Skip to content

Commit

Permalink
Rework fix when x != dst
Browse files Browse the repository at this point in the history
  • Loading branch information
sydhds committed Jan 10, 2023
1 parent 9fbe6c5 commit eaab3cc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/compiler-singlepass/src/emitter_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,12 +909,10 @@ macro_rules! sse_round_fn {
|emitter: &mut AssemblerX64, precision: Precision, src1: XMM, src2: XMMOrMemory, dst: XMM| {
match src2 {
XMMOrMemory::XMM(x) => {
if src1 == x {
move_src_to_dst(emitter, precision, x, dst);
} else {
if x != dst {
move_src_to_dst(emitter, precision, src1, dst);
}
dynasm!(emitter ; $ins Rx((dst as u8)), Rx((dst as u8)), $mode)
dynasm!(emitter ; $ins Rx((x as u8)), Rx((dst as u8)), $mode)
}
XMMOrMemory::Memory(base, disp) => {
dynasm!(emitter ; $ins Rx((dst as u8)), [Rq((base as u8)) + disp], $mode)
Expand Down

0 comments on commit eaab3cc

Please sign in to comment.