brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 32dcad9 Raw
60 lines · plain
1// RUN: llvm-mc < %s -triple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r - | FileCheck %s2 3	.file	"<stdin>"4	.text5	.globl	test_jumptable6	.type	test_jumptable,@function7test_jumptable:                         // @test_jumptable8	.cfi_startproc9// %bb.0:10	ubfx	w1, w0, #0, #3211	cmp w0, #412	b.hi .LBB0_313// %bb.1:14	adrp	x0, .LJTI0_015	add	x0, x0, #:lo12:.LJTI0_016	ldr	x0, [x0, x1, lsl #3]17	br	x018.LBB0_2:                                // %lbl119	movz	x0, #120	ret21.LBB0_3:                                // %def22	mov	 x0, xzr23	ret24.LBB0_4:                                // %lbl225	movz	x0, #226	ret27.LBB0_5:                                // %lbl328	movz	x0, #429	ret30.LBB0_6:                                // %lbl431	movz	x0, #832	ret33.Ltmp0:34	.size	test_jumptable, .Ltmp0-test_jumptable35	.cfi_endproc36	.section	.rodata,"a",@progbits37	.align	338.LJTI0_0:39	.xword	.LBB0_240	.xword	.LBB0_441	.xword	.LBB0_542	.xword	.LBB0_343	.xword	.LBB0_644 45 46 47// First make sure we get a page/lo12 pair in .text to pick up the jump-table48 49// CHECK:      Relocations [50// CHECK:        Section ({{[0-9]+}}) .rela.text {51// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 .rodata52// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC .rodata53// CHECK:        }54 55// Also check the targets in .rodata are relocated56// CHECK:        Section ({{[0-9]+}}) .rela.rodata {57// CHECK-NEXT:     0x{{[0-9,A-F]+}} R_AARCH64_ABS64 .text58// CHECK:        }59// CHECK:      ]60