• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This test case will cause an internal EK_GPRel64BlockAddress to be
2// produced. This was not handled for direct object and an assertion
3// to occur. This is a variation on test case test/CodeGen/Mips/do_switch.ll
4
5// RUN: llvm-mc < %s -filetype=obj -triple=mips64-pc-linux -mcpu=mips64 -target-abi=n64
6
7	.text
8	.abicalls
9	.section	.mdebug.abi64,"",@progbits
10	.file	"/home/espindola/llvm/llvm/test/MC/Mips/do_switch.ll"
11	.text
12	.globl	main
13	.align	3
14	.type	main,@function
15	.set	nomips16
16	.ent	main
17main:                                   # @main
18	.frame	$sp,16,$ra
19	.mask 	0x00000000,0
20	.fmask	0x00000000,0
21	.set	noreorder
22	.set	nomacro
23	.set	noat
24# %bb.0:                                # %entry
25	daddiu	$sp, $sp, -16
26	lui	$1, %hi(%neg(%gp_rel(main)))
27	daddu	$2, $1, $25
28	addiu	$1, $zero, 2
29	sw	$1, 12($sp)
30	lw	$1, 12($sp)
31	sltiu	$4, $1, 4
32	dsll	$3, $1, 32
33	bnez	$4, $BB0_2
34	nop
35$BB0_1:                                 # %bb4
36	addiu	$2, $zero, 4
37	jr	$ra
38	daddiu	$sp, $sp, 16
39$BB0_2:                                 # %entry
40	daddiu	$1, $2, %lo(%neg(%gp_rel(main)))
41	dsrl	$2, $3, 32
42	daddiu	$3, $zero, 8
43	dmult	$2, $3
44	mflo	$2
45	ld	$3, %got_page($JTI0_0)($1)
46	daddu	$2, $2, $3
47	ld	$2, %got_ofst($JTI0_0)($2)
48	daddu	$1, $2, $1
49	jr	$1
50	nop
51$BB0_3:                                 # %bb5
52	addiu	$2, $zero, 1
53	jr	$ra
54	daddiu	$sp, $sp, 16
55$BB0_4:                                 # %bb1
56	addiu	$2, $zero, 2
57	jr	$ra
58	daddiu	$sp, $sp, 16
59$BB0_5:                                 # %bb2
60	addiu	$2, $zero, 0
61	jr	$ra
62	daddiu	$sp, $sp, 16
63$BB0_6:                                 # %bb3
64	addiu	$2, $zero, 3
65	jr	$ra
66	daddiu	$sp, $sp, 16
67	.set	at
68	.set	macro
69	.set	reorder
70	.end	main
71$tmp0:
72	.size	main, ($tmp0)-main
73	.section	.rodata,"a",@progbits
74	.align	3
75$JTI0_0:
76	.gpdword	($BB0_3)
77	.gpdword	($BB0_4)
78	.gpdword	($BB0_5)
79	.gpdword	($BB0_6)
80
81
82	.text
83