11## Test relocations without specifiers. See also relocation-specifier.s for relocations with specifiers.
22# RUN: llvm-mc %s -triple=sparcv9 | FileCheck %s --check-prefix=ASM
33# RUN: llvm-mc %s -triple=sparcv9 -filetype=obj -o %t
4- # RUN: llvm-objdump -dr %t | FileCheck %s --check-prefix=OBJDUMP
4+ # RUN: llvm-objdump -Dr %t | FileCheck %s --check-prefix=OBJDUMP
55
66# ASM: call local
77# ASM: call local1
@@ -26,13 +26,50 @@ or %g1, (sym+4), %g3
2626
2727local:
2828
29+ # ASM: brz %g1, undef
30+ # ASM: brlz %g1, .Ltmp{{.}}-8
31+ # OBJDUMP: brz %g1, 0x0
32+ # OBJDUMP-NEXT: R_SPARC_WDISP16 undef
33+ # OBJDUMP-NEXT: brlz %g1, 0xfffe
34+ # OBJDUMP-NEXT: bg %icc, 0x0
35+ # OBJDUMP-NEXT: R_SPARC_WDISP19 undef
36+ # OBJDUMP-NEXT: bg %icc, 0x7fffe
37+ # OBJDUMP-NEXT: cbn 0x0
38+ # OBJDUMP-NEXT: R_SPARC_WDISP22 undef
39+ # OBJDUMP-NEXT: cbn 0x3ffffe
40+ brz %g1, undef
41+ brlz %g1, .-8
42+ bg %icc, undef
43+ bg %icc, .-8
44+ cbn undef
45+ cbn .-8
46+
2947.section .text1,"ax"
3048nop
3149local1:
3250
51+ # OBJDUMP-LABEL: .data:
52+ # OBJDUMP: 0: R_SPARC_32 .text1+0x8
53+ # OBJDUMP: 4: R_SPARC_DISP32 .text1+0x8
54+ # OBJDUMP: 8: R_SPARC_64 .text1+0x8
55+ # OBJDUMP: 10: R_SPARC_DISP64 .text1+0x8
3356.data
57+ .word local1+4
58+ .word local1+4 -.
59+ .xword local1+4
60+ .xword local1+4 -.
61+
62+ # OBJDUMP: 18: R_SPARC_8 .text1+0x8
63+ # OBJDUMP: 19: R_SPARC_DISP8 .text1+0x8
64+ # OBJDUMP: 1a: R_SPARC_16 .text1+0x8
65+ # OBJDUMP: 1c: R_SPARC_DISP16 .text1+0x8
66+ .byte local1+4
67+ .byte local1+4 -.
68+ .half local1+4
69+ .half local1+4 -.
70+
3471# This test needs to placed last in the file
35- # ASM: .half a-.Ltmp0
72+ # ASM: .half a-.Ltmp{{.}}{{$}}
3673.half a - .
3774.byte a - .
3875a:
0 commit comments