1 ! RUN: llvm-mc %s -arch=sparcv9 -show-encoding | FileCheck %s 2 ! RUN: llvm-mc %s -arch=sparcv9 -filetype=obj | llvm-readobj -r | FileCheck %s --check-prefix=CHECK-OBJ 3 4 ! CHECK-OBJ: Format: ELF64-sparc 5 ! CHECK-OBJ: Relocations [ 6 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_WDISP30 foo 7 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_LO10 sym 8 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_HI22 sym 9 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_H44 sym 10 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_M44 sym 11 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_L44 sym 12 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_HH22 sym 13 ! CHECK-OBJ: 0x{{[0-9,A-F]+}} R_SPARC_HM10 sym 14 ! CHECK-ELF: ] 15 16 ! CHECK: call foo ! encoding: [0b01AAAAAA,A,A,A] 17 ! CHECK: ! fixup A - offset: 0, value: foo, kind: fixup_sparc_call30 18 call foo 19 20 ! CHECK: or %g1, %lo(sym), %g3 ! encoding: [0x86,0x10,0b011000AA,A] 21 ! CHECK-NEXT: ! fixup A - offset: 0, value: %lo(sym), kind: fixup_sparc_lo10 22 or %g1, %lo(sym), %g3 23 24 ! CHECK: sethi %hi(sym), %l0 ! encoding: [0x21,0b00AAAAAA,A,A] 25 ! CHECK-NEXT: ! fixup A - offset: 0, value: %hi(sym), kind: fixup_sparc_hi22 26 sethi %hi(sym), %l0 27 28 ! CHECK: sethi %h44(sym), %l0 ! encoding: [0x21,0b00AAAAAA,A,A] 29 ! CHECK-NEXT: ! fixup A - offset: 0, value: %h44(sym), kind: fixup_sparc_h44 30 sethi %h44(sym), %l0 31 32 ! CHECK: or %g1, %m44(sym), %g3 ! encoding: [0x86,0x10,0b011000AA,A] 33 ! CHECK-NEXT: ! fixup A - offset: 0, value: %m44(sym), kind: fixup_sparc_m44 34 or %g1, %m44(sym), %g3 35 36 ! CHECK: or %g1, %l44(sym), %g3 ! encoding: [0x86,0x10,0b0110AAAA,A] 37 ! CHECK-NEXT: ! fixup A - offset: 0, value: %l44(sym), kind: fixup_sparc_l44 38 or %g1, %l44(sym), %g3 39 40 ! CHECK: sethi %hh(sym), %l0 ! encoding: [0x21,0b00AAAAAA,A,A] 41 ! CHECK-NEXT: ! fixup A - offset: 0, value: %hh(sym), kind: fixup_sparc_hh 42 sethi %hh(sym), %l0 43 44 ! CHECK: or %g1, %hm(sym), %g3 ! encoding: [0x86,0x10,0b011000AA,A] 45 ! CHECK-NEXT: ! fixup A - offset: 0, value: %hm(sym), kind: fixup_sparc_hm 46 or %g1, %hm(sym), %g3 47