X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=gas%2Ftestsuite%2Fgas%2Fmips%2Felf-rel8-mips16.s;fp=gas%2Ftestsuite%2Fgas%2Fmips%2Felf-rel8-mips16.s;h=0c9eefe652fbb6411bced0de3c4a6404361bc970;hp=0000000000000000000000000000000000000000;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/gas/testsuite/gas/mips/elf-rel8-mips16.s b/gas/testsuite/gas/mips/elf-rel8-mips16.s new file mode 100644 index 0000000..0c9eefe --- /dev/null +++ b/gas/testsuite/gas/mips/elf-rel8-mips16.s @@ -0,0 +1,39 @@ + .equ $fprel, 2 + .set mips16 + + .ent foo +foo: + move $2,$gp + + # Test various forms of relocation syntax. + + li $4,(%hi gvar) + sll $4,16 + addiu $4,(%lo (gvar)) + lw $4,%lo gvar($5) + + # Check that registers aren't confused with $ identifiers. + + lw $4,($fprel)($17) + + # Check various forms of paired relocations. + + lw $4,%got(lvar)($2) + sb $5,%lo(lvar)($4) + + lw $4,%got(lvar)($2) + addiu $4,%lo(lvar) + + # Check individual relocations. + + lw $3,%call16(gfunc)($2) + addiu $4,%call16(gfunc) + + lw $4,%gprel(gvar)($2) + sw $4,%gprel(gvar)($2) + addiu $4,%gprel(gvar) + .align 6 + .end foo + + .data +lvar: .word 1,2