conditional_inst.s
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
! RUN: llvm-mc -arch=lanai -show-encoding -show-inst < %s | FileCheck %s
.text
.align 4
.global jump1
bt %r5
! CHECK: encoding: [0xc1,0x00,0x2d,0x00]
! CHECK-NEXT: <MCInst #{{[0-9]+}} JR{{$}}
! CHECK-NEXT: <MCOperand Reg:12>>
! BR classes
bt 0x1234
! CHECK: encoding: [0xe0,0x00,0x12,0x34]
! CHECK-NEXT: <MCInst #{{[0-9]+}} BT{{$}}
! CHECK-NEXT: <MCOperand Imm:4660>
jump1:
blt 2000
! CHECK: encoding: [0xec,0x00,0x07,0xd1]
! CHECK-NEXT: <MCInst #{{[0-9]+}} BRCC{{$}}
! CHECK-NEXT: <MCOperand Imm:2000>
! CHECK-NEXT: <MCOperand Imm:13>
jump2:
blt jump1
! CHECK: encoding: [0b1110110A,A,A,0x01'A']
! CHECK-NEXT: fixup A - offset: 0, value: jump1, kind: FIXUP_LANAI_25
! CHECK-NEXT: <MCInst #{{[0-9]+}} BRCC{{$}}
! CHECK-NEXT: <MCOperand Expr:(jump1)>
! CHECK-NEXT: <MCOperand Imm:13>
bpl jump2
! CHECK: encoding: [0b1110101A,A,A,A]
! CHECK-NEXT: fixup A - offset: 0, value: jump2, kind: FIXUP_LANAI_25
! CHECK-NEXT: <MCInst #{{[0-9]+}} BRCC{{$}}
! CHECK-NEXT: <MCOperand Expr:(jump2)>
! CHECK-NEXT: <MCOperand Imm:10>
bt .
! CHECK: .Ltmp{{[0-9]+}}
! CHECK-NEXT: bt .Ltmp{{[0-9]+}}
! CHECK: encoding: [0b1110000A,A,A,A]
! CHECK-NEXT: fixup A - offset: 0, value: .Ltmp0, kind: FIXUP_LANAI_25
! CHECK-NEXT: <MCInst #{{[0-9]+}} BT{{$}}
! CHECK-NEXT: <MCOperand Expr:(.Ltmp0)>
! SCC
spl %r19
! CHECK: encoding: [0xea,0x4c,0x00,0x02]
! CHECK-NEXT: <MCInst #{{[0-9]+}} SCC{{$}}
! CHECK-NEXT: <MCOperand Reg:26>
! CHECK-NEXT: <MCOperand Imm:10>
! BRR
bf.r 0x456
! CHECK: encoding: [0xe1,0x00,0x04,0x57]
! CHECK-NEXT: <MCInst #{{[0-9]+}} BRR{{$}}
! CHECK-NEXT: <MCOperand Imm:1110>
! CHECK-NEXT: <MCOperand Imm:1>
! Conditional ALU
add.ge %r13, %r14, %r18
! CHECK: encoding: [0xc9,0x34,0x70,0x06]
! CHECK-NEXT: <MCInst #{{[0-9]+}} ADD_R
! CHECK-NEXT: <MCOperand Reg:25>
! CHECK-NEXT: <MCOperand Reg:20>
! CHECK-NEXT: <MCOperand Reg:21>
! CHECK-NEXT: <MCOperand Imm:12>>
add.f %r13, %r14, %r18
! CHECK: encoding: [0xc9,0x36,0x70,0x00]
! CHECK-NEXT: <MCInst #{{[0-9]+}} ADD_F_R
! CHECK-NEXT: <MCOperand Reg:25>
! CHECK-NEXT: <MCOperand Reg:20>
! CHECK-NEXT: <MCOperand Reg:21>
! CHECK-NEXT: <MCOperand Imm:0>>