Skip to content

Commit

Permalink
SSE Comparison instructions (rust-lang#111)
Browse files Browse the repository at this point in the history
* Add _mm_cmp*_ps variant (SSE)

* Add _mm_comi{eq,lt,le,gt,ge,neq}_ss instructions (sse)

* Add _mm_ucomi*_ss instructions SSE

They all compile down to the same x86 instruction, UCOMISS, whereas the
_mm_comi*_ss instructions compile down to COMISS. The outputs of both
sets of instructions are exactly the same. The only difference is in
exception handling. I therefore added a single test case which tests
their different effect on the MXCSR register (_mm_getcsr) of
_mm_comieq_ss vs. _mm_ucomieq_ss. Together with the tests about emitting
the right instruction, no tests further tests are needed for the other
variants.

* Avoid constant-folding test case
  • Loading branch information
nominolo authored and alexcrichton committed Oct 12, 2017
1 parent 1cc08d7 commit 9654875
Showing 1 changed file with 740 additions and 0 deletions.
Loading

0 comments on commit 9654875

Please sign in to comment.