...
1// Copyright 2020 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5#include "textflag.h"
6
7TEXT ·asmAddFlags(SB),NOSPLIT,$0-24
8 MOVD x+0(FP), R0
9 MOVD y+8(FP), R1
10 CMN R0, R1
11 WORD $0xd53b4200 // MOVD NZCV, R0
12 MOVD R0, ret+16(FP)
13 RET
14
15TEXT ·asmSubFlags(SB),NOSPLIT,$0-24
16 MOVD x+0(FP), R0
17 MOVD y+8(FP), R1
18 CMP R1, R0
19 WORD $0xd53b4200 // MOVD NZCV, R0
20 MOVD R0, ret+16(FP)
21 RET
22
23TEXT ·asmAndFlags(SB),NOSPLIT,$0-24
24 MOVD x+0(FP), R0
25 MOVD y+8(FP), R1
26 TST R1, R0
27 WORD $0xd53b4200 // MOVD NZCV, R0
28 BIC $0x30000000, R0 // clear C, V bits, as TST does not change those flags
29 MOVD R0, ret+16(FP)
30 RET
View as plain text