Skip to content

Commit

Permalink
x86 g_binary::compare
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Mar 24, 2024
1 parent b752101 commit df3abd1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions fidget/src/jit/x86_64/grad_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,17 @@ impl Assembler for GradSliceAssembler {
dynasm!(self.0.ops
; vcomiss Rx(reg(lhs_reg)), Rx(reg(rhs_reg))
; jp >N
; jae >R
; ja >R
; jb >L

// Fall-through for less than
; mov eax, 1f32.to_bits() as i32
// Fall-through for equal
; mov eax, 0f32.to_bits() as i32
; vmovd Rx(reg(out_reg)), eax
; jmp >O

// Less than
; L:
; mov eax, (-1f32).to_bits() as i32
; vmovd Rx(reg(out_reg)), eax
; jmp >O

Expand All @@ -404,7 +411,7 @@ impl Assembler for GradSliceAssembler {
; jmp >O

; R:
; mov eax, 0f32.to_bits() as i32
; mov eax, 1f32.to_bits() as i32
; vmovd Rx(reg(out_reg)), eax
// fallthrough to out

Expand Down

0 comments on commit df3abd1

Please sign in to comment.