mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[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
This commit is contained in:
parent
0ac606967a
commit
18b7d75488
@ -1073,11 +1073,15 @@ public:
|
||||
bool isConstantMemOff() const {
|
||||
return isMem() && isa<MCConstantExpr>(getMemOff());
|
||||
}
|
||||
// Allow relocation operators.
|
||||
// FIXME: This predicate and others need to look through binary expressions
|
||||
// and determine whether a Value is a constant or not.
|
||||
template <unsigned Bits, unsigned ShiftAmount = 0>
|
||||
bool isMemWithSimmOffset() const {
|
||||
return isMem() && isConstantMemOff() &&
|
||||
isShiftedInt<Bits, ShiftAmount>(getConstantMemOff()) &&
|
||||
getMemBase()->isGPRAsmReg();
|
||||
return isMem() && getMemBase()->isGPRAsmReg() &&
|
||||
(isa<MCTargetExpr>(getMemOff()) ||
|
||||
(isConstantMemOff() &&
|
||||
isShiftedInt<Bits, ShiftAmount>(getConstantMemOff())));
|
||||
}
|
||||
bool isMemWithGRPMM16Base() const {
|
||||
return isMem() && getMemBase()->isMM16AsmReg();
|
||||
|
@ -152,3 +152,24 @@ a:
|
||||
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
|
||||
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]
|
||||
swc1 $f0, %lo(g_8)($2) # CHECK: encoding: [0xe4,0x40,A,A]
|
||||
.type g_8,@object
|
||||
.comm g_8,16,16
|
||||
|
@ -178,3 +178,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
|
||||
|
@ -244,3 +244,34 @@ 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]
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -247,3 +247,27 @@ a:
|
||||
synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e]
|
||||
|
||||
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
|
||||
|
@ -247,3 +247,27 @@ a:
|
||||
synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e]
|
||||
|
||||
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
|
||||
|
@ -248,3 +248,27 @@ a:
|
||||
synci -15842($a2) # CHECK: synci -15842($6) # encoding: [0x04,0xdf,0xc2,0x1e]
|
||||
|
||||
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
|
||||
|
@ -200,3 +200,22 @@ 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]
|
||||
.type g_8,@object
|
||||
.comm g_8,16,16
|
||||
|
@ -273,3 +273,34 @@ 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]
|
||||
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
|
||||
|
@ -275,3 +275,34 @@ 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]
|
||||
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
|
||||
|
@ -294,3 +294,34 @@ 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]
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -321,3 +321,34 @@ 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
|
||||
|
@ -322,3 +322,34 @@ 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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user