winch: Add support for <i32|i64>.rem_* WebAssembly instructions (#5823)
This commit adds support for i32 and i64 remainder instructions for x64.
This commit is contained in:
@@ -13,6 +13,14 @@ pub(crate) enum DivKind {
|
||||
Unsigned,
|
||||
}
|
||||
|
||||
/// Remainder kind.
|
||||
pub(crate) enum RemKind {
|
||||
/// Signed remainder.
|
||||
Signed,
|
||||
/// Unsigned remainder.
|
||||
Unsigned,
|
||||
}
|
||||
|
||||
/// Operand size, in bits.
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
pub(crate) enum OperandSize {
|
||||
@@ -116,6 +124,9 @@ pub(crate) trait MacroAssembler {
|
||||
/// functions.
|
||||
fn div(&mut self, context: &mut CodeGenContext, kind: DivKind, size: OperandSize);
|
||||
|
||||
/// Calculate remainder.
|
||||
fn rem(&mut self, context: &mut CodeGenContext, kind: RemKind, size: OperandSize);
|
||||
|
||||
/// Push the register to the stack, returning the offset.
|
||||
fn push(&mut self, src: Reg) -> u32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user