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// +build riscv64
6
7#include "textflag.h"
8
9// func testBEQZ(a int64) (r bool)
10TEXT ·testBEQZ(SB),NOSPLIT,$0-0
11 MOV a+0(FP), X5
12 MOV $1, X6
13 BEQZ X5, b
14 MOV $0, X6
15b:
16 MOV X6, r+8(FP)
17 RET
18
19// func testBGEZ(a int64) (r bool)
20TEXT ·testBGEZ(SB),NOSPLIT,$0-0
21 MOV a+0(FP), X5
22 MOV $1, X6
23 BGEZ X5, b
24 MOV $0, X6
25b:
26 MOV X6, r+8(FP)
27 RET
28
29// func testBGT(a, b int64) (r bool)
30TEXT ·testBGT(SB),NOSPLIT,$0-0
31 MOV a+0(FP), X5
32 MOV b+8(FP), X6
33 MOV $1, X7
34 BGT X5, X6, b
35 MOV $0, X7
36b:
37 MOV X7, r+16(FP)
38 RET
39
40// func testBGTU(a, b int64) (r bool)
41TEXT ·testBGTU(SB),NOSPLIT,$0-0
42 MOV a+0(FP), X5
43 MOV b+8(FP), X6
44 MOV $1, X7
45 BGTU X5, X6, b
46 MOV $0, X7
47b:
48 MOV X7, r+16(FP)
49 RET
50
51// func testBGTZ(a int64) (r bool)
52TEXT ·testBGTZ(SB),NOSPLIT,$0-0
53 MOV a+0(FP), X5
54 MOV $1, X6
55 BGTZ X5, b
56 MOV $0, X6
57b:
58 MOV X6, r+8(FP)
59 RET
60
61// func testBLE(a, b int64) (r bool)
62TEXT ·testBLE(SB),NOSPLIT,$0-0
63 MOV a+0(FP), X5
64 MOV b+8(FP), X6
65 MOV $1, X7
66 BLE X5, X6, b
67 MOV $0, X7
68b:
69 MOV X7, r+16(FP)
70 RET
71
72// func testBLEU(a, b int64) (r bool)
73TEXT ·testBLEU(SB),NOSPLIT,$0-0
74 MOV a+0(FP), X5
75 MOV b+8(FP), X6
76 MOV $1, X7
77 BLEU X5, X6, b
78 MOV $0, X7
79b:
80 MOV X7, r+16(FP)
81 RET
82
83// func testBLEZ(a int64) (r bool)
84TEXT ·testBLEZ(SB),NOSPLIT,$0-0
85 MOV a+0(FP), X5
86 MOV $1, X6
87 BLEZ X5, b
88 MOV $0, X6
89b:
90 MOV X6, r+8(FP)
91 RET
92
93// func testBLTZ(a int64) (r bool)
94TEXT ·testBLTZ(SB),NOSPLIT,$0-0
95 MOV a+0(FP), X5
96 MOV $1, X6
97 BLTZ X5, b
98 MOV $0, X6
99b:
100 MOV X6, r+8(FP)
101 RET
102
103// func testBNEZ(a int64) (r bool)
104TEXT ·testBNEZ(SB),NOSPLIT,$0-0
105 MOV a+0(FP), X5
106 MOV $1, X6
107 BNEZ X5, b
108 MOV $0, X6
109b:
110 MOV X6, r+8(FP)
111 RET
View as plain text