diff options
author | Simon Dardis <simon.dardis@imgtec.com> | 2016-05-27 13:56:36 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@imgtec.com> | 2016-05-27 13:56:36 +0000 |
commit | bba655e896f2826511967e55b2ee859749b247ad (patch) | |
tree | eb403849a838c43528652cabdd747dafda32cd2c /test/MC/Mips/mips64r2 | |
parent | ceb0f307b3ac11aad61242d75215db1234b4b3b7 (diff) |
[mips] Weaken asm predicate for memory offsets
The isMemWithSimmOffset predicate rejects relocations which is incorrect
behaviour. Linkers and other tools should handle|warn|error when the
field overflows.
Reviewers: dsanders, vkalintiris
Differential Revision: http://reviews.llvm.org/D20727
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/Mips/mips64r2')
-rw-r--r-- | test/MC/Mips/mips64r2/valid.s | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/MC/Mips/mips64r2/valid.s b/test/MC/Mips/mips64r2/valid.s index a7af903a9d48..5ae3adc46eb9 100644 --- a/test/MC/Mips/mips64r2/valid.s +++ b/test/MC/Mips/mips64r2/valid.s @@ -321,3 +321,35 @@ a: wsbh $k1,$9 1: + + # Check that we accept traditional %relocation(symbol) offsets for stores + # and loads, not just a sign 16 bit offset. + + lui $2, %hi(g_8) # CHECK: encoding: [0x3c,0x02,A,A] + lb $3, %lo(g_8)($2) # CHECK: encoding: [0x80,0x43,A,A] + lh $3, %lo(g_8)($2) # CHECK: encoding: [0x84,0x43,A,A] + lhu $3, %lo(g_8)($2) # CHECK: encoding: [0x94,0x43,A,A] + lw $3, %lo(g_8)($2) # CHECK: encoding: [0x8c,0x43,A,A] + sb $3, %lo(g_8)($2) # CHECK: encoding: [0xa0,0x43,A,A] + sh $3, %lo(g_8)($2) # CHECK: encoding: [0xa4,0x43,A,A] + sw $3, %lo(g_8)($2) # CHECK: encoding: [0xac,0x43,A,A] + + lwl $3, %lo(g_8)($2) # CHECK: encoding: [0x88,0x43,A,A] + lwr $3, %lo(g_8)($2) # CHECK: encoding: [0x98,0x43,A,A] + swl $3, %lo(g_8)($2) # CHECK: encoding: [0xa8,0x43,A,A] + swr $3, %lo(g_8)($2) # CHECK: encoding: [0xb8,0x43,A,A] + + lwc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xc4,0x40,A,A] + ldc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xd4,0x40,A,A] + swc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xe4,0x40,A,A] + sdc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xf4,0x40,A,A] + + lwu $3, %lo(g_8)($2) # CHECK: encoding: [0x9c,0x43,A,A] + ld $3, %lo(g_8)($2) # CHECK: encoding: [0xdc,0x43,A,A] + sd $3, %lo(g_8)($2) # CHECK: encoding: [0xfc,0x43,A,A] + ldl $3, %lo(g_8)($2) # CHECK: encoding: [0x68,0x43,A,A] + ldr $3, %lo(g_8)($2) # CHECK: encoding: [0x6c,0x43,A,A] + sdl $3, %lo(g_8)($2) # CHECK: encoding: [0xb0,0x43,A,A] + sdr $3, %lo(g_8)($2) # CHECK: encoding: [0xb4,0x43,A,A] + .type g_8,@object + .comm g_8,16,16 |