mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Don't allocate another register when it's safe to reuse dst.
This commit is contained in:
parent
b75e5c0c7c
commit
0f712c90ab
@ -2836,16 +2836,18 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
|
||||
Location::GPR(GPR::RDX),
|
||||
),
|
||||
};
|
||||
|
||||
// TODO: we can skip this when dst is an XMM reg.
|
||||
let tmp_xmm = if src1 == XMM::XMM0 {
|
||||
if src2 == XMMOrMemory::XMM(XMM::XMM1) {
|
||||
XMM::XMM2
|
||||
} else {
|
||||
XMM::XMM1
|
||||
}
|
||||
let tmp_xmm = if dst != src1 && XMMOrMemory::XMM(dst) != src2 {
|
||||
dst
|
||||
} else {
|
||||
XMM::XMM0
|
||||
if src1 == XMM::XMM0 {
|
||||
if src2 == XMMOrMemory::XMM(XMM::XMM1) {
|
||||
XMM::XMM2
|
||||
} else {
|
||||
XMM::XMM1
|
||||
}
|
||||
} else {
|
||||
XMM::XMM0
|
||||
}
|
||||
};
|
||||
match src2 {
|
||||
XMMOrMemory::XMM(x) => {
|
||||
|
Loading…
Reference in New Issue
Block a user