Home | History | Annotate | Download | only in Mips
      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=mips-pc-linux -relocation-model=static
      6 
      7 	.text
      8 	.abicalls
      9 	.option	pic0
     10 	.section	.mdebug.abi32,"",@progbits
     11 	.file	"/home/espindola/llvm/llvm/test/MC/Mips/do_switch.ll"
     12 	.text
     13 	.globl	main
     14 	.align	2
     15 	.type	main,@function
     16 	.set	nomips16
     17 	.ent	main
     18 main:                                   # @main
     19 	.frame	$sp,8,$ra
     20 	.mask 	0x00000000,0
     21 	.fmask	0x00000000,0
     22 	.set	noreorder
     23 	.set	nomacro
     24 	.set	noat
     25 # BB#0:                                 # %entry
     26 	addiu	$sp, $sp, -8
     27 	addiu	$1, $zero, 2
     28 	sw	$1, 4($sp)
     29 	lw	$2, 4($sp)
     30 	sltiu	$1, $2, 4
     31 	bnez	$1, $BB0_2
     32 	nop
     33 $BB0_1:                                 # %bb4
     34 	addiu	$2, $zero, 4
     35 	jr	$ra
     36 	addiu	$sp, $sp, 8
     37 $BB0_2:                                 # %entry
     38 	sll	$1, $2, 2
     39 	lui	$2, %hi($JTI0_0)
     40 	addu	$1, $1, $2
     41 	lw	$1, %lo($JTI0_0)($1)
     42 	jr	$1
     43 	nop
     44 $BB0_3:                                 # %bb5
     45 	addiu	$2, $zero, 1
     46 	jr	$ra
     47 	addiu	$sp, $sp, 8
     48 $BB0_4:                                 # %bb1
     49 	addiu	$2, $zero, 2
     50 	jr	$ra
     51 	addiu	$sp, $sp, 8
     52 $BB0_5:                                 # %bb2
     53 	addiu	$2, $zero, 0
     54 	jr	$ra
     55 	addiu	$sp, $sp, 8
     56 $BB0_6:                                 # %bb3
     57 	addiu	$2, $zero, 3
     58 	jr	$ra
     59 	addiu	$sp, $sp, 8
     60 	.set	at
     61 	.set	macro
     62 	.set	reorder
     63 	.end	main
     64 $tmp0:
     65 	.size	main, ($tmp0)-main
     66 	.section	.rodata,"a",@progbits
     67 	.align	2
     68 $JTI0_0:
     69 	.4byte	($BB0_3)
     70 	.4byte	($BB0_4)
     71 	.4byte	($BB0_5)
     72 	.4byte	($BB0_6)
     73 
     74 
     75 	.text
     76