(
&mut self,
mode: RoundingMode,
env: &mut FuncEnv<Self::Ptr>,
context: &mut CodeGenContext<Emission>,
size: OperandSize,
mut fallback: F,
)
| 686 | } |
| 687 | |
| 688 | fn float_round< |
| 689 | F: FnMut(&mut FuncEnv<Self::Ptr>, &mut CodeGenContext<Emission>, &mut Self) -> Result<()>, |
| 690 | >( |
| 691 | &mut self, |
| 692 | mode: RoundingMode, |
| 693 | env: &mut FuncEnv<Self::Ptr>, |
| 694 | context: &mut CodeGenContext<Emission>, |
| 695 | size: OperandSize, |
| 696 | mut fallback: F, |
| 697 | ) -> Result<()> { |
| 698 | if self.flags.has_sse41() { |
| 699 | let src = context.pop_to_reg(self, None)?; |
| 700 | self.asm |
| 701 | .xmm_rounds_rr(src.into(), writable!(src.into()), mode, size); |
| 702 | context.stack.push(src.into()); |
| 703 | Ok(()) |
| 704 | } else { |
| 705 | fallback(env, context, self) |
| 706 | } |
| 707 | } |
| 708 | |
| 709 | fn float_sqrt(&mut self, dst: WritableReg, src: Reg, size: OperandSize) -> Result<()> { |
| 710 | self.asm.sqrt(src, dst, size); |
no test coverage detected