mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
[mips] Allow dsubu to take an immediate as an alias for dsubiu.
Summary: Patch by David Chisnall His work was sponsored by: DARPA, AFRL Differential Revision: http://llvm-reviews.chandlerc.com/D3155 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
38a80e9b21
commit
eaae583095
@ -403,6 +403,9 @@ def DSUBi : MipsInst<(outs GPR64Opnd: $rt), (ins GPR64Opnd: $rs, simm16_64: $imm
|
|||||||
def DSUBiu : MipsInst<(outs GPR64Opnd: $rt), (ins GPR64Opnd: $rs, simm16_64: $imm),
|
def DSUBiu : MipsInst<(outs GPR64Opnd: $rt), (ins GPR64Opnd: $rs, simm16_64: $imm),
|
||||||
"ssubu\t$rt, $rs, $imm", [], II_DSUB, Pseudo>;
|
"ssubu\t$rt, $rs, $imm", [], II_DSUB, Pseudo>;
|
||||||
}
|
}
|
||||||
|
def : InstAlias<"dsubu $rt, $rs, $imm",
|
||||||
|
(DSUBiu GPR64Opnd:$rt, GPR64Opnd:$rs, simm16_64: $imm),
|
||||||
|
0>;
|
||||||
def : InstAlias<"sub $rs, $imm",
|
def : InstAlias<"sub $rs, $imm",
|
||||||
(SUBi GPR32Opnd:$rs, GPR32Opnd:$rs, simm16:$imm),
|
(SUBi GPR32Opnd:$rs, GPR32Opnd:$rs, simm16:$imm),
|
||||||
0>;
|
0>;
|
||||||
|
@ -83,6 +83,7 @@
|
|||||||
# CHECK: multu $3, $5 # encoding: [0x19,0x00,0x65,0x00]
|
# CHECK: multu $3, $5 # encoding: [0x19,0x00,0x65,0x00]
|
||||||
# CHECK: dsub $9, $6, $7 # encoding: [0x2e,0x48,0xc7,0x00]
|
# CHECK: dsub $9, $6, $7 # encoding: [0x2e,0x48,0xc7,0x00]
|
||||||
# CHECK: dsubu $4, $3, $5 # encoding: [0x2f,0x20,0x65,0x00]
|
# CHECK: dsubu $4, $3, $5 # encoding: [0x2f,0x20,0x65,0x00]
|
||||||
|
# CHECK: daddiu $9, $6, -17767 # encoding: [0x99,0xba,0xc9,0x64]
|
||||||
# CHECK: move $7, $8 # encoding: [0x2d,0x38,0x00,0x01]
|
# CHECK: move $7, $8 # encoding: [0x2d,0x38,0x00,0x01]
|
||||||
# CHECK: .set push
|
# CHECK: .set push
|
||||||
# CHECK: .set mips32r2
|
# CHECK: .set mips32r2
|
||||||
@ -107,6 +108,7 @@
|
|||||||
multu $3,$5
|
multu $3,$5
|
||||||
dsub $9,$6,$7
|
dsub $9,$6,$7
|
||||||
dsubu $4,$3,$5
|
dsubu $4,$3,$5
|
||||||
|
dsubu $9,$6,17767
|
||||||
move $7,$8
|
move $7,$8
|
||||||
rdhwr $5, $29
|
rdhwr $5, $29
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user