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