1*9880d681SAndroid Build Coastguard Worker// This test case will cause an internal EK_GPRel64BlockAddress to be 2*9880d681SAndroid Build Coastguard Worker// produced. This was not handled for direct object and an assertion 3*9880d681SAndroid Build Coastguard Worker// to occur. This is a variation on test case test/CodeGen/Mips/do_switch.ll 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc < %s -filetype=obj -triple=mips-pc-linux 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker .text 8*9880d681SAndroid Build Coastguard Worker .abicalls 9*9880d681SAndroid Build Coastguard Worker .option pic0 10*9880d681SAndroid Build Coastguard Worker .section .mdebug.abi32,"",@progbits 11*9880d681SAndroid Build Coastguard Worker .file "/home/espindola/llvm/llvm/test/MC/Mips/do_switch.ll" 12*9880d681SAndroid Build Coastguard Worker .text 13*9880d681SAndroid Build Coastguard Worker .globl main 14*9880d681SAndroid Build Coastguard Worker .align 2 15*9880d681SAndroid Build Coastguard Worker .type main,@function 16*9880d681SAndroid Build Coastguard Worker .set nomips16 17*9880d681SAndroid Build Coastguard Worker .ent main 18*9880d681SAndroid Build Coastguard Workermain: # @main 19*9880d681SAndroid Build Coastguard Worker .frame $sp,8,$ra 20*9880d681SAndroid Build Coastguard Worker .mask 0x00000000,0 21*9880d681SAndroid Build Coastguard Worker .fmask 0x00000000,0 22*9880d681SAndroid Build Coastguard Worker .set noreorder 23*9880d681SAndroid Build Coastguard Worker .set nomacro 24*9880d681SAndroid Build Coastguard Worker .set noat 25*9880d681SAndroid Build Coastguard Worker# BB#0: # %entry 26*9880d681SAndroid Build Coastguard Worker addiu $sp, $sp, -8 27*9880d681SAndroid Build Coastguard Worker addiu $1, $zero, 2 28*9880d681SAndroid Build Coastguard Worker sw $1, 4($sp) 29*9880d681SAndroid Build Coastguard Worker lw $2, 4($sp) 30*9880d681SAndroid Build Coastguard Worker sltiu $1, $2, 4 31*9880d681SAndroid Build Coastguard Worker bnez $1, $BB0_2 32*9880d681SAndroid Build Coastguard Worker nop 33*9880d681SAndroid Build Coastguard Worker$BB0_1: # %bb4 34*9880d681SAndroid Build Coastguard Worker addiu $2, $zero, 4 35*9880d681SAndroid Build Coastguard Worker jr $ra 36*9880d681SAndroid Build Coastguard Worker addiu $sp, $sp, 8 37*9880d681SAndroid Build Coastguard Worker$BB0_2: # %entry 38*9880d681SAndroid Build Coastguard Worker sll $1, $2, 2 39*9880d681SAndroid Build Coastguard Worker lui $2, %hi($JTI0_0) 40*9880d681SAndroid Build Coastguard Worker addu $1, $1, $2 41*9880d681SAndroid Build Coastguard Worker lw $1, %lo($JTI0_0)($1) 42*9880d681SAndroid Build Coastguard Worker jr $1 43*9880d681SAndroid Build Coastguard Worker nop 44*9880d681SAndroid Build Coastguard Worker$BB0_3: # %bb5 45*9880d681SAndroid Build Coastguard Worker addiu $2, $zero, 1 46*9880d681SAndroid Build Coastguard Worker jr $ra 47*9880d681SAndroid Build Coastguard Worker addiu $sp, $sp, 8 48*9880d681SAndroid Build Coastguard Worker$BB0_4: # %bb1 49*9880d681SAndroid Build Coastguard Worker addiu $2, $zero, 2 50*9880d681SAndroid Build Coastguard Worker jr $ra 51*9880d681SAndroid Build Coastguard Worker addiu $sp, $sp, 8 52*9880d681SAndroid Build Coastguard Worker$BB0_5: # %bb2 53*9880d681SAndroid Build Coastguard Worker addiu $2, $zero, 0 54*9880d681SAndroid Build Coastguard Worker jr $ra 55*9880d681SAndroid Build Coastguard Worker addiu $sp, $sp, 8 56*9880d681SAndroid Build Coastguard Worker$BB0_6: # %bb3 57*9880d681SAndroid Build Coastguard Worker addiu $2, $zero, 3 58*9880d681SAndroid Build Coastguard Worker jr $ra 59*9880d681SAndroid Build Coastguard Worker addiu $sp, $sp, 8 60*9880d681SAndroid Build Coastguard Worker .set at 61*9880d681SAndroid Build Coastguard Worker .set macro 62*9880d681SAndroid Build Coastguard Worker .set reorder 63*9880d681SAndroid Build Coastguard Worker .end main 64*9880d681SAndroid Build Coastguard Worker$tmp0: 65*9880d681SAndroid Build Coastguard Worker .size main, ($tmp0)-main 66*9880d681SAndroid Build Coastguard Worker .section .rodata,"a",@progbits 67*9880d681SAndroid Build Coastguard Worker .align 2 68*9880d681SAndroid Build Coastguard Worker$JTI0_0: 69*9880d681SAndroid Build Coastguard Worker .4byte ($BB0_3) 70*9880d681SAndroid Build Coastguard Worker .4byte ($BB0_4) 71*9880d681SAndroid Build Coastguard Worker .4byte ($BB0_5) 72*9880d681SAndroid Build Coastguard Worker .4byte ($BB0_6) 73*9880d681SAndroid Build Coastguard Worker 74*9880d681SAndroid Build Coastguard Worker 75*9880d681SAndroid Build Coastguard Worker .text 76