Skip to content

Commit

Permalink
[fix]: Added assert guard in SSE support against the case that src2 =…
Browse files Browse the repository at this point in the history
…= dst
  • Loading branch information
batconjurer committed Feb 11, 2022
1 parent 6090608 commit c023998
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/compiler-singlepass/src/emitter_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ macro_rules! sse_fn {
|emitter: &mut AssemblerX64, precision: Precision, src1: XMM, src2: XMMOrMemory, dst: XMM| {
match src2 {
XMMOrMemory::XMM(x) => {
assert_ne!(x, dst);
move_src_to_dst(emitter, precision, src1, dst);
dynasm!(emitter ; $ins Rx((dst as u8)), Rx((x as u8)))
}
Expand Down

0 comments on commit c023998

Please sign in to comment.