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 | 4ccda502d5c63e13e5f6777cfc1570b5d585b841 (patch) | |
tree | 2134491f3f707197386978c64856a641ed661802 /llvm/test/MC/Mips/mips32/valid.s | |
parent | 2e018efa9be05c7dc30bc816e9db8b49a2791405 (diff) | |
download | bcm5719-llvm-4ccda502d5c63e13e5f6777cfc1570b5d585b841.tar.gz bcm5719-llvm-4ccda502d5c63e13e5f6777cfc1570b5d585b841.zip |
[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
llvm-svn: 270995
Diffstat (limited to 'llvm/test/MC/Mips/mips32/valid.s')
-rw-r--r-- | llvm/test/MC/Mips/mips32/valid.s | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/mips32/valid.s b/llvm/test/MC/Mips/mips32/valid.s index 6328e56830f..53d08df04af 100644 --- a/llvm/test/MC/Mips/mips32/valid.s +++ b/llvm/test/MC/Mips/mips32/valid.s @@ -208,3 +208,27 @@ a: xor $2, 4 # CHECK: xori $2, $2, 4 # encoding: [0x38,0x42,0x00,0x04] 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] + .type g_8,@object + .comm g_8,16,16 |