Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove assert in sse_round_fn and handle case where src2 is in memory #3465

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lib/compiler-singlepass/src/emitter_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,14 @@ macro_rules! sse_round_fn {
|emitter: &mut AssemblerX64, precision: Precision, src1: XMM, src2: XMMOrMemory, dst: XMM| {
match src2 {
XMMOrMemory::XMM(x) => {
assert_eq!(src1, x);
move_src_to_dst(emitter, precision, src1, dst);
dynasm!(emitter ; $ins Rx((dst as u8)), Rx((dst as u8)), $mode)
if x != dst {
move_src_to_dst(emitter, precision, src1, dst);
}
dynasm!(emitter ; $ins Rx((x as u8)), Rx((dst as u8)), $mode)
}
XMMOrMemory::Memory(..) => unreachable!(),
XMMOrMemory::Memory(base, disp) => {
dynasm!(emitter ; $ins Rx((dst as u8)), [Rq((base as u8)) + disp], $mode)
},
}
}
}
Expand Down