mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Encode the flag results in an auxint field instead of having one opcode per flag state. This helps us handle the new *noov branches in a unified manner. This is only for arm, arm64 is in a subsequent CL. We could extend to other architectures as well, athough it would only be cleanup, no behavioral change. Update #39505 Change-Id: Ia46cea596faad540d1496c5915ab1274571543f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/238077 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
31 lines
550 B
ArmAsm
31 lines
550 B
ArmAsm
// Copyright 2020 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build amd64
|
|
|
|
#include "textflag.h"
|
|
|
|
TEXT ·asmAddFlags(SB),NOSPLIT,$0-24
|
|
MOVQ x+0(FP), AX
|
|
ADDQ y+8(FP), AX
|
|
PUSHFQ
|
|
POPQ AX
|
|
MOVQ AX, ret+16(FP)
|
|
RET
|
|
|
|
TEXT ·asmSubFlags(SB),NOSPLIT,$0-24
|
|
MOVQ x+0(FP), AX
|
|
SUBQ y+8(FP), AX
|
|
PUSHFQ
|
|
POPQ AX
|
|
MOVQ AX, ret+16(FP)
|
|
RET
|
|
|
|
TEXT ·asmAndFlags(SB),NOSPLIT,$0-24
|
|
MOVQ x+0(FP), AX
|
|
ANDQ y+8(FP), AX
|
|
PUSHFQ
|
|
POPQ AX
|
|
MOVQ AX, ret+16(FP)
|
|
RET
|