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