aarch64: Implement isub for i128 operands
This commit is contained in:
@@ -601,6 +601,8 @@ impl MachInstEmit for Inst {
|
||||
ALUOp::Adc64 => 0b10011010_000,
|
||||
ALUOp::Sub32 => 0b01001011_000,
|
||||
ALUOp::Sub64 => 0b11001011_000,
|
||||
ALUOp::Sbc32 => 0b01011010_000,
|
||||
ALUOp::Sbc64 => 0b11011010_000,
|
||||
ALUOp::Orr32 => 0b00101010_000,
|
||||
ALUOp::Orr64 => 0b10101010_000,
|
||||
ALUOp::And32 => 0b00001010_000,
|
||||
|
||||
@@ -90,6 +90,27 @@ fn test_aarch64_binemit() {
|
||||
"A40006CB",
|
||||
"sub x4, x5, x6",
|
||||
));
|
||||
insns.push((
|
||||
Inst::AluRRR {
|
||||
alu_op: ALUOp::Sbc32,
|
||||
rd: writable_xreg(1),
|
||||
rn: xreg(2),
|
||||
rm: xreg(3),
|
||||
},
|
||||
"4100035A",
|
||||
"sbc w1, w2, w3",
|
||||
));
|
||||
insns.push((
|
||||
Inst::AluRRR {
|
||||
alu_op: ALUOp::Sbc64,
|
||||
rd: writable_xreg(4),
|
||||
rn: xreg(5),
|
||||
rm: xreg(6),
|
||||
},
|
||||
"A40006DA",
|
||||
"sbc x4, x5, x6",
|
||||
));
|
||||
|
||||
insns.push((
|
||||
Inst::AluRRR {
|
||||
alu_op: ALUOp::Orr32,
|
||||
|
||||
@@ -87,6 +87,9 @@ pub enum ALUOp {
|
||||
/// Add with carry
|
||||
Adc32,
|
||||
Adc64,
|
||||
/// Subtract with carry
|
||||
Sbc32,
|
||||
Sbc64,
|
||||
}
|
||||
|
||||
/// An ALU operation with three arguments.
|
||||
@@ -3209,6 +3212,8 @@ impl Inst {
|
||||
ALUOp::Lsl64 => ("lsl", OperandSize::Size64),
|
||||
ALUOp::Adc32 => ("adc", OperandSize::Size32),
|
||||
ALUOp::Adc64 => ("adc", OperandSize::Size64),
|
||||
ALUOp::Sbc32 => ("sbc", OperandSize::Size32),
|
||||
ALUOp::Sbc64 => ("sbc", OperandSize::Size64),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user