1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -filetype=obj -triple mips-unknown-linux -mattr=+micromips < %s \ 2*9880d681SAndroid Build Coastguard Worker// RUN: | llvm-readobj -sections -section-data \ 3*9880d681SAndroid Build Coastguard Worker// RUN: | FileCheck -check-prefix=DATA %s 4*9880d681SAndroid Build Coastguard Worker// 5*9880d681SAndroid Build Coastguard Worker// XFAIL: * 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker// Please merge this with relocation.s when it passes. 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker// baz is equivalent to .text+0x8 and is recorded in the symbol table as such 10*9880d681SAndroid Build Coastguard Worker// but it refers to microMIPS code so the addend must indicate this in the LSB. 11*9880d681SAndroid Build Coastguard Worker// The addend must therefore be 0x9. 12*9880d681SAndroid Build Coastguard Worker// DATA-LABEL: Name: .text 13*9880d681SAndroid Build Coastguard Worker// DATA: SectionData ( 14*9880d681SAndroid Build Coastguard Worker// DATA: 0000: 30430000 30420009 30430000 30420009 15*9880d681SAndroid Build Coastguard Worker addiu $2, $3, %got(baz) 16*9880d681SAndroid Build Coastguard Worker addiu $2, $2, %lo(baz) 17*9880d681SAndroid Build Coastguard Workerbaz: 18*9880d681SAndroid Build Coastguard Worker addiu $2, $3, %hi(baz) 19*9880d681SAndroid Build Coastguard Worker addiu $2, $2, %lo(baz) 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Worker// DATA-LABEL: Name: .data 22*9880d681SAndroid Build Coastguard Worker// DATA: SectionData ( 23*9880d681SAndroid Build Coastguard Worker .data 24*9880d681SAndroid Build Coastguard Worker .word 0 25*9880d681SAndroid Build Coastguard Workerbar: 26*9880d681SAndroid Build Coastguard Worker .word 1 27*9880d681SAndroid Build Coastguard Worker// baz is equivalent to .text+0x8 and is recorded in the symbol table as such 28*9880d681SAndroid Build Coastguard Worker// but it refers to microMIPS code so the addend must indicate this in the LSB. 29*9880d681SAndroid Build Coastguard Worker// The addend must therefore be 0x9. 30*9880d681SAndroid Build Coastguard Worker// DATA: 0000: 00000000 00000001 00000009 31*9880d681SAndroid Build Coastguard Worker .gpword baz 32