mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Merge #550
550: Fix singlepass compilation error with `imul` instruction. r=losfair a=losfair Co-authored-by: losfair <zhy20000919@hotmail.com>
This commit is contained in:
commit
bd2a082a78
@ -641,6 +641,13 @@ impl X64FunctionCode {
|
|||||||
BothToGPR,
|
BothToGPR,
|
||||||
}
|
}
|
||||||
let mode = match (src, dst) {
|
let mode = match (src, dst) {
|
||||||
|
(Location::GPR(_), Location::GPR(_))
|
||||||
|
if (op as *const u8 == Assembler::emit_imul as *const u8) =>
|
||||||
|
{
|
||||||
|
RelaxMode::Direct
|
||||||
|
}
|
||||||
|
_ if (op as *const u8 == Assembler::emit_imul as *const u8) => RelaxMode::BothToGPR,
|
||||||
|
|
||||||
(Location::Memory(_, _), Location::Memory(_, _)) => RelaxMode::SrcToGPR,
|
(Location::Memory(_, _), Location::Memory(_, _)) => RelaxMode::SrcToGPR,
|
||||||
(Location::Imm64(_), Location::Imm64(_)) | (Location::Imm64(_), Location::Imm32(_)) => {
|
(Location::Imm64(_), Location::Imm64(_)) | (Location::Imm64(_), Location::Imm32(_)) => {
|
||||||
RelaxMode::BothToGPR
|
RelaxMode::BothToGPR
|
||||||
@ -653,7 +660,6 @@ impl X64FunctionCode {
|
|||||||
RelaxMode::SrcToGPR
|
RelaxMode::SrcToGPR
|
||||||
}
|
}
|
||||||
(_, Location::XMM(_)) => RelaxMode::SrcToGPR,
|
(_, Location::XMM(_)) => RelaxMode::SrcToGPR,
|
||||||
_ if (op as *const u8 == Assembler::emit_imul as *const u8) => RelaxMode::BothToGPR, // TODO: optimize this
|
|
||||||
_ => RelaxMode::Direct,
|
_ => RelaxMode::Direct,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user