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 authored and sydhds committed Jan 12, 2023
1 parent 19bbdd3 commit 675cf17
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 675cf17

Please sign in to comment.