aboutsummaryrefslogtreecommitdiff
path: root/test/MC/Mips/mips64r6
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2016-05-27 13:56:36 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2016-05-27 13:56:36 +0000
commitbba655e896f2826511967e55b2ee859749b247ad (patch)
treeeb403849a838c43528652cabdd747dafda32cd2c /test/MC/Mips/mips64r6
parentceb0f307b3ac11aad61242d75215db1234b4b3b7 (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/mips64r6')
-rw-r--r--test/MC/Mips/mips64r6/valid.s22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/MC/Mips/mips64r6/valid.s b/test/MC/Mips/mips64r6/valid.s
index 53107ceb321..377316863e3 100644
--- a/test/MC/Mips/mips64r6/valid.s
+++ b/test/MC/Mips/mips64r6/valid.s
@@ -225,3 +225,25 @@ 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]
+
+ 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]
+ .type g_8,@object
+ .comm g_8,16,16