From 0e98a8d54ec558724481cf963f879be69ec01795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Cabrera?= Date: Wed, 21 Feb 2024 17:48:02 -0500 Subject: [PATCH] winch: Overhaul the internal ABI (#7974) * winch: Overhaul the internal ABI This change overhauls Winch's ABI. This means that as part of this change, the default ABI now closely resembles Cranelift's ABI, particularly on the treatment of the VMContext. This change also fixes many wrong assumptions about trampolines, which are tied to how the previous ABI operated. The main motivation behind this change is: * To make it easier to integrate Winch-generated functions with Wasmtime * Fix fuzz bugs related to imports * Solidify the implementation regarding the usage of a pinned register to hold the VMContext value throughout the lifetime of a function. The previous implementation had the following characteristics, and wrong assumptions): * Assumed that nternal functions don't receive a caller or callee VMContexts as parameters. * Worked correctly in the following scenarios: * `Wasm -> Native`: since we can explicitly load the caller and callee `VMContext`, because we're calling a native import. * `(Native, Array) -> Wasm`: because the native signatures define a tuple of `VMContext` as arguments. * It didn't work in the following scenario: * `Wasm->Wasm`: When calling imports from another WebAssembly instance (via direct call or `call_indirect`. The previous implementation wrongly assumes that there should be a trampoline in this case, but there isn't. The code was generated by the same compiler, so the same ABI should be used in both functions, but it doesn't. This change introduces the following changes, which fix the previous assumptions and bugs: * All internal functions declare a two extra pointer-sized parameters, which will hold the callee and caller `VMContext`s * Use a pinned register that will be considered live through the lifetime of the function instead of pinning it at the trampoline level. The pinning explicitlly happens when entering the function body and no other assumptions are made from there on. * Introduce the concept of special `ContextArgs` for function calls. This enum holds metadata about which context arguments are needed depending on the callee. The previous implementation of introducing register values at arbitrary locations in the value stack conflicts with the stack ordering principle which states that older values must *always* precede newer values. So we can't insert a register, because if a spill happens the order of the values will be wrong. Finally, given that this change also enables the `imports.wast` test suite, it also includes a fix to `global.{get, set}` instructions which didn't account entirely for imported globals. Resolved conflicts Update Winch filetests * Fix typos * Use `get_wasm_local` and `get_frame_local` instead of `get_local` and `get_local_unchecked` * Introduce `MAX_CONTEXT_ARGS` and use it in the trampoline to skip context arguments. --- build.rs | 1 - winch/codegen/src/abi/mod.rs | 119 ++++++++-- winch/codegen/src/codegen/call.rs | 209 ++++++++++++------ winch/codegen/src/codegen/context.rs | 23 +- winch/codegen/src/codegen/control.rs | 2 +- winch/codegen/src/codegen/env.rs | 61 ++--- winch/codegen/src/codegen/mod.rs | 67 ++++-- winch/codegen/src/frame/mod.rs | 75 +++++-- winch/codegen/src/isa/aarch64/mod.rs | 17 +- winch/codegen/src/isa/x64/mod.rs | 16 +- winch/codegen/src/masm.rs | 81 ++++++- winch/codegen/src/trampoline.rs | 124 +++-------- winch/codegen/src/visitor.rs | 85 ++----- .../filetests/aarch64/i32_add/const.wat | 8 +- .../filetests/aarch64/i32_add/locals.wat | 18 +- .../filetests/aarch64/i32_add/max.wat | 8 +- .../filetests/aarch64/i32_add/max_one.wat | 8 +- .../filetests/aarch64/i32_add/mixed.wat | 8 +- .../filetests/aarch64/i32_add/params.wat | 16 +- .../filetests/aarch64/i32_add/signed.wat | 8 +- .../aarch64/i32_add/unsigned_with_zero.wat | 8 +- .../filetests/aarch64/i32_mul/const.wat | 8 +- .../filetests/aarch64/i32_mul/locals.wat | 18 +- .../filetests/aarch64/i32_mul/max.wat | 8 +- .../filetests/aarch64/i32_mul/max_one.wat | 8 +- .../filetests/aarch64/i32_mul/mixed.wat | 8 +- .../filetests/aarch64/i32_mul/params.wat | 16 +- .../filetests/aarch64/i32_mul/signed.wat | 8 +- .../aarch64/i32_mul/unsigned_with_zero.wat | 8 +- .../filetests/aarch64/i32_sub/const.wat | 8 +- .../filetests/aarch64/i32_sub/locals.wat | 18 +- .../filetests/aarch64/i32_sub/max.wat | 8 +- .../filetests/aarch64/i32_sub/max_one.wat | 8 +- .../filetests/aarch64/i32_sub/mixed.wat | 8 +- .../filetests/aarch64/i32_sub/params.wat | 16 +- .../filetests/aarch64/i32_sub/signed.wat | 8 +- .../aarch64/i32_sub/unsigned_with_zero.wat | 8 +- .../filetests/aarch64/i64_add/const.wat | 8 +- .../filetests/aarch64/i64_add/locals.wat | 18 +- .../filetests/aarch64/i64_add/max.wat | 8 +- .../filetests/aarch64/i64_add/max_one.wat | 8 +- .../filetests/aarch64/i64_add/mixed.wat | 8 +- .../filetests/aarch64/i64_add/params.wat | 16 +- .../filetests/aarch64/i64_add/signed.wat | 8 +- .../aarch64/i64_add/unsigned_with_zero.wat | 8 +- .../filetests/aarch64/i64_mul/const.wat | 8 +- .../filetests/aarch64/i64_mul/locals.wat | 18 +- .../filetests/aarch64/i64_mul/max.wat | 8 +- .../filetests/aarch64/i64_mul/max_one.wat | 8 +- .../filetests/aarch64/i64_mul/mixed.wat | 8 +- .../filetests/aarch64/i64_mul/params.wat | 16 +- .../filetests/aarch64/i64_mul/signed.wat | 8 +- .../aarch64/i64_mul/unsigned_with_zero.wat | 8 +- .../filetests/aarch64/i64_sub/const.wat | 8 +- .../filetests/aarch64/i64_sub/locals.wat | 18 +- .../filetests/aarch64/i64_sub/max.wat | 8 +- .../filetests/aarch64/i64_sub/max_one.wat | 8 +- .../filetests/aarch64/i64_sub/mixed.wat | 8 +- .../filetests/aarch64/i64_sub/params.wat | 16 +- .../filetests/aarch64/i64_sub/signed.wat | 8 +- .../aarch64/i64_sub/unsigned_with_zero.wat | 8 +- winch/filetests/filetests/aarch64/nop/nop.wat | 8 +- .../filetests/x64/block/as_if_cond.wat | 35 +-- .../filetests/x64/block/as_if_else.wat | 22 +- .../filetests/x64/block/as_if_then.wat | 22 +- winch/filetests/filetests/x64/block/deep.wat | 33 +-- winch/filetests/filetests/x64/block/empty.wat | 28 ++- .../filetests/x64/block/get_and_set.wat | 20 +- .../filetests/x64/block/get_and_tee.wat | 20 +- .../filetests/filetests/x64/block/nested.wat | 40 ++-- .../filetests/x64/block/singular.wat | 14 +- .../filetests/x64/block/with_local_float.wat | 18 +- .../filetests/x64/br/as_block_first.wat | 28 ++- .../filetests/x64/br/as_block_last.wat | 33 +-- .../filetests/x64/br/as_block_mid.wat | 33 +-- .../filetests/x64/br/as_block_value.wat | 33 +-- .../filetests/x64/br/as_br_if_cond.wat | 14 +- .../filetests/x64/br/as_br_value.wat | 14 +- .../filetests/x64/br/as_call_all.wat | 32 +-- .../filetests/x64/br/as_call_first.wat | 32 +-- .../filetests/x64/br/as_call_last.wat | 32 +-- .../filetests/x64/br/as_call_mid.wat | 32 +-- .../filetests/filetests/x64/br/as_if_cond.wat | 14 +- .../filetests/filetests/x64/br/as_if_else.wat | 28 +-- .../filetests/filetests/x64/br/as_if_then.wat | 28 +-- .../filetests/x64/br/as_loop_first.wat | 14 +- .../filetests/x64/br/as_loop_last.wat | 33 +-- .../filetests/x64/br/as_loop_mid.wat | 33 +-- winch/filetests/filetests/x64/br/br_jump.wat | 23 +- .../filetests/x64/br_if/as_block_last.wat | 48 ++-- .../x64/br_if/as_block_last_value.wat | 48 ++-- .../filetests/x64/br_if/as_br_if_cond.wat | 20 +- .../filetests/x64/br_if/as_br_value.wat | 16 +- .../filetests/x64/br_if/as_call_first.wat | 51 +++-- .../filetests/x64/br_if/as_call_last.wat | 51 +++-- .../filetests/x64/br_if/as_call_mid.wat | 51 +++-- .../filetests/x64/br_if/as_if_cond.wat | 30 +-- .../filetests/x64/br_if/as_if_else.wat | 49 ++-- .../filetests/x64/br_if/as_if_then.wat | 49 ++-- .../x64/br_if/as_local_set_value.wat | 24 +- .../filetests/x64/br_if/as_loop_last.wat | 41 ++-- .../x64/br_if/with_machine_stack_entry.wat | 52 +++-- .../x64/br_table/ensure_sp_state.wat | 16 +- .../filetests/x64/br_table/large.wat | 24 +- .../br_table/nested_br_table_loop_block.wat | 16 +- .../filetests/x64/br_table/stack_handling.wat | 26 ++- winch/filetests/filetests/x64/call/params.wat | 120 +++++----- .../filetests/x64/call/recursive.wat | 46 ++-- .../filetests/x64/call/reg_on_stack.wat | 46 ++-- winch/filetests/filetests/x64/call/simple.wat | 54 +++-- .../x64/call_indirect/call_indirect.wat | 116 +++++----- .../filetests/x64/call_indirect/local_arg.wat | 133 ++++------- .../filetests/x64/f32_abs/f32_abs_const.wat | 26 ++- .../filetests/x64/f32_abs/f32_abs_param.wat | 18 +- .../filetests/filetests/x64/f32_add/const.wat | 24 +- .../filetests/x64/f32_add/locals.wat | 34 +-- .../filetests/x64/f32_add/params.wat | 22 +- .../x64/f32_ceil/f32_ceil_const_sse41.wat | 26 ++- .../filetests/x64/f32_ceil/f32_ceil_param.wat | 23 +- .../x64/f32_ceil/f32_ceil_param_sse41.wat | 18 +- .../filetests/x64/f32_const/call_id.wat | 47 ++-- .../filetests/filetests/x64/f32_const/id.wat | 18 +- .../filetests/x64/f32_convert_i32_s/const.wat | 14 +- .../x64/f32_convert_i32_s/locals.wat | 19 +- .../x64/f32_convert_i32_s/params.wat | 18 +- .../x64/f32_convert_i32_s/spilled.wat | 14 +- .../filetests/x64/f32_convert_i32_u/const.wat | 22 +- .../x64/f32_convert_i32_u/locals.wat | 27 +-- .../x64/f32_convert_i32_u/params.wat | 26 ++- .../x64/f32_convert_i32_u/spilled.wat | 22 +- .../filetests/x64/f32_convert_i64_s/const.wat | 14 +- .../x64/f32_convert_i64_s/locals.wat | 19 +- .../x64/f32_convert_i64_s/params.wat | 18 +- .../x64/f32_convert_i64_s/spilled.wat | 14 +- .../filetests/x64/f32_convert_i64_u/const.wat | 22 +- .../x64/f32_convert_i64_u/locals.wat | 27 +-- .../x64/f32_convert_i64_u/params.wat | 26 ++- .../x64/f32_convert_i64_u/spilled.wat | 22 +- .../filetests/x64/f32_copysign/const.wat | 22 +- .../filetests/x64/f32_copysign/locals.wat | 32 ++- .../filetests/x64/f32_copysign/params.wat | 22 +- .../filetests/x64/f32_demote_f64/const.wat | 22 +- .../filetests/x64/f32_demote_f64/locals.wat | 19 +- .../filetests/x64/f32_demote_f64/params.wat | 18 +- .../filetests/x64/f32_demote_f64/spilled.wat | 24 +- .../filetests/filetests/x64/f32_div/const.wat | 24 +- .../filetests/x64/f32_div/locals.wat | 34 +-- .../filetests/x64/f32_div/params.wat | 22 +- .../filetests/filetests/x64/f32_eq/const.wat | 22 +- .../filetests/filetests/x64/f32_eq/locals.wat | 32 +-- .../filetests/filetests/x64/f32_eq/params.wat | 22 +- .../x64/f32_floor/f32_floor_const_sse41.wat | 26 ++- .../x64/f32_floor/f32_floor_param.wat | 23 +- .../x64/f32_floor/f32_floor_param_sse41.wat | 18 +- .../filetests/filetests/x64/f32_ge/const.wat | 22 +- .../filetests/filetests/x64/f32_ge/locals.wat | 32 +-- .../filetests/filetests/x64/f32_ge/params.wat | 22 +- .../filetests/filetests/x64/f32_gt/const.wat | 22 +- .../filetests/filetests/x64/f32_gt/locals.wat | 32 +-- .../filetests/filetests/x64/f32_gt/params.wat | 22 +- .../filetests/filetests/x64/f32_le/const.wat | 26 ++- .../filetests/filetests/x64/f32_le/locals.wat | 28 +-- .../filetests/filetests/x64/f32_le/params.wat | 22 +- .../filetests/filetests/x64/f32_lt/const.wat | 26 ++- .../filetests/filetests/x64/f32_lt/locals.wat | 28 +-- .../filetests/filetests/x64/f32_lt/params.wat | 22 +- .../filetests/filetests/x64/f32_max/const.wat | 44 ++-- .../filetests/x64/f32_max/locals.wat | 46 ++-- .../filetests/x64/f32_max/params.wat | 36 +-- .../filetests/filetests/x64/f32_min/const.wat | 44 ++-- .../filetests/x64/f32_min/locals.wat | 46 ++-- .../filetests/x64/f32_min/params.wat | 36 +-- .../filetests/filetests/x64/f32_mul/const.wat | 24 +- .../filetests/x64/f32_mul/locals.wat | 34 +-- .../filetests/x64/f32_mul/params.wat | 22 +- .../filetests/filetests/x64/f32_ne/const.wat | 22 +- .../filetests/filetests/x64/f32_ne/locals.wat | 32 +-- .../filetests/filetests/x64/f32_ne/params.wat | 22 +- .../x64/f32_nearest/f32_floor_const_sse41.wat | 26 ++- .../x64/f32_nearest/f32_floor_param_sse41.wat | 18 +- .../x64/f32_nearest/f32_nearest_param.wat | 23 +- .../filetests/x64/f32_neg/f32_neg_const.wat | 26 ++- .../filetests/x64/f32_neg/f32_neg_param.wat | 18 +- .../x64/f32_reinterpret_i32/const.wat | 14 +- .../x64/f32_reinterpret_i32/locals.wat | 19 +- .../x64/f32_reinterpret_i32/params.wat | 18 +- .../x64/f32_reinterpret_i32/ret_int.wat | 14 +- .../x64/f32_reinterpret_i32/spilled.wat | 14 +- .../filetests/x64/f32_sqrt/f32_sqrt_const.wat | 20 +- .../filetests/x64/f32_sqrt/f32_sqrt_param.wat | 18 +- .../filetests/filetests/x64/f32_sub/const.wat | 24 +- .../filetests/x64/f32_sub/locals.wat | 34 +-- .../filetests/x64/f32_sub/params.wat | 22 +- .../x64/f32_trunc/f32_trunc_const_sse41.wat | 26 ++- .../x64/f32_trunc/f32_trunc_param.wat | 23 +- .../x64/f32_trunc/f32_trunc_param_sse41.wat | 18 +- .../filetests/x64/f64_abs/f64_abs_const.wat | 20 +- .../filetests/x64/f64_abs/f64_abs_param.wat | 18 +- .../filetests/filetests/x64/f64_add/const.wat | 34 +-- .../filetests/x64/f64_add/locals.wat | 25 ++- .../filetests/x64/f64_add/params.wat | 22 +- .../x64/f64_ceil/f64_ceil_const_sse41.wat | 26 ++- .../filetests/x64/f64_ceil/f64_ceil_param.wat | 21 +- .../x64/f64_ceil/f64_ceil_param_sse41.wat | 18 +- .../filetests/x64/f64_const/call_id.wat | 44 ++-- .../filetests/filetests/x64/f64_const/id.wat | 18 +- .../filetests/x64/f64_convert_i32_s/const.wat | 14 +- .../x64/f64_convert_i32_s/locals.wat | 19 +- .../x64/f64_convert_i32_s/params.wat | 18 +- .../x64/f64_convert_i32_s/spilled.wat | 14 +- .../filetests/x64/f64_convert_i32_u/const.wat | 22 +- .../x64/f64_convert_i32_u/locals.wat | 27 +-- .../x64/f64_convert_i32_u/params.wat | 26 ++- .../x64/f64_convert_i32_u/spilled.wat | 22 +- .../filetests/x64/f64_convert_i64_s/const.wat | 14 +- .../x64/f64_convert_i64_s/locals.wat | 19 +- .../x64/f64_convert_i64_s/params.wat | 18 +- .../x64/f64_convert_i64_s/spilled.wat | 14 +- .../filetests/x64/f64_convert_i64_u/const.wat | 22 +- .../x64/f64_convert_i64_u/locals.wat | 27 +-- .../x64/f64_convert_i64_u/params.wat | 26 ++- .../x64/f64_convert_i64_u/spilled.wat | 22 +- .../filetests/x64/f64_copysign/const.wat | 36 +-- .../filetests/x64/f64_copysign/locals.wat | 27 ++- .../filetests/x64/f64_copysign/params.wat | 22 +- .../filetests/filetests/x64/f64_div/const.wat | 34 +-- .../filetests/x64/f64_div/locals.wat | 25 ++- .../filetests/x64/f64_div/params.wat | 22 +- .../filetests/filetests/x64/f64_eq/const.wat | 32 +-- .../filetests/filetests/x64/f64_eq/locals.wat | 29 ++- .../filetests/filetests/x64/f64_eq/params.wat | 22 +- .../x64/f64_floor/f64_floor_const_sse41.wat | 26 ++- .../x64/f64_floor/f64_floor_param.wat | 21 +- .../x64/f64_floor/f64_floor_param_sse41.wat | 18 +- .../filetests/filetests/x64/f64_ge/const.wat | 32 +-- .../filetests/filetests/x64/f64_ge/locals.wat | 29 ++- .../filetests/filetests/x64/f64_ge/params.wat | 22 +- .../filetests/filetests/x64/f64_gt/const.wat | 32 +-- .../filetests/filetests/x64/f64_gt/locals.wat | 29 ++- .../filetests/filetests/x64/f64_gt/params.wat | 22 +- .../filetests/filetests/x64/f64_le/const.wat | 14 +- .../filetests/filetests/x64/f64_le/locals.wat | 33 +-- .../filetests/filetests/x64/f64_le/params.wat | 33 +-- .../filetests/filetests/x64/f64_lt/const.wat | 14 +- .../filetests/filetests/x64/f64_lt/locals.wat | 33 +-- .../filetests/filetests/x64/f64_lt/params.wat | 22 +- .../filetests/filetests/x64/f64_max/const.wat | 30 +-- .../filetests/x64/f64_max/locals.wat | 49 ++-- .../filetests/x64/f64_max/params.wat | 36 +-- .../filetests/filetests/x64/f64_min/const.wat | 30 +-- .../filetests/x64/f64_min/locals.wat | 49 ++-- .../filetests/x64/f64_min/params.wat | 36 +-- .../filetests/filetests/x64/f64_mul/const.wat | 34 +-- .../filetests/x64/f64_mul/locals.wat | 25 ++- .../filetests/x64/f64_mul/params.wat | 22 +- .../filetests/filetests/x64/f64_ne/const.wat | 32 +-- .../filetests/filetests/x64/f64_ne/locals.wat | 29 ++- .../filetests/filetests/x64/f64_ne/params.wat | 22 +- .../f64_nearest/f64_nearest_const_sse41.wat | 26 ++- .../x64/f64_nearest/f64_nearest_param.wat | 21 +- .../f64_nearest/f64_nearest_param_sse41.wat | 18 +- .../filetests/x64/f64_neg/f64_neg_const.wat | 20 +- .../filetests/x64/f64_neg/f64_neg_param.wat | 18 +- .../filetests/x64/f64_promote_f32/const.wat | 16 +- .../filetests/x64/f64_promote_f32/locals.wat | 19 +- .../filetests/x64/f64_promote_f32/params.wat | 18 +- .../filetests/x64/f64_promote_f32/spilled.wat | 22 +- .../x64/f64_reinterpret_i64/const.wat | 14 +- .../x64/f64_reinterpret_i64/locals.wat | 19 +- .../x64/f64_reinterpret_i64/params.wat | 18 +- .../x64/f64_reinterpret_i64/ret_int.wat | 14 +- .../x64/f64_reinterpret_i64/spilled.wat | 14 +- .../filetests/x64/f64_sqrt/f64_sqrt_const.wat | 20 +- .../filetests/x64/f64_sqrt/f64_sqrt_param.wat | 18 +- .../filetests/filetests/x64/f64_sub/const.wat | 34 +-- .../filetests/x64/f64_sub/locals.wat | 25 ++- .../filetests/x64/f64_sub/params.wat | 22 +- .../x64/f64_trunc/f64_trunc_const_sse41.wat | 26 ++- .../x64/f64_trunc/f64_trunc_param.wat | 21 +- .../x64/f64_trunc/f64_trunc_param_sse41.wat | 18 +- .../filetests/filetests/x64/i32_add/const.wat | 14 +- .../filetests/x64/i32_add/locals.wat | 25 ++- winch/filetests/filetests/x64/i32_add/max.wat | 14 +- .../filetests/x64/i32_add/max_one.wat | 14 +- .../filetests/filetests/x64/i32_add/mixed.wat | 14 +- .../filetests/x64/i32_add/params.wat | 22 +- .../filetests/x64/i32_add/signed.wat | 14 +- .../x64/i32_add/unsigned_with_zero.wat | 14 +- .../filetests/filetests/x64/i32_and/const.wat | 14 +- .../filetests/x64/i32_and/locals.wat | 25 ++- .../filetests/x64/i32_and/params.wat | 22 +- .../filetests/x64/i32_clz/lzcnt_const.wat | 14 +- .../filetests/x64/i32_clz/lzcnt_local.wat | 21 +- .../filetests/x64/i32_clz/lzcnt_param.wat | 18 +- .../filetests/x64/i32_clz/no_lzcnt_const.wat | 14 +- .../filetests/x64/i32_clz/no_lzcnt_local.wat | 21 +- .../filetests/x64/i32_clz/no_lzcnt_param.wat | 18 +- .../filetests/x64/i32_ctz/bmi1_const.wat | 14 +- .../filetests/x64/i32_ctz/bmi1_local.wat | 21 +- .../filetests/x64/i32_ctz/bmi1_param.wat | 18 +- .../filetests/x64/i32_ctz/no_bmi1_const.wat | 14 +- .../filetests/x64/i32_ctz/no_bmi1_local.wat | 21 +- .../filetests/x64/i32_ctz/no_bmi1_param.wat | 18 +- .../filetests/x64/i32_divs/const.wat | 20 +- .../filetests/x64/i32_divs/one_zero.wat | 20 +- .../filetests/x64/i32_divs/overflow.wat | 20 +- .../filetests/x64/i32_divs/params.wat | 28 +-- .../filetests/x64/i32_divs/zero_zero.wat | 20 +- .../filetests/x64/i32_divu/const.wat | 14 +- .../filetests/x64/i32_divu/one_zero.wat | 14 +- .../filetests/x64/i32_divu/params.wat | 22 +- .../filetests/x64/i32_divu/signed.wat | 14 +- .../filetests/x64/i32_divu/zero_zero.wat | 14 +- .../filetests/filetests/x64/i32_eq/const.wat | 14 +- .../filetests/filetests/x64/i32_eq/locals.wat | 25 ++- .../filetests/filetests/x64/i32_eq/params.wat | 22 +- .../filetests/filetests/x64/i32_eqz/const.wat | 14 +- .../filetests/filetests/x64/i32_eqz/local.wat | 21 +- .../filetests/filetests/x64/i32_eqz/param.wat | 18 +- .../filetests/x64/i32_extend_16_s/const.wat | 14 +- .../filetests/x64/i32_extend_16_s/locals.wat | 19 +- .../filetests/x64/i32_extend_16_s/params.wat | 18 +- .../filetests/x64/i32_extend_8_s/const.wat | 14 +- .../filetests/x64/i32_extend_8_s/locals.wat | 19 +- .../filetests/x64/i32_extend_8_s/params.wat | 18 +- .../filetests/x64/i32_ge_s/const.wat | 14 +- .../filetests/x64/i32_ge_s/locals.wat | 25 ++- .../filetests/x64/i32_ge_s/params.wat | 22 +- .../filetests/x64/i32_ge_u/const.wat | 14 +- .../filetests/x64/i32_ge_u/locals.wat | 25 ++- .../filetests/x64/i32_ge_u/params.wat | 22 +- .../filetests/x64/i32_gt_s/const.wat | 14 +- .../filetests/x64/i32_gt_s/locals.wat | 25 ++- .../filetests/x64/i32_gt_s/params.wat | 22 +- .../filetests/x64/i32_gt_u/const.wat | 14 +- .../filetests/x64/i32_gt_u/locals.wat | 25 ++- .../filetests/x64/i32_gt_u/params.wat | 22 +- .../filetests/x64/i32_le_s/const.wat | 14 +- .../filetests/x64/i32_le_s/locals.wat | 25 ++- .../filetests/x64/i32_le_s/params.wat | 22 +- .../filetests/x64/i32_le_u/const.wat | 14 +- .../filetests/x64/i32_le_u/locals.wat | 25 ++- .../filetests/x64/i32_le_u/params.wat | 22 +- .../filetests/x64/i32_lt_s/const.wat | 14 +- .../filetests/x64/i32_lt_s/locals.wat | 25 ++- .../filetests/x64/i32_lt_s/params.wat | 22 +- .../filetests/x64/i32_lt_u/const.wat | 14 +- .../filetests/x64/i32_lt_u/locals.wat | 25 ++- .../filetests/x64/i32_lt_u/params.wat | 22 +- .../filetests/filetests/x64/i32_mul/const.wat | 14 +- .../filetests/x64/i32_mul/locals.wat | 25 ++- winch/filetests/filetests/x64/i32_mul/max.wat | 14 +- .../filetests/x64/i32_mul/max_one.wat | 14 +- .../filetests/filetests/x64/i32_mul/mixed.wat | 14 +- .../filetests/x64/i32_mul/params.wat | 22 +- .../filetests/x64/i32_mul/signed.wat | 14 +- .../x64/i32_mul/unsigned_with_zero.wat | 14 +- .../filetests/filetests/x64/i32_ne/const.wat | 14 +- .../filetests/filetests/x64/i32_ne/locals.wat | 25 ++- .../filetests/filetests/x64/i32_ne/params.wat | 22 +- .../filetests/filetests/x64/i32_or/const.wat | 14 +- .../filetests/filetests/x64/i32_or/locals.wat | 25 ++- .../filetests/filetests/x64/i32_or/params.wat | 22 +- .../filetests/x64/i32_popcnt/const.wat | 14 +- .../filetests/x64/i32_popcnt/fallback.wat | 14 +- .../filetests/x64/i32_popcnt/no_sse42.wat | 14 +- .../filetests/x64/i32_popcnt/reg.wat | 18 +- .../x64/i32_reinterpret_f32/const.wat | 16 +- .../x64/i32_reinterpret_f32/locals.wat | 19 +- .../x64/i32_reinterpret_f32/params.wat | 18 +- .../x64/i32_reinterpret_f32/ret_float.wat | 16 +- .../filetests/x64/i32_rems/const.wat | 22 +- .../filetests/x64/i32_rems/one_zero.wat | 22 +- .../filetests/x64/i32_rems/overflow.wat | 22 +- .../filetests/x64/i32_rems/params.wat | 30 +-- .../filetests/x64/i32_rems/zero_zero.wat | 22 +- .../filetests/x64/i32_remu/const.wat | 14 +- .../filetests/x64/i32_remu/one_zero.wat | 14 +- .../filetests/x64/i32_remu/params.wat | 22 +- .../filetests/x64/i32_remu/signed.wat | 14 +- .../filetests/x64/i32_remu/zero_zero.wat | 14 +- .../filetests/x64/i32_rotl/16_const.wat | 14 +- .../filetests/x64/i32_rotl/8_const.wat | 14 +- .../filetests/x64/i32_rotl/locals.wat | 25 ++- .../filetests/x64/i32_rotl/params.wat | 22 +- .../filetests/x64/i32_rotr/16_const.wat | 14 +- .../filetests/x64/i32_rotr/8_const.wat | 14 +- .../filetests/x64/i32_rotr/locals.wat | 25 ++- .../filetests/x64/i32_rotr/params.wat | 22 +- .../filetests/x64/i32_shl/16_const.wat | 14 +- .../filetests/x64/i32_shl/8_const.wat | 14 +- .../filetests/x64/i32_shl/locals.wat | 25 ++- .../filetests/x64/i32_shl/params.wat | 22 +- .../filetests/x64/i32_shr_s/16_const.wat | 14 +- .../filetests/x64/i32_shr_s/8_const.wat | 14 +- .../filetests/x64/i32_shr_s/locals.wat | 25 ++- .../filetests/x64/i32_shr_s/params.wat | 22 +- .../filetests/x64/i32_shr_u/16_const.wat | 14 +- .../filetests/x64/i32_shr_u/8_const.wat | 14 +- .../filetests/x64/i32_shr_u/locals.wat | 25 ++- .../filetests/x64/i32_shr_u/params.wat | 22 +- .../filetests/filetests/x64/i32_sub/const.wat | 14 +- .../filetests/x64/i32_sub/locals.wat | 25 ++- winch/filetests/filetests/x64/i32_sub/max.wat | 14 +- .../filetests/x64/i32_sub/max_one.wat | 14 +- .../filetests/filetests/x64/i32_sub/mixed.wat | 14 +- .../filetests/x64/i32_sub/params.wat | 22 +- .../filetests/x64/i32_sub/signed.wat | 14 +- .../x64/i32_sub/unsigned_with_zero.wat | 14 +- .../filetests/x64/i32_trunc_f32_s/const.wat | 40 ++-- .../filetests/x64/i32_trunc_f32_s/locals.wat | 39 ++-- .../filetests/x64/i32_trunc_f32_s/params.wat | 38 ++-- .../filetests/x64/i32_trunc_f32_u/const.wat | 38 ++-- .../filetests/x64/i32_trunc_f32_u/locals.wat | 37 ++-- .../filetests/x64/i32_trunc_f32_u/params.wat | 36 +-- .../filetests/x64/i32_trunc_f64_s/const.wat | 42 ++-- .../filetests/x64/i32_trunc_f64_s/locals.wat | 39 ++-- .../filetests/x64/i32_trunc_f64_s/params.wat | 38 ++-- .../filetests/x64/i32_trunc_f64_u/const.wat | 42 ++-- .../filetests/x64/i32_trunc_f64_u/locals.wat | 37 ++-- .../filetests/x64/i32_trunc_f64_u/params.wat | 36 +-- .../filetests/x64/i32_wrap_i64/const.wat | 14 +- .../filetests/x64/i32_wrap_i64/locals.wat | 19 +- .../filetests/x64/i32_wrap_i64/params.wat | 18 +- .../filetests/x64/i32_wrap_i64/spilled.wat | 14 +- .../filetests/filetests/x64/i32_xor/const.wat | 14 +- .../filetests/x64/i32_xor/locals.wat | 25 ++- .../filetests/x64/i32_xor/params.wat | 22 +- .../filetests/filetests/x64/i64_add/const.wat | 14 +- .../filetests/x64/i64_add/locals.wat | 24 +- winch/filetests/filetests/x64/i64_add/max.wat | 14 +- .../filetests/x64/i64_add/max_one.wat | 14 +- .../filetests/filetests/x64/i64_add/mixed.wat | 14 +- .../filetests/x64/i64_add/params.wat | 22 +- .../filetests/x64/i64_add/signed.wat | 14 +- .../x64/i64_add/unsigned_with_zero.wat | 14 +- .../filetests/x64/i64_and/32_const.wat | 14 +- .../filetests/x64/i64_and/64_const.wat | 14 +- .../filetests/x64/i64_and/locals.wat | 24 +- .../filetests/x64/i64_and/params.wat | 22 +- .../filetests/x64/i64_clz/lzcnt_const.wat | 14 +- .../filetests/x64/i64_clz/lzcnt_local.wat | 21 +- .../filetests/x64/i64_clz/lzcnt_param.wat | 18 +- .../filetests/x64/i64_clz/no_lzcnt_const.wat | 14 +- .../filetests/x64/i64_clz/no_lzcnt_local.wat | 21 +- .../filetests/x64/i64_clz/no_lzcnt_param.wat | 18 +- .../filetests/x64/i64_ctz/bmi1_const.wat | 14 +- .../filetests/x64/i64_ctz/bmi1_local.wat | 21 +- .../filetests/x64/i64_ctz/bmi1_param.wat | 18 +- .../filetests/x64/i64_ctz/no_bmi1_const.wat | 14 +- .../filetests/x64/i64_ctz/no_bmi1_local.wat | 21 +- .../filetests/x64/i64_ctz/no_bmi1_param.wat | 18 +- .../filetests/x64/i64_divs/const.wat | 20 +- .../filetests/x64/i64_divs/one_zero.wat | 20 +- .../filetests/x64/i64_divs/overflow.wat | 20 +- .../filetests/x64/i64_divs/params.wat | 28 +-- .../filetests/x64/i64_divs/zero_zero.wat | 20 +- .../filetests/x64/i64_divu/const.wat | 14 +- .../filetests/x64/i64_divu/one_zero.wat | 14 +- .../filetests/x64/i64_divu/params.wat | 22 +- .../filetests/x64/i64_divu/signed.wat | 14 +- .../filetests/x64/i64_divu/zero_zero.wat | 14 +- .../filetests/x64/i64_eq/32_const.wat | 14 +- .../filetests/x64/i64_eq/64_const.wat | 14 +- .../filetests/filetests/x64/i64_eq/locals.wat | 24 +- .../filetests/filetests/x64/i64_eq/params.wat | 22 +- .../filetests/x64/i64_eqz/32_const.wat | 14 +- .../filetests/x64/i64_eqz/64_const.wat | 14 +- .../filetests/filetests/x64/i64_eqz/local.wat | 21 +- .../filetests/filetests/x64/i64_eqz/param.wat | 18 +- .../filetests/x64/i64_eqz/spilled.wat | 14 +- .../filetests/x64/i64_extend_16_s/const.wat | 14 +- .../filetests/x64/i64_extend_16_s/locals.wat | 19 +- .../filetests/x64/i64_extend_16_s/params.wat | 18 +- .../filetests/x64/i64_extend_32_s/const.wat | 14 +- .../filetests/x64/i64_extend_32_s/locals.wat | 19 +- .../filetests/x64/i64_extend_32_s/params.wat | 18 +- .../filetests/x64/i64_extend_8_s/const.wat | 14 +- .../filetests/x64/i64_extend_8_s/locals.wat | 19 +- .../filetests/x64/i64_extend_8_s/params.wat | 18 +- .../filetests/x64/i64_extend_i32_s/const.wat | 14 +- .../filetests/x64/i64_extend_i32_s/locals.wat | 19 +- .../filetests/x64/i64_extend_i32_s/params.wat | 18 +- .../x64/i64_extend_i32_s/spilled.wat | 14 +- .../filetests/x64/i64_extend_i32_u/const.wat | 14 +- .../filetests/x64/i64_extend_i32_u/locals.wat | 19 +- .../filetests/x64/i64_extend_i32_u/params.wat | 18 +- .../x64/i64_extend_i32_u/spilled.wat | 14 +- .../filetests/x64/i64_ge_s/32_const.wat | 14 +- .../filetests/x64/i64_ge_s/64_const.wat | 14 +- .../filetests/x64/i64_ge_s/locals.wat | 24 +- .../filetests/x64/i64_ge_s/params.wat | 22 +- .../filetests/x64/i64_ge_u/32_const.wat | 14 +- .../filetests/x64/i64_ge_u/64_const.wat | 14 +- .../filetests/x64/i64_ge_u/locals.wat | 24 +- .../filetests/x64/i64_ge_u/params.wat | 22 +- .../filetests/x64/i64_gt_s/32_const.wat | 14 +- .../filetests/x64/i64_gt_s/64_const.wat | 14 +- .../filetests/x64/i64_gt_s/locals.wat | 24 +- .../filetests/x64/i64_gt_s/params.wat | 22 +- .../filetests/x64/i64_gt_u/32_const.wat | 14 +- .../filetests/x64/i64_gt_u/64_const.wat | 14 +- .../filetests/x64/i64_gt_u/locals.wat | 24 +- .../filetests/x64/i64_gt_u/params.wat | 22 +- .../filetests/x64/i64_le_s/32_const.wat | 14 +- .../filetests/x64/i64_le_s/64_const.wat | 14 +- .../filetests/x64/i64_le_s/locals.wat | 24 +- .../filetests/x64/i64_le_s/params.wat | 22 +- .../filetests/x64/i64_le_u/32_const.wat | 14 +- .../filetests/x64/i64_le_u/64_const.wat | 14 +- .../filetests/x64/i64_le_u/locals.wat | 24 +- .../filetests/x64/i64_le_u/params.wat | 22 +- .../filetests/x64/i64_lt_s/32_const.wat | 14 +- .../filetests/x64/i64_lt_s/64_const.wat | 14 +- .../filetests/x64/i64_lt_s/locals.wat | 24 +- .../filetests/x64/i64_lt_s/params.wat | 22 +- .../filetests/x64/i64_lt_u/32_const.wat | 14 +- .../filetests/x64/i64_lt_u/64_const.wat | 14 +- .../filetests/x64/i64_lt_u/locals.wat | 24 +- .../filetests/x64/i64_lt_u/params.wat | 22 +- .../filetests/filetests/x64/i64_mul/const.wat | 14 +- .../filetests/x64/i64_mul/locals.wat | 24 +- winch/filetests/filetests/x64/i64_mul/max.wat | 14 +- .../filetests/x64/i64_mul/max_one.wat | 14 +- .../filetests/filetests/x64/i64_mul/mixed.wat | 14 +- .../filetests/x64/i64_mul/params.wat | 22 +- .../filetests/x64/i64_mul/signed.wat | 14 +- .../x64/i64_mul/unsigned_with_zero.wat | 14 +- .../filetests/x64/i64_ne/32_const.wat | 14 +- .../filetests/x64/i64_ne/64_const.wat | 14 +- .../filetests/filetests/x64/i64_ne/locals.wat | 24 +- .../filetests/filetests/x64/i64_ne/params.wat | 22 +- .../filetests/x64/i64_or/32_const.wat | 14 +- .../filetests/x64/i64_or/64_const.wat | 14 +- .../filetests/filetests/x64/i64_or/locals.wat | 24 +- .../filetests/filetests/x64/i64_or/params.wat | 22 +- .../filetests/x64/i64_popcnt/const.wat | 14 +- .../filetests/x64/i64_popcnt/fallback.wat | 14 +- .../filetests/x64/i64_popcnt/no_sse42.wat | 14 +- .../filetests/x64/i64_popcnt/reg.wat | 18 +- .../x64/i64_reinterpret_f64/const.wat | 20 +- .../x64/i64_reinterpret_f64/locals.wat | 19 +- .../x64/i64_reinterpret_f64/params.wat | 18 +- .../x64/i64_reinterpret_f64/ret_float.wat | 20 +- .../filetests/x64/i64_rems/const.wat | 22 +- .../filetests/x64/i64_rems/one_zero.wat | 22 +- .../filetests/x64/i64_rems/overflow.wat | 22 +- .../filetests/x64/i64_rems/params.wat | 30 +-- .../filetests/x64/i64_rems/zero_zero.wat | 22 +- .../filetests/x64/i64_remu/const.wat | 14 +- .../filetests/x64/i64_remu/one_zero.wat | 14 +- .../filetests/x64/i64_remu/params.wat | 22 +- .../filetests/x64/i64_remu/signed.wat | 14 +- .../filetests/x64/i64_remu/zero_zero.wat | 14 +- .../filetests/x64/i64_rotl/16_const.wat | 14 +- .../filetests/x64/i64_rotl/8_const.wat | 14 +- .../filetests/x64/i64_rotl/locals.wat | 24 +- .../filetests/x64/i64_rotl/params.wat | 22 +- .../filetests/x64/i64_rotr/16_const.wat | 14 +- .../filetests/x64/i64_rotr/8_const.wat | 14 +- .../filetests/x64/i64_rotr/locals.wat | 24 +- .../filetests/x64/i64_rotr/params.wat | 22 +- .../filetests/x64/i64_shl/16_const.wat | 14 +- .../filetests/x64/i64_shl/8_const.wat | 14 +- .../filetests/x64/i64_shl/locals.wat | 24 +- .../filetests/x64/i64_shl/params.wat | 22 +- .../filetests/x64/i64_shr_s/16_const.wat | 14 +- .../filetests/x64/i64_shr_s/8_const.wat | 14 +- .../filetests/x64/i64_shr_s/locals.wat | 24 +- .../filetests/x64/i64_shr_s/params.wat | 22 +- .../filetests/x64/i64_shr_u/16_const.wat | 14 +- .../filetests/x64/i64_shr_u/8_const.wat | 14 +- .../filetests/x64/i64_shr_u/locals.wat | 24 +- .../filetests/x64/i64_shr_u/params.wat | 22 +- .../filetests/filetests/x64/i64_sub/const.wat | 14 +- .../filetests/x64/i64_sub/locals.wat | 24 +- winch/filetests/filetests/x64/i64_sub/max.wat | 14 +- .../filetests/x64/i64_sub/max_one.wat | 14 +- .../filetests/filetests/x64/i64_sub/mixed.wat | 14 +- .../filetests/x64/i64_sub/params.wat | 22 +- .../filetests/x64/i64_sub/signed.wat | 14 +- .../x64/i64_sub/unsigned_with_zero.wat | 14 +- .../filetests/x64/i64_trunc_f32_s/const.wat | 38 ++-- .../filetests/x64/i64_trunc_f32_s/locals.wat | 39 ++-- .../filetests/x64/i64_trunc_f32_s/params.wat | 38 ++-- .../filetests/x64/i64_trunc_f32_u/const.wat | 34 +-- .../filetests/x64/i64_trunc_f32_u/locals.wat | 37 ++-- .../filetests/x64/i64_trunc_f32_u/params.wat | 36 +-- .../filetests/x64/i64_trunc_f64_s/const.wat | 42 ++-- .../filetests/x64/i64_trunc_f64_s/locals.wat | 39 ++-- .../filetests/x64/i64_trunc_f64_s/params.wat | 38 ++-- .../filetests/x64/i64_trunc_f64_u/const.wat | 40 ++-- .../filetests/x64/i64_trunc_f64_u/locals.wat | 37 ++-- .../filetests/x64/i64_trunc_f64_u/params.wat | 36 +-- .../filetests/x64/i64_xor/32_const.wat | 14 +- .../filetests/x64/i64_xor/64_const.wat | 14 +- .../filetests/x64/i64_xor/locals.wat | 24 +- .../filetests/x64/i64_xor/params.wat | 22 +- winch/filetests/filetests/x64/if/as_binop.wat | 74 ++++--- .../filetests/x64/if/as_br_if_last.wat | 54 +++-- .../filetests/filetests/x64/if/as_if_cond.wat | 58 +++-- .../filetests/filetests/x64/if/as_testop.wat | 50 +++-- .../filetests/x64/if/break_value.wat | 26 ++- winch/filetests/filetests/x64/if/nested.wat | 126 +++++++---- .../filetests/x64/if/reachability.wat | 28 +-- winch/filetests/filetests/x64/if/singular.wat | 48 ++-- winch/filetests/filetests/x64/load/f32.wat | 14 +- winch/filetests/filetests/x64/load/f64.wat | 14 +- winch/filetests/filetests/x64/load/i32.wat | 14 +- winch/filetests/filetests/x64/load/i64.wat | 18 +- .../filetests/filetests/x64/local/latent.wat | 20 +- .../filetests/x64/local/materialized.wat | 20 +- .../filetests/x64/loop/as_binary_operand.wat | 40 ++-- .../filetests/x64/loop/as_br_if_first.wat | 16 +- .../filetests/x64/loop/as_br_if_last.wat | 16 +- .../filetests/x64/loop/as_br_value.wat | 14 +- .../filetests/x64/loop/as_call_value.wat | 39 ++-- .../filetests/x64/loop/as_if_condition.wat | 35 +-- .../filetests/x64/loop/as_if_else.wat | 22 +- .../filetests/x64/loop/as_if_then.wat | 22 +- .../filetests/x64/loop/as_local_set_value.wat | 21 +- .../filetests/x64/loop/as_test_operand.wat | 33 +-- .../filetests/x64/loop/as_unary_operand.wat | 33 +-- .../filetests/x64/loop/break_inner.wat | 41 ++-- .../filetests/x64/loop/cont_inner.wat | 23 +- winch/filetests/filetests/x64/loop/deep.wat | 33 +-- .../filetests/filetests/x64/loop/effects.wat | 33 +-- winch/filetests/filetests/x64/loop/empty.wat | 14 +- winch/filetests/filetests/x64/loop/for.wat | 42 ++-- winch/filetests/filetests/x64/loop/multi.wat | 73 +++--- winch/filetests/filetests/x64/loop/nested.wat | 40 ++-- .../filetests/filetests/x64/loop/singular.wat | 14 +- winch/filetests/filetests/x64/loop/while.wat | 39 ++-- winch/filetests/filetests/x64/nop/nop.wat | 14 +- .../filetests/x64/return/as_block_first.wat | 28 ++- .../filetests/x64/return/as_block_last.wat | 33 +-- .../filetests/x64/return/as_block_mid.wat | 33 +-- .../filetests/x64/return/as_block_value.wat | 33 +-- .../filetests/x64/return/as_br_if_cond.wat | 28 ++- .../filetests/x64/return/as_br_value.wat | 28 ++- .../filetests/x64/return/as_call_fist.wat | 32 +-- .../filetests/x64/return/as_call_last.wat | 32 +-- .../filetests/x64/return/as_call_mid.wat | 32 +-- .../filetests/x64/return/as_func_first.wat | 28 ++- .../filetests/x64/return/as_func_last.wat | 14 +- .../filetests/x64/return/as_func_mid.wat | 33 +-- .../filetests/x64/return/as_func_value.wat | 33 +-- .../filetests/x64/return/as_if_cond.wat | 28 ++- .../filetests/x64/return/as_if_else.wat | 42 ++-- .../filetests/x64/return/as_if_then.wat | 42 ++-- .../filetests/x64/return/as_loop_first.wat | 28 ++- .../filetests/x64/return/as_loop_last.wat | 33 +-- .../filetests/x64/return/as_loop_mid.wat | 33 +-- .../filetests/x64/return/as_return_value.wat | 28 ++- .../filetests/x64/return/nullary.wat | 28 ++- .../filetests/x64/return/type_i32.wat | 28 ++- .../filetests/x64/return/type_i64_value.wat | 28 ++- winch/filetests/filetests/x64/select/f32.wat | 30 +-- winch/filetests/filetests/x64/select/f64.wat | 30 +-- winch/filetests/filetests/x64/select/i32.wat | 24 +- winch/filetests/filetests/x64/select/i64.wat | 26 ++- winch/filetests/filetests/x64/store/f32.wat | 20 +- winch/filetests/filetests/x64/store/f64.wat | 24 +- winch/filetests/filetests/x64/store/i32.wat | 14 +- winch/filetests/filetests/x64/store/i64.wat | 14 +- winch/filetests/filetests/x64/table/fill.wat | 103 +++++---- winch/filetests/filetests/x64/table/get.wat | 54 +++-- winch/filetests/filetests/x64/table/grow.wat | 22 +- .../filetests/x64/table/init_copy_drop.wat | 181 ++++++++------- winch/filetests/filetests/x64/table/set.wat | 96 ++++---- winch/filetests/filetests/x64/table/size.wat | 14 +- .../x64/unreachable/as_block_broke.wat | 33 +-- .../x64/unreachable/as_block_first.wat | 14 +- .../x64/unreachable/as_block_last.wat | 33 +-- .../x64/unreachable/as_block_mid.wat | 33 +-- .../x64/unreachable/as_block_value.wat | 33 +-- .../x64/unreachable/as_br_if_cond.wat | 14 +- .../filetests/x64/unreachable/as_br_value.wat | 14 +- .../x64/unreachable/as_call_first.wat | 32 +-- .../x64/unreachable/as_call_last.wat | 32 +-- .../filetests/x64/unreachable/as_call_mid.wat | 32 +-- .../x64/unreachable/as_func_first.wat | 28 ++- .../x64/unreachable/as_func_last.wat | 33 +-- .../filetests/x64/unreachable/as_func_mid.wat | 33 +-- .../x64/unreachable/as_func_value.wat | 33 +-- .../filetests/x64/unreachable/as_if_cond.wat | 14 +- .../filetests/x64/unreachable/as_if_else.wat | 28 +-- .../filetests/x64/unreachable/as_if_then.wat | 26 ++- .../x64/unreachable/as_if_then_no_else.wat | 26 ++- .../x64/unreachable/as_loop_broke.wat | 33 +-- .../x64/unreachable/as_loop_first.wat | 14 +- .../x64/unreachable/as_loop_last.wat | 33 +-- .../filetests/x64/unreachable/as_loop_mid.wat | 33 +-- .../x64/unreachable/as_return_value.wat | 14 +- .../filetests/x64/unreachable/type_i32.wat | 14 +- .../filetests/x64/unreachable/type_i64.wat | 14 +- .../x64/unreachable/with_spilled_local.wat | 19 +- .../unreachable/with_spilled_local_in_if.wat | 23 +- 698 files changed, 9324 insertions(+), 7477 deletions(-) diff --git a/build.rs b/build.rs index 06ff566f5075..9999da50151c 100644 --- a/build.rs +++ b/build.rs @@ -223,7 +223,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { "elem", "select", "unreached_invalid", - "imports", "linking", ] .contains(&testname); diff --git a/winch/codegen/src/abi/mod.rs b/winch/codegen/src/abi/mod.rs index 0c39976f7b89..b9bb921767b9 100644 --- a/winch/codegen/src/abi/mod.rs +++ b/winch/codegen/src/abi/mod.rs @@ -1,19 +1,23 @@ //! -//! # Default ABI +//! The Default ABI //! -//! Winch uses a default internal ABI, for all internal functions. -//! This allows us to push the complexity of system ABI compliance to -//! the trampolines (not yet implemented). The default ABI treats all -//! allocatable registers as caller saved, which means that (i) all -//! register values in the Wasm value stack (which are normally -//! referred to as "live"), must be saved onto the machine stack (ii) -//! function prologues and epilogues don't store/restore other -//! registers more than the non-allocatable ones (e.g. rsp/rbp in -//! x86_64). +//! Winch uses a default ABI, for all internal functions. This allows +//! us to push the complexity of system ABI compliance to the trampolines. The +//! default ABI treats all allocatable registers as caller saved, which means +//! that (i) all register values in the Wasm value stack (which are normally +//! referred to as "live"), must be saved onto the machine stack (ii) function +//! prologues and epilogues don't store/restore other registers more than the +//! non-allocatable ones (e.g. rsp/rbp in x86_64). +//! +//! The calling convention in the default ABI, uses registers to a certain fixed +//! count for arguments and return values, and then the stack is used for all +//! additional arguments and return values. Aside from the parameters declared +//! in each WebAssembly function, Winch's ABI declares two extra parameters, to +//! hold the callee and caller `VMContext` pointers. A well-known `LocalSlot` is +//! reserved for the callee VMContext pointer and also a particular pinned +//! register is used to hold the value of the callee `VMContext`, which is +//! available throughout the lifetime of the function. //! -//! The calling convention in the default ABI, uses registers to a -//! certain fixed count for arguments and return values, and then the -//! stack is used for all additional arguments. //! //! Generally the stack layout looks like: //! +-------------------------------+ @@ -28,10 +32,10 @@ //! | SP | //! +-------------------------------+----> SP @ Function prologue //! | | +//! +-------------------------------+----> VMContext slot //! | | //! | | //! | Stack slots | -//! | + `VMContext` slot | //! | + dynamic space | //! | | //! | | @@ -60,6 +64,84 @@ pub(super) enum ParamsOrReturns { Returns, } +/// Macro to get the pinned register holding the [VMContext]. +macro_rules! vmctx { + ($m:ident) => { + <$m::ABI as ABI>::vmctx_reg() + }; +} + +pub(crate) use vmctx; + +/// Constructs an [ABISig] using Winch's ABI. +pub(crate) fn wasm_sig(ty: &WasmFuncType) -> ABISig { + // 6 is used semi-arbitrarily here, we can modify as we see fit. + let mut params: SmallVec<[WasmValType; 6]> = SmallVec::new(); + params.extend_from_slice(&vmctx_types::()); + params.extend_from_slice(ty.params()); + + A::sig_from(¶ms, ty.returns(), &CallingConvention::Default) +} + +/// Returns the callee and caller [VMContext] types. +pub(crate) fn vmctx_types() -> [WasmValType; 2] { + [A::ptr_type(), A::ptr_type()] +} + +/// Returns an [ABISig] for the array calling convention. +/// The signature looks like: +/// ```ignore +/// unsafe extern "C" fn( +/// callee_vmctx: *mut VMOpaqueContext, +/// caller_vmctx: *mut VMOpaqueContext, +/// values_ptr: *mut ValRaw, +/// values_len: usize, +/// ) +/// ``` +pub(crate) fn array_sig(call_conv: &CallingConvention) -> ABISig { + let params = [A::ptr_type(), A::ptr_type(), A::ptr_type(), A::ptr_type()]; + A::sig_from(¶ms, &[], call_conv) +} + +/// Returns an [ABISig] that follows a variation of the system's +/// calling convention. +/// The main difference between the flavor of the returned signature +/// and the vanilla signature is how multiple values are returned. +/// Multiple returns are handled following Wasmtime's expectations: +/// * A single value is returned via a register according to the calling +/// convention. +/// * More than one values are returned via a return pointer. +/// These variations look like: +/// +/// Single return value. +/// +/// ```ignore +/// unsafe extern "C" fn( +/// callee_vmctx: *mut VMOpaqueContext, +/// caller_vmctx: *mut VMOpaqueContext, +/// // rest of parameters +/// ) -> // single result +/// ``` +/// +/// Multiple return values. +/// +/// ```ignore +/// unsafe extern "C" fn( +/// callee_vmctx: *mut VMOpaqueContext, +/// caller_vmctx: *mut VMOpaqueContext, +/// // rest of parameters +/// retptr: *mut (), // 2+ results +/// ) -> // first result +/// ``` +pub(crate) fn native_sig(ty: &WasmFuncType, call_conv: &CallingConvention) -> ABISig { + // 6 is used semi-arbitrarily here, we can modify as we see fit. + let mut params: SmallVec<[WasmValType; 6]> = SmallVec::new(); + params.extend_from_slice(&vmctx_types::()); + params.extend_from_slice(ty.params()); + + A::sig_from(¶ms, ty.returns(), call_conv) +} + /// Trait implemented by a specific ISA and used to provide /// information about alignment, parameter passing, usage of /// specific registers, etc. @@ -140,6 +222,13 @@ pub(crate) trait ABI { /// Returns the size in bits of the given [`WasmType`]. fn sizeof_bits(ty: &WasmValType) -> u8; + + /// The target pointer size represented as [WasmValType]. + fn ptr_type() -> WasmValType { + // Defaulting to 64, since we currently only support 64-bit + // architectures. + WasmValType::I64 + } } /// ABI-specific representation of function argument or result. @@ -309,7 +398,7 @@ impl ABIResults { /// Creates [`ABIResults`] from a slice of `WasmType`. /// This function maps the given return types to their ABI specific /// representation. It does so, by iterating over them and applying the - /// given `map` closure. The map closure takes a [WasmType], maps its ABI + /// given `map` closure. The map closure takes a [WasmValType], maps its ABI /// representation, according to the calling convention. In the case of /// results, one result is stored in registers and the rest at particular /// offsets in the stack. diff --git a/winch/codegen/src/codegen/call.rs b/winch/codegen/src/codegen/call.rs index 9e3817f74682..ea0b38a1da43 100644 --- a/winch/codegen/src/codegen/call.rs +++ b/winch/codegen/src/codegen/call.rs @@ -57,12 +57,12 @@ //! └──────────────────────────────────────────────────┘ ------> Stack pointer when emitting the call use crate::{ - abi::{ABIOperand, ABISig, RetArea, ABI}, - codegen::{ - ptr_type_from_ptr_size, BuiltinFunction, BuiltinType, Callee, CalleeInfo, CodeGenContext, - TypedReg, + abi::{vmctx, ABIOperand, ABISig, RetArea, ABI}, + codegen::{BuiltinFunction, BuiltinType, Callee, CalleeInfo, CodeGenContext}, + masm::{ + CalleeKind, ContextArgs, MacroAssembler, MemMoveDirection, OperandSize, SPOffset, + VMContextLoc, }, - masm::{CalleeKind, MacroAssembler, MemMoveDirection, OperandSize, SPOffset}, reg::Reg, stack::Val, }; @@ -75,7 +75,7 @@ pub(crate) struct FnCall {} impl FnCall { /// Orchestrates the emission of a function call: /// 1. Resolves the [`Callee`] through the given callback. - /// 2. Maps the resolved [`Callee`] to the [`CalleeKind`]. + /// 2. Lowers the resolved [`Callee`] to a ([`CalleeKind`], [ContextArgs]) /// 3. Spills the value stack. /// 4. Creates the stack space needed for the return area. /// 5. Emits the call. @@ -86,22 +86,25 @@ impl FnCall { callee: Callee<'a>, ) { let sig = callee.sig(); - let kind = Self::map(&context.vmoffsets, &callee, sig, context, masm); + let (kind, callee_context) = Self::lower(&context.vmoffsets, &callee, sig, context, masm); context.spill(masm); let ret_area = Self::make_ret_area(&sig, masm); let arg_stack_space = sig.params_stack_size(); let reserved_stack = masm.call(arg_stack_space, |masm| { - Self::assign(sig, ret_area.as_ref(), context, masm); + Self::assign(sig, &callee_context, ret_area.as_ref(), context, masm); kind }); - match kind { - CalleeKind::Indirect(r) => context.free_reg(r), - _ => {} - } - - Self::cleanup(sig, reserved_stack, ret_area, masm, context); + Self::cleanup( + sig, + &callee_context, + &kind, + reserved_stack, + ret_area, + masm, + context, + ); } /// Calculates the return area for the callee, if any. @@ -116,28 +119,32 @@ impl FnCall { }) } - /// Maps the given [`Callee`] to a [`CalleeKind`]. - fn map( + /// Lowers the high-level [`Callee`] to a [`CalleeKind`] and + /// [ContextArgs] pair which contains all the metadata needed for + /// emission. + fn lower( vmoffsets: &VMOffsets

, callee: &Callee, sig: &ABISig, context: &mut CodeGenContext, masm: &mut M, - ) -> CalleeKind { + ) -> (CalleeKind, ContextArgs) { + let ptr = vmoffsets.ptr.size(); match callee { - Callee::Builtin(b) => Self::load_builtin(b, context, masm), - Callee::FuncRef(_) => Self::load_funcref(sig, vmoffsets.ptr.size(), context, masm), - Callee::Local(i) => Self::map_local(i), - Callee::Import(i) => Self::load_import(i, sig, context, masm, vmoffsets), + Callee::Builtin(b) => Self::lower_builtin(b, context, masm), + Callee::FuncRef(_) => Self::lower_funcref(sig, ptr, context, masm), + Callee::Local(i) => Self::lower_local::(i), + Callee::Import(i) => Self::lower_import(i, sig, context, masm, vmoffsets), } } - /// Load a built-in function to the next available register. - fn load_builtin( + /// Lowers a builtin function by loading its address to the next available + /// register. + fn lower_builtin( builtin: &BuiltinFunction, context: &mut CodeGenContext, masm: &mut M, - ) -> CalleeKind { + ) -> (CalleeKind, ContextArgs) { match builtin.ty() { BuiltinType::Dynamic { index, base } => { let sig = builtin.sig(); @@ -150,27 +157,29 @@ impl FnCall { masm.load_ptr(addr, callee); callee }); - CalleeKind::indirect(callee) + (CalleeKind::indirect(callee), ContextArgs::pinned_vmctx()) } - BuiltinType::Known(c) => CalleeKind::known(c), + BuiltinType::Known(c) => (CalleeKind::known(c), ContextArgs::none()), } } - /// Map a local function to a [`CalleeKind`]. - fn map_local(info: &CalleeInfo) -> CalleeKind { - CalleeKind::direct(info.index.as_u32()) + /// Lower a local function to a [`CalleeKind`] and [ContextArgs] pair. + fn lower_local(info: &CalleeInfo) -> (CalleeKind, ContextArgs) { + ( + CalleeKind::direct(info.index.as_u32()), + ContextArgs::pinned_callee_and_caller_vmctx(), + ) } - /// Loads a function import to the next available register. - fn load_import( + /// Lowers a function import by loading its address to the next available + /// register. + fn lower_import( info: &CalleeInfo, sig: &ABISig, context: &mut CodeGenContext, masm: &mut M, vmoffsets: &VMOffsets

, - ) -> CalleeKind { - let ptr_type = ptr_type_from_ptr_size(vmoffsets.ptr.size()); - let caller_vmctx = ::vmctx_reg(); + ) -> (CalleeKind, ContextArgs) { let (callee, callee_vmctx) = context.without::<(Reg, Reg), M, _>(&sig.regs, masm, |context, masm| { (context.any_gpr(masm), context.any_gpr(masm)) @@ -183,57 +192,106 @@ impl FnCall { let callee_addr = masm.address_at_vmctx(callee_body_offset); masm.load_ptr(callee_addr, callee); - // Put the callee / caller vmctx at the start of the - // range of the stack so that they are used as first - // and second arguments. - let stack = &mut context.stack; - let location = stack.len().checked_sub(sig.params.len() - 2).unwrap_or(0); - context.stack.insert_many( - location, - &[ - TypedReg::new(ptr_type, callee_vmctx).into(), - TypedReg::new(ptr_type, caller_vmctx).into(), - ], - ); - - CalleeKind::indirect(callee) + ( + CalleeKind::indirect(callee), + ContextArgs::with_callee_and_pinned_caller(callee_vmctx), + ) } - /// Loads a function reference to the next available register. - fn load_funcref( + /// Lowers a function reference by loading its address into the next + /// available register. + fn lower_funcref( sig: &ABISig, ptr: impl PtrSize, context: &mut CodeGenContext, masm: &mut M, - ) -> CalleeKind { + ) -> (CalleeKind, ContextArgs) { // Pop the funcref pointer to a register and allocate a register to hold the // address of the funcref. Since the callee is not addressed from a global non // allocatable register (like the vmctx in the case of an import), we load the // funcref to a register ensuring that it doesn't get assigned to a register // used in the callee's signature. - let (funcref_ptr, funcref) = context.without::<_, M, _>(&sig.regs, masm, |cx, masm| { - (cx.pop_to_reg(masm, None).into(), cx.any_gpr(masm)) - }); + let (funcref_ptr, funcref, callee_vmctx) = + context.without::<_, M, _>(&sig.regs, masm, |cx, masm| { + ( + cx.pop_to_reg(masm, None).into(), + cx.any_gpr(masm), + cx.any_gpr(masm), + ) + }); + + // Load the callee VMContext, that will be passed as first argument to + // the function call. + masm.load_ptr( + masm.address_at_reg(funcref_ptr, ptr.vm_func_ref_vmctx().into()), + callee_vmctx, + ); + // Load the function pointer to be called. masm.load_ptr( masm.address_at_reg(funcref_ptr, ptr.vm_func_ref_wasm_call().into()), funcref, ); context.free_reg(funcref_ptr); - CalleeKind::indirect(funcref) + + ( + CalleeKind::indirect(funcref), + ContextArgs::with_callee_and_pinned_caller(callee_vmctx), + ) + } + + /// Materializes any [ContextArgs] as a function argument. + fn assign_context_args(sig: &ABISig, context: &ContextArgs, masm: &mut M) { + debug_assert!(sig.params().len() >= context.len()); + for (context_arg, operand) in context + .as_slice() + .iter() + .zip(sig.params_without_retptr().iter().take(context.len())) + { + match (context_arg, operand) { + (VMContextLoc::Pinned, ABIOperand::Reg { ty, reg, .. }) => { + masm.mov(vmctx!(M).into(), *reg, (*ty).into()); + } + (VMContextLoc::Pinned, ABIOperand::Stack { ty, offset, .. }) => { + let addr = masm.address_at_sp(SPOffset::from_u32(*offset)); + masm.store(vmctx!(M).into(), addr, (*ty).into()); + } + + (VMContextLoc::Reg(src), ABIOperand::Reg { ty, reg, .. }) => { + masm.mov((*src).into(), *reg, (*ty).into()); + } + + (VMContextLoc::Reg(src), ABIOperand::Stack { ty, offset, .. }) => { + let addr = masm.address_at_sp(SPOffset::from_u32(*offset)); + masm.store((*src).into(), addr, (*ty).into()); + } + } + } } /// Assign arguments for the function call. fn assign( sig: &ABISig, + callee_context: &ContextArgs, ret_area: Option<&RetArea>, context: &mut CodeGenContext, masm: &mut M, ) { let arg_count = sig.params.len_without_retptr(); + debug_assert!(arg_count >= callee_context.len()); let stack = &context.stack; - let stack_values = stack.peekn(arg_count); - for (arg, val) in sig.params_without_retptr().iter().zip(stack_values) { + let stack_values = stack.peekn(arg_count - callee_context.len()); + + if callee_context.len() > 0 { + Self::assign_context_args(&sig, &callee_context, masm); + } + + for (arg, val) in sig + .params_without_retptr() + .iter() + .skip(callee_context.len()) + .zip(stack_values) + { match arg { &ABIOperand::Reg { reg, .. } => { context.move_val_to_reg(&val, reg, masm); @@ -273,24 +331,44 @@ impl FnCall { /// emitting the call. fn cleanup( sig: &ABISig, + callee_context: &ContextArgs, + callee_kind: &CalleeKind, reserved_space: u32, ret_area: Option, masm: &mut M, context: &mut CodeGenContext, ) { + // Free any registers holding any function references. + match callee_kind { + CalleeKind::Indirect(r) => context.free_reg(*r), + _ => {} + } + + // Free any registers used as part of the [ContextArgs]. + for loc in callee_context.as_slice() { + match loc { + VMContextLoc::Reg(r) => context.free_reg(*r), + _ => {} + } + } // Deallocate the reserved space for stack arguments and for alignment, // which was allocated last. masm.free_stack(reserved_space); + debug_assert!(sig.params.len_without_retptr() >= callee_context.len()); + // Drop params from value stack and calculate amount of machine stack // space they consumed. let mut stack_consumed = 0; - context.drop_last(sig.params.len_without_retptr(), |_regalloc, v| { - debug_assert!(v.is_mem() || v.is_const()); - if let Val::Memory(mem) = v { - stack_consumed += mem.slot.size; - } - }); + context.drop_last( + sig.params.len_without_retptr() - callee_context.len(), + |_regalloc, v| { + debug_assert!(v.is_mem() || v.is_const()); + if let Val::Memory(mem) = v { + stack_consumed += mem.slot.size; + } + }, + ); if let Some(ret_area) = ret_area { if stack_consumed > 0 { @@ -326,5 +404,10 @@ impl FnCall { // In the case of [Callee], there's no need to set the [RetArea] of the // signature, as it's only used here to push abi results. context.push_abi_results(&sig.results, masm, |_, _, _| ret_area); + // Reload the [VMContext] pointer into the corresponding pinned + // register. Winch currently doesn't have any callee-saved registers in + // the default ABI. So the callee might clobber the designated pinned + // register. + context.load_vmctx(masm); } } diff --git a/winch/codegen/src/codegen/context.rs b/winch/codegen/src/codegen/context.rs index 542c1c246c5b..553295ec8eae 100644 --- a/winch/codegen/src/codegen/context.rs +++ b/winch/codegen/src/codegen/context.rs @@ -2,7 +2,7 @@ use wasmtime_environ::{VMOffsets, WasmHeapType, WasmValType}; use super::ControlStackFrame; use crate::{ - abi::{ABIOperand, ABIResults, RetArea, ABI}, + abi::{vmctx, ABIOperand, ABIResults, RetArea, ABI}, frame::Frame, isa::reg::RegClass, masm::{MacroAssembler, OperandSize, RegImm, SPOffset, StackSlot}, @@ -184,10 +184,7 @@ impl<'a> CodeGenContext<'a> { Val::F32(v) => masm.store(RegImm::f32(v.bits()), addr, size), Val::F64(v) => masm.store(RegImm::f64(v.bits()), addr, size), Val::Local(local) => { - let slot = self - .frame - .get_local(local.index) - .unwrap_or_else(|| panic!("invalid local at index = {}", local.index)); + let slot = self.frame.get_wasm_local(local.index); let scratch = ::scratch_reg(); let local_addr = masm.local_address(&slot); masm.load(local_addr, scratch, size); @@ -211,10 +208,7 @@ impl<'a> CodeGenContext<'a> { Val::F32(imm) => masm.mov(RegImm::f32(imm.bits()), dst, size), Val::F64(imm) => masm.mov(RegImm::f64(imm.bits()), dst, size), Val::Local(local) => { - let slot = self - .frame - .get_local(local.index) - .unwrap_or_else(|| panic!("invalid local at index = {}", local.index)); + let slot = self.frame.get_wasm_local(local.index); let addr = masm.local_address(&slot); masm.load(addr, dst, size); } @@ -500,6 +494,15 @@ impl<'a> CodeGenContext<'a> { } } + /// Load the [VMContext] pointer into the designated pinned register. + pub fn load_vmctx(&mut self, masm: &mut M) + where + M: MacroAssembler, + { + let addr = masm.local_address(&self.frame.vmctx_slot); + masm.load_ptr(addr, vmctx!(M)); + } + /// Spill locals and registers to memory. // TODO: optimize the spill range; // At any point in the program, the stack might already contain memory @@ -518,7 +521,7 @@ impl<'a> CodeGenContext<'a> { *v = Val::mem(r.ty, slot); } Val::Local(local) => { - let slot = frame.get_local(local.index).expect("valid local at slot"); + let slot = frame.get_wasm_local(local.index); let addr = masm.local_address(&slot); let scratch = ::scratch_for(&slot.ty); masm.load(addr, scratch, slot.ty.into()); diff --git a/winch/codegen/src/codegen/control.rs b/winch/codegen/src/codegen/control.rs index 12da9b5248a1..5b0cadaa3653 100644 --- a/winch/codegen/src/codegen/control.rs +++ b/winch/codegen/src/codegen/control.rs @@ -753,7 +753,7 @@ impl ControlStackFrame { // frame pointer (less) than the destination, perform a memory move of // the bytes to its destination, else stop, because the memory values // are in place. - // * Lastly, iterate over the top `n` elements of the value stack which + // * Lastly, iterate over the top `n` elements of the value stack, // and spill any constant values, placing them in their respective // memory location. // diff --git a/winch/codegen/src/codegen/env.rs b/winch/codegen/src/codegen/env.rs index a0ff08f9d5dd..05bc71116dc1 100644 --- a/winch/codegen/src/codegen/env.rs +++ b/winch/codegen/src/codegen/env.rs @@ -1,9 +1,8 @@ use crate::{ - abi::{ABISig, ABI}, + abi::{wasm_sig, ABISig, ABI}, codegen::{control, BlockSig, BuiltinFunction, BuiltinFunctions, OperandSize}, - isa::{CallingConvention, TargetIsa}, + isa::TargetIsa, }; -use smallvec::SmallVec; use std::collections::{ hash_map::Entry::{Occupied, Vacant}, HashMap, @@ -15,6 +14,16 @@ use wasmtime_environ::{ WasmHeapType, WasmValType, WASM_PAGE_SIZE, }; +#[derive(Debug, Clone, Copy)] +pub struct GlobalData { + /// The offset of the global. + pub offset: u32, + /// True if the global is imported. + pub imported: bool, + /// The WebAssembly type of the global. + pub ty: WasmValType, +} + /// Table metadata. #[derive(Debug, Copy, Clone)] pub struct TableData { @@ -131,6 +140,8 @@ pub struct FuncEnv<'a, 'translation: 'a, 'data: 'translation, P: PtrSize> { /// A map from [TypeIndex] to [ABISig], to keep track of the resolved /// indirect function signatures. resolved_sigs: HashMap, + /// A map from [GlobalIndex] to [GlobalData]. + resolved_globals: HashMap, /// Pointer size represented as a WebAssembly type. ptr_type: WasmValType, /// Whether or not to enable Spectre mitigation on heap bounds checks. @@ -151,6 +162,7 @@ impl<'a, 'translation, 'data, P: PtrSize> FuncEnv<'a, 'translation, 'data, P> { types: &'translation ModuleTypesBuilder, builtins: &'translation mut BuiltinFunctions, isa: &dyn TargetIsa, + ptr_type: WasmValType, ) -> Self { Self { vmoffsets, @@ -160,7 +172,8 @@ impl<'a, 'translation, 'data, P: PtrSize> FuncEnv<'a, 'translation, 'data, P> { resolved_heaps: HashMap::new(), resolved_callees: HashMap::new(), resolved_sigs: HashMap::new(), - ptr_type: ptr_type_from_ptr_size(vmoffsets.ptr.size()), + resolved_globals: HashMap::new(), + ptr_type, heap_access_spectre_mitigation: isa.flags().enable_heap_access_spectre_mitigation(), builtins, } @@ -179,7 +192,7 @@ impl<'a, 'translation, 'data, P: PtrSize> FuncEnv<'a, 'translation, 'data, P> { let val = || { let sig_index = self.translation.module.types[idx].unwrap_function(); let ty = &self.types[sig_index]; - let sig = ::sig(ty, &CallingConvention::Default); + let sig = wasm_sig::(ty); sig }; Callee::FuncRef(self.resolved_sigs.entry(idx).or_insert_with(val)) @@ -190,25 +203,13 @@ impl<'a, 'translation, 'data, P: PtrSize> FuncEnv<'a, 'translation, 'data, P> { where A: ABI, { - let ptr = self.ptr_type(); - let types = &self.translation.get_types(); + let types = self.translation.get_types(); let ty = types[types.core_function_at(idx.as_u32())].unwrap_func(); let ty = self.convert_func_type(ty); let import = self.translation.module.is_imported_function(idx); let val = || { - let info = if import { - let mut params: SmallVec<[WasmValType; 6]> = - SmallVec::with_capacity(ty.params().len() + 2); - params.extend_from_slice(&[ptr, ptr]); - params.extend_from_slice(ty.params()); - let sig = ::sig_from(¶ms, ty.returns(), &CallingConvention::Default); - CalleeInfo { sig, index: idx } - } else { - let sig = ::sig(&ty, &CallingConvention::Default); - CalleeInfo { sig, index: idx } - }; - - info + let sig = wasm_sig::(&ty); + CalleeInfo { sig, index: idx } }; if import { @@ -236,15 +237,23 @@ impl<'a, 'translation, 'data, P: PtrSize> FuncEnv<'a, 'translation, 'data, P> { } } - /// Resolves the type and offset of a global at the given index. - pub fn resolve_global_type_and_offset(&self, index: GlobalIndex) -> (WasmValType, u32) { + /// Resolves [GlobalData] of a global at the given index. + pub fn resolve_global(&mut self, index: GlobalIndex) -> GlobalData { let ty = self.translation.module.globals[index].wasm_ty; - let offset = match self.translation.module.defined_global_index(index) { - Some(defined_index) => self.vmoffsets.vmctx_vmglobal_definition(defined_index), - None => self.vmoffsets.vmctx_vmglobal_import_from(index), + let val = || match self.translation.module.defined_global_index(index) { + Some(defined_index) => GlobalData { + offset: self.vmoffsets.vmctx_vmglobal_definition(defined_index), + imported: false, + ty, + }, + None => GlobalData { + offset: self.vmoffsets.vmctx_vmglobal_import_from(index), + imported: true, + ty, + }, }; - (ty, offset) + *self.resolved_globals.entry(index).or_insert_with(val) } /// Returns the table information for the given table index. diff --git a/winch/codegen/src/codegen/mod.rs b/winch/codegen/src/codegen/mod.rs index 47861ac3e1e3..1438b2026556 100644 --- a/winch/codegen/src/codegen/mod.rs +++ b/winch/codegen/src/codegen/mod.rs @@ -1,17 +1,19 @@ use crate::{ - abi::{ABIOperand, ABISig, RetArea, ABI}, + abi::{vmctx, ABIOperand, ABISig, RetArea, ABI}, codegen::BlockSig, isa::reg::Reg, masm::{ExtendKind, IntCmpKind, MacroAssembler, OperandSize, RegImm, SPOffset, TrapCode}, stack::TypedReg, }; + use anyhow::Result; use smallvec::SmallVec; use wasmparser::{ BinaryReader, FuncValidator, MemArg, Operator, ValidatorResources, VisitOperator, }; use wasmtime_environ::{ - MemoryIndex, PtrSize, TableIndex, TypeIndex, WasmHeapType, WasmValType, FUNCREF_MASK, + GlobalIndex, MemoryIndex, PtrSize, TableIndex, TypeIndex, WasmHeapType, WasmValType, + FUNCREF_MASK, }; mod context; @@ -86,6 +88,9 @@ where fn emit_start(&mut self) -> Result<()> { self.masm.prologue(); + // Pin the `VMContext` pointer. + self.pin_vmctx(); + // Stack overflow checks must occur during the function prologue to ensure that unwinding // will not assume they're user-handlable exceptions. As the `save_clobbers` call below // marks the end of the prologue for unwinding annotations, we make the stack check here. @@ -157,6 +162,18 @@ where } } + /// Assigns the [VMContext] pointer to the designated, pinned [VMContext] + /// register. + fn pin_vmctx(&mut self) { + let pinned = vmctx!(M); + let vmctx = self.sig.params().first().expect("VMContext argument"); + self.masm.mov( + vmctx.unwrap_reg().into(), + pinned, + self.env.ptr_type().into(), + ); + } + fn emit_body( &mut self, body: &mut BinaryReader<'a>, @@ -166,12 +183,6 @@ where let defined_locals_range = &self.context.frame.defined_locals_range; self.masm.zero_mem_range(defined_locals_range.as_range()); - // Save the vmctx pointer to its local slot in case we need to reload it - // at any point. - let vmctx_addr = self.masm.local_address(&self.context.frame.vmctx_slot); - self.masm - .store_ptr(::vmctx_reg().into(), vmctx_addr); - // Save the results base parameter register into its slot. self.sig.params.has_retptr().then(|| { match self.sig.params.unwrap_results_area_operand() { @@ -332,11 +343,7 @@ where .filter(|(_, a)| a.is_reg()) .for_each(|(index, arg)| { let ty = arg.ty(); - let local = self - .context - .frame - .get_local(index as u32) - .expect("valid local slot at location"); + let local = self.context.frame.get_frame_local(index); let addr = self.masm.local_address(local); let src = arg .get_reg() @@ -372,6 +379,22 @@ where src } + /// Loads the address of the given global. + pub fn emit_get_global_addr(&mut self, index: GlobalIndex) -> (WasmValType, M::Address) { + let data = self.env.resolve_global(index); + + let addr = if data.imported { + let global_base = self.masm.address_at_reg(vmctx!(M), data.offset); + let scratch = ::scratch_reg(); + self.masm.load_ptr(global_base, scratch); + self.masm.address_at_reg(scratch, 0) + } else { + self.masm.address_at_reg(vmctx!(M), data.offset) + }; + + (data.ty, addr) + } + pub fn emit_lazy_init_funcref(&mut self, table_index: TableIndex) { let table_data = self.env.resolve_table_data(table_index); let ptr_type = self.env.ptr_type(); @@ -380,11 +403,11 @@ where .builtins .table_get_lazy_init_func_ref::(); - // Request the builtin's result register and use it to hold the - // table element value. We preemptively request this register to - // avoid conflict at the control flow merge below. - // Requesting the result register is safe since we know ahead-of-time - // the builtin's signature. + // Request the builtin's result register and use it to hold the table + // element value. We preemptively spill and request this register to + // avoid conflict at the control flow merge below. Requesting the result + // register is safe since we know ahead-of-time the builtin's signature. + self.context.spill(self.masm); let elem_value: Reg = self .context .reg( @@ -407,11 +430,9 @@ where let (defined, cont) = (self.masm.get_label(), self.masm.get_label()); // Push the built-in arguments to the stack. - self.context.stack.extend([ - TypedReg::new(ptr_type, ::vmctx_reg()).into(), - table_index.as_u32().try_into().unwrap(), - index.into(), - ]); + self.context + .stack + .extend([table_index.as_u32().try_into().unwrap(), index.into()]); self.masm.branch( IntCmpKind::Ne, diff --git a/winch/codegen/src/frame/mod.rs b/winch/codegen/src/frame/mod.rs index 2c1b931375de..a467f61ac4fc 100644 --- a/winch/codegen/src/frame/mod.rs +++ b/winch/codegen/src/frame/mod.rs @@ -78,7 +78,7 @@ pub(crate) struct Frame { /// /// Locals get calculated when allocating a frame and are readonly /// through the function compilation lifetime. - pub locals: Locals, + locals: Locals, /// The offset to the slot containing the `VMContext`. pub vmctx_slot: LocalSlot, @@ -101,22 +101,33 @@ impl Frame { .map(|l| LocalSlot::new(l.ty, l.offset + defined_locals_start)), ); - // Align the locals to add a slot for the VMContext pointer. - let ptr_size = ::word_bytes() as u32; - let vmctx_offset = - align_to(defined_locals_start + defined_locals.stack_size, ptr_size) + ptr_size; + let stack_align = ::stack_align(); + let defined_locals_end = align_to( + defined_locals_start + defined_locals.stack_size, + stack_align as u32, + ); + // Handle the results base slot for multi value returns. let (results_base_slot, locals_size) = if sig.params.has_retptr() { match sig.params.unwrap_results_area_operand() { + // If the results operand is a stack argument, ensure the + // offset is correctly calculated, that is, that it includes the + // argument base offset. + // In this case, the locals size, remains untouched as we don't + // need to create an extra slot for it. ABIOperand::Stack { ty, offset, .. } => ( Some(LocalSlot::stack_arg( *ty, *offset + (::arg_base_offset() as u32), )), - align_to(vmctx_offset, ::stack_align().into()), + defined_locals_end, ), - ABIOperand::Reg { ty, .. } => { - let offs = align_to(vmctx_offset, ptr_size) + ptr_size; + // If the resuls operand is a register, we give this register + // the same treatment as all the other argument registers and + // spill it, therefore, we need to increase the locals size by + // one slot. + ABIOperand::Reg { ty, size, .. } => { + let offs = align_to(defined_locals_end, *size) + *size; ( Some(LocalSlot::new(*ty, offs)), align_to(offs, ::stack_align().into()), @@ -124,16 +135,14 @@ impl Frame { } } } else { - ( - None, - align_to(vmctx_offset, ::stack_align().into()), - ) + (None, defined_locals_end) }; + let vmctx_slot = *locals.get(0).expect("LocalSlot for VMContext"); Ok(Self { locals, locals_size, - vmctx_slot: LocalSlot::i64(vmctx_offset), + vmctx_slot, defined_locals_range: DefinedLocalsRange( defined_locals_start..(defined_locals_start + defined_locals.stack_size), ), @@ -141,9 +150,38 @@ impl Frame { }) } - /// Get a local slot. - pub fn get_local(&self, index: u32) -> Option<&LocalSlot> { - self.locals.get(index as usize) + // Winch's ABI uses two extra parameters to store the callee and caller + // VMContext pointers. + // These arguments are spilled and treated as frame locals, but not + // WebAssembly locals. + const WASM_LOCALS_OFFSET: usize = 2; + + /// Get the [LocalSlot] for a WebAssembly local. + /// This method assumes that the index is bound to u32::MAX, representing + /// the index space for WebAssembly locals. + /// + /// # Panics + /// This method panics if the index is not associated to a valid WebAssembly + /// local. + pub fn get_wasm_local(&self, index: u32) -> &LocalSlot { + let local_index = Self::WASM_LOCALS_OFFSET + index as usize; + self.locals + .get(local_index) + .unwrap_or_else(|| panic!(" Expected WebAssembly local at slot: {index}")) + } + + /// Get the [LocalSlot] for a frame local. + /// This method doesn't make any asumptions about the local index passed in, + /// and simply delegates the [LocalSlot] retrieval to the underlying locals + /// vector. + /// + /// # Panics + /// This method panics if the index is not associated to a valid WebAssembly + /// local. + pub fn get_frame_local(&self, index: usize) -> &LocalSlot { + self.locals + .get(index) + .unwrap_or_else(|| panic!(" Expected Frame local at slot: {index}")) } /// Returns the address of the local at the given index. @@ -155,9 +193,8 @@ impl Frame { index: u32, masm: &mut M, ) -> (WasmValType, M::Address) { - self.get_local(index) - .map(|slot| (slot.ty, masm.local_address(slot))) - .unwrap_or_else(|| panic!("Invalid local slot: {}", index)) + let slot = self.get_wasm_local(index); + (slot.ty, masm.local_address(&slot)) } fn compute_arg_slots(sig: &ABISig) -> Result<(Locals, u32)> { diff --git a/winch/codegen/src/isa/aarch64/mod.rs b/winch/codegen/src/isa/aarch64/mod.rs index c4e1924547e3..4e7db5ac0e06 100644 --- a/winch/codegen/src/isa/aarch64/mod.rs +++ b/winch/codegen/src/isa/aarch64/mod.rs @@ -1,9 +1,9 @@ use self::regs::{ALL_GPR, MAX_FPR, MAX_GPR, NON_ALLOCATABLE_GPR}; use crate::{ - abi::ABI, + abi::{wasm_sig, ABI}, codegen::{CodeGen, CodeGenContext, FuncEnv}, frame::{DefinedLocals, Frame}, - isa::{Builder, CallingConvention, TargetIsa}, + isa::{Builder, TargetIsa}, masm::MacroAssembler, regalloc::RegAlloc, regset::RegBitSet, @@ -96,9 +96,16 @@ impl TargetIsa for Aarch64 { let mut body = body.get_binary_reader(); let mut masm = Aarch64Masm::new(pointer_bytes, self.shared_flags.clone()); let stack = Stack::new(); - let abi_sig = abi::Aarch64ABI::sig(sig, &CallingConvention::Default); - - let env = FuncEnv::new(&vmoffsets, translation, types, builtins, self); + let abi_sig = wasm_sig::(sig); + + let env = FuncEnv::new( + &vmoffsets, + translation, + types, + builtins, + self, + abi::Aarch64ABI::ptr_type(), + ); let defined_locals = DefinedLocals::new::(&env, &mut body, validator)?; let frame = Frame::new::(&abi_sig, &defined_locals)?; let gpr = RegBitSet::int( diff --git a/winch/codegen/src/isa/x64/mod.rs b/winch/codegen/src/isa/x64/mod.rs index bcb263a5c296..b420711bb8a6 100644 --- a/winch/codegen/src/isa/x64/mod.rs +++ b/winch/codegen/src/isa/x64/mod.rs @@ -1,10 +1,10 @@ use crate::{ - abi::ABI, + abi::{wasm_sig, ABI}, codegen::{BuiltinFunctions, CodeGen, CodeGenContext, FuncEnv}, }; use crate::frame::{DefinedLocals, Frame}; -use crate::isa::{x64::masm::MacroAssembler as X64Masm, CallingConvention}; +use crate::isa::x64::masm::MacroAssembler as X64Masm; use crate::masm::MacroAssembler; use crate::regalloc::RegAlloc; use crate::stack::Stack; @@ -105,9 +105,17 @@ impl TargetIsa for X64 { self.isa_flags.clone(), ); let stack = Stack::new(); - let abi_sig = abi::X64ABI::sig(sig, &CallingConvention::Default); - let env = FuncEnv::new(&vmoffsets, translation, types, builtins, self); + let abi_sig = wasm_sig::(sig); + + let env = FuncEnv::new( + &vmoffsets, + translation, + types, + builtins, + self, + abi::X64ABI::ptr_type(), + ); let defined_locals = DefinedLocals::new::(&env, &mut body, validator)?; let frame = Frame::new::(&abi_sig, &defined_locals)?; let gpr = RegBitSet::int( diff --git a/winch/codegen/src/masm.rs b/winch/codegen/src/masm.rs index 428dd112ba10..7aba29328b99 100644 --- a/winch/codegen/src/masm.rs +++ b/winch/codegen/src/masm.rs @@ -264,15 +264,11 @@ impl Imm { } /// Create a new F32 immediate. - // Temporary until support for f32.const is added. - #[allow(dead_code)] pub fn f32(bits: u32) -> Self { Self::F32(bits) } /// Create a new F64 immediate. - // Temporary until support for f64.const is added. - #[allow(dead_code)] pub fn f64(bits: u64) -> Self { Self::F64(bits) } @@ -287,6 +283,83 @@ impl Imm { } } +/// The location of the [VMcontext] used for function calls. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub(crate) enum VMContextLoc { + /// Dynamic, stored in the given register. + Reg(Reg), + /// The pinned [VMContext] register. + Pinned, +} + +/// The maximum number of context arguments currently used across the compiler. +pub(crate) const MAX_CONTEXT_ARGS: usize = 2; + +/// Out-of-band special purpose arguments used for function call emission. +/// +/// We cannot rely on the value stack for these values given that inserting +/// register or memory values at arbitrary locations of the value stack has the +/// potential to break the stack ordering principle, which states that older +/// values must always precede newer values, effectively simulating the order of +/// values in the machine stack. +/// The [ContextArgs] are meant to be resolved at every callsite; in some cases +/// it might be possible to construct it early on, but given that it might +/// contain allocatable registers, it's preferred to construct it in +/// [FnCall::emit]. +#[derive(Clone, Debug)] +pub(crate) enum ContextArgs { + /// No context arguments required. This is used for libcalls that don't + /// require any special context arguments. For example builtin functions + /// that perform float calculations. + None, + /// A single context argument is required; the current pinned [VMcontext] + /// register must be passed as the first argument of the function call. + VMContext([VMContextLoc; 1]), + /// The callee and caller context arguments are required. In this case, the + /// callee context argument is usually stored into an allocatable register + /// and the caller is always the current pinned [VMContext] pointer. + CalleeAndCallerVMContext([VMContextLoc; MAX_CONTEXT_ARGS]), +} + +impl ContextArgs { + /// Construct an empty [ContextArgs]. + pub fn none() -> Self { + Self::None + } + + /// Construct a [ContextArgs] declaring the usage of the pinned [VMContext] + /// register as both the caller and callee context arguments. + pub fn pinned_callee_and_caller_vmctx() -> Self { + Self::CalleeAndCallerVMContext([VMContextLoc::Pinned, VMContextLoc::Pinned]) + } + + /// Construct a [ContextArgs] that declares the usage of the pinned + /// [VMContext] register as the only context argument. + pub fn pinned_vmctx() -> Self { + Self::VMContext([VMContextLoc::Pinned]) + } + + /// Construct a [ContextArgs] that declares a dynamic callee context and the + /// pinned [VMContext] register as the context arguments. + pub fn with_callee_and_pinned_caller(callee_vmctx: Reg) -> Self { + Self::CalleeAndCallerVMContext([VMContextLoc::Reg(callee_vmctx), VMContextLoc::Pinned]) + } + + /// Get the length of the [ContextArgs]. + pub fn len(&self) -> usize { + self.as_slice().len() + } + + /// Get a slice of the context arguments. + pub fn as_slice(&self) -> &[VMContextLoc] { + match self { + Self::None => &[], + Self::VMContext(a) => a.as_slice(), + Self::CalleeAndCallerVMContext(a) => a.as_slice(), + } + } +} + #[derive(Copy, Clone, Debug)] pub(crate) enum CalleeKind { /// A function call to a raw address. diff --git a/winch/codegen/src/trampoline.rs b/winch/codegen/src/trampoline.rs index 179929717c3e..37e2ae1a02bb 100644 --- a/winch/codegen/src/trampoline.rs +++ b/winch/codegen/src/trampoline.rs @@ -10,10 +10,10 @@ // and VM context type should be derived from the ABI's pointer size. This is // going to be relevant once 32-bit architectures are supported. use crate::{ - abi::{ABIOperand, ABIParams, ABISig, RetArea, ABI}, + abi::{array_sig, native_sig, wasm_sig, ABIOperand, ABIParams, ABISig, RetArea, ABI}, codegen::ptr_type_from_ptr_size, isa::CallingConvention, - masm::{CalleeKind, MacroAssembler, OperandSize, RegImm, SPOffset}, + masm::{CalleeKind, MacroAssembler, OperandSize, RegImm, SPOffset, MAX_CONTEXT_ARGS}, reg::Reg, }; use anyhow::{anyhow, Result}; @@ -89,8 +89,8 @@ where /// Emit an array-to-wasm trampoline. pub fn emit_array_to_wasm(mut self, ty: &WasmFuncType, callee_index: FuncIndex) -> Result<()> { - let array_sig = self.array_sig(); - let wasm_sig = self.wasm_sig(ty); + let array_sig = array_sig::(&self.call_conv); + let wasm_sig: ABISig = wasm_sig::(&ty); let val_ptr = array_sig .params @@ -100,19 +100,20 @@ where self.prologue_with_callee_saved(); - // Get the VM context pointer and move it to the designated pinned - // register. + // Assign the caller and caller VMContext arguments. let (vmctx, caller_vmctx) = Self::callee_and_caller_vmctx(&array_sig.params)?; - + let (dst_callee_vmctx, dst_caller_vmctx) = Self::callee_and_caller_vmctx(&wasm_sig.params)?; + self.masm + .mov(vmctx.into(), dst_callee_vmctx, self.pointer_type.into()); self.masm.mov( - vmctx.into(), - ::vmctx_reg().into(), - OperandSize::S64, + caller_vmctx.into(), + dst_caller_vmctx, + self.pointer_type.into(), ); let ret_area = self.make_ret_area(&wasm_sig); - let vmctx_runtime_limits_addr = self.vmctx_runtime_limits_addr(caller_vmctx); - let (offsets, spill_size) = self.spill(array_sig.params()); + let vmctx_runtime_limits_addr = self.vmctx_runtime_limits_addr(vmctx); + let (offsets, spill_size) = self.spill(&array_sig.params()[2..]); // Call the function that was passed into the trampoline. let allocated_stack = self.masm.call(wasm_sig.params_stack_size(), |masm| { @@ -144,7 +145,7 @@ where // Move the val ptr back into the scratch register so we can // load the return values. - let val_ptr_offset = offsets[2]; + let val_ptr_offset = offsets[0]; self.masm .load_ptr(self.masm.address_from_sp(val_ptr_offset), self.scratch_reg); @@ -191,19 +192,13 @@ where /// Emit a native-to-wasm trampoline. pub fn emit_native_to_wasm(mut self, ty: &WasmFuncType, callee_index: FuncIndex) -> Result<()> { - let native_sig = self.native_sig(&ty); - let wasm_sig = self.wasm_sig(&ty); - let (vmctx, caller_vmctx) = Self::callee_and_caller_vmctx(&native_sig.params)?; + let native_sig = native_sig::(&ty, &self.call_conv); + let wasm_sig = wasm_sig::(&ty); + let (vmctx, _) = Self::callee_and_caller_vmctx(&native_sig.params)?; self.prologue_with_callee_saved(); - // Move the VM context pointer to the designated pinned register. - self.masm.mov( - vmctx.into(), - ::vmctx_reg().into(), - OperandSize::S64, - ); - let vmctx_runtime_limits_addr = self.vmctx_runtime_limits_addr(caller_vmctx); + let vmctx_runtime_limits_addr = self.vmctx_runtime_limits_addr(vmctx); let ret_area = self.make_ret_area(&wasm_sig); let (offsets, spill_size) = self.spill(native_sig.params()); @@ -221,8 +216,8 @@ where Self::assign_args( masm, &wasm_sig.params_without_retptr(), - &native_sig.params_without_retptr()[2..], - &offsets[2..], + &native_sig.params_without_retptr(), + &offsets, self.scratch_reg, ); Self::load_retptr(masm, ret_area.as_ref(), &wasm_sig); @@ -362,12 +357,8 @@ where /// Emit a wasm-to-native trampoline. pub fn emit_wasm_to_native(mut self, ty: &WasmFuncType) -> Result<()> { - let mut params = self.callee_and_caller_vmctx_types(); - params.extend_from_slice(ty.params()); - - let wasm_ty = WasmFuncType::new(params.into_boxed_slice(), ty.returns().into()); - let wasm_sig = self.wasm_sig(&wasm_ty); - let native_sig = self.native_sig(ty); + let wasm_sig = wasm_sig::(&ty); + let native_sig = native_sig::(ty, &self.call_conv); let (vmctx, caller_vmctx) = Self::callee_and_caller_vmctx(&wasm_sig.params).unwrap(); let vmctx_runtime_limits_addr = self.vmctx_runtime_limits_addr(caller_vmctx); @@ -490,68 +481,6 @@ where ); } - /// Get the type of the caller and callee VM contexts. - fn callee_and_caller_vmctx_types(&self) -> SmallVec<[WasmValType; 2]> { - std::iter::repeat(self.pointer_type).take(2).collect() - } - - /// Returns an [ABISig] for the array calling convention. - /// The signature looks like: - /// ```ignore - /// unsafe extern "C" fn( - /// callee_vmctx: *mut VMOpaqueContext, - /// caller_vmctx: *mut VMOpaqueContext, - /// values_ptr: *mut ValRaw, - /// values_len: usize, - /// ) - /// ``` - fn array_sig(&self) -> ABISig { - let mut params = self.callee_and_caller_vmctx_types(); - params.extend_from_slice(&[self.pointer_type, self.pointer_type]); - ::sig_from(¶ms, &[], self.call_conv) - } - - /// Returns an [ABISig] that follows a variation of the system's - /// calling convention. - /// The main difference between the flavor of the returned signature - /// and the vanilla signature is how multiple values are returned. - /// Multiple returns are handled following Wasmtime's expectations: - /// * A single value is returned via a register according to the calling - /// convention. - /// * More than one values are returned via a return pointer. - /// These variations look like: - /// - /// Single return value. - /// - /// ```ignore - /// unsafe extern "C" fn( - /// callee_vmctx: *mut VMOpaqueContext, - /// caller_vmctx: *mut VMOpaqueContext, - /// // rest of paramters - /// ) -> // single result - /// ``` - /// - /// Multiple return values. - /// - /// ```ignore - /// unsafe extern "C" fn( - /// callee_vmctx: *mut VMOpaqueContext, - /// caller_vmctx: *mut VMOpaqueContext, - /// // rest of parameters - /// retptr: *mut (), // 2+ results - /// ) -> // first result - /// ``` - fn native_sig(&self, ty: &WasmFuncType) -> ABISig { - let mut params = self.callee_and_caller_vmctx_types(); - params.extend_from_slice(ty.params()); - ::sig_from(¶ms, ty.returns(), self.call_conv) - } - - /// Returns an [ABISig] using the Winch's default calling convention. - fn wasm_sig(&self, ty: &WasmFuncType) -> ABISig { - ::sig(ty, &CallingConvention::Default) - } - /// Returns the register pair containing the callee and caller VM context pointers. fn callee_and_caller_vmctx(params: &ABIParams) -> Result<(Reg, Reg)> { let vmctx = params @@ -567,11 +496,9 @@ where /// Returns the address of the VM context runtime limits /// field. - fn vmctx_runtime_limits_addr(&mut self, caller_vmctx: Reg) -> M::Address { - self.masm.address_at_reg( - caller_vmctx, - self.pointer_size.vmcontext_runtime_limits().into(), - ) + fn vmctx_runtime_limits_addr(&mut self, vmctx: Reg) -> M::Address { + self.masm + .address_at_reg(vmctx, self.pointer_size.vmcontext_runtime_limits().into()) } /// Performs a spill of the given operands. @@ -601,6 +528,7 @@ where callee_sig .params_without_retptr() .iter() + .skip(MAX_CONTEXT_ARGS) .enumerate() .for_each(|(i, param)| { let value_offset = (i * VALUE_SIZE) as u32; diff --git a/winch/codegen/src/visitor.rs b/winch/codegen/src/visitor.rs index e07355616546..3ad1ec585aa4 100644 --- a/winch/codegen/src/visitor.rs +++ b/winch/codegen/src/visitor.rs @@ -4,7 +4,7 @@ //! which validates and dispatches to the corresponding //! machine code emitter. -use crate::abi::{RetArea, ABI}; +use crate::abi::RetArea; use crate::codegen::{control_index, Callee, CodeGen, ControlStackFrame, FnCall}; use crate::masm::{ DivKind, ExtendKind, FloatCmpKind, IntCmpKind, MacroAssembler, MemMoveDirection, OperandSize, @@ -1335,10 +1335,7 @@ where fn visit_local_get(&mut self, index: u32) { use WasmValType::*; let context = &mut self.context; - let slot = context - .frame - .get_local(index) - .unwrap_or_else(|| panic!("valid local at slot = {}", index)); + let slot = context.frame.get_wasm_local(index); match slot.ty { I32 | I64 | F32 | F64 => context.stack.push(Val::local(index, slot.ty)), Ref(rt) => match rt.heap_type { @@ -1397,20 +1394,12 @@ where } fn visit_table_init(&mut self, elem: u32, table: u32) { - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); - debug_assert!(self.context.stack.len() >= 3); let at = self.context.stack.len() - 3; - self.context.stack.insert_many( - at, - &[ - vmctx.into(), - table.try_into().unwrap(), - elem.try_into().unwrap(), - ], - ); + self.context + .stack + .insert_many(at, &[table.try_into().unwrap(), elem.try_into().unwrap()]); let builtin = self.env.builtins.table_init::(); FnCall::emit::( @@ -1421,18 +1410,11 @@ where } fn visit_table_copy(&mut self, dst: u32, src: u32) { - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); debug_assert!(self.context.stack.len() >= 3); let at = self.context.stack.len() - 3; - self.context.stack.insert_many( - at, - &[ - vmctx.into(), - dst.try_into().unwrap(), - src.try_into().unwrap(), - ], - ); + self.context + .stack + .insert_many(at, &[dst.try_into().unwrap(), src.try_into().unwrap()]); let builtin = self.env.builtins.table_copy::(); FnCall::emit::(self.masm, &mut self.context, Callee::Builtin(builtin)) @@ -1453,8 +1435,6 @@ where } fn visit_table_grow(&mut self, table: u32) { - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); let table_index = TableIndex::from_u32(table); let table_plan = self.env.table_plan(table_index); let builtin = match table_plan.table.wasm_ty.heap_type { @@ -1476,7 +1456,7 @@ where self.context.stack.inner_mut().swap(len - 1, len - 2); self.context .stack - .insert_many(at, &[vmctx.into(), table.try_into().unwrap()]); + .insert_many(at, &[table.try_into().unwrap()]); FnCall::emit::( self.masm, @@ -1492,8 +1472,6 @@ where } fn visit_table_fill(&mut self, table: u32) { - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); let table_index = TableIndex::from_u32(table); let table_plan = self.env.table_plan(table_index); let builtin = match table_plan.table.wasm_ty.heap_type { @@ -1506,7 +1484,7 @@ where let at = len - 3; self.context .stack - .insert_many(at, &[vmctx.into(), table.try_into().unwrap()]); + .insert_many(at, &[table.try_into().unwrap()]); FnCall::emit::( self.masm, &mut self.context, @@ -1552,27 +1530,17 @@ where } fn visit_elem_drop(&mut self, index: u32) { - let ptr_type = self.env.ptr_type(); let elem_drop = self.env.builtins.elem_drop::(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); - self.context - .stack - .extend([vmctx.into(), index.try_into().unwrap()]); + self.context.stack.extend([index.try_into().unwrap()]); FnCall::emit::(self.masm, &mut self.context, Callee::Builtin(elem_drop)) } fn visit_memory_init(&mut self, data_index: u32, mem: u32) { debug_assert!(self.context.stack.len() >= 3); - let ptr_type = self.env.ptr_type(); let at = self.context.stack.len() - 3; - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); self.context.stack.insert_many( at, - &[ - vmctx.into(), - mem.try_into().unwrap(), - data_index.try_into().unwrap(), - ], + &[mem.try_into().unwrap(), data_index.try_into().unwrap()], ); let builtin = self.env.builtins.memory_init::(); FnCall::emit::(self.masm, &mut self.context, Callee::Builtin(builtin)) @@ -1585,8 +1553,6 @@ where // [ vmctx, dst_mem, dst_offset, src_mem, src_offset, len ] // Which is the order expected by the builtin function. debug_assert!(self.context.stack.len() >= 3); - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); let at = self.context.stack.len() - 2; self.context .stack @@ -1596,7 +1562,7 @@ where let at = self.context.stack.len() - 4; self.context .stack - .insert_many(at, &[vmctx.into(), dst_mem.try_into().unwrap()]); + .insert_many(at, &[dst_mem.try_into().unwrap()]); let builtin = self.env.builtins.memory_copy::(); @@ -1605,13 +1571,11 @@ where fn visit_memory_fill(&mut self, mem: u32) { debug_assert!(self.context.stack.len() >= 3); - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); let at = self.context.stack.len() - 3; self.context .stack - .insert_many(at, &[vmctx.into(), mem.try_into().unwrap()]); + .insert_many(at, &[mem.try_into().unwrap()]); let builtin = self.env.builtins.memory_fill::(); FnCall::emit::(self.masm, &mut self.context, Callee::Builtin(builtin)) @@ -1624,13 +1588,9 @@ where fn visit_memory_grow(&mut self, mem: u32, _: u8) { debug_assert!(self.context.stack.len() >= 1); - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); - let at = self.context.stack.len() - 1; // The stack at this point contains: [ delta ] // The desired state is // [ vmctx, delta, index ] - self.context.stack.insert_many(at, &[vmctx.into()]); self.context.stack.extend([mem.try_into().unwrap()]); let builtin = self.env.builtins.memory32_grow::(); @@ -1638,11 +1598,7 @@ where } fn visit_data_drop(&mut self, data_index: u32) { - let ptr_type = self.env.ptr_type(); - let vmctx = TypedReg::new(ptr_type, ::vmctx_reg()); - self.context - .stack - .extend([vmctx.into(), data_index.try_into().unwrap()]); + self.context.stack.extend([data_index.try_into().unwrap()]); let builtin = self.env.builtins.data_drop::(); FnCall::emit::(self.masm, &mut self.context, Callee::Builtin(builtin)) @@ -1858,10 +1814,7 @@ where fn visit_global_get(&mut self, global_index: u32) { let index = GlobalIndex::from_u32(global_index); - let (ty, offset) = self.env.resolve_global_type_and_offset(index); - let addr = self - .masm - .address_at_reg(::vmctx_reg(), offset); + let (ty, addr) = self.emit_get_global_addr(index); let dst = self.context.reg_for_type(ty, self.masm); self.masm.load(addr, dst, ty.into()); self.context.stack.push(Val::reg(dst, ty)); @@ -1869,10 +1822,8 @@ where fn visit_global_set(&mut self, global_index: u32) { let index = GlobalIndex::from_u32(global_index); - let (ty, offset) = self.env.resolve_global_type_and_offset(index); - let addr = self - .masm - .address_at_reg(::vmctx_reg(), offset); + let (ty, addr) = self.emit_get_global_addr(index); + let typed_reg = self.context.pop_to_reg(self.masm, None); self.context.free_reg(typed_reg.reg); self.masm.store(typed_reg.reg.into(), addr, ty.into()); diff --git a/winch/filetests/filetests/aarch64/i32_add/const.wat b/winch/filetests/filetests/aarch64/i32_add/const.wat index 6a632c1d6708..969a5479a5fe 100644 --- a/winch/filetests/filetests/aarch64/i32_add/const.wat +++ b/winch/filetests/filetests/aarch64/i32_add/const.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 500180d2 mov x16, #0xa ;; e003102a mov w0, w16 ;; 00500011 add w0, w0, #0x14 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/locals.wat b/winch/filetests/filetests/aarch64/i32_add/locals.wat index 4a5a4102852b..a404a9500c36 100644 --- a/winch/filetests/filetests/aarch64/i32_add/locals.wat +++ b/winch/filetests/filetests/aarch64/i32_add/locals.wat @@ -19,22 +19,24 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff4300d1 sub sp, sp, #0x10 +;; e90300aa mov x9, x0 +;; ff6300d1 sub sp, sp, #0x18 ;; fc030091 mov x28, sp +;; 800301f8 stur x0, [x28, #0x10] +;; 818300f8 stur x1, [x28, #8] ;; 100080d2 mov x16, #0 -;; 908300f8 stur x16, [x28, #8] -;; 890300f8 stur x9, [x28] +;; 900300f8 stur x16, [x28] ;; 500180d2 mov x16, #0xa ;; e003102a mov w0, w16 -;; 80c300b8 stur w0, [x28, #0xc] +;; 804300b8 stur w0, [x28, #4] ;; 900280d2 mov x16, #0x14 ;; e003102a mov w0, w16 -;; 808300b8 stur w0, [x28, #8] -;; 808340b8 ldur w0, [x28, #8] -;; 81c340b8 ldur w1, [x28, #0xc] +;; 800300b8 stur w0, [x28] +;; 800340b8 ldur w0, [x28] +;; 814340b8 ldur w1, [x28, #4] ;; 2160200b add w1, w1, w0, uxtx ;; e003012a mov w0, w1 -;; ff430091 add sp, sp, #0x10 +;; ff630091 add sp, sp, #0x18 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/max.wat b/winch/filetests/filetests/aarch64/i32_add/max.wat index c59efbd6a776..6dd2300e0929 100644 --- a/winch/filetests/filetests/aarch64/i32_add/max.wat +++ b/winch/filetests/filetests/aarch64/i32_add/max.wat @@ -9,13 +9,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07b40b2 orr x16, xzr, #0x7fffffff ;; e003102a mov w0, w16 ;; 00040011 add w0, w0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/max_one.wat b/winch/filetests/filetests/aarch64/i32_add/max_one.wat index 94e784060c5d..5b85216ed267 100644 --- a/winch/filetests/filetests/aarch64/i32_add/max_one.wat +++ b/winch/filetests/filetests/aarch64/i32_add/max_one.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000b0d2 mov x16, #0x80000000 ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 0060300b add w0, w0, w16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/mixed.wat b/winch/filetests/filetests/aarch64/i32_add/mixed.wat index 1ba12b3560af..f02623263913 100644 --- a/winch/filetests/filetests/aarch64/i32_add/mixed.wat +++ b/winch/filetests/filetests/aarch64/i32_add/mixed.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07f40b2 orr x16, xzr, #0xffffffff ;; e003102a mov w0, w16 ;; 00040011 add w0, w0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/params.wat b/winch/filetests/filetests/aarch64/i32_add/params.wat index 93d1335b7eae..4da6b3cdabd9 100644 --- a/winch/filetests/filetests/aarch64/i32_add/params.wat +++ b/winch/filetests/filetests/aarch64/i32_add/params.wat @@ -10,16 +10,18 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff4300d1 sub sp, sp, #0x10 +;; e90300aa mov x9, x0 +;; ff6300d1 sub sp, sp, #0x18 ;; fc030091 mov x28, sp -;; 80c300b8 stur w0, [x28, #0xc] -;; 818300b8 stur w1, [x28, #8] -;; 890300f8 stur x9, [x28] -;; 808340b8 ldur w0, [x28, #8] -;; 81c340b8 ldur w1, [x28, #0xc] +;; 800301f8 stur x0, [x28, #0x10] +;; 818300f8 stur x1, [x28, #8] +;; 824300b8 stur w2, [x28, #4] +;; 830300b8 stur w3, [x28] +;; 800340b8 ldur w0, [x28] +;; 814340b8 ldur w1, [x28, #4] ;; 2160200b add w1, w1, w0, uxtx ;; e003012a mov w0, w1 -;; ff430091 add sp, sp, #0x10 +;; ff630091 add sp, sp, #0x18 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/signed.wat b/winch/filetests/filetests/aarch64/i32_add/signed.wat index 9ca41aa79727..212a2f904995 100644 --- a/winch/filetests/filetests/aarch64/i32_add/signed.wat +++ b/winch/filetests/filetests/aarch64/i32_add/signed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07f40b2 orr x16, xzr, #0xffffffff ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 0060300b add w0, w0, w16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_add/unsigned_with_zero.wat b/winch/filetests/filetests/aarch64/i32_add/unsigned_with_zero.wat index 7015e5ef2746..ddc8914e9991 100644 --- a/winch/filetests/filetests/aarch64/i32_add/unsigned_with_zero.wat +++ b/winch/filetests/filetests/aarch64/i32_add/unsigned_with_zero.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e003102a mov w0, w16 ;; 00000011 add w0, w0, #0 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/const.wat b/winch/filetests/filetests/aarch64/i32_mul/const.wat index 2123d262ac98..bf362f26b4ee 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/const.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/const.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 500180d2 mov x16, #0xa ;; e003102a mov w0, w16 ;; 900280d2 mov x16, #0x14 ;; 007c101b mul w0, w0, w16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/locals.wat b/winch/filetests/filetests/aarch64/i32_mul/locals.wat index 22433c270c68..aef9967f9264 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/locals.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/locals.wat @@ -19,22 +19,24 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff4300d1 sub sp, sp, #0x10 +;; e90300aa mov x9, x0 +;; ff6300d1 sub sp, sp, #0x18 ;; fc030091 mov x28, sp +;; 800301f8 stur x0, [x28, #0x10] +;; 818300f8 stur x1, [x28, #8] ;; 100080d2 mov x16, #0 -;; 908300f8 stur x16, [x28, #8] -;; 890300f8 stur x9, [x28] +;; 900300f8 stur x16, [x28] ;; 500180d2 mov x16, #0xa ;; e003102a mov w0, w16 -;; 80c300b8 stur w0, [x28, #0xc] +;; 804300b8 stur w0, [x28, #4] ;; 900280d2 mov x16, #0x14 ;; e003102a mov w0, w16 -;; 808300b8 stur w0, [x28, #8] -;; 808340b8 ldur w0, [x28, #8] -;; 81c340b8 ldur w1, [x28, #0xc] +;; 800300b8 stur w0, [x28] +;; 800340b8 ldur w0, [x28] +;; 814340b8 ldur w1, [x28, #4] ;; 217c001b mul w1, w1, w0 ;; e003012a mov w0, w1 -;; ff430091 add sp, sp, #0x10 +;; ff630091 add sp, sp, #0x18 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/max.wat b/winch/filetests/filetests/aarch64/i32_mul/max.wat index 0636475bbd71..bff663e7ecd1 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/max.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/max.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07b40b2 orr x16, xzr, #0x7fffffff ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 007c101b mul w0, w0, w16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/max_one.wat b/winch/filetests/filetests/aarch64/i32_mul/max_one.wat index 860984ea43da..95c0fc1b2e57 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/max_one.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/max_one.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000b0d2 mov x16, #0x80000000 ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 007c101b mul w0, w0, w16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/mixed.wat b/winch/filetests/filetests/aarch64/i32_mul/mixed.wat index 07e38743135b..f6ca3609e64a 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/mixed.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/mixed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07f40b2 orr x16, xzr, #0xffffffff ;; e003102a mov w0, w16 ;; 300080d2 mov x16, #1 ;; 007c101b mul w0, w0, w16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/params.wat b/winch/filetests/filetests/aarch64/i32_mul/params.wat index fd2ead6bb470..d86b7c44982c 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/params.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/params.wat @@ -10,16 +10,18 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff4300d1 sub sp, sp, #0x10 +;; e90300aa mov x9, x0 +;; ff6300d1 sub sp, sp, #0x18 ;; fc030091 mov x28, sp -;; 80c300b8 stur w0, [x28, #0xc] -;; 818300b8 stur w1, [x28, #8] -;; 890300f8 stur x9, [x28] -;; 808340b8 ldur w0, [x28, #8] -;; 81c340b8 ldur w1, [x28, #0xc] +;; 800301f8 stur x0, [x28, #0x10] +;; 818300f8 stur x1, [x28, #8] +;; 824300b8 stur w2, [x28, #4] +;; 830300b8 stur w3, [x28] +;; 800340b8 ldur w0, [x28] +;; 814340b8 ldur w1, [x28, #4] ;; 217c001b mul w1, w1, w0 ;; e003012a mov w0, w1 -;; ff430091 add sp, sp, #0x10 +;; ff630091 add sp, sp, #0x18 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/signed.wat b/winch/filetests/filetests/aarch64/i32_mul/signed.wat index 78ed0894e6bd..11114382703e 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/signed.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/signed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07f40b2 orr x16, xzr, #0xffffffff ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 007c101b mul w0, w0, w16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_mul/unsigned_with_zero.wat b/winch/filetests/filetests/aarch64/i32_mul/unsigned_with_zero.wat index e7f352fa7163..f9b3a5782a3c 100644 --- a/winch/filetests/filetests/aarch64/i32_mul/unsigned_with_zero.wat +++ b/winch/filetests/filetests/aarch64/i32_mul/unsigned_with_zero.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e003102a mov w0, w16 ;; 100080d2 mov x16, #0 ;; 007c101b mul w0, w0, w16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/const.wat b/winch/filetests/filetests/aarch64/i32_sub/const.wat index 71d199c0ecb6..818c97bd0e5d 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/const.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/const.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 500180d2 mov x16, #0xa ;; e003102a mov w0, w16 ;; 00500051 sub w0, w0, #0x14 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/locals.wat b/winch/filetests/filetests/aarch64/i32_sub/locals.wat index 6e54580bcc27..d0caf5687ff0 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/locals.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/locals.wat @@ -19,22 +19,24 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff4300d1 sub sp, sp, #0x10 +;; e90300aa mov x9, x0 +;; ff6300d1 sub sp, sp, #0x18 ;; fc030091 mov x28, sp +;; 800301f8 stur x0, [x28, #0x10] +;; 818300f8 stur x1, [x28, #8] ;; 100080d2 mov x16, #0 -;; 908300f8 stur x16, [x28, #8] -;; 890300f8 stur x9, [x28] +;; 900300f8 stur x16, [x28] ;; 500180d2 mov x16, #0xa ;; e003102a mov w0, w16 -;; 80c300b8 stur w0, [x28, #0xc] +;; 804300b8 stur w0, [x28, #4] ;; 900280d2 mov x16, #0x14 ;; e003102a mov w0, w16 -;; 808300b8 stur w0, [x28, #8] -;; 808340b8 ldur w0, [x28, #8] -;; 81c340b8 ldur w1, [x28, #0xc] +;; 800300b8 stur w0, [x28] +;; 800340b8 ldur w0, [x28] +;; 814340b8 ldur w1, [x28, #4] ;; 2160204b sub w1, w1, w0, uxtx ;; e003012a mov w0, w1 -;; ff430091 add sp, sp, #0x10 +;; ff630091 add sp, sp, #0x18 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/max.wat b/winch/filetests/filetests/aarch64/i32_sub/max.wat index 454e78037322..0bef1ff99a47 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/max.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/max.wat @@ -9,14 +9,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07b40b2 orr x16, xzr, #0x7fffffff ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 0060304b sub w0, w0, w16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/max_one.wat b/winch/filetests/filetests/aarch64/i32_sub/max_one.wat index a42494c1b557..178bb7b045fb 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/max_one.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/max_one.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000b0d2 mov x16, #0x80000000 ;; e003102a mov w0, w16 ;; 00040051 sub w0, w0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/mixed.wat b/winch/filetests/filetests/aarch64/i32_sub/mixed.wat index 99817755615e..ff45fa7cb33e 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/mixed.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/mixed.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07f40b2 orr x16, xzr, #0xffffffff ;; e003102a mov w0, w16 ;; 00040051 sub w0, w0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/params.wat b/winch/filetests/filetests/aarch64/i32_sub/params.wat index f30ada72cd84..969f6df19403 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/params.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/params.wat @@ -10,16 +10,18 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff4300d1 sub sp, sp, #0x10 +;; e90300aa mov x9, x0 +;; ff6300d1 sub sp, sp, #0x18 ;; fc030091 mov x28, sp -;; 80c300b8 stur w0, [x28, #0xc] -;; 818300b8 stur w1, [x28, #8] -;; 890300f8 stur x9, [x28] -;; 808340b8 ldur w0, [x28, #8] -;; 81c340b8 ldur w1, [x28, #0xc] +;; 800301f8 stur x0, [x28, #0x10] +;; 818300f8 stur x1, [x28, #8] +;; 824300b8 stur w2, [x28, #4] +;; 830300b8 stur w3, [x28] +;; 800340b8 ldur w0, [x28] +;; 814340b8 ldur w1, [x28, #4] ;; 2160204b sub w1, w1, w0, uxtx ;; e003012a mov w0, w1 -;; ff430091 add sp, sp, #0x10 +;; ff630091 add sp, sp, #0x18 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/signed.wat b/winch/filetests/filetests/aarch64/i32_sub/signed.wat index 75cbc5e465cc..0471752d598e 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/signed.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/signed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; f07f40b2 orr x16, xzr, #0xffffffff ;; e003102a mov w0, w16 ;; f07f40b2 orr x16, xzr, #0xffffffff ;; 0060304b sub w0, w0, w16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i32_sub/unsigned_with_zero.wat b/winch/filetests/filetests/aarch64/i32_sub/unsigned_with_zero.wat index 219c1b97248d..64f990457ee1 100644 --- a/winch/filetests/filetests/aarch64/i32_sub/unsigned_with_zero.wat +++ b/winch/filetests/filetests/aarch64/i32_sub/unsigned_with_zero.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e003102a mov w0, w16 ;; 00000051 sub w0, w0, #0 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/const.wat b/winch/filetests/filetests/aarch64/i64_add/const.wat index 6e969770b912..4cc460d7a832 100644 --- a/winch/filetests/filetests/aarch64/i64_add/const.wat +++ b/winch/filetests/filetests/aarch64/i64_add/const.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 500180d2 mov x16, #0xa ;; e00310aa mov x0, x16 ;; 00500091 add x0, x0, #0x14 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/locals.wat b/winch/filetests/filetests/aarch64/i64_add/locals.wat index 8174615ed6e8..e60559fd8996 100644 --- a/winch/filetests/filetests/aarch64/i64_add/locals.wat +++ b/winch/filetests/filetests/aarch64/i64_add/locals.wat @@ -19,23 +19,25 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff6300d1 sub sp, sp, #0x18 +;; e90300aa mov x9, x0 +;; ff8300d1 sub sp, sp, #0x20 ;; fc030091 mov x28, sp +;; 808301f8 stur x0, [x28, #0x18] +;; 810301f8 stur x1, [x28, #0x10] ;; 100080d2 mov x16, #0 -;; 900301f8 stur x16, [x28, #0x10] ;; 908300f8 stur x16, [x28, #8] -;; 890300f8 stur x9, [x28] +;; 900300f8 stur x16, [x28] ;; 500180d2 mov x16, #0xa ;; e00310aa mov x0, x16 -;; 800301f8 stur x0, [x28, #0x10] +;; 808300f8 stur x0, [x28, #8] ;; 900280d2 mov x16, #0x14 ;; e00310aa mov x0, x16 -;; 808300f8 stur x0, [x28, #8] -;; 808340f8 ldur x0, [x28, #8] -;; 810341f8 ldur x1, [x28, #0x10] +;; 800300f8 stur x0, [x28] +;; 800340f8 ldur x0, [x28] +;; 818340f8 ldur x1, [x28, #8] ;; 2160208b add x1, x1, x0, uxtx ;; e00301aa mov x0, x1 -;; ff630091 add sp, sp, #0x18 +;; ff830091 add sp, sp, #0x20 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/max.wat b/winch/filetests/filetests/aarch64/i64_add/max.wat index 85921123008a..0fba573d9961 100644 --- a/winch/filetests/filetests/aarch64/i64_add/max.wat +++ b/winch/filetests/filetests/aarch64/i64_add/max.wat @@ -9,14 +9,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e00310aa mov x0, x16 ;; 1000f092 mov x16, #0x7fffffffffffffff ;; 0060308b add x0, x0, x16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/max_one.wat b/winch/filetests/filetests/aarch64/i64_add/max_one.wat index da9fbced92bd..c053880e47c2 100644 --- a/winch/filetests/filetests/aarch64/i64_add/max_one.wat +++ b/winch/filetests/filetests/aarch64/i64_add/max_one.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000f0d2 mov x16, #-0x8000000000000000 ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 0060308b add x0, x0, x16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/mixed.wat b/winch/filetests/filetests/aarch64/i64_add/mixed.wat index 324a80a60ac9..9d6d7612ca84 100644 --- a/winch/filetests/filetests/aarch64/i64_add/mixed.wat +++ b/winch/filetests/filetests/aarch64/i64_add/mixed.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 10008092 mov x16, #-1 ;; e00310aa mov x0, x16 ;; 00040091 add x0, x0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/params.wat b/winch/filetests/filetests/aarch64/i64_add/params.wat index a1173c076b77..584a049b8c0c 100644 --- a/winch/filetests/filetests/aarch64/i64_add/params.wat +++ b/winch/filetests/filetests/aarch64/i64_add/params.wat @@ -10,16 +10,18 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff6300d1 sub sp, sp, #0x18 +;; e90300aa mov x9, x0 +;; ff8300d1 sub sp, sp, #0x20 ;; fc030091 mov x28, sp -;; 800301f8 stur x0, [x28, #0x10] -;; 818300f8 stur x1, [x28, #8] -;; 890300f8 stur x9, [x28] -;; 808340f8 ldur x0, [x28, #8] -;; 810341f8 ldur x1, [x28, #0x10] +;; 808301f8 stur x0, [x28, #0x18] +;; 810301f8 stur x1, [x28, #0x10] +;; 828300f8 stur x2, [x28, #8] +;; 830300f8 stur x3, [x28] +;; 800340f8 ldur x0, [x28] +;; 818340f8 ldur x1, [x28, #8] ;; 2160208b add x1, x1, x0, uxtx ;; e00301aa mov x0, x1 -;; ff630091 add sp, sp, #0x18 +;; ff830091 add sp, sp, #0x20 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/signed.wat b/winch/filetests/filetests/aarch64/i64_add/signed.wat index 45b7be417187..7ee0179f4251 100644 --- a/winch/filetests/filetests/aarch64/i64_add/signed.wat +++ b/winch/filetests/filetests/aarch64/i64_add/signed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 10008092 mov x16, #-1 ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 0060308b add x0, x0, x16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_add/unsigned_with_zero.wat b/winch/filetests/filetests/aarch64/i64_add/unsigned_with_zero.wat index f0c9782428d4..93970304607d 100644 --- a/winch/filetests/filetests/aarch64/i64_add/unsigned_with_zero.wat +++ b/winch/filetests/filetests/aarch64/i64_add/unsigned_with_zero.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e00310aa mov x0, x16 ;; 00000091 add x0, x0, #0 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/const.wat b/winch/filetests/filetests/aarch64/i64_mul/const.wat index aefa644222f5..f2299965476e 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/const.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/const.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 500180d2 mov x16, #0xa ;; e00310aa mov x0, x16 ;; 900280d2 mov x16, #0x14 ;; 007c109b mul x0, x0, x16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/locals.wat b/winch/filetests/filetests/aarch64/i64_mul/locals.wat index 4e68719623d9..0980831c58d9 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/locals.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/locals.wat @@ -19,23 +19,25 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff6300d1 sub sp, sp, #0x18 +;; e90300aa mov x9, x0 +;; ff8300d1 sub sp, sp, #0x20 ;; fc030091 mov x28, sp +;; 808301f8 stur x0, [x28, #0x18] +;; 810301f8 stur x1, [x28, #0x10] ;; 100080d2 mov x16, #0 -;; 900301f8 stur x16, [x28, #0x10] ;; 908300f8 stur x16, [x28, #8] -;; 890300f8 stur x9, [x28] +;; 900300f8 stur x16, [x28] ;; 500180d2 mov x16, #0xa ;; e00310aa mov x0, x16 -;; 800301f8 stur x0, [x28, #0x10] +;; 808300f8 stur x0, [x28, #8] ;; 900280d2 mov x16, #0x14 ;; e00310aa mov x0, x16 -;; 808300f8 stur x0, [x28, #8] -;; 808340f8 ldur x0, [x28, #8] -;; 810341f8 ldur x1, [x28, #0x10] +;; 800300f8 stur x0, [x28] +;; 800340f8 ldur x0, [x28] +;; 818340f8 ldur x1, [x28, #8] ;; 217c009b mul x1, x1, x0 ;; e00301aa mov x0, x1 -;; ff630091 add sp, sp, #0x18 +;; ff830091 add sp, sp, #0x20 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/max.wat b/winch/filetests/filetests/aarch64/i64_mul/max.wat index 41f91cb15525..2547a96fc445 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/max.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/max.wat @@ -9,14 +9,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000f092 mov x16, #0x7fffffffffffffff ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 007c109b mul x0, x0, x16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/max_one.wat b/winch/filetests/filetests/aarch64/i64_mul/max_one.wat index 2eaa76ce3055..ed0477e8fcbe 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/max_one.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/max_one.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000f0d2 mov x16, #-0x8000000000000000 ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 007c109b mul x0, x0, x16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/mixed.wat b/winch/filetests/filetests/aarch64/i64_mul/mixed.wat index 4ef2c2a261d8..f2f1a07be3bc 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/mixed.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/mixed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 10008092 mov x16, #-1 ;; e00310aa mov x0, x16 ;; 300080d2 mov x16, #1 ;; 007c109b mul x0, x0, x16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/params.wat b/winch/filetests/filetests/aarch64/i64_mul/params.wat index f902742516bd..7760c6032728 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/params.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/params.wat @@ -10,16 +10,18 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff6300d1 sub sp, sp, #0x18 +;; e90300aa mov x9, x0 +;; ff8300d1 sub sp, sp, #0x20 ;; fc030091 mov x28, sp -;; 800301f8 stur x0, [x28, #0x10] -;; 818300f8 stur x1, [x28, #8] -;; 890300f8 stur x9, [x28] -;; 808340f8 ldur x0, [x28, #8] -;; 810341f8 ldur x1, [x28, #0x10] +;; 808301f8 stur x0, [x28, #0x18] +;; 810301f8 stur x1, [x28, #0x10] +;; 828300f8 stur x2, [x28, #8] +;; 830300f8 stur x3, [x28] +;; 800340f8 ldur x0, [x28] +;; 818340f8 ldur x1, [x28, #8] ;; 217c009b mul x1, x1, x0 ;; e00301aa mov x0, x1 -;; ff630091 add sp, sp, #0x18 +;; ff830091 add sp, sp, #0x20 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/signed.wat b/winch/filetests/filetests/aarch64/i64_mul/signed.wat index c52600d989fe..d74ad5d37ef4 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/signed.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/signed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 10008092 mov x16, #-1 ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 007c109b mul x0, x0, x16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_mul/unsigned_with_zero.wat b/winch/filetests/filetests/aarch64/i64_mul/unsigned_with_zero.wat index 9f80cebbf18b..7bc58f968700 100644 --- a/winch/filetests/filetests/aarch64/i64_mul/unsigned_with_zero.wat +++ b/winch/filetests/filetests/aarch64/i64_mul/unsigned_with_zero.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e00310aa mov x0, x16 ;; 100080d2 mov x16, #0 ;; 007c109b mul x0, x0, x16 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/const.wat b/winch/filetests/filetests/aarch64/i64_sub/const.wat index be4f018d3db6..676474e64e9d 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/const.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/const.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 500180d2 mov x16, #0xa ;; e00310aa mov x0, x16 ;; 005000d1 sub x0, x0, #0x14 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/locals.wat b/winch/filetests/filetests/aarch64/i64_sub/locals.wat index ec93d32767a0..d7e968024078 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/locals.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/locals.wat @@ -19,23 +19,25 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff6300d1 sub sp, sp, #0x18 +;; e90300aa mov x9, x0 +;; ff8300d1 sub sp, sp, #0x20 ;; fc030091 mov x28, sp +;; 808301f8 stur x0, [x28, #0x18] +;; 810301f8 stur x1, [x28, #0x10] ;; 100080d2 mov x16, #0 -;; 900301f8 stur x16, [x28, #0x10] ;; 908300f8 stur x16, [x28, #8] -;; 890300f8 stur x9, [x28] +;; 900300f8 stur x16, [x28] ;; 500180d2 mov x16, #0xa ;; e00310aa mov x0, x16 -;; 800301f8 stur x0, [x28, #0x10] +;; 808300f8 stur x0, [x28, #8] ;; 900280d2 mov x16, #0x14 ;; e00310aa mov x0, x16 -;; 808300f8 stur x0, [x28, #8] -;; 808340f8 ldur x0, [x28, #8] -;; 810341f8 ldur x1, [x28, #0x10] +;; 800300f8 stur x0, [x28] +;; 800340f8 ldur x0, [x28] +;; 818340f8 ldur x1, [x28, #8] ;; 216020cb sub x1, x1, x0, uxtx ;; e00301aa mov x0, x1 -;; ff630091 add sp, sp, #0x18 +;; ff830091 add sp, sp, #0x20 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/max.wat b/winch/filetests/filetests/aarch64/i64_sub/max.wat index 76d642905483..016429b4d9d0 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/max.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/max.wat @@ -9,14 +9,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000f092 mov x16, #0x7fffffffffffffff ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 006030cb sub x0, x0, x16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/max_one.wat b/winch/filetests/filetests/aarch64/i64_sub/max_one.wat index 36fb2f7a1d8c..3417837a8b25 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/max_one.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/max_one.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 1000f0d2 mov x16, #-0x8000000000000000 ;; e00310aa mov x0, x16 ;; 000400d1 sub x0, x0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/mixed.wat b/winch/filetests/filetests/aarch64/i64_sub/mixed.wat index ae06566e26ea..c01d43e1459f 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/mixed.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/mixed.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 10008092 mov x16, #-1 ;; e00310aa mov x0, x16 ;; 000400d1 sub x0, x0, #1 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/params.wat b/winch/filetests/filetests/aarch64/i64_sub/params.wat index 30560c7c4d06..4c67eee2bbbd 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/params.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/params.wat @@ -10,16 +10,18 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff6300d1 sub sp, sp, #0x18 +;; e90300aa mov x9, x0 +;; ff8300d1 sub sp, sp, #0x20 ;; fc030091 mov x28, sp -;; 800301f8 stur x0, [x28, #0x10] -;; 818300f8 stur x1, [x28, #8] -;; 890300f8 stur x9, [x28] -;; 808340f8 ldur x0, [x28, #8] -;; 810341f8 ldur x1, [x28, #0x10] +;; 808301f8 stur x0, [x28, #0x18] +;; 810301f8 stur x1, [x28, #0x10] +;; 828300f8 stur x2, [x28, #8] +;; 830300f8 stur x3, [x28] +;; 800340f8 ldur x0, [x28] +;; 818340f8 ldur x1, [x28, #8] ;; 216020cb sub x1, x1, x0, uxtx ;; e00301aa mov x0, x1 -;; ff630091 add sp, sp, #0x18 +;; ff830091 add sp, sp, #0x20 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/signed.wat b/winch/filetests/filetests/aarch64/i64_sub/signed.wat index 6fd70be787cd..e273e04f6ae3 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/signed.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/signed.wat @@ -10,14 +10,16 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 10008092 mov x16, #-1 ;; e00310aa mov x0, x16 ;; 10008092 mov x16, #-1 ;; 006030cb sub x0, x0, x16, uxtx -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/i64_sub/unsigned_with_zero.wat b/winch/filetests/filetests/aarch64/i64_sub/unsigned_with_zero.wat index a2e977fe1a13..ed4486c22c36 100644 --- a/winch/filetests/filetests/aarch64/i64_sub/unsigned_with_zero.wat +++ b/winch/filetests/filetests/aarch64/i64_sub/unsigned_with_zero.wat @@ -10,13 +10,15 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] ;; 300080d2 mov x16, #1 ;; e00310aa mov x0, x16 ;; 000000d1 sub x0, x0, #0 -;; ff230091 add sp, sp, #8 +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/aarch64/nop/nop.wat b/winch/filetests/filetests/aarch64/nop/nop.wat index fa28e83bc2df..718a7dad6c8a 100644 --- a/winch/filetests/filetests/aarch64/nop/nop.wat +++ b/winch/filetests/filetests/aarch64/nop/nop.wat @@ -8,10 +8,12 @@ ;; fd7bbfa9 stp x29, x30, [sp, #-0x10]! ;; fd030091 mov x29, sp ;; fc030091 mov x28, sp -;; ff2300d1 sub sp, sp, #8 +;; e90300aa mov x9, x0 +;; ff4300d1 sub sp, sp, #0x10 ;; fc030091 mov x28, sp -;; 890300f8 stur x9, [x28] -;; ff230091 add sp, sp, #8 +;; 808300f8 stur x0, [x28, #8] +;; 810300f8 stur x1, [x28] +;; ff430091 add sp, sp, #0x10 ;; fc030091 mov x28, sp ;; fd7bc1a8 ldp x29, x30, [sp], #0x10 ;; c0035fd6 ret diff --git a/winch/filetests/filetests/x64/block/as_if_cond.wat b/winch/filetests/filetests/x64/block/as_if_cond.wat index 3d9a3124cb08..994bf8484dfc 100644 --- a/winch/filetests/filetests/x64/block/as_if_cond.wat +++ b/winch/filetests/filetests/x64/block/as_if_cond.wat @@ -9,34 +9,39 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f840d000000 je 0x3d -;; 30: 4883ec08 sub rsp, 8 -;; e800000000 call 0x39 -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8410000000 je 0x48 +;; 38: 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x43 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/as_if_else.wat b/winch/filetests/filetests/x64/block/as_if_else.wat index 49a119e53d44..e4894746d2c9 100644 --- a/winch/filetests/filetests/x64/block/as_if_else.wat +++ b/winch/filetests/filetests/x64/block/as_if_else.wat @@ -6,20 +6,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f840a000000 je 0x3a -;; 30: b802000000 mov eax, 2 -;; e905000000 jmp 0x3f -;; 3a: b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 0f840a000000 je 0x42 +;; 38: b802000000 mov eax, 2 +;; e905000000 jmp 0x47 +;; 42: b801000000 mov eax, 1 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/as_if_then.wat b/winch/filetests/filetests/x64/block/as_if_then.wat index 80e116244aeb..c205372e53eb 100644 --- a/winch/filetests/filetests/x64/block/as_if_then.wat +++ b/winch/filetests/filetests/x64/block/as_if_then.wat @@ -6,20 +6,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f840a000000 je 0x3a -;; 30: b801000000 mov eax, 1 -;; e905000000 jmp 0x3f -;; 3a: b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 0f840a000000 je 0x42 +;; 38: b801000000 mov eax, 1 +;; e905000000 jmp 0x47 +;; 42: b802000000 mov eax, 2 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/deep.wat b/winch/filetests/filetests/x64/block/deep.wat index 0894a408243e..50989d3e43b4 100644 --- a/winch/filetests/filetests/x64/block/deep.wat +++ b/winch/filetests/filetests/x64/block/deep.wat @@ -46,32 +46,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b896000000 mov eax, 0x96 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/empty.wat b/winch/filetests/filetests/x64/block/empty.wat index b416fb8e4d75..6863a26cad3a 100644 --- a/winch/filetests/filetests/x64/block/empty.wat +++ b/winch/filetests/filetests/x64/block/empty.wat @@ -10,28 +10,32 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/get_and_set.wat b/winch/filetests/filetests/x64/block/get_and_set.wat index 3091e5f35519..72dd256590d8 100644 --- a/winch/filetests/filetests/x64/block/get_and_set.wat +++ b/winch/filetests/filetests/x64/block/get_and_set.wat @@ -10,21 +10,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 8b0424 mov eax, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 4883c410 add rsp, 0x10 +;; 89442404 mov dword ptr [rsp + 4], eax +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/get_and_tee.wat b/winch/filetests/filetests/x64/block/get_and_tee.wat index aa7d7ca3c21c..636b57b7be3f 100644 --- a/winch/filetests/filetests/x64/block/get_and_tee.wat +++ b/winch/filetests/filetests/x64/block/get_and_tee.wat @@ -10,21 +10,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 8b0424 mov eax, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 4883c410 add rsp, 0x10 +;; 89442404 mov dword ptr [rsp + 4], eax +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/nested.wat b/winch/filetests/filetests/x64/block/nested.wat index 6fd51c694400..a2dd862d8760 100644 --- a/winch/filetests/filetests/x64/block/nested.wat +++ b/winch/filetests/filetests/x64/block/nested.wat @@ -11,35 +11,41 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x39 -;; 4883c408 add rsp, 8 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x46 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b809000000 mov eax, 9 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/singular.wat b/winch/filetests/filetests/x64/block/singular.wat index 2126f0939566..a26619facac6 100644 --- a/winch/filetests/filetests/x64/block/singular.wat +++ b/winch/filetests/filetests/x64/block/singular.wat @@ -8,15 +8,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b807000000 mov eax, 7 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/block/with_local_float.wat b/winch/filetests/filetests/x64/block/with_local_float.wat index 30be2cada346..d822a45c5144 100644 --- a/winch/filetests/filetests/x64/block/with_local_float.wat +++ b/winch/filetests/filetests/x64/block/with_local_float.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f3440f107c240c movss xmm15, dword ptr [rsp + 0xc] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f3440f107c2404 movss xmm15, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; f3440f113c24 movss dword ptr [rsp], xmm15 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_block_first.wat b/winch/filetests/filetests/x64/br/as_block_first.wat index a5087c9e232c..c8af683d5f16 100644 --- a/winch/filetests/filetests/x64/br/as_block_first.wat +++ b/winch/filetests/filetests/x64/br/as_block_first.wat @@ -8,28 +8,32 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_block_last.wat b/winch/filetests/filetests/x64/br/as_block_last.wat index 269087a29604..18d0f57d0cb7 100644 --- a/winch/filetests/filetests/x64/br/as_block_last.wat +++ b/winch/filetests/filetests/x64/br/as_block_last.wat @@ -8,31 +8,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871b000000 ja 0x36 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 36: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_block_mid.wat b/winch/filetests/filetests/x64/br/as_block_mid.wat index 04d5dcf3fe2d..5e1e34ed46f1 100644 --- a/winch/filetests/filetests/x64/br/as_block_mid.wat +++ b/winch/filetests/filetests/x64/br/as_block_mid.wat @@ -8,31 +8,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871b000000 ja 0x36 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 36: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_block_value.wat b/winch/filetests/filetests/x64/br/as_block_value.wat index e7dbc47d9c21..fae4d8eecbfc 100644 --- a/winch/filetests/filetests/x64/br/as_block_value.wat +++ b/winch/filetests/filetests/x64/br/as_block_value.wat @@ -8,32 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_br_if_cond.wat b/winch/filetests/filetests/x64/br/as_br_if_cond.wat index 163e96d4063d..30b322745239 100644 --- a/winch/filetests/filetests/x64/br/as_br_if_cond.wat +++ b/winch/filetests/filetests/x64/br/as_br_if_cond.wat @@ -6,14 +6,16 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_br_value.wat b/winch/filetests/filetests/x64/br/as_br_value.wat index 4aa1d9321304..66f14e9e0be0 100644 --- a/winch/filetests/filetests/x64/br/as_br_value.wat +++ b/winch/filetests/filetests/x64/br/as_br_value.wat @@ -6,15 +6,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b809000000 mov eax, 9 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_call_all.wat b/winch/filetests/filetests/x64/br/as_call_all.wat index 94d9b0aa2efb..89d276b3a691 100644 --- a/winch/filetests/filetests/x64/br/as_call_all.wat +++ b/winch/filetests/filetests/x64/br/as_call_all.wat @@ -7,33 +7,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80f000000 mov eax, 0xf -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_call_first.wat b/winch/filetests/filetests/x64/br/as_call_first.wat index e1038bbf8548..da7cf082e145 100644 --- a/winch/filetests/filetests/x64/br/as_call_first.wat +++ b/winch/filetests/filetests/x64/br/as_call_first.wat @@ -10,33 +10,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80c000000 mov eax, 0xc -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_call_last.wat b/winch/filetests/filetests/x64/br/as_call_last.wat index 601d413ffa4a..8509faccd764 100644 --- a/winch/filetests/filetests/x64/br/as_call_last.wat +++ b/winch/filetests/filetests/x64/br/as_call_last.wat @@ -9,33 +9,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80e000000 mov eax, 0xe -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_call_mid.wat b/winch/filetests/filetests/x64/br/as_call_mid.wat index 915792c6e127..9b3c4fca9ba9 100644 --- a/winch/filetests/filetests/x64/br/as_call_mid.wat +++ b/winch/filetests/filetests/x64/br/as_call_mid.wat @@ -10,33 +10,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80d000000 mov eax, 0xd -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_if_cond.wat b/winch/filetests/filetests/x64/br/as_if_cond.wat index c05186358c99..3a6afcfd234a 100644 --- a/winch/filetests/filetests/x64/br/as_if_cond.wat +++ b/winch/filetests/filetests/x64/br/as_if_cond.wat @@ -11,15 +11,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_if_else.wat b/winch/filetests/filetests/x64/br/as_if_else.wat index 87e564441ed7..64db18cfe517 100644 --- a/winch/filetests/filetests/x64/br/as_if_else.wat +++ b/winch/filetests/filetests/x64/br/as_if_else.wat @@ -11,22 +11,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8409000000 je 0x40 -;; 37: 8b442408 mov eax, dword ptr [rsp + 8] -;; e905000000 jmp 0x45 -;; 40: b804000000 mov eax, 4 -;; 4883c410 add rsp, 0x10 +;; 0f8408000000 je 0x47 +;; 3f: 8b0424 mov eax, dword ptr [rsp] +;; e905000000 jmp 0x4c +;; 47: b804000000 mov eax, 4 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_if_then.wat b/winch/filetests/filetests/x64/br/as_if_then.wat index 84f7c7b2ecf9..c9bb07024be4 100644 --- a/winch/filetests/filetests/x64/br/as_if_then.wat +++ b/winch/filetests/filetests/x64/br/as_if_then.wat @@ -11,22 +11,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840a000000 je 0x41 -;; 37: b803000000 mov eax, 3 -;; e904000000 jmp 0x45 -;; 41: 8b442408 mov eax, dword ptr [rsp + 8] -;; 4883c410 add rsp, 0x10 +;; 0f840a000000 je 0x49 +;; 3f: b803000000 mov eax, 3 +;; e903000000 jmp 0x4c +;; 49: 8b0424 mov eax, dword ptr [rsp] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_loop_first.wat b/winch/filetests/filetests/x64/br/as_loop_first.wat index fd275564831d..d3b85bceae41 100644 --- a/winch/filetests/filetests/x64/br/as_loop_first.wat +++ b/winch/filetests/filetests/x64/br/as_loop_first.wat @@ -7,15 +7,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b803000000 mov eax, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_loop_last.wat b/winch/filetests/filetests/x64/br/as_loop_last.wat index 714c094f89cd..57ce6677e250 100644 --- a/winch/filetests/filetests/x64/br/as_loop_last.wat +++ b/winch/filetests/filetests/x64/br/as_loop_last.wat @@ -9,32 +9,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b805000000 mov eax, 5 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/as_loop_mid.wat b/winch/filetests/filetests/x64/br/as_loop_mid.wat index e6746d5c5487..5d337eaf974f 100644 --- a/winch/filetests/filetests/x64/br/as_loop_mid.wat +++ b/winch/filetests/filetests/x64/br/as_loop_mid.wat @@ -10,32 +10,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b804000000 mov eax, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br/br_jump.wat b/winch/filetests/filetests/x64/br/br_jump.wat index 9bde2851fa0d..5a1864c0ec32 100644 --- a/winch/filetests/filetests/x64/br/br_jump.wat +++ b/winch/filetests/filetests/x64/br/br_jump.wat @@ -14,24 +14,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f873a000000 ja 0x55 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f873f000000 ja 0x5d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; 448b5c2410 mov r11d, dword ptr [rsp + 0x10] +;; 448b5c2408 mov r11d, dword ptr [rsp + 8] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 4883c404 add rsp, 4 -;; e9eaffffff jmp 0x39 -;; 4f: 4883c410 add rsp, 0x10 +;; e9eaffffff jmp 0x41 +;; 57: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 55: 0f0b ud2 +;; 5d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_block_last.wat b/winch/filetests/filetests/x64/br_if/as_block_last.wat index c68d93c2397e..aa8ba23f4ad7 100644 --- a/winch/filetests/filetests/x64/br_if/as_block_last.wat +++ b/winch/filetests/filetests/x64/br_if/as_block_last.wat @@ -7,34 +7,48 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; e800000000 call 0x2c -;; e800000000 call 0x31 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8754000000 ja 0x72 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x3f +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x57 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8500000000 jne 0x3d -;; 3d: 4883c410 add rsp, 0x10 +;; 0f8500000000 jne 0x6c +;; 6c: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 72: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_block_last_value.wat b/winch/filetests/filetests/x64/br_if/as_block_last_value.wat index dba2bd24a5fa..6eb50867f264 100644 --- a/winch/filetests/filetests/x64/br_if/as_block_last_value.wat +++ b/winch/filetests/filetests/x64/br_if/as_block_last_value.wat @@ -9,35 +9,49 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; e800000000 call 0x2c -;; e800000000 call 0x31 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8759000000 ja 0x77 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x3f +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x57 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; b80b000000 mov eax, 0xb ;; 85c9 test ecx, ecx -;; 0f8500000000 jne 0x42 -;; 42: 4883c410 add rsp, 0x10 +;; 0f8500000000 jne 0x71 +;; 71: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 77: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_br_if_cond.wat b/winch/filetests/filetests/x64/br_if/as_br_if_cond.wat index 970735895657..6080e23d8704 100644 --- a/winch/filetests/filetests/x64/br_if/as_br_if_cond.wat +++ b/winch/filetests/filetests/x64/br_if/as_br_if_cond.wat @@ -6,20 +6,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872d000000 ja 0x4b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f850d000000 jne 0x3d -;; 30: b801000000 mov eax, 1 +;; 0f850d000000 jne 0x45 +;; 38: b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f8500000000 jne 0x3d -;; 3d: 4883c408 add rsp, 8 +;; 0f8500000000 jne 0x45 +;; 45: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_br_value.wat b/winch/filetests/filetests/x64/br_if/as_br_value.wat index d5a0c8a90505..45f2620c4784 100644 --- a/winch/filetests/filetests/x64/br_if/as_br_value.wat +++ b/winch/filetests/filetests/x64/br_if/as_br_value.wat @@ -6,18 +6,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b902000000 mov ecx, 2 ;; b801000000 mov eax, 1 ;; 85c9 test ecx, ecx -;; 0f8500000000 jne 0x35 -;; 35: 4883c408 add rsp, 8 +;; 0f8500000000 jne 0x3d +;; 3d: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_call_first.wat b/winch/filetests/filetests/x64/br_if/as_call_first.wat index 0c71efa251e5..80d41f9a996c 100644 --- a/winch/filetests/filetests/x64/br_if/as_call_first.wat +++ b/winch/filetests/filetests/x64/br_if/as_call_first.wat @@ -11,45 +11,52 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8757000000 ja 0x75 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; b80c000000 mov eax, 0xc ;; 85c9 test ecx, ecx -;; 0f8526000000 jne 0x5b -;; 35: 4883ec04 sub rsp, 4 +;; 0f8532000000 jne 0x6f +;; 3d: 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec04 sub rsp, 4 -;; 8b7c2404 mov edi, dword ptr [rsp + 4] -;; be02000000 mov esi, 2 -;; ba03000000 mov edx, 3 -;; e800000000 call 0x53 +;; 4883ec0c sub rsp, 0xc +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; 8b54240c mov edx, dword ptr [rsp + 0xc] +;; b902000000 mov ecx, 2 +;; 41b803000000 mov r8d, 3 +;; e800000000 call 0x62 +;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 75: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_call_last.wat b/winch/filetests/filetests/x64/br_if/as_call_last.wat index 324b7fe8858f..f1ee010980f0 100644 --- a/winch/filetests/filetests/x64/br_if/as_call_last.wat +++ b/winch/filetests/filetests/x64/br_if/as_call_last.wat @@ -11,45 +11,52 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8757000000 ja 0x75 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; b80e000000 mov eax, 0xe ;; 85c9 test ecx, ecx -;; 0f8526000000 jne 0x5b -;; 35: 4883ec04 sub rsp, 4 +;; 0f8532000000 jne 0x6f +;; 3d: 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec04 sub rsp, 4 -;; bf01000000 mov edi, 1 -;; be02000000 mov esi, 2 -;; 8b542404 mov edx, dword ptr [rsp + 4] -;; e800000000 call 0x53 +;; 4883ec0c sub rsp, 0xc +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; ba01000000 mov edx, 1 +;; b902000000 mov ecx, 2 +;; 448b44240c mov r8d, dword ptr [rsp + 0xc] +;; e800000000 call 0x62 +;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 75: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_call_mid.wat b/winch/filetests/filetests/x64/br_if/as_call_mid.wat index 870ab7e6baf7..22df527bc49d 100644 --- a/winch/filetests/filetests/x64/br_if/as_call_mid.wat +++ b/winch/filetests/filetests/x64/br_if/as_call_mid.wat @@ -11,45 +11,52 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8757000000 ja 0x75 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; b80d000000 mov eax, 0xd ;; 85c9 test ecx, ecx -;; 0f8526000000 jne 0x5b -;; 35: 4883ec04 sub rsp, 4 +;; 0f8532000000 jne 0x6f +;; 3d: 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec04 sub rsp, 4 -;; bf01000000 mov edi, 1 -;; 8b742404 mov esi, dword ptr [rsp + 4] -;; ba03000000 mov edx, 3 -;; e800000000 call 0x53 +;; 4883ec0c sub rsp, 0xc +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; ba01000000 mov edx, 1 +;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 41b803000000 mov r8d, 3 +;; e800000000 call 0x62 +;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 75: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_if_cond.wat b/winch/filetests/filetests/x64/br_if/as_if_cond.wat index b11742631d96..4bf770f70586 100644 --- a/winch/filetests/filetests/x64/br_if/as_if_cond.wat +++ b/winch/filetests/filetests/x64/br_if/as_if_cond.wat @@ -12,24 +12,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873a000000 ja 0x55 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8740000000 ja 0x5e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; b801000000 mov eax, 1 ;; 85c9 test ecx, ecx -;; 0f8517000000 jne 0x4f -;; 38: 85c0 test eax, eax -;; 0f840a000000 je 0x4a -;; 40: b802000000 mov eax, 2 -;; e905000000 jmp 0x4f -;; 4a: b803000000 mov eax, 3 -;; 4883c410 add rsp, 0x10 +;; 0f8517000000 jne 0x58 +;; 41: 85c0 test eax, eax +;; 0f840a000000 je 0x53 +;; 49: b802000000 mov eax, 2 +;; e905000000 jmp 0x58 +;; 53: b803000000 mov eax, 3 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 55: 0f0b ud2 +;; 5e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_if_else.wat b/winch/filetests/filetests/x64/br_if/as_if_else.wat index 4a241545ab0d..d4a6c957640e 100644 --- a/winch/filetests/filetests/x64/br_if/as_if_else.wat +++ b/winch/filetests/filetests/x64/br_if/as_if_else.wat @@ -10,38 +10,47 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840a000000 je 0x41 -;; 37: e800000000 call 0x3c -;; e90c000000 jmp 0x4d -;; 41: 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f841d000000 je 0x5c +;; 3f: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x4e +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; e90b000000 jmp 0x67 +;; 5c: 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f8500000000 jne 0x4d -;; 4d: 4883c410 add rsp, 0x10 +;; 0f8500000000 jne 0x67 +;; 67: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_if_then.wat b/winch/filetests/filetests/x64/br_if/as_if_then.wat index feb8a3f17289..b46cff6fcfe3 100644 --- a/winch/filetests/filetests/x64/br_if/as_if_then.wat +++ b/winch/filetests/filetests/x64/br_if/as_if_then.wat @@ -9,38 +9,47 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8411000000 je 0x48 -;; 37: 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f8410000000 je 0x4f +;; 3f: 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f850a000000 jne 0x4d -;; e905000000 jmp 0x4d -;; 48: e800000000 call 0x4d -;; 4883c410 add rsp, 0x10 +;; 0f851d000000 jne 0x67 +;; e918000000 jmp 0x67 +;; 4f: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x5e +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_local_set_value.wat b/winch/filetests/filetests/x64/br_if/as_local_set_value.wat index 1114cdb367c4..933466701858 100644 --- a/winch/filetests/filetests/x64/br_if/as_local_set_value.wat +++ b/winch/filetests/filetests/x64/br_if/as_local_set_value.wat @@ -10,23 +10,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8737000000 ja 0x52 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; c744240800000000 mov dword ptr [rsp + 8], 0 +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; c7042400000000 mov dword ptr [rsp], 0 ;; 4531db xor r11d, r11d -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; b811000000 mov eax, 0x11 ;; 85c9 test ecx, ecx -;; 0f8509000000 jne 0x4c -;; 43: 8944240c mov dword ptr [rsp + 0xc], eax +;; 0f8509000000 jne 0x54 +;; 4b: 89442404 mov dword ptr [rsp + 4], eax ;; b8ffffffff mov eax, 0xffffffff -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 52: 0f0b ud2 +;; 5a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/as_loop_last.wat b/winch/filetests/filetests/x64/br_if/as_loop_last.wat index 6b7399a61f31..f307f6f8c2eb 100644 --- a/winch/filetests/filetests/x64/br_if/as_loop_last.wat +++ b/winch/filetests/filetests/x64/br_if/as_loop_last.wat @@ -7,33 +7,42 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8723000000 ja 0x3e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; e800000000 call 0x2c -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x3f +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8500000000 jne 0x38 -;; 38: 4883c410 add rsp, 0x10 +;; 0f8500000000 jne 0x54 +;; 54: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3e: 0f0b ud2 +;; 5a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_if/with_machine_stack_entry.wat b/winch/filetests/filetests/x64/br_if/with_machine_stack_entry.wat index e0d47ef88f13..1de40a1efd3e 100644 --- a/winch/filetests/filetests/x64/br_if/with_machine_stack_entry.wat +++ b/winch/filetests/filetests/x64/br_if/with_machine_stack_entry.wat @@ -13,42 +13,50 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8757000000 ja 0x75 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec04 sub rsp, 4 -;; e800000000 call 0x40 -;; 4883c404 add rsp, 4 +;; 4883ec0c sub rsp, 0xc +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x51 +;; 4883c40c add rsp, 0xc +;; 4c8b74240c mov r14, qword ptr [rsp + 0xc] ;; 85c0 test eax, eax -;; 0f8409000000 je 0x55 -;; 4c: 4883c404 add rsp, 4 -;; e904000000 jmp 0x59 -;; 55: 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 0f8409000000 je 0x6b +;; 62: 4883c404 add rsp, 4 +;; e904000000 jmp 0x6f +;; 6b: 4883c404 add rsp, 4 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 75: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_table/ensure_sp_state.wat b/winch/filetests/filetests/x64/br_table/ensure_sp_state.wat index 4d512f428920..d527947e490e 100644 --- a/winch/filetests/filetests/x64/br_table/ensure_sp_state.wat +++ b/winch/filetests/filetests/x64/br_table/ensure_sp_state.wat @@ -12,13 +12,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8747000000 ja 0x62 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874c000000 ja 0x6a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000000 mov eax, 0 ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax @@ -31,10 +33,10 @@ ;; 4963148b movsxd rdx, dword ptr [r11 + rcx*4] ;; 4901d3 add r11, rdx ;; 41ffe3 jmp r11 -;; 54: 0400 add al, 0 +;; 5c: 0400 add al, 0 ;; 0000 add byte ptr [rax], al ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 62: 0f0b ud2 +;; 6a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_table/large.wat b/winch/filetests/filetests/x64/br_table/large.wat index 2773bf6b177d..633a119c384e 100644 --- a/winch/filetests/filetests/x64/br_table/large.wat +++ b/winch/filetests/filetests/x64/br_table/large.wat @@ -739,15 +739,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f87e0800100 ja 0x180fb -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f87e6800100 ja 0x18104 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; b927600000 mov ecx, 0x6027 ;; 39c1 cmp ecx, eax ;; 0f42c1 cmovb eax, ecx @@ -755,7 +757,7 @@ ;; 49630c83 movsxd rcx, dword ptr [r11 + rax*4] ;; 4901cb add r11, rcx ;; 41ffe3 jmp r11 -;; 46: a0800100aa800100a0 +;; 4f: a0800100aa800100a0 ;; movabs al, byte ptr [0xa0000180aa000180] ;; 800100 add byte ptr [rcx], 0 ;; aa stosb byte ptr [rdi], al @@ -31526,9 +31528,9 @@ ;; aa stosb byte ptr [rdi], al ;; 800100 add byte ptr [rcx], 0 ;; b800000000 mov eax, 0 -;; e905000000 jmp 0x180f5 -;; 180f0: b801000000 mov eax, 1 -;; 4883c410 add rsp, 0x10 +;; e905000000 jmp 0x180fe +;; 180f9: b801000000 mov eax, 1 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 180fb: 0f0b ud2 +;; 18104: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/br_table/nested_br_table_loop_block.wat b/winch/filetests/filetests/x64/br_table/nested_br_table_loop_block.wat index 3dc861c8ce6a..20ad73296dd4 100644 --- a/winch/filetests/filetests/x64/br_table/nested_br_table_loop_block.wat +++ b/winch/filetests/filetests/x64/br_table/nested_br_table_loop_block.wat @@ -19,15 +19,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f877b000000 ja 0x96 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8781000000 ja 0x9f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; b902000000 mov ecx, 2 ;; 39c1 cmp ecx, eax ;; 0f42c1 cmovb eax, ecx @@ -35,4 +37,4 @@ ;; 49630c83 movsxd rcx, dword ptr [r11 + rax*4] ;; 4901cb add r11, rcx ;; 41ffe3 jmp r11 -;; 46: e1ff loope 0x47 +;; 4f: e1ff loope 0x50 diff --git a/winch/filetests/filetests/x64/br_table/stack_handling.wat b/winch/filetests/filetests/x64/br_table/stack_handling.wat index e57169ddc9cf..0ad40a8331c5 100644 --- a/winch/filetests/filetests/x64/br_table/stack_handling.wat +++ b/winch/filetests/filetests/x64/br_table/stack_handling.wat @@ -12,15 +12,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f875d000000 ja 0x78 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f8763000000 ja 0x81 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b839343430 mov eax, 0x30343439 @@ -31,17 +33,17 @@ ;; 49630c83 movsxd rcx, dword ptr [r11 + rax*4] ;; 4901cb add r11, rcx ;; 41ffe3 jmp r11 -;; 54: 1a00 sbb al, byte ptr [rax] +;; 5d: 1a00 sbb al, byte ptr [rax] ;; 0000 add byte ptr [rax], al ;; 1100 adc dword ptr [rax], eax ;; 0000 add byte ptr [rax], al ;; 1a00 sbb al, byte ptr [rax] ;; 0000 add byte ptr [rax], al -;; e909000000 jmp 0x6e -;; 65: 4883c404 add rsp, 4 -;; e904000000 jmp 0x72 +;; e909000000 jmp 0x77 ;; 6e: 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; e904000000 jmp 0x7b +;; 77: 4883c404 add rsp, 4 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 78: 0f0b ud2 +;; 81: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/call/params.wat b/winch/filetests/filetests/x64/call/params.wat index 8f41a9e91180..6689e9603517 100644 --- a/winch/filetests/filetests/x64/call/params.wat +++ b/winch/filetests/filetests/x64/call/params.wat @@ -37,43 +37,50 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c340000000 add r11, 0x40 +;; 4981c350000000 add r11, 0x50 ;; 4939e3 cmp r11, rsp -;; 0f8702010000 ja 0x11d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] -;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f8734010000 ja 0x152 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] +;; 8b0424 mov eax, dword ptr [rsp] ;; 31d2 xor edx, edx ;; f7f1 div ecx ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec2c sub rsp, 0x2c -;; 8b7c242c mov edi, dword ptr [rsp + 0x2c] -;; be01000000 mov esi, 1 -;; ba02000000 mov edx, 2 -;; b903000000 mov ecx, 3 -;; 41b804000000 mov r8d, 4 -;; 41b905000000 mov r9d, 5 -;; 41bb06000000 mov r11d, 6 +;; 4883ec34 sub rsp, 0x34 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; 8b542434 mov edx, dword ptr [rsp + 0x34] +;; b901000000 mov ecx, 1 +;; 41b802000000 mov r8d, 2 +;; 41b903000000 mov r9d, 3 +;; 41bb04000000 mov r11d, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; 41bb07000000 mov r11d, 7 +;; 41bb05000000 mov r11d, 5 ;; 44895c2408 mov dword ptr [rsp + 8], r11d -;; 41bb08000000 mov r11d, 8 +;; 41bb06000000 mov r11d, 6 ;; 44895c2410 mov dword ptr [rsp + 0x10], r11d -;; e800000000 call 0x86 -;; 4883c42c add rsp, 0x2c +;; 41bb07000000 mov r11d, 7 +;; 44895c2418 mov dword ptr [rsp + 0x18], r11d +;; 41bb08000000 mov r11d, 8 +;; 44895c2420 mov dword ptr [rsp + 0x20], r11d +;; e800000000 call 0x9f +;; 4883c434 add rsp, 0x34 ;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; 448b5c2414 mov r11d, dword ptr [rsp + 0x14] +;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 8b0c24 mov ecx, dword ptr [rsp] @@ -84,52 +91,53 @@ ;; f7f1 div ecx ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec28 sub rsp, 0x28 -;; 8b7c242c mov edi, dword ptr [rsp + 0x2c] -;; 8b742428 mov esi, dword ptr [rsp + 0x28] -;; ba02000000 mov edx, 2 -;; b903000000 mov ecx, 3 -;; 41b804000000 mov r8d, 4 -;; 41b905000000 mov r9d, 5 -;; 41bb06000000 mov r11d, 6 +;; 4883ec30 sub rsp, 0x30 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; 8b542434 mov edx, dword ptr [rsp + 0x34] +;; 8b4c2430 mov ecx, dword ptr [rsp + 0x30] +;; 41b802000000 mov r8d, 2 +;; 41b903000000 mov r9d, 3 +;; 41bb04000000 mov r11d, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; 41bb07000000 mov r11d, 7 +;; 41bb05000000 mov r11d, 5 ;; 44895c2408 mov dword ptr [rsp + 8], r11d -;; 41bb08000000 mov r11d, 8 +;; 41bb06000000 mov r11d, 6 ;; 44895c2410 mov dword ptr [rsp + 0x10], r11d -;; e800000000 call 0x10f -;; 4883c428 add rsp, 0x28 +;; 41bb07000000 mov r11d, 7 +;; 44895c2418 mov dword ptr [rsp + 0x18], r11d +;; 41bb08000000 mov r11d, 8 +;; 44895c2420 mov dword ptr [rsp + 0x20], r11d +;; e800000000 call 0x13f +;; 4883c430 add rsp, 0x30 ;; 4883c408 add rsp, 8 -;; 4883c410 add rsp, 0x10 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 11d: 0f0b ud2 +;; 152: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f875b000000 ja 0x76 -;; 1b: 4883ec20 sub rsp, 0x20 -;; 897c241c mov dword ptr [rsp + 0x1c], edi -;; 89742418 mov dword ptr [rsp + 0x18], esi -;; 89542414 mov dword ptr [rsp + 0x14], edx -;; 894c2410 mov dword ptr [rsp + 0x10], ecx -;; 448944240c mov dword ptr [rsp + 0xc], r8d -;; 44894c2408 mov dword ptr [rsp + 8], r9d -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442418 mov eax, dword ptr [rsp + 0x18] -;; 8b4c241c mov ecx, dword ptr [rsp + 0x1c] -;; 01c1 add ecx, eax -;; 8b442414 mov eax, dword ptr [rsp + 0x14] -;; 01c1 add ecx, eax -;; 8b442410 mov eax, dword ptr [rsp + 0x10] +;; 0f8755000000 ja 0x73 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 8954240c mov dword ptr [rsp + 0xc], edx +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d +;; 44890c24 mov dword ptr [rsp], r9d +;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] ;; 01c1 add ecx, eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 01c1 add ecx, eax -;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 8b0424 mov eax, dword ptr [rsp] ;; 01c1 add ecx, eax ;; 8b4510 mov eax, dword ptr [rbp + 0x10] ;; 01c1 add ecx, eax @@ -137,8 +145,12 @@ ;; 01c1 add ecx, eax ;; 8b4520 mov eax, dword ptr [rbp + 0x20] ;; 01c1 add ecx, eax +;; 8b4528 mov eax, dword ptr [rbp + 0x28] +;; 01c1 add ecx, eax +;; 8b4530 mov eax, dword ptr [rbp + 0x30] +;; 01c1 add ecx, eax ;; 89c8 mov eax, ecx ;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 76: 0f0b ud2 +;; 73: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/call/recursive.wat b/winch/filetests/filetests/x64/call/recursive.wat index 33cb786859c9..7a3cf3c4b08a 100644 --- a/winch/filetests/filetests/x64/call/recursive.wat +++ b/winch/filetests/filetests/x64/call/recursive.wat @@ -24,47 +24,53 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f878b000000 ja 0xa6 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f879e000000 ja 0xbc +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83f801 cmp eax, 1 ;; b800000000 mov eax, 0 ;; 400f9ec0 setle al ;; 85c0 test eax, eax -;; 0f8409000000 je 0x48 -;; 3f: 8b44240c mov eax, dword ptr [rsp + 0xc] -;; e958000000 jmp 0xa0 -;; 48: 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8409000000 je 0x51 +;; 48: 8b442404 mov eax, dword ptr [rsp + 4] +;; e965000000 jmp 0xb6 +;; 51: 8b442404 mov eax, dword ptr [rsp + 4] ;; 83e801 sub eax, 1 ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec0c sub rsp, 0xc -;; 8b7c240c mov edi, dword ptr [rsp + 0xc] -;; e800000000 call 0x63 -;; 4883c40c add rsp, 0xc +;; 4883ec04 sub rsp, 4 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; 8b542404 mov edx, dword ptr [rsp + 4] +;; e800000000 call 0x72 +;; 4883c404 add rsp, 4 ;; 4883c404 add rsp, 4 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 83e902 sub ecx, 2 ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx -;; 4883ec08 sub rsp, 8 -;; 8b7c2408 mov edi, dword ptr [rsp + 8] -;; e800000000 call 0x8d -;; 4883c408 add rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; 8b1424 mov edx, dword ptr [rsp] +;; e800000000 call 0xa2 ;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; a6: 0f0b ud2 +;; bc: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/call/reg_on_stack.wat b/winch/filetests/filetests/x64/call/reg_on_stack.wat index 226273148ace..38b2978ac873 100644 --- a/winch/filetests/filetests/x64/call/reg_on_stack.wat +++ b/winch/filetests/filetests/x64/call/reg_on_stack.wat @@ -12,27 +12,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c320000000 add r11, 0x20 +;; 4981c324000000 add r11, 0x24 ;; 4939e3 cmp r11, rsp -;; 0f8772000000 ja 0x8d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f8786000000 ja 0xa4 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; 4883ec0c sub rsp, 0xc -;; bf01000000 mov edi, 1 -;; e800000000 call 0x42 -;; 4883c40c add rsp, 0xc +;; 4883ec04 sub rsp, 4 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; ba01000000 mov edx, 1 +;; e800000000 call 0x51 +;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 4883ec08 sub rsp, 8 -;; bf01000000 mov edi, 1 -;; e800000000 call 0x5b -;; 4883c408 add rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; ba01000000 mov edx, 1 +;; e800000000 call 0x71 +;; 4c8b742418 mov r14, qword ptr [rsp + 0x18] ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax ;; 8b0c24 mov ecx, dword ptr [rsp] @@ -40,11 +46,11 @@ ;; 8b0424 mov eax, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 85c9 test ecx, ecx -;; 0f8409000000 je 0x85 -;; 7c: 4883c404 add rsp, 4 -;; e902000000 jmp 0x87 -;; 85: 0f0b ud2 -;; 4883c410 add rsp, 0x10 +;; 0f8409000000 je 0x9c +;; 93: 4883c404 add rsp, 4 +;; e902000000 jmp 0x9e +;; 9c: 0f0b ud2 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 8d: 0f0b ud2 +;; a4: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/call/simple.wat b/winch/filetests/filetests/x64/call/simple.wat index 54b00b5372d9..182266c9ab2a 100644 --- a/winch/filetests/filetests/x64/call/simple.wat +++ b/winch/filetests/filetests/x64/call/simple.wat @@ -15,23 +15,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8755000000 ja 0x70 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; bf14000000 mov edi, 0x14 -;; be50000000 mov esi, 0x50 -;; e800000000 call 0x3b +;; 0f876d000000 ja 0x8b +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; ba14000000 mov edx, 0x14 +;; b950000000 mov ecx, 0x50 +;; e800000000 call 0x4d +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b902000000 mov ecx, 2 -;; 894c240c mov dword ptr [rsp + 0xc], ecx +;; 894c2404 mov dword ptr [rsp + 4], ecx ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax -;; 448b5c2410 mov r11d, dword ptr [rsp + 0x10] +;; 448b5c2408 mov r11d, dword ptr [rsp + 8] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 8b0c24 mov ecx, dword ptr [rsp] @@ -40,27 +46,29 @@ ;; 4883c404 add rsp, 4 ;; 31d2 xor edx, edx ;; f7f1 div ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 70: 0f0b ud2 +;; 8b: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8723000000 ja 0x3e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 0fafc8 imul ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3e: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/call_indirect/call_indirect.wat b/winch/filetests/filetests/x64/call_indirect/call_indirect.wat index bb83657d50e7..94abda63a546 100644 --- a/winch/filetests/filetests/x64/call_indirect/call_indirect.wat +++ b/winch/filetests/filetests/x64/call_indirect/call_indirect.wat @@ -31,23 +31,25 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c330000000 add r11, 0x30 ;; 4939e3 cmp r11, rsp -;; 0f8797010000 ja 0x1b2 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f87b4010000 ja 0x1d2 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83f801 cmp eax, 1 ;; b800000000 mov eax, 0 ;; 400f96c0 setbe al ;; 85c0 test eax, eax -;; 0f840a000000 je 0x49 -;; 3f: b801000000 mov eax, 1 -;; e963010000 jmp 0x1ac -;; 49: 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f840a000000 je 0x52 +;; 48: b801000000 mov eax, 1 +;; e97a010000 jmp 0x1cc +;; 52: 8b442404 mov eax, dword ptr [rsp + 4] ;; 83e802 sub eax, 2 ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax @@ -55,8 +57,8 @@ ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f834a010000 jae 0x1b4 -;; 6a: 4189cb mov r11d, ecx +;; 0f8361010000 jae 0x1d4 +;; 73: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -65,35 +67,39 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8529000000 jne 0xb6 -;; 8d: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f852a000000 jne 0xc0 +;; 96: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx -;; 488b7c2404 mov rdi, qword ptr [rsp + 4] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b1424 mov edx, dword ptr [rsp] ;; ffd3 call rbx -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0xba -;; b6: 4883e0fe and rax, 0xfffffffffffffffe +;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] +;; e904000000 jmp 0xc4 +;; c0: 4883e0fe and rax, 0xfffffffffffffffe ;; 4885c0 test rax, rax -;; 0f84f3000000 je 0x1b6 -;; c3: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] +;; 0f8409010000 je 0x1d6 +;; cd: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] ;; 418b0b mov ecx, dword ptr [r11] ;; 8b5018 mov edx, dword ptr [rax + 0x18] ;; 39d1 cmp ecx, edx -;; 0f85e3000000 jne 0x1b8 -;; d5: 50 push rax +;; 0f85f9000000 jne 0x1d8 +;; df: 50 push rax ;; 59 pop rcx -;; 488b5110 mov rdx, qword ptr [rcx + 0x10] -;; 4883ec0c sub rsp, 0xc -;; 8b7c240c mov edi, dword ptr [rsp + 0xc] -;; ffd2 call rdx -;; 4883c40c add rsp, 0xc +;; 4c8b4120 mov r8, qword ptr [rcx + 0x20] +;; 488b5910 mov rbx, qword ptr [rcx + 0x10] +;; 4883ec04 sub rsp, 4 +;; 4c89c7 mov rdi, r8 +;; 4c89f6 mov rsi, r14 +;; 8b542404 mov edx, dword ptr [rsp + 4] +;; ffd3 call rbx ;; 4883c404 add rsp, 4 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 83e901 sub ecx, 1 ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax @@ -103,8 +109,8 @@ ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f83a5000000 jae 0x1ba -;; 115: 4189cb mov r11d, ecx +;; 0f83ac000000 jae 0x1da +;; 12e: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -113,47 +119,49 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8532000000 jne 0x16a -;; 138: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f8533000000 jne 0x184 +;; 151: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx ;; 4883ec0c sub rsp, 0xc -;; 488b7c2410 mov rdi, qword ptr [rsp + 0x10] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b54240c mov edx, dword ptr [rsp + 0xc] ;; ffd3 call rbx ;; 4883c40c add rsp, 0xc -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0x16e -;; 16a: 4883e0fe and rax, 0xfffffffffffffffe +;; 4883c404 add rsp, 4 +;; 4c8b742418 mov r14, qword ptr [rsp + 0x18] +;; e904000000 jmp 0x188 +;; 184: 4883e0fe and rax, 0xfffffffffffffffe ;; 4885c0 test rax, rax -;; 0f8445000000 je 0x1bc -;; 177: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] +;; 0f844b000000 je 0x1dc +;; 191: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] ;; 418b0b mov ecx, dword ptr [r11] ;; 8b5018 mov edx, dword ptr [rax + 0x18] ;; 39d1 cmp ecx, edx -;; 0f8535000000 jne 0x1be -;; 189: 50 push rax +;; 0f853b000000 jne 0x1de +;; 1a3: 50 push rax ;; 59 pop rcx -;; 488b5110 mov rdx, qword ptr [rcx + 0x10] -;; 4883ec08 sub rsp, 8 -;; 8b7c2408 mov edi, dword ptr [rsp + 8] -;; ffd2 call rdx -;; 4883c408 add rsp, 8 +;; 4c8b4120 mov r8, qword ptr [rcx + 0x20] +;; 488b5910 mov rbx, qword ptr [rcx + 0x10] +;; 4c89c7 mov rdi, r8 +;; 4c89f6 mov rsi, r14 +;; 8b1424 mov edx, dword ptr [rsp] +;; ffd3 call rbx ;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 1b2: 0f0b ud2 -;; 1b4: 0f0b ud2 -;; 1b6: 0f0b ud2 -;; 1b8: 0f0b ud2 -;; 1ba: 0f0b ud2 -;; 1bc: 0f0b ud2 -;; 1be: 0f0b ud2 +;; 1d2: 0f0b ud2 +;; 1d4: 0f0b ud2 +;; 1d6: 0f0b ud2 +;; 1d8: 0f0b ud2 +;; 1da: 0f0b ud2 +;; 1dc: 0f0b ud2 +;; 1de: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/call_indirect/local_arg.wat b/winch/filetests/filetests/x64/call_indirect/local_arg.wat index 1382aec7a111..05c43c782d1b 100644 --- a/winch/filetests/filetests/x64/call_indirect/local_arg.wat +++ b/winch/filetests/filetests/x64/call_indirect/local_arg.wat @@ -15,100 +15,45 @@ $param-i32) ) ) -;; 0: 55 push rbp -;; 1: 4889e5 mov rbp, rsp -;; 4: 4883ec10 sub rsp, 0x10 -;; 8: 897c240c mov dword ptr [rsp + 0xc], edi -;; c: 4c893424 mov qword ptr [rsp], r14 -;; 10: 4883c410 add rsp, 0x10 -;; 14: 5d pop rbp -;; 15: c3 ret -;; -;; 0: 55 push rbp -;; 1: 4889e5 mov rbp, rsp -;; 4: 4883ec10 sub rsp, 0x10 -;; 8: 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 11: 4c893424 mov qword ptr [rsp], r14 -;; 15: b900000000 mov ecx, 0 -;; 1a: 4c89f2 mov rdx, r14 -;; 1d: 8b5a50 mov ebx, dword ptr [rdx + 0x50] -;; 20: 39d9 cmp ecx, ebx -;; 22: 0f8394000000 jae 0xbc -;; 28: 4189cb mov r11d, ecx -;; 2b: 4d6bdb08 imul r11, r11, 8 -;; 2f: 488b5248 mov rdx, qword ptr [rdx + 0x48] -;; 33: 4889d6 mov rsi, rdx -;; 36: 4c01da add rdx, r11 -;; 39: 39d9 cmp ecx, ebx -;; 3b: 480f43d6 cmovae rdx, rsi -;; 3f: 488b02 mov rax, qword ptr [rdx] -;; 42: 4885c0 test rax, rax -;; 45: 0f8536000000 jne 0x81 -;; 4b: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] -;; 4f: 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 53: 448b5c240c mov r11d, dword ptr [rsp + 0xc] -;; 58: 4883ec04 sub rsp, 4 -;; 5c: 44891c24 mov dword ptr [rsp], r11d -;; 60: 4156 push r14 -;; 62: 4883ec04 sub rsp, 4 -;; 66: 890c24 mov dword ptr [rsp], ecx -;; 69: 488b7c2404 mov rdi, qword ptr [rsp + 4] -;; 6e: be00000000 mov esi, 0 -;; 73: 8b1424 mov edx, dword ptr [rsp] -;; 76: ffd3 call rbx -;; 78: 4883c40c add rsp, 0xc -;; 7c: e904000000 jmp 0x85 -;; 81: 4883e0fe and rax, 0xfffffffffffffffe -;; 85: 4885c0 test rax, rax -;; 88: 0f8430000000 je 0xbe -;; 8e: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] -;; 92: 418b0b mov ecx, dword ptr [r11] -;; 95: 8b5018 mov edx, dword ptr [rax + 0x18] -;; 98: 39d1 cmp ecx, edx -;; 9a: 0f8520000000 jne 0xc0 -;; a0: 488b4810 mov rcx, qword ptr [rax + 0x10] -;; a4: 4883ec0c sub rsp, 0xc -;; a8: 8b7c240c mov edi, dword ptr [rsp + 0xc] -;; ac: ffd1 call rcx -;; ae: 4883c40c add rsp, 0xc -;; b2: 4883c404 add rsp, 4 ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8712000000 ja 0x2d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c410 add rsp, 0x10 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 2d: 0f0b ud2 +;; 36: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f87b8000000 ja 0xd3 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f87cd000000 ja 0xeb +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b900000000 mov ecx, 0 ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f8389000000 jae 0xd5 -;; 4c: 4189cb mov r11d, ecx +;; 0f8399000000 jae 0xed +;; 54: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -117,36 +62,40 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8529000000 jne 0x98 -;; 6f: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f852a000000 jne 0xa1 +;; 77: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx -;; 488b7c2404 mov rdi, qword ptr [rsp + 4] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b1424 mov edx, dword ptr [rsp] ;; ffd3 call rbx -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0x9c -;; 98: 4883e0fe and rax, 0xfffffffffffffffe +;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] +;; e904000000 jmp 0xa5 +;; a1: 4883e0fe and rax, 0xfffffffffffffffe ;; 4885c0 test rax, rax -;; 0f8432000000 je 0xd7 -;; a5: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] +;; 0f8441000000 je 0xef +;; ae: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] ;; 418b0b mov ecx, dword ptr [r11] ;; 8b5018 mov edx, dword ptr [rax + 0x18] ;; 39d1 cmp ecx, edx -;; 0f8522000000 jne 0xd9 -;; b7: 488b4810 mov rcx, qword ptr [rax + 0x10] -;; 4883ec0c sub rsp, 0xc -;; 8b7c240c mov edi, dword ptr [rsp + 0xc] +;; 0f8531000000 jne 0xf1 +;; c0: 488b5820 mov rbx, qword ptr [rax + 0x20] +;; 488b4810 mov rcx, qword ptr [rax + 0x10] +;; 4883ec04 sub rsp, 4 +;; 4889df mov rdi, rbx +;; 4c89f6 mov rsi, r14 +;; 8b542404 mov edx, dword ptr [rsp + 4] ;; ffd1 call rcx -;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; d3: 0f0b ud2 -;; d5: 0f0b ud2 -;; d7: 0f0b ud2 -;; d9: 0f0b ud2 +;; eb: 0f0b ud2 +;; ed: 0f0b ud2 +;; ef: 0f0b ud2 +;; f1: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_abs/f32_abs_const.wat b/winch/filetests/filetests/x64/f32_abs/f32_abs_const.wat index 2dac811cb236..2ef69e1f8ae4 100644 --- a/winch/filetests/filetests/x64/f32_abs/f32_abs_const.wat +++ b/winch/filetests/filetests/x64/f32_abs/f32_abs_const.wat @@ -8,24 +8,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; 41bbffffff7f mov r11d, 0x7fffffff ;; 66450f6efb movd xmm15, r11d ;; 410f54c7 andps xmm0, xmm15 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al -;; 46: 0000 add byte ptr [rax], al -;; 48: c3 ret -;; 49: f5 cmc -;; 4a: a8bf test al, 0xbf +;; 48: 0f0b ud2 +;; 4a: 0000 add byte ptr [rax], al +;; 4c: 0000 add byte ptr [rax], al +;; 4e: 0000 add byte ptr [rax], al +;; 50: c3 ret +;; 51: f5 cmc +;; 52: a8bf test al, 0xbf diff --git a/winch/filetests/filetests/x64/f32_abs/f32_abs_param.wat b/winch/filetests/filetests/x64/f32_abs/f32_abs_param.wat index 739a778aacd6..8aed3667189f 100644 --- a/winch/filetests/filetests/x64/f32_abs/f32_abs_param.wat +++ b/winch/filetests/filetests/x64/f32_abs/f32_abs_param.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8729000000 ja 0x44 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 41bbffffff7f mov r11d, 0x7fffffff ;; 66450f6efb movd xmm15, r11d ;; 410f54c7 andps xmm0, xmm15 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 44: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_add/const.wat b/winch/filetests/filetests/x64/f32_add/const.wat index 46719c76a4ec..b377c03741a6 100644 --- a/winch/filetests/filetests/x64/f32_add/const.wat +++ b/winch/filetests/filetests/x64/f32_add/const.wat @@ -9,26 +9,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; f30f100d1d000000 movss xmm1, dword ptr [rip + 0x1d] ;; f30f58c8 addss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al -;; 46: 0000 add byte ptr [rax], al -;; 48: cdcc int 0xcc -;; 4a: 0c40 or al, 0x40 +;; 48: 0f0b ud2 +;; 4a: 0000 add byte ptr [rax], al ;; 4c: 0000 add byte ptr [rax], al ;; 4e: 0000 add byte ptr [rax], al ;; 50: cdcc int 0xcc +;; 52: 0c40 or al, 0x40 +;; 54: 0000 add byte ptr [rax], al +;; 56: 0000 add byte ptr [rax], al +;; 58: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_add/locals.wat b/winch/filetests/filetests/x64/f32_add/locals.wat index cff3e0c5241f..d6f3a8dabf62 100644 --- a/winch/filetests/filetests/x64/f32_add/locals.wat +++ b/winch/filetests/filetests/x64/f32_add/locals.wat @@ -18,28 +18,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8749000000 ja 0x67 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100534000000 movss xmm0, dword ptr [rip + 0x34] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10052e000000 movss xmm0, dword ptr [rip + 0x2e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f58c8 addss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 00cd add ch, cl -;; 69: cc int3 +;; 67: 0f0b ud2 +;; 69: 0000 add byte ptr [rax], al +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 00cd add ch, cl +;; 71: cc int3 diff --git a/winch/filetests/filetests/x64/f32_add/params.wat b/winch/filetests/filetests/x64/f32_add/params.wat index 13694a679317..2f4790de7046 100644 --- a/winch/filetests/filetests/x64/f32_add/params.wat +++ b/winch/filetests/filetests/x64/f32_add/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f58c8 addss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_ceil/f32_ceil_const_sse41.wat b/winch/filetests/filetests/x64/f32_ceil/f32_ceil_const_sse41.wat index fdf05e94aa23..e7a23c0024ec 100644 --- a/winch/filetests/filetests/x64/f32_ceil/f32_ceil_const_sse41.wat +++ b/winch/filetests/filetests/x64/f32_ceil/f32_ceil_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100515000000 movss xmm0, dword ptr [rip + 0x15] ;; 660f3a0ac002 roundss xmm0, xmm0, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 00c3 add bl, al -;; 41: f5 cmc -;; 42: a8bf test al, 0xbf +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 00c3 add bl, al +;; 49: f5 cmc +;; 4a: a8bf test al, 0xbf diff --git a/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param.wat b/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param.wat index 1044a46ea089..2776af08dc9e 100644 --- a/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param.wat +++ b/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param.wat @@ -8,25 +8,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f3440f107c240c movss xmm15, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f3440f107c2404 movss xmm15, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; f3440f113c24 movss dword ptr [rsp], xmm15 -;; 4883ec0c sub rsp, 0xc -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 4883ec04 sub rsp, 4 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 -;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param_sse41.wat b/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param_sse41.wat index 5e25be59c994..c463ebdb2684 100644 --- a/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param_sse41.wat +++ b/winch/filetests/filetests/x64/f32_ceil/f32_ceil_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 660f3a0ac002 roundss xmm0, xmm0, 2 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_const/call_id.wat b/winch/filetests/filetests/x64/f32_const/call_id.wat index 66e6d9fc7d79..f73339b8d9eb 100644 --- a/winch/filetests/filetests/x64/f32_const/call_id.wat +++ b/winch/filetests/filetests/x64/f32_const/call_id.wat @@ -6,37 +6,44 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] -;; 4883c410 add rsp, 0x10 +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8723000000 ja 0x3e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; f30f100511000000 movss xmm0, dword ptr [rip + 0x11] -;; e800000000 call 0x34 -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; f30f100517000000 movss xmm0, dword ptr [rip + 0x17] +;; e800000000 call 0x3e +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3e: 0f0b ud2 -;; 40: c3 ret -;; 41: f5 cmc -;; 42: a83f test al, 0x3f +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 00c3 add bl, al +;; 51: f5 cmc +;; 52: a83f test al, 0x3f diff --git a/winch/filetests/filetests/x64/f32_const/id.wat b/winch/filetests/filetests/x64/f32_const/id.wat index 65d9ff773c56..02aa268d6a4d 100644 --- a/winch/filetests/filetests/x64/f32_const/id.wat +++ b/winch/filetests/filetests/x64/f32_const/id.wat @@ -5,16 +5,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] -;; 4883c410 add rsp, 0x10 +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_s/const.wat b/winch/filetests/filetests/x64/f32_convert_i32_s/const.wat index a95547a80b17..ef439bc11f89 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_s/const.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; f30f2ac0 cvtsi2ss xmm0, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_s/locals.wat b/winch/filetests/filetests/x64/f32_convert_i32_s/locals.wat index 7cb39964db32..a8e273324991 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_s/locals.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30f2ac0 cvtsi2ss xmm0, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_s/params.wat b/winch/filetests/filetests/x64/f32_convert_i32_s/params.wat index 2f81f55d6fa8..8437677f4d2f 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_s/params.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30f2ac0 cvtsi2ss xmm0, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_s/spilled.wat b/winch/filetests/filetests/x64/f32_convert_i32_s/spilled.wat index a334e4f7f508..11abc4b5f475 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_s/spilled.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_s/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8729000000 ja 0x44 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872e000000 ja 0x4c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; f30f2ac0 cvtsi2ss xmm0, eax ;; 4883ec04 sub rsp, 4 ;; f30f110424 movss dword ptr [rsp], xmm0 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 44: 0f0b ud2 +;; 4c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_u/const.wat b/winch/filetests/filetests/x64/f32_convert_i32_u/const.wat index d1a737c3fa19..091c9f259291 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_u/const.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_u/const.wat @@ -8,27 +8,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8748000000 ja 0x66 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; f30f58c0 addss xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 66: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_u/locals.wat b/winch/filetests/filetests/x64/f32_convert_i32_u/locals.wat index fd8d04c81123..500c43135ece 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_u/locals.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_u/locals.wat @@ -10,29 +10,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8750000000 ja 0x6e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x46 -;; 3c: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x60 -;; 46: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x4e +;; 44: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x68 +;; 4e: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; f30f58c0 addss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_u/params.wat b/winch/filetests/filetests/x64/f32_convert_i32_u/params.wat index f8d484c9ba0f..51b59f670c05 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_u/params.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_u/params.wat @@ -8,28 +8,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f874c000000 ja 0x6a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x41 -;; 37: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x5b -;; 41: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x4a +;; 40: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x64 +;; 4a: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; f30f58c0 addss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 6a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i32_u/spilled.wat b/winch/filetests/filetests/x64/f32_convert_i32_u/spilled.wat index 66d2357c0c41..77c9fd9b6c3c 100644 --- a/winch/filetests/filetests/x64/f32_convert_i32_u/spilled.wat +++ b/winch/filetests/filetests/x64/f32_convert_i32_u/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8755000000 ja 0x70 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875a000000 ja 0x78 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 @@ -34,7 +36,7 @@ ;; f30f110424 movss dword ptr [rsp], xmm0 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 70: 0f0b ud2 +;; 78: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_s/const.wat b/winch/filetests/filetests/x64/f32_convert_i64_s/const.wat index 4c4f76d8bb03..83c3c72358f4 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_s/const.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; f3480f2ac0 cvtsi2ss xmm0, rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_s/locals.wat b/winch/filetests/filetests/x64/f32_convert_i64_s/locals.wat index 3933069611b3..f885240ffff5 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_s/locals.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480f2ac0 cvtsi2ss xmm0, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_s/params.wat b/winch/filetests/filetests/x64/f32_convert_i64_s/params.wat index 30a99d840f79..a988b845738d 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_s/params.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480f2ac0 cvtsi2ss xmm0, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_s/spilled.wat b/winch/filetests/filetests/x64/f32_convert_i64_s/spilled.wat index ea1faa1a4a48..417a1ee7c657 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_s/spilled.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_s/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f872c000000 ja 0x47 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; 4883ec04 sub rsp, 4 ;; f30f110424 movss dword ptr [rsp], xmm0 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 47: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_u/const.wat b/winch/filetests/filetests/x64/f32_convert_i64_u/const.wat index 249c541727ea..8a3d48280722 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_u/const.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_u/const.wat @@ -8,26 +8,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8748000000 ja 0x66 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c101000000 mov rcx, 1 ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; f30f58c0 addss xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 66: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_u/locals.wat b/winch/filetests/filetests/x64/f32_convert_i64_u/locals.wat index 7edf7e250292..05f6b9b30936 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_u/locals.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_u/locals.wat @@ -10,28 +10,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874a000000 ja 0x65 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0c24 mov rcx, qword ptr [rsp] ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x45 -;; 3b: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x5f -;; 45: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x4c +;; 42: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x66 +;; 4c: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; f30f58c0 addss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 65: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_u/params.wat b/winch/filetests/filetests/x64/f32_convert_i64_u/params.wat index f1b15d42a87b..04fdd2f99bdf 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_u/params.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_u/params.wat @@ -8,27 +8,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] +;; 0f874a000000 ja 0x68 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0c24 mov rcx, qword ptr [rsp] ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x41 -;; 37: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x5b -;; 41: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x48 +;; 3e: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x62 +;; 48: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f3480f2ac0 cvtsi2ss xmm0, rax ;; f30f58c0 addss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 68: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_convert_i64_u/spilled.wat b/winch/filetests/filetests/x64/f32_convert_i64_u/spilled.wat index f610c527c8c8..fa31e0044f37 100644 --- a/winch/filetests/filetests/x64/f32_convert_i64_u/spilled.wat +++ b/winch/filetests/filetests/x64/f32_convert_i64_u/spilled.wat @@ -10,19 +10,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8755000000 ja 0x70 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875a000000 ja 0x78 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c101000000 mov rcx, 1 ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f3480f2ac1 cvtsi2ss xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f3480f2ac1 cvtsi2ss xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 @@ -33,7 +35,7 @@ ;; f30f110424 movss dword ptr [rsp], xmm0 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 70: 0f0b ud2 +;; 78: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_copysign/const.wat b/winch/filetests/filetests/x64/f32_copysign/const.wat index dbeae84433a5..1976eabc21c3 100644 --- a/winch/filetests/filetests/x64/f32_copysign/const.wat +++ b/winch/filetests/filetests/x64/f32_copysign/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f873b000000 ja 0x56 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8740000000 ja 0x5e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10052d000000 movss xmm0, dword ptr [rip + 0x2d] ;; f30f100d2d000000 movss xmm1, dword ptr [rip + 0x2d] ;; 41bb00000080 mov r11d, 0x80000000 @@ -25,12 +27,12 @@ ;; 410f28cf movaps xmm1, xmm15 ;; 0f56c8 orps xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 56: 0f0b ud2 -;; 58: cdcc int 0xcc -;; 5a: 0c40 or al, 0x40 -;; 5c: 0000 add byte ptr [rax], al -;; 5e: 0000 add byte ptr [rax], al +;; 5e: 0f0b ud2 ;; 60: cdcc int 0xcc +;; 62: 0c40 or al, 0x40 +;; 64: 0000 add byte ptr [rax], al +;; 66: 0000 add byte ptr [rax], al +;; 68: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_copysign/locals.wat b/winch/filetests/filetests/x64/f32_copysign/locals.wat index 2fd2eef9ce52..f2e7f52f80cf 100644 --- a/winch/filetests/filetests/x64/f32_copysign/locals.wat +++ b/winch/filetests/filetests/x64/f32_copysign/locals.wat @@ -18,21 +18,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f875c000000 ja 0x77 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10054c000000 movss xmm0, dword ptr [rip + 0x4c] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f100546000000 movss xmm0, dword ptr [rip + 0x46] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f875f000000 ja 0x7d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f100544000000 movss xmm0, dword ptr [rip + 0x44] +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10053e000000 movss xmm0, dword ptr [rip + 0x3e] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 41bb00000080 mov r11d, 0x80000000 ;; 66450f6efb movd xmm15, r11d ;; 410f54c7 andps xmm0, xmm15 @@ -40,12 +41,9 @@ ;; 410f28cf movaps xmm1, xmm15 ;; 0f56c8 orps xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 77: 0f0b ud2 -;; 79: 0000 add byte ptr [rax], al -;; 7b: 0000 add byte ptr [rax], al -;; 7d: 0000 add byte ptr [rax], al +;; 7d: 0f0b ud2 ;; 7f: 00cd add ch, cl ;; 81: cc int3 diff --git a/winch/filetests/filetests/x64/f32_copysign/params.wat b/winch/filetests/filetests/x64/f32_copysign/params.wat index 4eb30cebc850..b8c032f920df 100644 --- a/winch/filetests/filetests/x64/f32_copysign/params.wat +++ b/winch/filetests/filetests/x64/f32_copysign/params.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8747000000 ja 0x65 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 41bb00000080 mov r11d, 0x80000000 ;; 66450f6efb movd xmm15, r11d ;; 410f54c7 andps xmm0, xmm15 @@ -27,7 +29,7 @@ ;; 410f28cf movaps xmm1, xmm15 ;; 0f56c8 orps xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 65: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_demote_f64/const.wat b/winch/filetests/filetests/x64/f32_demote_f64/const.wat index 7be0a4fb97da..33c80c4c3315 100644 --- a/winch/filetests/filetests/x64/f32_demote_f64/const.wat +++ b/winch/filetests/filetests/x64/f32_demote_f64/const.wat @@ -8,20 +8,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10050d000000 movsd xmm0, qword ptr [rip + 0xd] ;; f20f5ac0 cvtsd2ss xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 -;; 37: 0000 add byte ptr [rax], al -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 00f0 add al, dh +;; 3d: 0f0b ud2 +;; 3f: 0000 add byte ptr [rax], al +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 00f0 add al, dh diff --git a/winch/filetests/filetests/x64/f32_demote_f64/locals.wat b/winch/filetests/filetests/x64/f32_demote_f64/locals.wat index f2cb6cfce984..65d9128f8dba 100644 --- a/winch/filetests/filetests/x64/f32_demote_f64/locals.wat +++ b/winch/filetests/filetests/x64/f32_demote_f64/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f20f5ac0 cvtsd2ss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_demote_f64/params.wat b/winch/filetests/filetests/x64/f32_demote_f64/params.wat index 75ab89a90633..bd956655c2ef 100644 --- a/winch/filetests/filetests/x64/f32_demote_f64/params.wat +++ b/winch/filetests/filetests/x64/f32_demote_f64/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8722000000 ja 0x40 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f20f5ac0 cvtsd2ss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 40: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_demote_f64/spilled.wat b/winch/filetests/filetests/x64/f32_demote_f64/spilled.wat index 7306709d8352..3a0810e7c90e 100644 --- a/winch/filetests/filetests/x64/f32_demote_f64/spilled.wat +++ b/winch/filetests/filetests/x64/f32_demote_f64/spilled.wat @@ -10,27 +10,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f872c000000 ja 0x47 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100525000000 movsd xmm0, qword ptr [rip + 0x25] ;; f20f5ac0 cvtsd2ss xmm0, xmm0 ;; 4883ec04 sub rsp, 4 ;; f30f110424 movss dword ptr [rsp], xmm0 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 47: 0f0b ud2 -;; 49: 0000 add byte ptr [rax], al -;; 4b: 0000 add byte ptr [rax], al -;; 4d: 0000 add byte ptr [rax], al -;; 4f: 0000 add byte ptr [rax], al +;; 4f: 0f0b ud2 ;; 51: 0000 add byte ptr [rax], al ;; 53: 0000 add byte ptr [rax], al -;; 55: 00f0 add al, dh +;; 55: 0000 add byte ptr [rax], al +;; 57: 0000 add byte ptr [rax], al +;; 59: 0000 add byte ptr [rax], al +;; 5b: 0000 add byte ptr [rax], al +;; 5d: 00f0 add al, dh diff --git a/winch/filetests/filetests/x64/f32_div/const.wat b/winch/filetests/filetests/x64/f32_div/const.wat index 113cb043ae36..33573898523b 100644 --- a/winch/filetests/filetests/x64/f32_div/const.wat +++ b/winch/filetests/filetests/x64/f32_div/const.wat @@ -9,26 +9,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; f30f100d1d000000 movss xmm1, dword ptr [rip + 0x1d] ;; f30f5ec8 divss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al -;; 46: 0000 add byte ptr [rax], al -;; 48: cdcc int 0xcc -;; 4a: 0c40 or al, 0x40 +;; 48: 0f0b ud2 +;; 4a: 0000 add byte ptr [rax], al ;; 4c: 0000 add byte ptr [rax], al ;; 4e: 0000 add byte ptr [rax], al ;; 50: cdcc int 0xcc +;; 52: 0c40 or al, 0x40 +;; 54: 0000 add byte ptr [rax], al +;; 56: 0000 add byte ptr [rax], al +;; 58: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_div/locals.wat b/winch/filetests/filetests/x64/f32_div/locals.wat index c14a5b8998a0..f02dff5cffbf 100644 --- a/winch/filetests/filetests/x64/f32_div/locals.wat +++ b/winch/filetests/filetests/x64/f32_div/locals.wat @@ -18,28 +18,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8749000000 ja 0x67 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100534000000 movss xmm0, dword ptr [rip + 0x34] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10052e000000 movss xmm0, dword ptr [rip + 0x2e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f5ec8 divss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 00cd add ch, cl -;; 69: cc int3 +;; 67: 0f0b ud2 +;; 69: 0000 add byte ptr [rax], al +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 00cd add ch, cl +;; 71: cc int3 diff --git a/winch/filetests/filetests/x64/f32_div/params.wat b/winch/filetests/filetests/x64/f32_div/params.wat index 91785221ede5..a06af01d30a2 100644 --- a/winch/filetests/filetests/x64/f32_div/params.wat +++ b/winch/filetests/filetests/x64/f32_div/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f5ec8 divss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_eq/const.wat b/winch/filetests/filetests/x64/f32_eq/const.wat index c5816afd0719..6ccb5df96c6a 100644 --- a/winch/filetests/filetests/x64/f32_eq/const.wat +++ b/winch/filetests/filetests/x64/f32_eq/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8737000000 ja 0x52 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10052d000000 movss xmm0, dword ptr [rip + 0x2d] ;; f30f100d2d000000 movss xmm1, dword ptr [rip + 0x2d] ;; 0f2ec8 ucomiss xmm1, xmm0 @@ -24,14 +26,14 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 52: 0f0b ud2 -;; 54: 0000 add byte ptr [rax], al -;; 56: 0000 add byte ptr [rax], al -;; 58: cdcc int 0xcc -;; 5a: 0c40 or al, 0x40 +;; 5a: 0f0b ud2 ;; 5c: 0000 add byte ptr [rax], al ;; 5e: 0000 add byte ptr [rax], al ;; 60: cdcc int 0xcc +;; 62: 0c40 or al, 0x40 +;; 64: 0000 add byte ptr [rax], al +;; 66: 0000 add byte ptr [rax], al +;; 68: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_eq/locals.wat b/winch/filetests/filetests/x64/f32_eq/locals.wat index 91225ce8c29d..50b9f2ff4131 100644 --- a/winch/filetests/filetests/x64/f32_eq/locals.wat +++ b/winch/filetests/filetests/x64/f32_eq/locals.wat @@ -18,31 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8758000000 ja 0x73 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875b000000 ja 0x79 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100544000000 movss xmm0, dword ptr [rip + 0x44] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10053e000000 movss xmm0, dword ptr [rip + 0x3e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 73: 0f0b ud2 -;; 75: 0000 add byte ptr [rax], al -;; 77: 00cd add ch, cl -;; 79: cc int3 +;; 79: 0f0b ud2 +;; 7b: 0000 add byte ptr [rax], al +;; 7d: 0000 add byte ptr [rax], al +;; 7f: 00cd add ch, cl +;; 81: cc int3 diff --git a/winch/filetests/filetests/x64/f32_eq/params.wat b/winch/filetests/filetests/x64/f32_eq/params.wat index 792c870bb3f8..47d436ce9cef 100644 --- a/winch/filetests/filetests/x64/f32_eq/params.wat +++ b/winch/filetests/filetests/x64/f32_eq/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873f000000 ja 0x5a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5a: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_floor/f32_floor_const_sse41.wat b/winch/filetests/filetests/x64/f32_floor/f32_floor_const_sse41.wat index adbe8ebfbc8f..b945db9ab7a7 100644 --- a/winch/filetests/filetests/x64/f32_floor/f32_floor_const_sse41.wat +++ b/winch/filetests/filetests/x64/f32_floor/f32_floor_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100515000000 movss xmm0, dword ptr [rip + 0x15] ;; 660f3a0ac001 roundss xmm0, xmm0, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 00c3 add bl, al -;; 41: f5 cmc -;; 42: a8bf test al, 0xbf +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 00c3 add bl, al +;; 49: f5 cmc +;; 4a: a8bf test al, 0xbf diff --git a/winch/filetests/filetests/x64/f32_floor/f32_floor_param.wat b/winch/filetests/filetests/x64/f32_floor/f32_floor_param.wat index 32c07f03e7b1..aa880d9d7902 100644 --- a/winch/filetests/filetests/x64/f32_floor/f32_floor_param.wat +++ b/winch/filetests/filetests/x64/f32_floor/f32_floor_param.wat @@ -8,25 +8,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f3440f107c240c movss xmm15, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f3440f107c2404 movss xmm15, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; f3440f113c24 movss dword ptr [rsp], xmm15 -;; 4883ec0c sub rsp, 0xc -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 4883ec04 sub rsp, 4 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 -;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_floor/f32_floor_param_sse41.wat b/winch/filetests/filetests/x64/f32_floor/f32_floor_param_sse41.wat index 6ffcf06f1fc6..c0ef87564951 100644 --- a/winch/filetests/filetests/x64/f32_floor/f32_floor_param_sse41.wat +++ b/winch/filetests/filetests/x64/f32_floor/f32_floor_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 660f3a0ac001 roundss xmm0, xmm0, 1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_ge/const.wat b/winch/filetests/filetests/x64/f32_ge/const.wat index 24858ddcb5cf..7f8d27c3797f 100644 --- a/winch/filetests/filetests/x64/f32_ge/const.wat +++ b/winch/filetests/filetests/x64/f32_ge/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8737000000 ja 0x52 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10052d000000 movss xmm0, dword ptr [rip + 0x2d] ;; f30f100d2d000000 movss xmm1, dword ptr [rip + 0x2d] ;; 0f2ec8 ucomiss xmm1, xmm0 @@ -24,14 +26,14 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 52: 0f0b ud2 -;; 54: 0000 add byte ptr [rax], al -;; 56: 0000 add byte ptr [rax], al -;; 58: cdcc int 0xcc -;; 5a: 0c40 or al, 0x40 +;; 5a: 0f0b ud2 ;; 5c: 0000 add byte ptr [rax], al ;; 5e: 0000 add byte ptr [rax], al ;; 60: cdcc int 0xcc +;; 62: 0c40 or al, 0x40 +;; 64: 0000 add byte ptr [rax], al +;; 66: 0000 add byte ptr [rax], al +;; 68: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_ge/locals.wat b/winch/filetests/filetests/x64/f32_ge/locals.wat index 29ed4cdc21bf..bf547e972ac4 100644 --- a/winch/filetests/filetests/x64/f32_ge/locals.wat +++ b/winch/filetests/filetests/x64/f32_ge/locals.wat @@ -18,31 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8758000000 ja 0x73 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875b000000 ja 0x79 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100544000000 movss xmm0, dword ptr [rip + 0x44] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10053e000000 movss xmm0, dword ptr [rip + 0x3e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 73: 0f0b ud2 -;; 75: 0000 add byte ptr [rax], al -;; 77: 00cd add ch, cl -;; 79: cc int3 +;; 79: 0f0b ud2 +;; 7b: 0000 add byte ptr [rax], al +;; 7d: 0000 add byte ptr [rax], al +;; 7f: 00cd add ch, cl +;; 81: cc int3 diff --git a/winch/filetests/filetests/x64/f32_ge/params.wat b/winch/filetests/filetests/x64/f32_ge/params.wat index 8086825bb555..3fd706cfb071 100644 --- a/winch/filetests/filetests/x64/f32_ge/params.wat +++ b/winch/filetests/filetests/x64/f32_ge/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873f000000 ja 0x5a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5a: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_gt/const.wat b/winch/filetests/filetests/x64/f32_gt/const.wat index 87349c0f3a6b..b21aa038595b 100644 --- a/winch/filetests/filetests/x64/f32_gt/const.wat +++ b/winch/filetests/filetests/x64/f32_gt/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8737000000 ja 0x52 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10052d000000 movss xmm0, dword ptr [rip + 0x2d] ;; f30f100d2d000000 movss xmm1, dword ptr [rip + 0x2d] ;; 0f2ec8 ucomiss xmm1, xmm0 @@ -24,14 +26,14 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 52: 0f0b ud2 -;; 54: 0000 add byte ptr [rax], al -;; 56: 0000 add byte ptr [rax], al -;; 58: cdcc int 0xcc -;; 5a: 0c40 or al, 0x40 +;; 5a: 0f0b ud2 ;; 5c: 0000 add byte ptr [rax], al ;; 5e: 0000 add byte ptr [rax], al ;; 60: cdcc int 0xcc +;; 62: 0c40 or al, 0x40 +;; 64: 0000 add byte ptr [rax], al +;; 66: 0000 add byte ptr [rax], al +;; 68: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_gt/locals.wat b/winch/filetests/filetests/x64/f32_gt/locals.wat index c5e24dd17332..518c6cc384bc 100644 --- a/winch/filetests/filetests/x64/f32_gt/locals.wat +++ b/winch/filetests/filetests/x64/f32_gt/locals.wat @@ -18,31 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8758000000 ja 0x73 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875b000000 ja 0x79 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100544000000 movss xmm0, dword ptr [rip + 0x44] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10053e000000 movss xmm0, dword ptr [rip + 0x3e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 73: 0f0b ud2 -;; 75: 0000 add byte ptr [rax], al -;; 77: 00cd add ch, cl -;; 79: cc int3 +;; 79: 0f0b ud2 +;; 7b: 0000 add byte ptr [rax], al +;; 7d: 0000 add byte ptr [rax], al +;; 7f: 00cd add ch, cl +;; 81: cc int3 diff --git a/winch/filetests/filetests/x64/f32_gt/params.wat b/winch/filetests/filetests/x64/f32_gt/params.wat index 5094f13e16e2..a2d3a367522a 100644 --- a/winch/filetests/filetests/x64/f32_gt/params.wat +++ b/winch/filetests/filetests/x64/f32_gt/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873f000000 ja 0x5a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4421d8 and eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5a: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_le/const.wat b/winch/filetests/filetests/x64/f32_le/const.wat index 49297f075ff3..5a286bf24647 100644 --- a/winch/filetests/filetests/x64/f32_le/const.wat +++ b/winch/filetests/filetests/x64/f32_le/const.wat @@ -9,25 +9,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; f30f100d1d000000 movss xmm1, dword ptr [rip + 0x1d] ;; 0f2ec1 ucomiss xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 -;; 47: 00cd add ch, cl -;; 49: cc int3 -;; 4a: 0c40 or al, 0x40 -;; 4c: 0000 add byte ptr [rax], al -;; 4e: 0000 add byte ptr [rax], al -;; 50: cdcc int 0xcc +;; 4d: 0f0b ud2 +;; 4f: 00cd add ch, cl +;; 51: cc int3 +;; 52: 0c40 or al, 0x40 +;; 54: 0000 add byte ptr [rax], al +;; 56: 0000 add byte ptr [rax], al +;; 58: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_le/locals.wat b/winch/filetests/filetests/x64/f32_le/locals.wat index 76e2182b603b..d325a54a6562 100644 --- a/winch/filetests/filetests/x64/f32_le/locals.wat +++ b/winch/filetests/filetests/x64/f32_le/locals.wat @@ -18,26 +18,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100534000000 movss xmm0, dword ptr [rip + 0x34] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10052e000000 movss xmm0, dword ptr [rip + 0x2e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec1 ucomiss xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 -;; 68: cdcc int 0xcc +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al +;; 70: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_le/params.wat b/winch/filetests/filetests/x64/f32_le/params.wat index b57945fc313f..d04a666410d5 100644 --- a/winch/filetests/filetests/x64/f32_le/params.wat +++ b/winch/filetests/filetests/x64/f32_le/params.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8732000000 ja 0x4d -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec1 ucomiss xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4d: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_lt/const.wat b/winch/filetests/filetests/x64/f32_lt/const.wat index 34943a7c5432..de1c1ea904fb 100644 --- a/winch/filetests/filetests/x64/f32_lt/const.wat +++ b/winch/filetests/filetests/x64/f32_lt/const.wat @@ -9,25 +9,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; f30f100d1d000000 movss xmm1, dword ptr [rip + 0x1d] ;; 0f2ec1 ucomiss xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 -;; 47: 00cd add ch, cl -;; 49: cc int3 -;; 4a: 0c40 or al, 0x40 -;; 4c: 0000 add byte ptr [rax], al -;; 4e: 0000 add byte ptr [rax], al -;; 50: cdcc int 0xcc +;; 4d: 0f0b ud2 +;; 4f: 00cd add ch, cl +;; 51: cc int3 +;; 52: 0c40 or al, 0x40 +;; 54: 0000 add byte ptr [rax], al +;; 56: 0000 add byte ptr [rax], al +;; 58: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_lt/locals.wat b/winch/filetests/filetests/x64/f32_lt/locals.wat index 03a585d1052a..bab972b4b3c6 100644 --- a/winch/filetests/filetests/x64/f32_lt/locals.wat +++ b/winch/filetests/filetests/x64/f32_lt/locals.wat @@ -18,26 +18,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100534000000 movss xmm0, dword ptr [rip + 0x34] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10052e000000 movss xmm0, dword ptr [rip + 0x2e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec1 ucomiss xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 -;; 68: cdcc int 0xcc +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al +;; 70: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_lt/params.wat b/winch/filetests/filetests/x64/f32_lt/params.wat index 04471a550691..d5a67fd2d08f 100644 --- a/winch/filetests/filetests/x64/f32_lt/params.wat +++ b/winch/filetests/filetests/x64/f32_lt/params.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8732000000 ja 0x4d -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec1 ucomiss xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4d: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_max/const.wat b/winch/filetests/filetests/x64/f32_max/const.wat index 33876c1f0fdd..9856ee24d364 100644 --- a/winch/filetests/filetests/x64/f32_max/const.wat +++ b/winch/filetests/filetests/x64/f32_max/const.wat @@ -9,33 +9,35 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874b000000 ja 0x69 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10053d000000 movss xmm0, dword ptr [rip + 0x3d] ;; f30f100d3d000000 movss xmm1, dword ptr [rip + 0x3d] ;; 0f2ec8 ucomiss xmm1, xmm0 -;; 0f8518000000 jne 0x54 -;; 0f8a08000000 jp 0x4a -;; 42: 0f54c8 andps xmm1, xmm0 -;; e90e000000 jmp 0x58 -;; 4a: f30f58c8 addss xmm1, xmm0 -;; 0f8a04000000 jp 0x58 -;; 54: f30f5fc8 maxss xmm1, xmm0 +;; 0f8518000000 jne 0x5c +;; 0f8a08000000 jp 0x52 +;; 4a: 0f54c8 andps xmm1, xmm0 +;; e90e000000 jmp 0x60 +;; 52: f30f58c8 addss xmm1, xmm0 +;; 0f8a04000000 jp 0x60 +;; 5c: f30f5fc8 maxss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 00cd add ch, cl -;; 69: cc int3 -;; 6a: 0c40 or al, 0x40 -;; 6c: 0000 add byte ptr [rax], al -;; 6e: 0000 add byte ptr [rax], al -;; 70: cdcc int 0xcc +;; 69: 0f0b ud2 +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 00cd add ch, cl +;; 71: cc int3 +;; 72: 0c40 or al, 0x40 +;; 74: 0000 add byte ptr [rax], al +;; 76: 0000 add byte ptr [rax], al +;; 78: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_max/locals.wat b/winch/filetests/filetests/x64/f32_max/locals.wat index 7c082a081350..34323b9995d2 100644 --- a/winch/filetests/filetests/x64/f32_max/locals.wat +++ b/winch/filetests/filetests/x64/f32_max/locals.wat @@ -18,34 +18,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8767000000 ja 0x82 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f876a000000 ja 0x88 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100554000000 movss xmm0, dword ptr [rip + 0x54] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10054e000000 movss xmm0, dword ptr [rip + 0x4e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 -;; 0f8518000000 jne 0x75 -;; 0f8a08000000 jp 0x6b -;; 63: 0f54c8 andps xmm1, xmm0 -;; e90e000000 jmp 0x79 -;; 6b: f30f58c8 addss xmm1, xmm0 -;; 0f8a04000000 jp 0x79 -;; 75: f30f5fc8 maxss xmm1, xmm0 +;; 0f8518000000 jne 0x7b +;; 0f8a08000000 jp 0x71 +;; 69: 0f54c8 andps xmm1, xmm0 +;; e90e000000 jmp 0x7f +;; 71: f30f58c8 addss xmm1, xmm0 +;; 0f8a04000000 jp 0x7f +;; 7b: f30f5fc8 maxss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 82: 0f0b ud2 -;; 84: 0000 add byte ptr [rax], al -;; 86: 0000 add byte ptr [rax], al -;; 88: cdcc int 0xcc +;; 88: 0f0b ud2 +;; 8a: 0000 add byte ptr [rax], al +;; 8c: 0000 add byte ptr [rax], al +;; 8e: 0000 add byte ptr [rax], al +;; 90: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_max/params.wat b/winch/filetests/filetests/x64/f32_max/params.wat index 35b4d3ee060d..c646a1738df1 100644 --- a/winch/filetests/filetests/x64/f32_max/params.wat +++ b/winch/filetests/filetests/x64/f32_max/params.wat @@ -9,27 +9,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874e000000 ja 0x69 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8752000000 ja 0x70 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 -;; 0f8518000000 jne 0x5c -;; 0f8a08000000 jp 0x52 -;; 4a: 0f54c8 andps xmm1, xmm0 -;; e90e000000 jmp 0x60 -;; 52: f30f58c8 addss xmm1, xmm0 -;; 0f8a04000000 jp 0x60 -;; 5c: f30f5fc8 maxss xmm1, xmm0 +;; 0f8518000000 jne 0x63 +;; 0f8a08000000 jp 0x59 +;; 51: 0f54c8 andps xmm1, xmm0 +;; e90e000000 jmp 0x67 +;; 59: f30f58c8 addss xmm1, xmm0 +;; 0f8a04000000 jp 0x67 +;; 63: f30f5fc8 maxss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 69: 0f0b ud2 +;; 70: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_min/const.wat b/winch/filetests/filetests/x64/f32_min/const.wat index b8431caed09b..dc6df9435ec2 100644 --- a/winch/filetests/filetests/x64/f32_min/const.wat +++ b/winch/filetests/filetests/x64/f32_min/const.wat @@ -9,33 +9,35 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874b000000 ja 0x69 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10053d000000 movss xmm0, dword ptr [rip + 0x3d] ;; f30f100d3d000000 movss xmm1, dword ptr [rip + 0x3d] ;; 0f2ec8 ucomiss xmm1, xmm0 -;; 0f8518000000 jne 0x54 -;; 0f8a08000000 jp 0x4a -;; 42: 0f56c8 orps xmm1, xmm0 -;; e90e000000 jmp 0x58 -;; 4a: f30f58c8 addss xmm1, xmm0 -;; 0f8a04000000 jp 0x58 -;; 54: f30f5dc8 minss xmm1, xmm0 +;; 0f8518000000 jne 0x5c +;; 0f8a08000000 jp 0x52 +;; 4a: 0f56c8 orps xmm1, xmm0 +;; e90e000000 jmp 0x60 +;; 52: f30f58c8 addss xmm1, xmm0 +;; 0f8a04000000 jp 0x60 +;; 5c: f30f5dc8 minss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 00cd add ch, cl -;; 69: cc int3 -;; 6a: 0c40 or al, 0x40 -;; 6c: 0000 add byte ptr [rax], al -;; 6e: 0000 add byte ptr [rax], al -;; 70: cdcc int 0xcc +;; 69: 0f0b ud2 +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 00cd add ch, cl +;; 71: cc int3 +;; 72: 0c40 or al, 0x40 +;; 74: 0000 add byte ptr [rax], al +;; 76: 0000 add byte ptr [rax], al +;; 78: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_min/locals.wat b/winch/filetests/filetests/x64/f32_min/locals.wat index 022264c875a2..c78b9db79706 100644 --- a/winch/filetests/filetests/x64/f32_min/locals.wat +++ b/winch/filetests/filetests/x64/f32_min/locals.wat @@ -18,34 +18,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8767000000 ja 0x82 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f876a000000 ja 0x88 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100554000000 movss xmm0, dword ptr [rip + 0x54] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10054e000000 movss xmm0, dword ptr [rip + 0x4e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 -;; 0f8518000000 jne 0x75 -;; 0f8a08000000 jp 0x6b -;; 63: 0f56c8 orps xmm1, xmm0 -;; e90e000000 jmp 0x79 -;; 6b: f30f58c8 addss xmm1, xmm0 -;; 0f8a04000000 jp 0x79 -;; 75: f30f5dc8 minss xmm1, xmm0 +;; 0f8518000000 jne 0x7b +;; 0f8a08000000 jp 0x71 +;; 69: 0f56c8 orps xmm1, xmm0 +;; e90e000000 jmp 0x7f +;; 71: f30f58c8 addss xmm1, xmm0 +;; 0f8a04000000 jp 0x7f +;; 7b: f30f5dc8 minss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 82: 0f0b ud2 -;; 84: 0000 add byte ptr [rax], al -;; 86: 0000 add byte ptr [rax], al -;; 88: cdcc int 0xcc +;; 88: 0f0b ud2 +;; 8a: 0000 add byte ptr [rax], al +;; 8c: 0000 add byte ptr [rax], al +;; 8e: 0000 add byte ptr [rax], al +;; 90: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_min/params.wat b/winch/filetests/filetests/x64/f32_min/params.wat index 5697dabf8920..01ec6a772a06 100644 --- a/winch/filetests/filetests/x64/f32_min/params.wat +++ b/winch/filetests/filetests/x64/f32_min/params.wat @@ -9,27 +9,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874e000000 ja 0x69 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8752000000 ja 0x70 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 -;; 0f8518000000 jne 0x5c -;; 0f8a08000000 jp 0x52 -;; 4a: 0f56c8 orps xmm1, xmm0 -;; e90e000000 jmp 0x60 -;; 52: f30f58c8 addss xmm1, xmm0 -;; 0f8a04000000 jp 0x60 -;; 5c: f30f5dc8 minss xmm1, xmm0 +;; 0f8518000000 jne 0x63 +;; 0f8a08000000 jp 0x59 +;; 51: 0f56c8 orps xmm1, xmm0 +;; e90e000000 jmp 0x67 +;; 59: f30f58c8 addss xmm1, xmm0 +;; 0f8a04000000 jp 0x67 +;; 63: f30f5dc8 minss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 69: 0f0b ud2 +;; 70: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_mul/const.wat b/winch/filetests/filetests/x64/f32_mul/const.wat index fba06519f776..77ed09297731 100644 --- a/winch/filetests/filetests/x64/f32_mul/const.wat +++ b/winch/filetests/filetests/x64/f32_mul/const.wat @@ -9,26 +9,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; f30f100d1d000000 movss xmm1, dword ptr [rip + 0x1d] ;; f30f59c8 mulss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al -;; 46: 0000 add byte ptr [rax], al -;; 48: cdcc int 0xcc -;; 4a: 0c40 or al, 0x40 +;; 48: 0f0b ud2 +;; 4a: 0000 add byte ptr [rax], al ;; 4c: 0000 add byte ptr [rax], al ;; 4e: 0000 add byte ptr [rax], al ;; 50: cdcc int 0xcc +;; 52: 0c40 or al, 0x40 +;; 54: 0000 add byte ptr [rax], al +;; 56: 0000 add byte ptr [rax], al +;; 58: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_mul/locals.wat b/winch/filetests/filetests/x64/f32_mul/locals.wat index 4a21770f19f4..7ffa4a45ca5f 100644 --- a/winch/filetests/filetests/x64/f32_mul/locals.wat +++ b/winch/filetests/filetests/x64/f32_mul/locals.wat @@ -18,28 +18,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8749000000 ja 0x67 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100534000000 movss xmm0, dword ptr [rip + 0x34] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10052e000000 movss xmm0, dword ptr [rip + 0x2e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f59c8 mulss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 00cd add ch, cl -;; 69: cc int3 +;; 67: 0f0b ud2 +;; 69: 0000 add byte ptr [rax], al +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 00cd add ch, cl +;; 71: cc int3 diff --git a/winch/filetests/filetests/x64/f32_mul/params.wat b/winch/filetests/filetests/x64/f32_mul/params.wat index 25217d4f7d89..9989dbffb437 100644 --- a/winch/filetests/filetests/x64/f32_mul/params.wat +++ b/winch/filetests/filetests/x64/f32_mul/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f59c8 mulss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_ne/const.wat b/winch/filetests/filetests/x64/f32_ne/const.wat index 8094636b7431..d11ec61d99df 100644 --- a/winch/filetests/filetests/x64/f32_ne/const.wat +++ b/winch/filetests/filetests/x64/f32_ne/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8737000000 ja 0x52 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10052d000000 movss xmm0, dword ptr [rip + 0x2d] ;; f30f100d2d000000 movss xmm1, dword ptr [rip + 0x2d] ;; 0f2ec8 ucomiss xmm1, xmm0 @@ -24,14 +26,14 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9ac3 setp r11b ;; 4409d8 or eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 52: 0f0b ud2 -;; 54: 0000 add byte ptr [rax], al -;; 56: 0000 add byte ptr [rax], al -;; 58: cdcc int 0xcc -;; 5a: 0c40 or al, 0x40 +;; 5a: 0f0b ud2 ;; 5c: 0000 add byte ptr [rax], al ;; 5e: 0000 add byte ptr [rax], al ;; 60: cdcc int 0xcc +;; 62: 0c40 or al, 0x40 +;; 64: 0000 add byte ptr [rax], al +;; 66: 0000 add byte ptr [rax], al +;; 68: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_ne/locals.wat b/winch/filetests/filetests/x64/f32_ne/locals.wat index 7e01edc01158..321a36a7624f 100644 --- a/winch/filetests/filetests/x64/f32_ne/locals.wat +++ b/winch/filetests/filetests/x64/f32_ne/locals.wat @@ -18,31 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8758000000 ja 0x73 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875b000000 ja 0x79 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100544000000 movss xmm0, dword ptr [rip + 0x44] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10053e000000 movss xmm0, dword ptr [rip + 0x3e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al ;; 41bb00000000 mov r11d, 0 ;; 410f9ac3 setp r11b ;; 4409d8 or eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 73: 0f0b ud2 -;; 75: 0000 add byte ptr [rax], al -;; 77: 00cd add ch, cl -;; 79: cc int3 +;; 79: 0f0b ud2 +;; 7b: 0000 add byte ptr [rax], al +;; 7d: 0000 add byte ptr [rax], al +;; 7f: 00cd add ch, cl +;; 81: cc int3 diff --git a/winch/filetests/filetests/x64/f32_ne/params.wat b/winch/filetests/filetests/x64/f32_ne/params.wat index 0bce734649ec..43d3ad55697a 100644 --- a/winch/filetests/filetests/x64/f32_ne/params.wat +++ b/winch/filetests/filetests/x64/f32_ne/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873f000000 ja 0x5a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 0f2ec8 ucomiss xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al ;; 41bb00000000 mov r11d, 0 ;; 410f9ac3 setp r11b ;; 4409d8 or eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5a: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_nearest/f32_floor_const_sse41.wat b/winch/filetests/filetests/x64/f32_nearest/f32_floor_const_sse41.wat index 26d3b6e24eb8..4549e5b2b091 100644 --- a/winch/filetests/filetests/x64/f32_nearest/f32_floor_const_sse41.wat +++ b/winch/filetests/filetests/x64/f32_nearest/f32_floor_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100515000000 movss xmm0, dword ptr [rip + 0x15] ;; 660f3a0ac000 roundss xmm0, xmm0, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 00c3 add bl, al -;; 41: f5 cmc -;; 42: a8bf test al, 0xbf +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 00c3 add bl, al +;; 49: f5 cmc +;; 4a: a8bf test al, 0xbf diff --git a/winch/filetests/filetests/x64/f32_nearest/f32_floor_param_sse41.wat b/winch/filetests/filetests/x64/f32_nearest/f32_floor_param_sse41.wat index b882d2b51100..8fa42abbd777 100644 --- a/winch/filetests/filetests/x64/f32_nearest/f32_floor_param_sse41.wat +++ b/winch/filetests/filetests/x64/f32_nearest/f32_floor_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 660f3a0ac000 roundss xmm0, xmm0, 0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_nearest/f32_nearest_param.wat b/winch/filetests/filetests/x64/f32_nearest/f32_nearest_param.wat index b3209736c357..e2379d1c902c 100644 --- a/winch/filetests/filetests/x64/f32_nearest/f32_nearest_param.wat +++ b/winch/filetests/filetests/x64/f32_nearest/f32_nearest_param.wat @@ -8,25 +8,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f3440f107c240c movss xmm15, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f3440f107c2404 movss xmm15, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; f3440f113c24 movss dword ptr [rsp], xmm15 -;; 4883ec0c sub rsp, 0xc -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 4883ec04 sub rsp, 4 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 -;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_neg/f32_neg_const.wat b/winch/filetests/filetests/x64/f32_neg/f32_neg_const.wat index 9e4a2f8911da..aacee9fdd949 100644 --- a/winch/filetests/filetests/x64/f32_neg/f32_neg_const.wat +++ b/winch/filetests/filetests/x64/f32_neg/f32_neg_const.wat @@ -8,24 +8,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; 41bb00000080 mov r11d, 0x80000000 ;; 66450f6efb movd xmm15, r11d ;; 410f57c7 xorps xmm0, xmm15 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al -;; 46: 0000 add byte ptr [rax], al -;; 48: c3 ret -;; 49: f5 cmc -;; 4a: a8bf test al, 0xbf +;; 48: 0f0b ud2 +;; 4a: 0000 add byte ptr [rax], al +;; 4c: 0000 add byte ptr [rax], al +;; 4e: 0000 add byte ptr [rax], al +;; 50: c3 ret +;; 51: f5 cmc +;; 52: a8bf test al, 0xbf diff --git a/winch/filetests/filetests/x64/f32_neg/f32_neg_param.wat b/winch/filetests/filetests/x64/f32_neg/f32_neg_param.wat index 8678e9fd6963..8df5f26cf04d 100644 --- a/winch/filetests/filetests/x64/f32_neg/f32_neg_param.wat +++ b/winch/filetests/filetests/x64/f32_neg/f32_neg_param.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8729000000 ja 0x44 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 41bb00000080 mov r11d, 0x80000000 ;; 66450f6efb movd xmm15, r11d ;; 410f57c7 xorps xmm0, xmm15 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 44: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_reinterpret_i32/const.wat b/winch/filetests/filetests/x64/f32_reinterpret_i32/const.wat index 6ae12700896e..6c043f5598a7 100644 --- a/winch/filetests/filetests/x64/f32_reinterpret_i32/const.wat +++ b/winch/filetests/filetests/x64/f32_reinterpret_i32/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 660f6ec0 movd xmm0, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_reinterpret_i32/locals.wat b/winch/filetests/filetests/x64/f32_reinterpret_i32/locals.wat index 93c4343fd9a3..1ba756394b13 100644 --- a/winch/filetests/filetests/x64/f32_reinterpret_i32/locals.wat +++ b/winch/filetests/filetests/x64/f32_reinterpret_i32/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 660f6ec0 movd xmm0, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_reinterpret_i32/params.wat b/winch/filetests/filetests/x64/f32_reinterpret_i32/params.wat index 750b7dbceb77..2d224c23f1c2 100644 --- a/winch/filetests/filetests/x64/f32_reinterpret_i32/params.wat +++ b/winch/filetests/filetests/x64/f32_reinterpret_i32/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 660f6ec0 movd xmm0, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_reinterpret_i32/ret_int.wat b/winch/filetests/filetests/x64/f32_reinterpret_i32/ret_int.wat index aa05ae148409..dc6401a4f814 100644 --- a/winch/filetests/filetests/x64/f32_reinterpret_i32/ret_int.wat +++ b/winch/filetests/filetests/x64/f32_reinterpret_i32/ret_int.wat @@ -10,17 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 660f6ec0 movd xmm0, eax ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_reinterpret_i32/spilled.wat b/winch/filetests/filetests/x64/f32_reinterpret_i32/spilled.wat index 8cce719cdec3..cce0ddf71a3a 100644 --- a/winch/filetests/filetests/x64/f32_reinterpret_i32/spilled.wat +++ b/winch/filetests/filetests/x64/f32_reinterpret_i32/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8729000000 ja 0x44 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872e000000 ja 0x4c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 660f6ec0 movd xmm0, eax ;; 4883ec04 sub rsp, 4 ;; f30f110424 movss dword ptr [rsp], xmm0 ;; f30f100424 movss xmm0, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 44: 0f0b ud2 +;; 4c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_const.wat b/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_const.wat index 306fa1ab419a..b9eed231e7e0 100644 --- a/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_const.wat +++ b/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_const.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10050d000000 movss xmm0, dword ptr [rip + 0xd] ;; f30f51c0 sqrtss xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 -;; 37: 00c3 add bl, al -;; 39: f5 cmc -;; 3a: a83f test al, 0x3f +;; 3d: 0f0b ud2 +;; 3f: 00c3 add bl, al +;; 41: f5 cmc +;; 42: a83f test al, 0x3f diff --git a/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_param.wat b/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_param.wat index 2bc51132a2d7..36289250815d 100644 --- a/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_param.wat +++ b/winch/filetests/filetests/x64/f32_sqrt/f32_sqrt_param.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f30f51c0 sqrtss xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_sub/const.wat b/winch/filetests/filetests/x64/f32_sub/const.wat index 3fd628b931b6..fc296238a533 100644 --- a/winch/filetests/filetests/x64/f32_sub/const.wat +++ b/winch/filetests/filetests/x64/f32_sub/const.wat @@ -9,26 +9,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; f30f100d1d000000 movss xmm1, dword ptr [rip + 0x1d] ;; f30f5cc8 subss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al -;; 46: 0000 add byte ptr [rax], al -;; 48: cdcc int 0xcc -;; 4a: 0c40 or al, 0x40 +;; 48: 0f0b ud2 +;; 4a: 0000 add byte ptr [rax], al ;; 4c: 0000 add byte ptr [rax], al ;; 4e: 0000 add byte ptr [rax], al ;; 50: cdcc int 0xcc +;; 52: 0c40 or al, 0x40 +;; 54: 0000 add byte ptr [rax], al +;; 56: 0000 add byte ptr [rax], al +;; 58: cdcc int 0xcc diff --git a/winch/filetests/filetests/x64/f32_sub/locals.wat b/winch/filetests/filetests/x64/f32_sub/locals.wat index 8d0c682e0c7b..3acd2e3bcf5f 100644 --- a/winch/filetests/filetests/x64/f32_sub/locals.wat +++ b/winch/filetests/filetests/x64/f32_sub/locals.wat @@ -18,28 +18,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8749000000 ja 0x67 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; f30f100534000000 movss xmm0, dword ptr [rip + 0x34] -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 ;; f30f10052e000000 movss xmm0, dword ptr [rip + 0x2e] -;; f30f11442408 movss dword ptr [rsp + 8], xmm0 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; f30f110424 movss dword ptr [rsp], xmm0 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f5cc8 subss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 00cd add ch, cl -;; 69: cc int3 +;; 67: 0f0b ud2 +;; 69: 0000 add byte ptr [rax], al +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 00cd add ch, cl +;; 71: cc int3 diff --git a/winch/filetests/filetests/x64/f32_sub/params.wat b/winch/filetests/filetests/x64/f32_sub/params.wat index 410ddc596af9..b27f2c4b5abe 100644 --- a/winch/filetests/filetests/x64/f32_sub/params.wat +++ b/winch/filetests/filetests/x64/f32_sub/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f10442408 movss xmm0, dword ptr [rsp + 8] -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f110c24 movss dword ptr [rsp], xmm1 +;; f30f100424 movss xmm0, dword ptr [rsp] +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; f30f5cc8 subss xmm1, xmm0 ;; 0f28c1 movaps xmm0, xmm1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_trunc/f32_trunc_const_sse41.wat b/winch/filetests/filetests/x64/f32_trunc/f32_trunc_const_sse41.wat index 23bbedf91a47..fa680d0e082a 100644 --- a/winch/filetests/filetests/x64/f32_trunc/f32_trunc_const_sse41.wat +++ b/winch/filetests/filetests/x64/f32_trunc/f32_trunc_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100515000000 movss xmm0, dword ptr [rip + 0x15] ;; 660f3a0ac003 roundss xmm0, xmm0, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 00c3 add bl, al -;; 41: f5 cmc -;; 42: a8bf test al, 0xbf +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 00c3 add bl, al +;; 49: f5 cmc +;; 4a: a8bf test al, 0xbf diff --git a/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param.wat b/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param.wat index 5c2f3ea91028..354895c7d13f 100644 --- a/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param.wat +++ b/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param.wat @@ -8,25 +8,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f3440f107c240c movss xmm15, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f3440f107c2404 movss xmm15, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; f3440f113c24 movss dword ptr [rsp], xmm15 -;; 4883ec0c sub rsp, 0xc -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 4883ec04 sub rsp, 4 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 -;; 4883c40c add rsp, 0xc ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param_sse41.wat b/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param_sse41.wat index 18f3fdaa569e..b5712ce35960 100644 --- a/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param_sse41.wat +++ b/winch/filetests/filetests/x64/f32_trunc/f32_trunc_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 660f3a0ac003 roundss xmm0, xmm0, 3 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_abs/f64_abs_const.wat b/winch/filetests/filetests/x64/f64_abs/f64_abs_const.wat index 6317d293f082..c6c2efc6a0ab 100644 --- a/winch/filetests/filetests/x64/f64_abs/f64_abs_const.wat +++ b/winch/filetests/filetests/x64/f64_abs/f64_abs_const.wat @@ -8,22 +8,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; 49bbffffffffffffff7f ;; movabs r11, 0x7fffffffffffffff ;; 664d0f6efb movq xmm15, r11 ;; 66410f54c7 andpd xmm0, xmm15 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 -;; 47: 001f add byte ptr [rdi], bl -;; 49: 85eb test ebx, ebp -;; 4b: 51 push rcx +;; 4d: 0f0b ud2 +;; 4f: 001f add byte ptr [rdi], bl +;; 51: 85eb test ebx, ebp +;; 53: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_abs/f64_abs_param.wat b/winch/filetests/filetests/x64/f64_abs/f64_abs_param.wat index 467d74702b55..c73c9ec00072 100644 --- a/winch/filetests/filetests/x64/f64_abs/f64_abs_param.wat +++ b/winch/filetests/filetests/x64/f64_abs/f64_abs_param.wat @@ -8,20 +8,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 49bbffffffffffffff7f ;; movabs r11, 0x7fffffffffffffff ;; 664d0f6efb movq xmm15, r11 ;; 66410f54c7 andpd xmm0, xmm15 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_add/const.wat b/winch/filetests/filetests/x64/f64_add/const.wat index d2274c533b0a..9d0a30341da6 100644 --- a/winch/filetests/filetests/x64/f64_add/const.wat +++ b/winch/filetests/filetests/x64/f64_add/const.wat @@ -9,29 +9,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; f20f100d1d000000 movsd xmm1, qword ptr [rip + 0x1d] ;; f20f58c8 addsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 -;; 43: 0000 add byte ptr [rax], al -;; 45: 0000 add byte ptr [rax], al -;; 47: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 4d: 99 cdq -;; 4e: 01409a add dword ptr [rax - 0x66], eax -;; 51: 99 cdq -;; 52: 99 cdq -;; 53: 99 cdq -;; 54: 99 cdq +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 55: 99 cdq -;; 56: f1 int1 +;; 56: 01409a add dword ptr [rax - 0x66], eax +;; 59: 99 cdq +;; 5a: 99 cdq +;; 5b: 99 cdq +;; 5c: 99 cdq +;; 5d: 99 cdq +;; 5e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_add/locals.wat b/winch/filetests/filetests/x64/f64_add/locals.wat index 8dcb2a119bb8..bd6bbc965bf7 100644 --- a/winch/filetests/filetests/x64/f64_add/locals.wat +++ b/winch/filetests/filetests/x64/f64_add/locals.wat @@ -18,25 +18,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100530000000 movsd xmm0, qword ptr [rip + 0x30] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f58c8 addsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_add/params.wat b/winch/filetests/filetests/x64/f64_add/params.wat index b946727f752d..3e928b885570 100644 --- a/winch/filetests/filetests/x64/f64_add/params.wat +++ b/winch/filetests/filetests/x64/f64_add/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f58c8 addsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_ceil/f64_ceil_const_sse41.wat b/winch/filetests/filetests/x64/f64_ceil/f64_ceil_const_sse41.wat index a6bbc8ee2cdc..2047a81acf44 100644 --- a/winch/filetests/filetests/x64/f64_ceil/f64_ceil_const_sse41.wat +++ b/winch/filetests/filetests/x64/f64_ceil/f64_ceil_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100515000000 movsd xmm0, qword ptr [rip + 0x15] ;; 660f3a0bc002 roundsd xmm0, xmm0, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 001f add byte ptr [rdi], bl -;; 41: 85eb test ebx, ebp -;; 43: 51 push rcx +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 001f add byte ptr [rdi], bl +;; 49: 85eb test ebx, ebp +;; 4b: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param.wat b/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param.wat index 0183ffcba15a..41a43a3a0a95 100644 --- a/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param.wat +++ b/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param.wat @@ -8,25 +8,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f2440f107c2408 movsd xmm15, qword ptr [rsp + 8] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f2440f103c24 movsd xmm15, qword ptr [rsp] ;; 4883ec08 sub rsp, 8 ;; f2440f113c24 movsd qword ptr [rsp], xmm15 -;; 4883ec08 sub rsp, 8 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 -;; 4883c410 add rsp, 0x10 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param_sse41.wat b/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param_sse41.wat index 8da3e8278517..d897f5fba20f 100644 --- a/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param_sse41.wat +++ b/winch/filetests/filetests/x64/f64_ceil/f64_ceil_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 660f3a0bc002 roundsd xmm0, xmm0, 2 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_const/call_id.wat b/winch/filetests/filetests/x64/f64_const/call_id.wat index 3e39dcbea9bc..a85f6cb2d073 100644 --- a/winch/filetests/filetests/x64/f64_const/call_id.wat +++ b/winch/filetests/filetests/x64/f64_const/call_id.wat @@ -6,34 +6,44 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; 4883c410 add rsp, 0x10 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3c: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8723000000 ja 0x3e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; f20f100511000000 movsd xmm0, qword ptr [rip + 0x11] -;; e800000000 call 0x34 -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; f20f100517000000 movsd xmm0, qword ptr [rip + 0x17] +;; e800000000 call 0x3e +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3e: 0f0b ud2 +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 001f add byte ptr [rdi], bl +;; 51: 85eb test ebx, ebp +;; 53: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_const/id.wat b/winch/filetests/filetests/x64/f64_const/id.wat index 0766cdf47178..36277b33c4dc 100644 --- a/winch/filetests/filetests/x64/f64_const/id.wat +++ b/winch/filetests/filetests/x64/f64_const/id.wat @@ -5,16 +5,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; 4883c410 add rsp, 0x10 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_s/const.wat b/winch/filetests/filetests/x64/f64_convert_i32_s/const.wat index 63a88facc46c..653b78548f67 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_s/const.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; f20f2ac0 cvtsi2sd xmm0, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_s/locals.wat b/winch/filetests/filetests/x64/f64_convert_i32_s/locals.wat index 79636c62858b..1abe6df59b20 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_s/locals.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f20f2ac0 cvtsi2sd xmm0, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_s/params.wat b/winch/filetests/filetests/x64/f64_convert_i32_s/params.wat index e83534d60c10..ef67f1b0a996 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_s/params.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f20f2ac0 cvtsi2sd xmm0, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_s/spilled.wat b/winch/filetests/filetests/x64/f64_convert_i32_s/spilled.wat index 6b4f9851ff13..afcbb29fea1d 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_s/spilled.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_s/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8729000000 ja 0x44 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872e000000 ja 0x4c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; f20f2ac0 cvtsi2sd xmm0, eax ;; 4883ec08 sub rsp, 8 ;; f20f110424 movsd qword ptr [rsp], xmm0 ;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 44: 0f0b ud2 +;; 4c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_u/const.wat b/winch/filetests/filetests/x64/f64_convert_i32_u/const.wat index 15b7289a6652..2b5f65dfc60c 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_u/const.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_u/const.wat @@ -8,27 +8,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8748000000 ja 0x66 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; f20f58c0 addsd xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 66: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_u/locals.wat b/winch/filetests/filetests/x64/f64_convert_i32_u/locals.wat index 5581187d1a9c..21b49a4c76ee 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_u/locals.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_u/locals.wat @@ -10,29 +10,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8750000000 ja 0x6e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x46 -;; 3c: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x60 -;; 46: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x4e +;; 44: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x68 +;; 4e: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; f20f58c0 addsd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_u/params.wat b/winch/filetests/filetests/x64/f64_convert_i32_u/params.wat index 133a369a61e9..a847c03ad41a 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_u/params.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_u/params.wat @@ -8,28 +8,30 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f874c000000 ja 0x6a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x41 -;; 37: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x5b -;; 41: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x4a +;; 40: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x64 +;; 4a: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; f20f58c0 addsd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 6a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i32_u/spilled.wat b/winch/filetests/filetests/x64/f64_convert_i32_u/spilled.wat index 4710e8ac90c0..5396597c4715 100644 --- a/winch/filetests/filetests/x64/f64_convert_i32_u/spilled.wat +++ b/winch/filetests/filetests/x64/f64_convert_i32_u/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8755000000 ja 0x70 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875a000000 ja 0x78 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; 8bc9 mov ecx, ecx ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 @@ -34,7 +36,7 @@ ;; f20f110424 movsd qword ptr [rsp], xmm0 ;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 70: 0f0b ud2 +;; 78: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_s/const.wat b/winch/filetests/filetests/x64/f64_convert_i64_s/const.wat index 4daf0a257a3b..1324e9e34fe1 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_s/const.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; f2480f2ac0 cvtsi2sd xmm0, rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_s/locals.wat b/winch/filetests/filetests/x64/f64_convert_i64_s/locals.wat index 957ac50d3aca..b5b249dca39a 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_s/locals.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; f2480f2ac0 cvtsi2sd xmm0, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_s/params.wat b/winch/filetests/filetests/x64/f64_convert_i64_s/params.wat index 760c7320d198..1bfa0169fc48 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_s/params.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; f2480f2ac0 cvtsi2sd xmm0, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_s/spilled.wat b/winch/filetests/filetests/x64/f64_convert_i64_s/spilled.wat index e823f6b4812f..e2aeb8e1691c 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_s/spilled.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_s/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872c000000 ja 0x47 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; 4883ec08 sub rsp, 8 ;; f20f110424 movsd qword ptr [rsp], xmm0 ;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 47: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_u/const.wat b/winch/filetests/filetests/x64/f64_convert_i64_u/const.wat index 23fcf844e8bb..8c187d66fb44 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_u/const.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_u/const.wat @@ -8,26 +8,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8748000000 ja 0x66 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c101000000 mov rcx, 1 ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; f20f58c0 addsd xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 66: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_u/locals.wat b/winch/filetests/filetests/x64/f64_convert_i64_u/locals.wat index d2d2ec54e2f0..f8556ca7a75d 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_u/locals.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_u/locals.wat @@ -10,28 +10,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f874a000000 ja 0x65 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0c24 mov rcx, qword ptr [rsp] ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x45 -;; 3b: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x5f -;; 45: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x4c +;; 42: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x66 +;; 4c: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; f20f58c0 addsd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 65: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_u/params.wat b/winch/filetests/filetests/x64/f64_convert_i64_u/params.wat index 477a63b62e72..113203dd7cfe 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_u/params.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_u/params.wat @@ -8,27 +8,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8746000000 ja 0x61 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] +;; 0f874a000000 ja 0x68 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0c24 mov rcx, qword ptr [rsp] ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x41 -;; 37: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x5b -;; 41: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x48 +;; 3e: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x62 +;; 48: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 ;; 4c09d8 or rax, r11 ;; f2480f2ac0 cvtsi2sd xmm0, rax ;; f20f58c0 addsd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 61: 0f0b ud2 +;; 68: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_convert_i64_u/spilled.wat b/winch/filetests/filetests/x64/f64_convert_i64_u/spilled.wat index c8b9d19731f6..84d23a22f518 100644 --- a/winch/filetests/filetests/x64/f64_convert_i64_u/spilled.wat +++ b/winch/filetests/filetests/x64/f64_convert_i64_u/spilled.wat @@ -10,19 +10,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8755000000 ja 0x70 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875a000000 ja 0x78 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c101000000 mov rcx, 1 ;; 4883f900 cmp rcx, 0 -;; 0f8c0a000000 jl 0x3e -;; 34: f2480f2ac1 cvtsi2sd xmm0, rcx -;; e91a000000 jmp 0x58 -;; 3e: 4989cb mov r11, rcx +;; 0f8c0a000000 jl 0x46 +;; 3c: f2480f2ac1 cvtsi2sd xmm0, rcx +;; e91a000000 jmp 0x60 +;; 46: 4989cb mov r11, rcx ;; 49c1eb01 shr r11, 1 ;; 4889c8 mov rax, rcx ;; 4883e001 and rax, 1 @@ -33,7 +35,7 @@ ;; f20f110424 movsd qword ptr [rsp], xmm0 ;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 70: 0f0b ud2 +;; 78: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_copysign/const.wat b/winch/filetests/filetests/x64/f64_copysign/const.wat index 800d55f25a3e..646ed8593a7c 100644 --- a/winch/filetests/filetests/x64/f64_copysign/const.wat +++ b/winch/filetests/filetests/x64/f64_copysign/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8749000000 ja 0x67 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10053d000000 movsd xmm0, qword ptr [rip + 0x3d] ;; f20f100d3d000000 movsd xmm1, qword ptr [rip + 0x3d] ;; 49bb0000000000000080 @@ -26,19 +28,19 @@ ;; 66410f28cf movapd xmm1, xmm15 ;; 660f56c8 orpd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 -;; 61: 0000 add byte ptr [rax], al -;; 63: 0000 add byte ptr [rax], al -;; 65: 0000 add byte ptr [rax], al -;; 67: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 6d: 99 cdq -;; 6e: 01409a add dword ptr [rax - 0x66], eax -;; 71: 99 cdq -;; 72: 99 cdq -;; 73: 99 cdq -;; 74: 99 cdq +;; 67: 0f0b ud2 +;; 69: 0000 add byte ptr [rax], al +;; 6b: 0000 add byte ptr [rax], al +;; 6d: 0000 add byte ptr [rax], al +;; 6f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 75: 99 cdq -;; 76: f1 int1 +;; 76: 01409a add dword ptr [rax - 0x66], eax +;; 79: 99 cdq +;; 7a: 99 cdq +;; 7b: 99 cdq +;; 7c: 99 cdq +;; 7d: 99 cdq +;; 7e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_copysign/locals.wat b/winch/filetests/filetests/x64/f64_copysign/locals.wat index 62de7b928674..b650ba1b283f 100644 --- a/winch/filetests/filetests/x64/f64_copysign/locals.wat +++ b/winch/filetests/filetests/x64/f64_copysign/locals.wat @@ -18,22 +18,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8769000000 ja 0x84 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f876c000000 ja 0x8a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100550000000 movsd xmm0, qword ptr [rip + 0x50] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f10054a000000 movsd xmm0, qword ptr [rip + 0x4a] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10054a000000 movsd xmm0, qword ptr [rip + 0x4a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 664d0f6efb movq xmm15, r11 @@ -42,8 +44,9 @@ ;; 66410f28cf movapd xmm1, xmm15 ;; 660f56c8 orpd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 84: 0f0b ud2 -;; 86: 0000 add byte ptr [rax], al +;; 8a: 0f0b ud2 +;; 8c: 0000 add byte ptr [rax], al +;; 8e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_copysign/params.wat b/winch/filetests/filetests/x64/f64_copysign/params.wat index 86862c8ccd41..4b4d7fdc6a80 100644 --- a/winch/filetests/filetests/x64/f64_copysign/params.wat +++ b/winch/filetests/filetests/x64/f64_copysign/params.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874c000000 ja 0x67 -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8750000000 ja 0x6e +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 664d0f6efb movq xmm15, r11 @@ -28,7 +30,7 @@ ;; 66410f28cf movapd xmm1, xmm15 ;; 660f56c8 orpd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 67: 0f0b ud2 +;; 6e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_div/const.wat b/winch/filetests/filetests/x64/f64_div/const.wat index 0cd26b40aeb4..b805916800b1 100644 --- a/winch/filetests/filetests/x64/f64_div/const.wat +++ b/winch/filetests/filetests/x64/f64_div/const.wat @@ -9,29 +9,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; f20f100d1d000000 movsd xmm1, qword ptr [rip + 0x1d] ;; f20f5ec8 divsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 -;; 43: 0000 add byte ptr [rax], al -;; 45: 0000 add byte ptr [rax], al -;; 47: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 4d: 99 cdq -;; 4e: 01409a add dword ptr [rax - 0x66], eax -;; 51: 99 cdq -;; 52: 99 cdq -;; 53: 99 cdq -;; 54: 99 cdq +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 55: 99 cdq -;; 56: f1 int1 +;; 56: 01409a add dword ptr [rax - 0x66], eax +;; 59: 99 cdq +;; 5a: 99 cdq +;; 5b: 99 cdq +;; 5c: 99 cdq +;; 5d: 99 cdq +;; 5e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_div/locals.wat b/winch/filetests/filetests/x64/f64_div/locals.wat index 0ef4c18c084a..c3d761ce359d 100644 --- a/winch/filetests/filetests/x64/f64_div/locals.wat +++ b/winch/filetests/filetests/x64/f64_div/locals.wat @@ -18,25 +18,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100530000000 movsd xmm0, qword ptr [rip + 0x30] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f5ec8 divsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_div/params.wat b/winch/filetests/filetests/x64/f64_div/params.wat index 8ce4fc84dee9..033194c7e6ad 100644 --- a/winch/filetests/filetests/x64/f64_div/params.wat +++ b/winch/filetests/filetests/x64/f64_div/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f5ec8 divsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_eq/const.wat b/winch/filetests/filetests/x64/f64_eq/const.wat index c8ed92241215..fa1457b69734 100644 --- a/winch/filetests/filetests/x64/f64_eq/const.wat +++ b/winch/filetests/filetests/x64/f64_eq/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10052d000000 movsd xmm0, qword ptr [rip + 0x2d] ;; f20f100d2d000000 movsd xmm1, qword ptr [rip + 0x2d] ;; 660f2ec8 ucomisd xmm1, xmm0 @@ -24,17 +26,17 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 -;; 55: 0000 add byte ptr [rax], al -;; 57: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 5d: 99 cdq -;; 5e: 01409a add dword ptr [rax - 0x66], eax -;; 61: 99 cdq -;; 62: 99 cdq -;; 63: 99 cdq -;; 64: 99 cdq +;; 5b: 0f0b ud2 +;; 5d: 0000 add byte ptr [rax], al +;; 5f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 65: 99 cdq -;; 66: f1 int1 +;; 66: 01409a add dword ptr [rax - 0x66], eax +;; 69: 99 cdq +;; 6a: 99 cdq +;; 6b: 99 cdq +;; 6c: 99 cdq +;; 6d: 99 cdq +;; 6e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_eq/locals.wat b/winch/filetests/filetests/x64/f64_eq/locals.wat index 627d29fbcd40..dc3b30272760 100644 --- a/winch/filetests/filetests/x64/f64_eq/locals.wat +++ b/winch/filetests/filetests/x64/f64_eq/locals.wat @@ -18,32 +18,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f875d000000 ja 0x78 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8760000000 ja 0x7e +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f100548000000 movsd xmm0, qword ptr [rip + 0x48] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100542000000 movsd xmm0, qword ptr [rip + 0x42] +;; 4c891c24 mov qword ptr [rsp], r11 +;; f20f100540000000 movsd xmm0, qword ptr [rip + 0x40] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10053a000000 movsd xmm0, qword ptr [rip + 0x3a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 78: 0f0b ud2 -;; 7a: 0000 add byte ptr [rax], al -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al +;; 7e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_eq/params.wat b/winch/filetests/filetests/x64/f64_eq/params.wat index fc1cf637ac9a..a93cb94046c2 100644 --- a/winch/filetests/filetests/x64/f64_eq/params.wat +++ b/winch/filetests/filetests/x64/f64_eq/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_floor/f64_floor_const_sse41.wat b/winch/filetests/filetests/x64/f64_floor/f64_floor_const_sse41.wat index c7ea9af76e9b..23ae88e4fe80 100644 --- a/winch/filetests/filetests/x64/f64_floor/f64_floor_const_sse41.wat +++ b/winch/filetests/filetests/x64/f64_floor/f64_floor_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100515000000 movsd xmm0, qword ptr [rip + 0x15] ;; 660f3a0bc001 roundsd xmm0, xmm0, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 001f add byte ptr [rdi], bl -;; 41: 85eb test ebx, ebp -;; 43: 51 push rcx +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 001f add byte ptr [rdi], bl +;; 49: 85eb test ebx, ebp +;; 4b: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_floor/f64_floor_param.wat b/winch/filetests/filetests/x64/f64_floor/f64_floor_param.wat index 3f0c4404d5e4..be634b2cf57d 100644 --- a/winch/filetests/filetests/x64/f64_floor/f64_floor_param.wat +++ b/winch/filetests/filetests/x64/f64_floor/f64_floor_param.wat @@ -8,25 +8,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f2440f107c2408 movsd xmm15, qword ptr [rsp + 8] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f2440f103c24 movsd xmm15, qword ptr [rsp] ;; 4883ec08 sub rsp, 8 ;; f2440f113c24 movsd qword ptr [rsp], xmm15 -;; 4883ec08 sub rsp, 8 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 -;; 4883c410 add rsp, 0x10 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_floor/f64_floor_param_sse41.wat b/winch/filetests/filetests/x64/f64_floor/f64_floor_param_sse41.wat index 4aa85d003492..552cd6e85e79 100644 --- a/winch/filetests/filetests/x64/f64_floor/f64_floor_param_sse41.wat +++ b/winch/filetests/filetests/x64/f64_floor/f64_floor_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 660f3a0bc001 roundsd xmm0, xmm0, 1 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_ge/const.wat b/winch/filetests/filetests/x64/f64_ge/const.wat index 678e9dba06ff..2eb4688ad8d8 100644 --- a/winch/filetests/filetests/x64/f64_ge/const.wat +++ b/winch/filetests/filetests/x64/f64_ge/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10052d000000 movsd xmm0, qword ptr [rip + 0x2d] ;; f20f100d2d000000 movsd xmm1, qword ptr [rip + 0x2d] ;; 660f2ec8 ucomisd xmm1, xmm0 @@ -24,17 +26,17 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 -;; 55: 0000 add byte ptr [rax], al -;; 57: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 5d: 99 cdq -;; 5e: 01409a add dword ptr [rax - 0x66], eax -;; 61: 99 cdq -;; 62: 99 cdq -;; 63: 99 cdq -;; 64: 99 cdq +;; 5b: 0f0b ud2 +;; 5d: 0000 add byte ptr [rax], al +;; 5f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 65: 99 cdq -;; 66: f1 int1 +;; 66: 01409a add dword ptr [rax - 0x66], eax +;; 69: 99 cdq +;; 6a: 99 cdq +;; 6b: 99 cdq +;; 6c: 99 cdq +;; 6d: 99 cdq +;; 6e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_ge/locals.wat b/winch/filetests/filetests/x64/f64_ge/locals.wat index 80aea31412ba..5a7d10c910fc 100644 --- a/winch/filetests/filetests/x64/f64_ge/locals.wat +++ b/winch/filetests/filetests/x64/f64_ge/locals.wat @@ -18,32 +18,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f875d000000 ja 0x78 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8760000000 ja 0x7e +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f100548000000 movsd xmm0, qword ptr [rip + 0x48] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100542000000 movsd xmm0, qword ptr [rip + 0x42] +;; 4c891c24 mov qword ptr [rsp], r11 +;; f20f100540000000 movsd xmm0, qword ptr [rip + 0x40] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10053a000000 movsd xmm0, qword ptr [rip + 0x3a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 78: 0f0b ud2 -;; 7a: 0000 add byte ptr [rax], al -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al +;; 7e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_ge/params.wat b/winch/filetests/filetests/x64/f64_ge/params.wat index 768a36b0a75a..c2bd954dae0e 100644 --- a/winch/filetests/filetests/x64/f64_ge/params.wat +++ b/winch/filetests/filetests/x64/f64_ge/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_gt/const.wat b/winch/filetests/filetests/x64/f64_gt/const.wat index 796b5f59d079..a6e3fa5763b2 100644 --- a/winch/filetests/filetests/x64/f64_gt/const.wat +++ b/winch/filetests/filetests/x64/f64_gt/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10052d000000 movsd xmm0, qword ptr [rip + 0x2d] ;; f20f100d2d000000 movsd xmm1, qword ptr [rip + 0x2d] ;; 660f2ec8 ucomisd xmm1, xmm0 @@ -24,17 +26,17 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 -;; 55: 0000 add byte ptr [rax], al -;; 57: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 5d: 99 cdq -;; 5e: 01409a add dword ptr [rax - 0x66], eax -;; 61: 99 cdq -;; 62: 99 cdq -;; 63: 99 cdq -;; 64: 99 cdq +;; 5b: 0f0b ud2 +;; 5d: 0000 add byte ptr [rax], al +;; 5f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 65: 99 cdq -;; 66: f1 int1 +;; 66: 01409a add dword ptr [rax - 0x66], eax +;; 69: 99 cdq +;; 6a: 99 cdq +;; 6b: 99 cdq +;; 6c: 99 cdq +;; 6d: 99 cdq +;; 6e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_gt/locals.wat b/winch/filetests/filetests/x64/f64_gt/locals.wat index 92e447a7fcfa..2756d7b14ad3 100644 --- a/winch/filetests/filetests/x64/f64_gt/locals.wat +++ b/winch/filetests/filetests/x64/f64_gt/locals.wat @@ -18,32 +18,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f875d000000 ja 0x78 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8760000000 ja 0x7e +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f100548000000 movsd xmm0, qword ptr [rip + 0x48] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100542000000 movsd xmm0, qword ptr [rip + 0x42] +;; 4c891c24 mov qword ptr [rsp], r11 +;; f20f100540000000 movsd xmm0, qword ptr [rip + 0x40] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10053a000000 movsd xmm0, qword ptr [rip + 0x3a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 78: 0f0b ud2 -;; 7a: 0000 add byte ptr [rax], al -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al +;; 7e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_gt/params.wat b/winch/filetests/filetests/x64/f64_gt/params.wat index 8d6849537900..42591edb0e70 100644 --- a/winch/filetests/filetests/x64/f64_gt/params.wat +++ b/winch/filetests/filetests/x64/f64_gt/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al ;; 41bb00000000 mov r11d, 0 ;; 410f9bc3 setnp r11b ;; 4c21d8 and rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_le/const.wat b/winch/filetests/filetests/x64/f64_le/const.wat index 07abc3b8ae0f..d2a36887cf1a 100644 --- a/winch/filetests/filetests/x64/f64_le/const.wat +++ b/winch/filetests/filetests/x64/f64_le/const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; f20f100d1d000000 movsd xmm1, qword ptr [rip + 0x1d] ;; 660f2ec1 ucomisd xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_le/locals.wat b/winch/filetests/filetests/x64/f64_le/locals.wat index 98db4e8dce0b..20401dba5fb4 100644 --- a/winch/filetests/filetests/x64/f64_le/locals.wat +++ b/winch/filetests/filetests/x64/f64_le/locals.wat @@ -18,30 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8750000000 ja 0x6b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8753000000 ja 0x71 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100538000000 movsd xmm0, qword ptr [rip + 0x38] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100532000000 movsd xmm0, qword ptr [rip + 0x32] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f100532000000 movsd xmm0, qword ptr [rip + 0x32] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec1 ucomisd xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 6b: 0f0b ud2 -;; 6d: 0000 add byte ptr [rax], al -;; 6f: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 75: 99 cdq -;; 76: f1 int1 +;; 71: 0f0b ud2 +;; 73: 0000 add byte ptr [rax], al +;; 75: 0000 add byte ptr [rax], al +;; 77: 009a99999999 add byte ptr [rdx - 0x66666667], bl +;; 7d: 99 cdq +;; 7e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_le/params.wat b/winch/filetests/filetests/x64/f64_le/params.wat index 98db4e8dce0b..20401dba5fb4 100644 --- a/winch/filetests/filetests/x64/f64_le/params.wat +++ b/winch/filetests/filetests/x64/f64_le/params.wat @@ -18,30 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8750000000 ja 0x6b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8753000000 ja 0x71 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100538000000 movsd xmm0, qword ptr [rip + 0x38] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100532000000 movsd xmm0, qword ptr [rip + 0x32] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f100532000000 movsd xmm0, qword ptr [rip + 0x32] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec1 ucomisd xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 6b: 0f0b ud2 -;; 6d: 0000 add byte ptr [rax], al -;; 6f: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 75: 99 cdq -;; 76: f1 int1 +;; 71: 0f0b ud2 +;; 73: 0000 add byte ptr [rax], al +;; 75: 0000 add byte ptr [rax], al +;; 77: 009a99999999 add byte ptr [rdx - 0x66666667], bl +;; 7d: 99 cdq +;; 7e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_lt/const.wat b/winch/filetests/filetests/x64/f64_lt/const.wat index 7f4a43971456..1f1190477e4b 100644 --- a/winch/filetests/filetests/x64/f64_lt/const.wat +++ b/winch/filetests/filetests/x64/f64_lt/const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; f20f100d1d000000 movsd xmm1, qword ptr [rip + 0x1d] ;; 660f2ec1 ucomisd xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_lt/locals.wat b/winch/filetests/filetests/x64/f64_lt/locals.wat index 140b6c6d10d0..fe73513b0e09 100644 --- a/winch/filetests/filetests/x64/f64_lt/locals.wat +++ b/winch/filetests/filetests/x64/f64_lt/locals.wat @@ -18,30 +18,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8750000000 ja 0x6b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8753000000 ja 0x71 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100538000000 movsd xmm0, qword ptr [rip + 0x38] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100532000000 movsd xmm0, qword ptr [rip + 0x32] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f100532000000 movsd xmm0, qword ptr [rip + 0x32] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec1 ucomisd xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 6b: 0f0b ud2 -;; 6d: 0000 add byte ptr [rax], al -;; 6f: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 75: 99 cdq -;; 76: f1 int1 +;; 71: 0f0b ud2 +;; 73: 0000 add byte ptr [rax], al +;; 75: 0000 add byte ptr [rax], al +;; 77: 009a99999999 add byte ptr [rdx - 0x66666667], bl +;; 7d: 99 cdq +;; 7e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_lt/params.wat b/winch/filetests/filetests/x64/f64_lt/params.wat index 42d118160089..2e0354cecbeb 100644 --- a/winch/filetests/filetests/x64/f64_lt/params.wat +++ b/winch/filetests/filetests/x64/f64_lt/params.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8733000000 ja 0x4e -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8737000000 ja 0x55 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec1 ucomisd xmm0, xmm1 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4e: 0f0b ud2 +;; 55: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_max/const.wat b/winch/filetests/filetests/x64/f64_max/const.wat index 23131b9284e2..1570827fc4f1 100644 --- a/winch/filetests/filetests/x64/f64_max/const.wat +++ b/winch/filetests/filetests/x64/f64_max/const.wat @@ -9,26 +9,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8749000000 ja 0x64 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10053d000000 movsd xmm0, qword ptr [rip + 0x3d] ;; f20f100d3d000000 movsd xmm1, qword ptr [rip + 0x3d] ;; 660f2ec8 ucomisd xmm1, xmm0 -;; 0f8519000000 jne 0x56 -;; 0f8a09000000 jp 0x4c -;; 43: 660f54c8 andpd xmm1, xmm0 -;; e90e000000 jmp 0x5a -;; 4c: f20f58c8 addsd xmm1, xmm0 -;; 0f8a04000000 jp 0x5a -;; 56: f20f5fc8 maxsd xmm1, xmm0 +;; 0f8519000000 jne 0x5e +;; 0f8a09000000 jp 0x54 +;; 4b: 660f54c8 andpd xmm1, xmm0 +;; e90e000000 jmp 0x62 +;; 54: f20f58c8 addsd xmm1, xmm0 +;; 0f8a04000000 jp 0x62 +;; 5e: f20f5fc8 maxsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 64: 0f0b ud2 -;; 66: 0000 add byte ptr [rax], al +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_max/locals.wat b/winch/filetests/filetests/x64/f64_max/locals.wat index 366ecaa4cbc1..481737fa9250 100644 --- a/winch/filetests/filetests/x64/f64_max/locals.wat +++ b/winch/filetests/filetests/x64/f64_max/locals.wat @@ -18,37 +18,40 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f876e000000 ja 0x89 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8771000000 ja 0x8f +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100558000000 movsd xmm0, qword ptr [rip + 0x58] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100552000000 movsd xmm0, qword ptr [rip + 0x52] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f100552000000 movsd xmm0, qword ptr [rip + 0x52] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 -;; 0f8519000000 jne 0x7b -;; 0f8a09000000 jp 0x71 -;; 68: 660f54c8 andpd xmm1, xmm0 -;; e90e000000 jmp 0x7f -;; 71: f20f58c8 addsd xmm1, xmm0 -;; 0f8a04000000 jp 0x7f -;; 7b: f20f5fc8 maxsd xmm1, xmm0 +;; 0f8519000000 jne 0x81 +;; 0f8a09000000 jp 0x77 +;; 6e: 660f54c8 andpd xmm1, xmm0 +;; e90e000000 jmp 0x85 +;; 77: f20f58c8 addsd xmm1, xmm0 +;; 0f8a04000000 jp 0x85 +;; 81: f20f5fc8 maxsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 89: 0f0b ud2 -;; 8b: 0000 add byte ptr [rax], al -;; 8d: 0000 add byte ptr [rax], al -;; 8f: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 95: 99 cdq -;; 96: f1 int1 +;; 8f: 0f0b ud2 +;; 91: 0000 add byte ptr [rax], al +;; 93: 0000 add byte ptr [rax], al +;; 95: 0000 add byte ptr [rax], al +;; 97: 009a99999999 add byte ptr [rdx - 0x66666667], bl +;; 9d: 99 cdq +;; 9e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_max/params.wat b/winch/filetests/filetests/x64/f64_max/params.wat index f3807c00705b..7cf51516f8a4 100644 --- a/winch/filetests/filetests/x64/f64_max/params.wat +++ b/winch/filetests/filetests/x64/f64_max/params.wat @@ -9,27 +9,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8751000000 ja 0x6c -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8755000000 ja 0x73 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 -;; 0f8519000000 jne 0x5e -;; 0f8a09000000 jp 0x54 -;; 4b: 660f54c8 andpd xmm1, xmm0 -;; e90e000000 jmp 0x62 -;; 54: f20f58c8 addsd xmm1, xmm0 -;; 0f8a04000000 jp 0x62 -;; 5e: f20f5fc8 maxsd xmm1, xmm0 +;; 0f8519000000 jne 0x65 +;; 0f8a09000000 jp 0x5b +;; 52: 660f54c8 andpd xmm1, xmm0 +;; e90e000000 jmp 0x69 +;; 5b: f20f58c8 addsd xmm1, xmm0 +;; 0f8a04000000 jp 0x69 +;; 65: f20f5fc8 maxsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 6c: 0f0b ud2 +;; 73: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_min/const.wat b/winch/filetests/filetests/x64/f64_min/const.wat index bd12efb58057..1e7ad628d1ae 100644 --- a/winch/filetests/filetests/x64/f64_min/const.wat +++ b/winch/filetests/filetests/x64/f64_min/const.wat @@ -9,26 +9,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8749000000 ja 0x64 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10053d000000 movsd xmm0, qword ptr [rip + 0x3d] ;; f20f100d3d000000 movsd xmm1, qword ptr [rip + 0x3d] ;; 660f2ec8 ucomisd xmm1, xmm0 -;; 0f8519000000 jne 0x56 -;; 0f8a09000000 jp 0x4c -;; 43: 660f56c8 orpd xmm1, xmm0 -;; e90e000000 jmp 0x5a -;; 4c: f20f58c8 addsd xmm1, xmm0 -;; 0f8a04000000 jp 0x5a -;; 56: f20f5dc8 minsd xmm1, xmm0 +;; 0f8519000000 jne 0x5e +;; 0f8a09000000 jp 0x54 +;; 4b: 660f56c8 orpd xmm1, xmm0 +;; e90e000000 jmp 0x62 +;; 54: f20f58c8 addsd xmm1, xmm0 +;; 0f8a04000000 jp 0x62 +;; 5e: f20f5dc8 minsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 64: 0f0b ud2 -;; 66: 0000 add byte ptr [rax], al +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_min/locals.wat b/winch/filetests/filetests/x64/f64_min/locals.wat index c70dcaba5c69..d9c5294a49e7 100644 --- a/winch/filetests/filetests/x64/f64_min/locals.wat +++ b/winch/filetests/filetests/x64/f64_min/locals.wat @@ -18,37 +18,40 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f876e000000 ja 0x89 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8771000000 ja 0x8f +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100558000000 movsd xmm0, qword ptr [rip + 0x58] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100552000000 movsd xmm0, qword ptr [rip + 0x52] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f100552000000 movsd xmm0, qword ptr [rip + 0x52] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 -;; 0f8519000000 jne 0x7b -;; 0f8a09000000 jp 0x71 -;; 68: 660f56c8 orpd xmm1, xmm0 -;; e90e000000 jmp 0x7f -;; 71: f20f58c8 addsd xmm1, xmm0 -;; 0f8a04000000 jp 0x7f -;; 7b: f20f5dc8 minsd xmm1, xmm0 +;; 0f8519000000 jne 0x81 +;; 0f8a09000000 jp 0x77 +;; 6e: 660f56c8 orpd xmm1, xmm0 +;; e90e000000 jmp 0x85 +;; 77: f20f58c8 addsd xmm1, xmm0 +;; 0f8a04000000 jp 0x85 +;; 81: f20f5dc8 minsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 89: 0f0b ud2 -;; 8b: 0000 add byte ptr [rax], al -;; 8d: 0000 add byte ptr [rax], al -;; 8f: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 95: 99 cdq -;; 96: f1 int1 +;; 8f: 0f0b ud2 +;; 91: 0000 add byte ptr [rax], al +;; 93: 0000 add byte ptr [rax], al +;; 95: 0000 add byte ptr [rax], al +;; 97: 009a99999999 add byte ptr [rdx - 0x66666667], bl +;; 9d: 99 cdq +;; 9e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_min/params.wat b/winch/filetests/filetests/x64/f64_min/params.wat index 049448287f5a..92e54c26a02f 100644 --- a/winch/filetests/filetests/x64/f64_min/params.wat +++ b/winch/filetests/filetests/x64/f64_min/params.wat @@ -9,27 +9,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8751000000 ja 0x6c -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8755000000 ja 0x73 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 -;; 0f8519000000 jne 0x5e -;; 0f8a09000000 jp 0x54 -;; 4b: 660f56c8 orpd xmm1, xmm0 -;; e90e000000 jmp 0x62 -;; 54: f20f58c8 addsd xmm1, xmm0 -;; 0f8a04000000 jp 0x62 -;; 5e: f20f5dc8 minsd xmm1, xmm0 +;; 0f8519000000 jne 0x65 +;; 0f8a09000000 jp 0x5b +;; 52: 660f56c8 orpd xmm1, xmm0 +;; e90e000000 jmp 0x69 +;; 5b: f20f58c8 addsd xmm1, xmm0 +;; 0f8a04000000 jp 0x69 +;; 65: f20f5dc8 minsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 6c: 0f0b ud2 +;; 73: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_mul/const.wat b/winch/filetests/filetests/x64/f64_mul/const.wat index 4920c4f2c389..186422df198d 100644 --- a/winch/filetests/filetests/x64/f64_mul/const.wat +++ b/winch/filetests/filetests/x64/f64_mul/const.wat @@ -9,29 +9,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; f20f100d1d000000 movsd xmm1, qword ptr [rip + 0x1d] ;; f20f59c8 mulsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 -;; 43: 0000 add byte ptr [rax], al -;; 45: 0000 add byte ptr [rax], al -;; 47: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 4d: 99 cdq -;; 4e: 01409a add dword ptr [rax - 0x66], eax -;; 51: 99 cdq -;; 52: 99 cdq -;; 53: 99 cdq -;; 54: 99 cdq +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 55: 99 cdq -;; 56: f1 int1 +;; 56: 01409a add dword ptr [rax - 0x66], eax +;; 59: 99 cdq +;; 5a: 99 cdq +;; 5b: 99 cdq +;; 5c: 99 cdq +;; 5d: 99 cdq +;; 5e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_mul/locals.wat b/winch/filetests/filetests/x64/f64_mul/locals.wat index c2314ba9775d..ebb5a401a135 100644 --- a/winch/filetests/filetests/x64/f64_mul/locals.wat +++ b/winch/filetests/filetests/x64/f64_mul/locals.wat @@ -18,25 +18,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100530000000 movsd xmm0, qword ptr [rip + 0x30] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f59c8 mulsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_mul/params.wat b/winch/filetests/filetests/x64/f64_mul/params.wat index 7bb94378c6a6..2788755a1b14 100644 --- a/winch/filetests/filetests/x64/f64_mul/params.wat +++ b/winch/filetests/filetests/x64/f64_mul/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f59c8 mulsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_ne/const.wat b/winch/filetests/filetests/x64/f64_ne/const.wat index a87119fec430..1b90213a2ac0 100644 --- a/winch/filetests/filetests/x64/f64_ne/const.wat +++ b/winch/filetests/filetests/x64/f64_ne/const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10052d000000 movsd xmm0, qword ptr [rip + 0x2d] ;; f20f100d2d000000 movsd xmm1, qword ptr [rip + 0x2d] ;; 660f2ec8 ucomisd xmm1, xmm0 @@ -24,17 +26,17 @@ ;; 41bb00000000 mov r11d, 0 ;; 410f9ac3 setp r11b ;; 4c09d8 or rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 -;; 55: 0000 add byte ptr [rax], al -;; 57: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 5d: 99 cdq -;; 5e: 01409a add dword ptr [rax - 0x66], eax -;; 61: 99 cdq -;; 62: 99 cdq -;; 63: 99 cdq -;; 64: 99 cdq +;; 5b: 0f0b ud2 +;; 5d: 0000 add byte ptr [rax], al +;; 5f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 65: 99 cdq -;; 66: f1 int1 +;; 66: 01409a add dword ptr [rax - 0x66], eax +;; 69: 99 cdq +;; 6a: 99 cdq +;; 6b: 99 cdq +;; 6c: 99 cdq +;; 6d: 99 cdq +;; 6e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_ne/locals.wat b/winch/filetests/filetests/x64/f64_ne/locals.wat index fd22829d8bad..6793ff49d941 100644 --- a/winch/filetests/filetests/x64/f64_ne/locals.wat +++ b/winch/filetests/filetests/x64/f64_ne/locals.wat @@ -18,32 +18,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f875d000000 ja 0x78 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8760000000 ja 0x7e +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f100548000000 movsd xmm0, qword ptr [rip + 0x48] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f100542000000 movsd xmm0, qword ptr [rip + 0x42] +;; 4c891c24 mov qword ptr [rsp], r11 +;; f20f100540000000 movsd xmm0, qword ptr [rip + 0x40] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10053a000000 movsd xmm0, qword ptr [rip + 0x3a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al ;; 41bb00000000 mov r11d, 0 ;; 410f9ac3 setp r11b ;; 4c09d8 or rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 78: 0f0b ud2 -;; 7a: 0000 add byte ptr [rax], al -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al +;; 7e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_ne/params.wat b/winch/filetests/filetests/x64/f64_ne/params.wat index dc9f7c74d881..5cf09af18802 100644 --- a/winch/filetests/filetests/x64/f64_ne/params.wat +++ b/winch/filetests/filetests/x64/f64_ne/params.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; 660f2ec8 ucomisd xmm1, xmm0 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al ;; 41bb00000000 mov r11d, 0 ;; 410f9ac3 setp r11b ;; 4c09d8 or rax, r11 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_nearest/f64_nearest_const_sse41.wat b/winch/filetests/filetests/x64/f64_nearest/f64_nearest_const_sse41.wat index 7092031ee106..2d5f7cd847b8 100644 --- a/winch/filetests/filetests/x64/f64_nearest/f64_nearest_const_sse41.wat +++ b/winch/filetests/filetests/x64/f64_nearest/f64_nearest_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100515000000 movsd xmm0, qword ptr [rip + 0x15] ;; 660f3a0bc000 roundsd xmm0, xmm0, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 001f add byte ptr [rdi], bl -;; 41: 85eb test ebx, ebp -;; 43: 51 push rcx +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 001f add byte ptr [rdi], bl +;; 49: 85eb test ebx, ebp +;; 4b: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param.wat b/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param.wat index 7b09bf80695a..a647efabcb26 100644 --- a/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param.wat +++ b/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param.wat @@ -8,25 +8,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f2440f107c2408 movsd xmm15, qword ptr [rsp + 8] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f2440f103c24 movsd xmm15, qword ptr [rsp] ;; 4883ec08 sub rsp, 8 ;; f2440f113c24 movsd qword ptr [rsp], xmm15 -;; 4883ec08 sub rsp, 8 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 -;; 4883c410 add rsp, 0x10 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param_sse41.wat b/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param_sse41.wat index 66768057eab5..43ca1db4c314 100644 --- a/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param_sse41.wat +++ b/winch/filetests/filetests/x64/f64_nearest/f64_nearest_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 660f3a0bc000 roundsd xmm0, xmm0, 0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_neg/f64_neg_const.wat b/winch/filetests/filetests/x64/f64_neg/f64_neg_const.wat index 0d2cbc28e081..1a0e779b2b4b 100644 --- a/winch/filetests/filetests/x64/f64_neg/f64_neg_const.wat +++ b/winch/filetests/filetests/x64/f64_neg/f64_neg_const.wat @@ -8,22 +8,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f57c7 xorpd xmm0, xmm15 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 -;; 47: 001f add byte ptr [rdi], bl -;; 49: 85eb test ebx, ebp -;; 4b: 51 push rcx +;; 4d: 0f0b ud2 +;; 4f: 001f add byte ptr [rdi], bl +;; 51: 85eb test ebx, ebp +;; 53: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_neg/f64_neg_param.wat b/winch/filetests/filetests/x64/f64_neg/f64_neg_param.wat index 871e1414cbda..0102cd4b8b06 100644 --- a/winch/filetests/filetests/x64/f64_neg/f64_neg_param.wat +++ b/winch/filetests/filetests/x64/f64_neg/f64_neg_param.wat @@ -8,20 +8,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f57c7 xorpd xmm0, xmm15 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_promote_f32/const.wat b/winch/filetests/filetests/x64/f64_promote_f32/const.wat index 98e1d2eac4e9..7413f0483886 100644 --- a/winch/filetests/filetests/x64/f64_promote_f32/const.wat +++ b/winch/filetests/filetests/x64/f64_promote_f32/const.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10050d000000 movss xmm0, dword ptr [rip + 0xd] ;; f30f5ac0 cvtss2sd xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 -;; 37: 0000 add byte ptr [rax], al +;; 3d: 0f0b ud2 +;; 3f: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_promote_f32/locals.wat b/winch/filetests/filetests/x64/f64_promote_f32/locals.wat index 23c3f79dd0df..0021ec16526f 100644 --- a/winch/filetests/filetests/x64/f64_promote_f32/locals.wat +++ b/winch/filetests/filetests/x64/f64_promote_f32/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f30f5ac0 cvtss2sd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_promote_f32/params.wat b/winch/filetests/filetests/x64/f64_promote_f32/params.wat index f4f41df13da4..8af1a9dd3139 100644 --- a/winch/filetests/filetests/x64/f64_promote_f32/params.wat +++ b/winch/filetests/filetests/x64/f64_promote_f32/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f30f5ac0 cvtss2sd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_promote_f32/spilled.wat b/winch/filetests/filetests/x64/f64_promote_f32/spilled.wat index 6e35eb881707..261268ede7c4 100644 --- a/winch/filetests/filetests/x64/f64_promote_f32/spilled.wat +++ b/winch/filetests/filetests/x64/f64_promote_f32/spilled.wat @@ -10,24 +10,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872c000000 ja 0x47 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100525000000 movss xmm0, dword ptr [rip + 0x25] ;; f30f5ac0 cvtss2sd xmm0, xmm0 ;; 4883ec08 sub rsp, 8 ;; f20f110424 movsd qword ptr [rsp], xmm0 ;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 47: 0f0b ud2 -;; 49: 0000 add byte ptr [rax], al -;; 4b: 0000 add byte ptr [rax], al -;; 4d: 0000 add byte ptr [rax], al -;; 4f: 0000 add byte ptr [rax], al +;; 4f: 0f0b ud2 +;; 51: 0000 add byte ptr [rax], al +;; 53: 0000 add byte ptr [rax], al +;; 55: 0000 add byte ptr [rax], al +;; 57: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_reinterpret_i64/const.wat b/winch/filetests/filetests/x64/f64_reinterpret_i64/const.wat index 2fe8c5cb78e8..80ce3b318404 100644 --- a/winch/filetests/filetests/x64/f64_reinterpret_i64/const.wat +++ b/winch/filetests/filetests/x64/f64_reinterpret_i64/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 66480f6ec0 movq xmm0, rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_reinterpret_i64/locals.wat b/winch/filetests/filetests/x64/f64_reinterpret_i64/locals.wat index ad8d7cbc9f9c..053a84d6b7f3 100644 --- a/winch/filetests/filetests/x64/f64_reinterpret_i64/locals.wat +++ b/winch/filetests/filetests/x64/f64_reinterpret_i64/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; 66480f6ec0 movq xmm0, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_reinterpret_i64/params.wat b/winch/filetests/filetests/x64/f64_reinterpret_i64/params.wat index c0fe8c7f4fe2..58a7c27a4971 100644 --- a/winch/filetests/filetests/x64/f64_reinterpret_i64/params.wat +++ b/winch/filetests/filetests/x64/f64_reinterpret_i64/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 66480f6ec0 movq xmm0, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_reinterpret_i64/ret_int.wat b/winch/filetests/filetests/x64/f64_reinterpret_i64/ret_int.wat index 2dca718c24cd..3104de4fcbb7 100644 --- a/winch/filetests/filetests/x64/f64_reinterpret_i64/ret_int.wat +++ b/winch/filetests/filetests/x64/f64_reinterpret_i64/ret_int.wat @@ -10,17 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 66480f6ec0 movq xmm0, rax ;; 48c7c001000000 mov rax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_reinterpret_i64/spilled.wat b/winch/filetests/filetests/x64/f64_reinterpret_i64/spilled.wat index 5a45fa2cf3d2..0d0521a17985 100644 --- a/winch/filetests/filetests/x64/f64_reinterpret_i64/spilled.wat +++ b/winch/filetests/filetests/x64/f64_reinterpret_i64/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872c000000 ja 0x47 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 66480f6ec0 movq xmm0, rax ;; 4883ec08 sub rsp, 8 ;; f20f110424 movsd qword ptr [rsp], xmm0 ;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 47: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_const.wat b/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_const.wat index 88aebf62fbd3..1c580227b697 100644 --- a/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_const.wat +++ b/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_const.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10050d000000 movsd xmm0, qword ptr [rip + 0xd] ;; f20f51c0 sqrtsd xmm0, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 -;; 37: 001f add byte ptr [rdi], bl -;; 39: 85eb test ebx, ebp -;; 3b: 51 push rcx +;; 3d: 0f0b ud2 +;; 3f: 001f add byte ptr [rdi], bl +;; 41: 85eb test ebx, ebp +;; 43: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_param.wat b/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_param.wat index d5bace4899e0..b902a4bd8ff6 100644 --- a/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_param.wat +++ b/winch/filetests/filetests/x64/f64_sqrt/f64_sqrt_param.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8722000000 ja 0x40 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f20f51c0 sqrtsd xmm0, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 40: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_sub/const.wat b/winch/filetests/filetests/x64/f64_sub/const.wat index 516312cdf07b..5eeaf16d9c81 100644 --- a/winch/filetests/filetests/x64/f64_sub/const.wat +++ b/winch/filetests/filetests/x64/f64_sub/const.wat @@ -9,29 +9,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; f20f100d1d000000 movsd xmm1, qword ptr [rip + 0x1d] ;; f20f5cc8 subsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 -;; 43: 0000 add byte ptr [rax], al -;; 45: 0000 add byte ptr [rax], al -;; 47: 009a99999999 add byte ptr [rdx - 0x66666667], bl -;; 4d: 99 cdq -;; 4e: 01409a add dword ptr [rax - 0x66], eax -;; 51: 99 cdq -;; 52: 99 cdq -;; 53: 99 cdq -;; 54: 99 cdq +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 009a99999999 add byte ptr [rdx - 0x66666667], bl ;; 55: 99 cdq -;; 56: f1 int1 +;; 56: 01409a add dword ptr [rax - 0x66], eax +;; 59: 99 cdq +;; 5a: 99 cdq +;; 5b: 99 cdq +;; 5c: 99 cdq +;; 5d: 99 cdq +;; 5e: f1 int1 diff --git a/winch/filetests/filetests/x64/f64_sub/locals.wat b/winch/filetests/filetests/x64/f64_sub/locals.wat index 3ea17db754a1..87ac53d6c9ee 100644 --- a/winch/filetests/filetests/x64/f64_sub/locals.wat +++ b/winch/filetests/filetests/x64/f64_sub/locals.wat @@ -18,25 +18,28 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; f20f100530000000 movsd xmm0, qword ptr [rip + 0x30] -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] ;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; f20f10052a000000 movsd xmm0, qword ptr [rip + 0x2a] +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f5cc8 subsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 +;; 6e: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/f64_sub/params.wat b/winch/filetests/filetests/x64/f64_sub/params.wat index 87d6b6f12da7..0369e1d0578e 100644 --- a/winch/filetests/filetests/x64/f64_sub/params.wat +++ b/winch/filetests/filetests/x64/f64_sub/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec18 sub rsp, 0x18 -;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 -;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] -;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 +;; f20f110c24 movsd qword ptr [rsp], xmm1 +;; f20f100424 movsd xmm0, qword ptr [rsp] +;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] ;; f20f5cc8 subsd xmm1, xmm0 ;; 660f28c1 movapd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_trunc/f64_trunc_const_sse41.wat b/winch/filetests/filetests/x64/f64_trunc/f64_trunc_const_sse41.wat index f85237b63563..12310ccc7f4a 100644 --- a/winch/filetests/filetests/x64/f64_trunc/f64_trunc_const_sse41.wat +++ b/winch/filetests/filetests/x64/f64_trunc/f64_trunc_const_sse41.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100515000000 movsd xmm0, qword ptr [rip + 0x15] ;; 660f3a0bc003 roundsd xmm0, xmm0, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 -;; 39: 0000 add byte ptr [rax], al -;; 3b: 0000 add byte ptr [rax], al -;; 3d: 0000 add byte ptr [rax], al -;; 3f: 001f add byte ptr [rdi], bl -;; 41: 85eb test ebx, ebp -;; 43: 51 push rcx +;; 3f: 0f0b ud2 +;; 41: 0000 add byte ptr [rax], al +;; 43: 0000 add byte ptr [rax], al +;; 45: 0000 add byte ptr [rax], al +;; 47: 001f add byte ptr [rdi], bl +;; 49: 85eb test ebx, ebp +;; 4b: 51 push rcx diff --git a/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param.wat b/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param.wat index 99042a1b4eaf..be1ca0dc38bd 100644 --- a/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param.wat +++ b/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param.wat @@ -8,25 +8,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f2440f107c2408 movsd xmm15, qword ptr [rsp + 8] +;; 0f8744000000 ja 0x62 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f2440f103c24 movsd xmm15, qword ptr [rsp] ;; 4883ec08 sub rsp, 8 ;; f2440f113c24 movsd qword ptr [rsp], xmm15 -;; 4883ec08 sub rsp, 8 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 49bb0000000000000000 ;; movabs r11, 0 ;; 41ffd3 call r11 ;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 -;; 4883c410 add rsp, 0x10 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 62: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param_sse41.wat b/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param_sse41.wat index 520e731ebaca..0a79d2a203b1 100644 --- a/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param_sse41.wat +++ b/winch/filetests/filetests/x64/f64_trunc/f64_trunc_param_sse41.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 660f3a0bc003 roundsd xmm0, xmm0, 3 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/const.wat b/winch/filetests/filetests/x64/i32_add/const.wat index e26e410abdce..246e1c1b8241 100644 --- a/winch/filetests/filetests/x64/i32_add/const.wat +++ b/winch/filetests/filetests/x64/i32_add/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80a000000 mov eax, 0xa ;; 83c014 add eax, 0x14 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/locals.wat b/winch/filetests/filetests/x64/i32_add/locals.wat index 929b69d3965a..dec969ae927d 100644 --- a/winch/filetests/filetests/x64/i32_add/locals.wat +++ b/winch/filetests/filetests/x64/i32_add/locals.wat @@ -18,24 +18,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8735000000 ja 0x50 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b80a000000 mov eax, 0xa -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b814000000 mov eax, 0x14 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 01c1 add ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 50: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/max.wat b/winch/filetests/filetests/x64/i32_add/max.wat index 5a6b519014ec..6f9df1fef497 100644 --- a/winch/filetests/filetests/x64/i32_add/max.wat +++ b/winch/filetests/filetests/x64/i32_add/max.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffff7f mov eax, 0x7fffffff ;; 83c001 add eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/max_one.wat b/winch/filetests/filetests/x64/i32_add/max_one.wat index 1362b73c7c4f..6adf482ce40e 100644 --- a/winch/filetests/filetests/x64/i32_add/max_one.wat +++ b/winch/filetests/filetests/x64/i32_add/max_one.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000080 mov eax, 0x80000000 ;; 83c0ff add eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/mixed.wat b/winch/filetests/filetests/x64/i32_add/mixed.wat index d86ee8dbad7e..04a3757b12fa 100644 --- a/winch/filetests/filetests/x64/i32_add/mixed.wat +++ b/winch/filetests/filetests/x64/i32_add/mixed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffffff mov eax, 0xffffffff ;; 83c001 add eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/params.wat b/winch/filetests/filetests/x64/i32_add/params.wat index 8b3276052872..bbdf1794e797 100644 --- a/winch/filetests/filetests/x64/i32_add/params.wat +++ b/winch/filetests/filetests/x64/i32_add/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 01c1 add ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/signed.wat b/winch/filetests/filetests/x64/i32_add/signed.wat index 23d0191049e6..5c06fb12e6a5 100644 --- a/winch/filetests/filetests/x64/i32_add/signed.wat +++ b/winch/filetests/filetests/x64/i32_add/signed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffffff mov eax, 0xffffffff ;; 83c0ff add eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_add/unsigned_with_zero.wat b/winch/filetests/filetests/x64/i32_add/unsigned_with_zero.wat index e9ec61704b06..cb0b37b1e4e3 100644 --- a/winch/filetests/filetests/x64/i32_add/unsigned_with_zero.wat +++ b/winch/filetests/filetests/x64/i32_add/unsigned_with_zero.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 83c000 add eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_and/const.wat b/winch/filetests/filetests/x64/i32_and/const.wat index c3011ece0843..ec8c5b794901 100644 --- a/winch/filetests/filetests/x64/i32_and/const.wat +++ b/winch/filetests/filetests/x64/i32_and/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 83e002 and eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_and/locals.wat b/winch/filetests/filetests/x64/i32_and/locals.wat index 50de75b78354..495f756f4cda 100644 --- a/winch/filetests/filetests/x64/i32_and/locals.wat +++ b/winch/filetests/filetests/x64/i32_and/locals.wat @@ -18,24 +18,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8735000000 ja 0x50 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 21c1 and ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 50: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_and/params.wat b/winch/filetests/filetests/x64/i32_and/params.wat index 6e5c7952e52c..9b9432e02377 100644 --- a/winch/filetests/filetests/x64/i32_and/params.wat +++ b/winch/filetests/filetests/x64/i32_and/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 21c1 and ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_clz/lzcnt_const.wat b/winch/filetests/filetests/x64/i32_clz/lzcnt_const.wat index b8f177da3e43..715acfd3886c 100644 --- a/winch/filetests/filetests/x64/i32_clz/lzcnt_const.wat +++ b/winch/filetests/filetests/x64/i32_clz/lzcnt_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; f30fbdc0 lzcnt eax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_clz/lzcnt_local.wat b/winch/filetests/filetests/x64/i32_clz/lzcnt_local.wat index f3748ee8f20b..dc2e8e2c81c3 100644 --- a/winch/filetests/filetests/x64/i32_clz/lzcnt_local.wat +++ b/winch/filetests/filetests/x64/i32_clz/lzcnt_local.wat @@ -14,20 +14,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872d000000 ja 0x4b +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30fbdc0 lzcnt eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_clz/lzcnt_param.wat b/winch/filetests/filetests/x64/i32_clz/lzcnt_param.wat index 1eff384d7d05..ef2c65cf99a4 100644 --- a/winch/filetests/filetests/x64/i32_clz/lzcnt_param.wat +++ b/winch/filetests/filetests/x64/i32_clz/lzcnt_param.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30fbdc0 lzcnt eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_clz/no_lzcnt_const.wat b/winch/filetests/filetests/x64/i32_clz/no_lzcnt_const.wat index 0b40470f4f7f..4dc841f2ebe7 100644 --- a/winch/filetests/filetests/x64/i32_clz/no_lzcnt_const.wat +++ b/winch/filetests/filetests/x64/i32_clz/no_lzcnt_const.wat @@ -8,13 +8,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872d000000 ja 0x4b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 0fbdc0 bsr eax, eax ;; 41bb00000000 mov r11d, 0 @@ -22,7 +24,7 @@ ;; f7d8 neg eax ;; 83c020 add eax, 0x20 ;; 4429d8 sub eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_clz/no_lzcnt_local.wat b/winch/filetests/filetests/x64/i32_clz/no_lzcnt_local.wat index c8ddac67f542..1adb151d8ec3 100644 --- a/winch/filetests/filetests/x64/i32_clz/no_lzcnt_local.wat +++ b/winch/filetests/filetests/x64/i32_clz/no_lzcnt_local.wat @@ -13,25 +13,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8739000000 ja 0x54 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873e000000 ja 0x5c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbdc0 bsr eax, eax ;; 41bb00000000 mov r11d, 0 ;; 410f95c3 setne r11b ;; f7d8 neg eax ;; 83c020 add eax, 0x20 ;; 4429d8 sub eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 54: 0f0b ud2 +;; 5c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_clz/no_lzcnt_param.wat b/winch/filetests/filetests/x64/i32_clz/no_lzcnt_param.wat index 9317d3fd17e1..c256ea971be6 100644 --- a/winch/filetests/filetests/x64/i32_clz/no_lzcnt_param.wat +++ b/winch/filetests/filetests/x64/i32_clz/no_lzcnt_param.wat @@ -8,22 +8,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbdc0 bsr eax, eax ;; 41bb00000000 mov r11d, 0 ;; 410f95c3 setne r11b ;; f7d8 neg eax ;; 83c020 add eax, 0x20 ;; 4429d8 sub eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ctz/bmi1_const.wat b/winch/filetests/filetests/x64/i32_ctz/bmi1_const.wat index bd203e1f1396..415f4dbce7b8 100644 --- a/winch/filetests/filetests/x64/i32_ctz/bmi1_const.wat +++ b/winch/filetests/filetests/x64/i32_ctz/bmi1_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; f30fbcc0 tzcnt eax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ctz/bmi1_local.wat b/winch/filetests/filetests/x64/i32_ctz/bmi1_local.wat index c2802dfa8de5..189d72605047 100644 --- a/winch/filetests/filetests/x64/i32_ctz/bmi1_local.wat +++ b/winch/filetests/filetests/x64/i32_ctz/bmi1_local.wat @@ -15,20 +15,21 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872d000000 ja 0x4b +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30fbcc0 tzcnt eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ctz/bmi1_param.wat b/winch/filetests/filetests/x64/i32_ctz/bmi1_param.wat index 51058bc6231d..4807202a66fd 100644 --- a/winch/filetests/filetests/x64/i32_ctz/bmi1_param.wat +++ b/winch/filetests/filetests/x64/i32_ctz/bmi1_param.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30fbcc0 tzcnt eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ctz/no_bmi1_const.wat b/winch/filetests/filetests/x64/i32_ctz/no_bmi1_const.wat index 175e1714bc36..a689f425c876 100644 --- a/winch/filetests/filetests/x64/i32_ctz/no_bmi1_const.wat +++ b/winch/filetests/filetests/x64/i32_ctz/no_bmi1_const.wat @@ -8,20 +8,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8727000000 ja 0x42 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 0fbcc0 bsf eax, eax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 41c1e305 shl r11d, 5 ;; 4401d8 add eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 42: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ctz/no_bmi1_local.wat b/winch/filetests/filetests/x64/i32_ctz/no_bmi1_local.wat index 7c2e5dd83720..31cbd722ce05 100644 --- a/winch/filetests/filetests/x64/i32_ctz/no_bmi1_local.wat +++ b/winch/filetests/filetests/x64/i32_ctz/no_bmi1_local.wat @@ -13,24 +13,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbcc0 bsf eax, eax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 41c1e305 shl r11d, 5 ;; 4401d8 add eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 +;; 5b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ctz/no_bmi1_param.wat b/winch/filetests/filetests/x64/i32_ctz/no_bmi1_param.wat index b2b0b757f01c..f4900174c7d7 100644 --- a/winch/filetests/filetests/x64/i32_ctz/no_bmi1_param.wat +++ b/winch/filetests/filetests/x64/i32_ctz/no_bmi1_param.wat @@ -8,21 +8,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbcc0 bsf eax, eax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 41c1e305 shl r11d, 5 ;; 4401d8 add eax, r11d -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divs/const.wat b/winch/filetests/filetests/x64/i32_divs/const.wat index 7003f479b5aa..608f4d1b6400 100644 --- a/winch/filetests/filetests/x64/i32_divs/const.wat +++ b/winch/filetests/filetests/x64/i32_divs/const.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8724000000 ja 0x3f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b90a000000 mov ecx, 0xa ;; b814000000 mov eax, 0x14 ;; 83f900 cmp ecx, 0 -;; 0f840b000000 je 0x41 -;; 36: 99 cdq +;; 0f840b000000 je 0x49 +;; 3e: 99 cdq ;; f7f9 idiv ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3f: 0f0b ud2 -;; 41: 0f0b ud2 +;; 47: 0f0b ud2 +;; 49: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divs/one_zero.wat b/winch/filetests/filetests/x64/i32_divs/one_zero.wat index 3c80ca5fe72e..85f2dfe641e9 100644 --- a/winch/filetests/filetests/x64/i32_divs/one_zero.wat +++ b/winch/filetests/filetests/x64/i32_divs/one_zero.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8724000000 ja 0x3f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b801000000 mov eax, 1 ;; 83f900 cmp ecx, 0 -;; 0f840b000000 je 0x41 -;; 36: 99 cdq +;; 0f840b000000 je 0x49 +;; 3e: 99 cdq ;; f7f9 idiv ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3f: 0f0b ud2 -;; 41: 0f0b ud2 +;; 47: 0f0b ud2 +;; 49: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divs/overflow.wat b/winch/filetests/filetests/x64/i32_divs/overflow.wat index f87441786b6f..100ea9b95675 100644 --- a/winch/filetests/filetests/x64/i32_divs/overflow.wat +++ b/winch/filetests/filetests/x64/i32_divs/overflow.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8724000000 ja 0x3f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b9ffffffff mov ecx, 0xffffffff ;; b800000080 mov eax, 0x80000000 ;; 83f900 cmp ecx, 0 -;; 0f840b000000 je 0x41 -;; 36: 99 cdq +;; 0f840b000000 je 0x49 +;; 3e: 99 cdq ;; f7f9 idiv ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3f: 0f0b ud2 -;; 41: 0f0b ud2 +;; 47: 0f0b ud2 +;; 49: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divs/params.wat b/winch/filetests/filetests/x64/i32_divs/params.wat index 9aa818feddc3..81a7dac9517f 100644 --- a/winch/filetests/filetests/x64/i32_divs/params.wat +++ b/winch/filetests/filetests/x64/i32_divs/params.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f872e000000 ja 0x4c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83f900 cmp ecx, 0 -;; 0f840b000000 je 0x47 -;; 3c: 99 cdq +;; 0f840b000000 je 0x4e +;; 43: 99 cdq ;; f7f9 idiv ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 -;; 47: 0f0b ud2 +;; 4c: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divs/zero_zero.wat b/winch/filetests/filetests/x64/i32_divs/zero_zero.wat index d3d61819149c..9a9544a49400 100644 --- a/winch/filetests/filetests/x64/i32_divs/zero_zero.wat +++ b/winch/filetests/filetests/x64/i32_divs/zero_zero.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8724000000 ja 0x3f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b800000000 mov eax, 0 ;; 83f900 cmp ecx, 0 -;; 0f840b000000 je 0x41 -;; 36: 99 cdq +;; 0f840b000000 je 0x49 +;; 3e: 99 cdq ;; f7f9 idiv ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3f: 0f0b ud2 -;; 41: 0f0b ud2 +;; 47: 0f0b ud2 +;; 49: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divu/const.wat b/winch/filetests/filetests/x64/i32_divu/const.wat index 06130346bc68..daf50e2ff3db 100644 --- a/winch/filetests/filetests/x64/i32_divu/const.wat +++ b/winch/filetests/filetests/x64/i32_divu/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b90a000000 mov ecx, 0xa ;; b814000000 mov eax, 0x14 ;; 31d2 xor edx, edx ;; f7f1 div ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divu/one_zero.wat b/winch/filetests/filetests/x64/i32_divu/one_zero.wat index 14d09d3840fe..272978dc26dd 100644 --- a/winch/filetests/filetests/x64/i32_divu/one_zero.wat +++ b/winch/filetests/filetests/x64/i32_divu/one_zero.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b801000000 mov eax, 1 ;; 31d2 xor edx, edx ;; f7f1 div ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divu/params.wat b/winch/filetests/filetests/x64/i32_divu/params.wat index 23e06f77e682..738203500361 100644 --- a/winch/filetests/filetests/x64/i32_divu/params.wat +++ b/winch/filetests/filetests/x64/i32_divu/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 31d2 xor edx, edx ;; f7f1 div ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divu/signed.wat b/winch/filetests/filetests/x64/i32_divu/signed.wat index 5dbd59762a24..9aaf45ceead7 100644 --- a/winch/filetests/filetests/x64/i32_divu/signed.wat +++ b/winch/filetests/filetests/x64/i32_divu/signed.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b9ffffffff mov ecx, 0xffffffff ;; b8ffffffff mov eax, 0xffffffff ;; 31d2 xor edx, edx ;; f7f1 div ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_divu/zero_zero.wat b/winch/filetests/filetests/x64/i32_divu/zero_zero.wat index 306d2c7a7098..7cbbce9e8077 100644 --- a/winch/filetests/filetests/x64/i32_divu/zero_zero.wat +++ b/winch/filetests/filetests/x64/i32_divu/zero_zero.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b800000000 mov eax, 0 ;; 31d2 xor edx, edx ;; f7f1 div ecx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_eq/const.wat b/winch/filetests/filetests/x64/i32_eq/const.wat index 2d03f3a82a52..928c1fc67104 100644 --- a/winch/filetests/filetests/x64/i32_eq/const.wat +++ b/winch/filetests/filetests/x64/i32_eq/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_eq/locals.wat b/winch/filetests/filetests/x64/i32_eq/locals.wat index 50fa124636a7..7cbed624fd87 100644 --- a/winch/filetests/filetests/x64/i32_eq/locals.wat +++ b/winch/filetests/filetests/x64/i32_eq/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f94c1 sete cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_eq/params.wat b/winch/filetests/filetests/x64/i32_eq/params.wat index 4313faeb825c..13e9cfe8c6df 100644 --- a/winch/filetests/filetests/x64/i32_eq/params.wat +++ b/winch/filetests/filetests/x64/i32_eq/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f94c1 sete cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_eqz/const.wat b/winch/filetests/filetests/x64/i32_eqz/const.wat index 36beacbed305..421647414e26 100644 --- a/winch/filetests/filetests/x64/i32_eqz/const.wat +++ b/winch/filetests/filetests/x64/i32_eqz/const.wat @@ -8,18 +8,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 83f800 cmp eax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_eqz/local.wat b/winch/filetests/filetests/x64/i32_eqz/local.wat index 415083b9c9b4..874f965f71ca 100644 --- a/winch/filetests/filetests/x64/i32_eqz/local.wat +++ b/winch/filetests/filetests/x64/i32_eqz/local.wat @@ -13,22 +13,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83f800 cmp eax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_eqz/param.wat b/winch/filetests/filetests/x64/i32_eqz/param.wat index 7379aef20f78..109aea18705e 100644 --- a/winch/filetests/filetests/x64/i32_eqz/param.wat +++ b/winch/filetests/filetests/x64/i32_eqz/param.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83f800 cmp eax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_extend_16_s/const.wat b/winch/filetests/filetests/x64/i32_extend_16_s/const.wat index cb862913d73c..a8c7b5d5e7ed 100644 --- a/winch/filetests/filetests/x64/i32_extend_16_s/const.wat +++ b/winch/filetests/filetests/x64/i32_extend_16_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 0fbfc0 movsx eax, ax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_extend_16_s/locals.wat b/winch/filetests/filetests/x64/i32_extend_16_s/locals.wat index 704ca768eeed..3f64e8f42faf 100644 --- a/winch/filetests/filetests/x64/i32_extend_16_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_extend_16_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbfc0 movsx eax, ax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_extend_16_s/params.wat b/winch/filetests/filetests/x64/i32_extend_16_s/params.wat index 316bd5ccbde8..5e1b50db10b1 100644 --- a/winch/filetests/filetests/x64/i32_extend_16_s/params.wat +++ b/winch/filetests/filetests/x64/i32_extend_16_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbfc0 movsx eax, ax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_extend_8_s/const.wat b/winch/filetests/filetests/x64/i32_extend_8_s/const.wat index 466c066bf250..37b79ff00599 100644 --- a/winch/filetests/filetests/x64/i32_extend_8_s/const.wat +++ b/winch/filetests/filetests/x64/i32_extend_8_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 0fbec0 movsx eax, al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_extend_8_s/locals.wat b/winch/filetests/filetests/x64/i32_extend_8_s/locals.wat index 14cd0b124fc3..236475bab2ca 100644 --- a/winch/filetests/filetests/x64/i32_extend_8_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_extend_8_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbec0 movsx eax, al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_extend_8_s/params.wat b/winch/filetests/filetests/x64/i32_extend_8_s/params.wat index 326ea47df3ab..95fbe425d1ca 100644 --- a/winch/filetests/filetests/x64/i32_extend_8_s/params.wat +++ b/winch/filetests/filetests/x64/i32_extend_8_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 0fbec0 movsx eax, al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ge_s/const.wat b/winch/filetests/filetests/x64/i32_ge_s/const.wat index d2424e918774..faab734a8095 100644 --- a/winch/filetests/filetests/x64/i32_ge_s/const.wat +++ b/winch/filetests/filetests/x64/i32_ge_s/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f9dc0 setge al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ge_s/locals.wat b/winch/filetests/filetests/x64/i32_ge_s/locals.wat index 0de352f43adc..105ff9ed76f5 100644 --- a/winch/filetests/filetests/x64/i32_ge_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_ge_s/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9dc1 setge cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ge_s/params.wat b/winch/filetests/filetests/x64/i32_ge_s/params.wat index fa14df96815b..3775aa3c10b0 100644 --- a/winch/filetests/filetests/x64/i32_ge_s/params.wat +++ b/winch/filetests/filetests/x64/i32_ge_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9dc1 setge cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ge_u/const.wat b/winch/filetests/filetests/x64/i32_ge_u/const.wat index c153b72edc95..81dda0ee2c49 100644 --- a/winch/filetests/filetests/x64/i32_ge_u/const.wat +++ b/winch/filetests/filetests/x64/i32_ge_u/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ge_u/locals.wat b/winch/filetests/filetests/x64/i32_ge_u/locals.wat index 3d9ba2018d99..2e58ccbf417c 100644 --- a/winch/filetests/filetests/x64/i32_ge_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_ge_u/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f93c1 setae cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ge_u/params.wat b/winch/filetests/filetests/x64/i32_ge_u/params.wat index d78f89c9902e..47c8eb4a2cbf 100644 --- a/winch/filetests/filetests/x64/i32_ge_u/params.wat +++ b/winch/filetests/filetests/x64/i32_ge_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f93c1 setae cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_gt_s/const.wat b/winch/filetests/filetests/x64/i32_gt_s/const.wat index d2cd91fec72c..7727a1e70d0b 100644 --- a/winch/filetests/filetests/x64/i32_gt_s/const.wat +++ b/winch/filetests/filetests/x64/i32_gt_s/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f9fc0 setg al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_gt_s/locals.wat b/winch/filetests/filetests/x64/i32_gt_s/locals.wat index bf2478c6f707..551880484cd4 100644 --- a/winch/filetests/filetests/x64/i32_gt_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_gt_s/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9fc1 setg cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_gt_s/params.wat b/winch/filetests/filetests/x64/i32_gt_s/params.wat index 5b81954e19c7..f0c6a9c5a02e 100644 --- a/winch/filetests/filetests/x64/i32_gt_s/params.wat +++ b/winch/filetests/filetests/x64/i32_gt_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9fc1 setg cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_gt_u/const.wat b/winch/filetests/filetests/x64/i32_gt_u/const.wat index 3d7e65effdd8..75d92d4a3902 100644 --- a/winch/filetests/filetests/x64/i32_gt_u/const.wat +++ b/winch/filetests/filetests/x64/i32_gt_u/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_gt_u/locals.wat b/winch/filetests/filetests/x64/i32_gt_u/locals.wat index 555d3643f6a7..4f0399900ca8 100644 --- a/winch/filetests/filetests/x64/i32_gt_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_gt_u/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f97c1 seta cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_gt_u/params.wat b/winch/filetests/filetests/x64/i32_gt_u/params.wat index 345afe3c8eac..cd77b857c773 100644 --- a/winch/filetests/filetests/x64/i32_gt_u/params.wat +++ b/winch/filetests/filetests/x64/i32_gt_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f97c1 seta cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_le_s/const.wat b/winch/filetests/filetests/x64/i32_le_s/const.wat index d24cfa621f74..e939da2f26dc 100644 --- a/winch/filetests/filetests/x64/i32_le_s/const.wat +++ b/winch/filetests/filetests/x64/i32_le_s/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f9ec0 setle al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_le_s/locals.wat b/winch/filetests/filetests/x64/i32_le_s/locals.wat index c34f7ef2f60c..31a1a74c3254 100644 --- a/winch/filetests/filetests/x64/i32_le_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_le_s/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9ec1 setle cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_le_s/params.wat b/winch/filetests/filetests/x64/i32_le_s/params.wat index cfec07c245c5..a34392f67fda 100644 --- a/winch/filetests/filetests/x64/i32_le_s/params.wat +++ b/winch/filetests/filetests/x64/i32_le_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9ec1 setle cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_le_u/const.wat b/winch/filetests/filetests/x64/i32_le_u/const.wat index 5dfdbbd36594..3fdc2591fc76 100644 --- a/winch/filetests/filetests/x64/i32_le_u/const.wat +++ b/winch/filetests/filetests/x64/i32_le_u/const.wat @@ -10,18 +10,20 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f96c0 setbe al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_le_u/locals.wat b/winch/filetests/filetests/x64/i32_le_u/locals.wat index c4a51c29e933..fe08dde24148 100644 --- a/winch/filetests/filetests/x64/i32_le_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_le_u/locals.wat @@ -18,26 +18,27 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f96c1 setbe cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_le_u/params.wat b/winch/filetests/filetests/x64/i32_le_u/params.wat index a6b87b809403..48e43b88205c 100644 --- a/winch/filetests/filetests/x64/i32_le_u/params.wat +++ b/winch/filetests/filetests/x64/i32_le_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f96c1 setbe cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_lt_s/const.wat b/winch/filetests/filetests/x64/i32_lt_s/const.wat index 761c3eac4cdf..8cbf03040f58 100644 --- a/winch/filetests/filetests/x64/i32_lt_s/const.wat +++ b/winch/filetests/filetests/x64/i32_lt_s/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f9cc0 setl al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_lt_s/locals.wat b/winch/filetests/filetests/x64/i32_lt_s/locals.wat index ad997f4794a2..988b5a8f8ce8 100644 --- a/winch/filetests/filetests/x64/i32_lt_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_lt_s/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9cc1 setl cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_lt_s/params.wat b/winch/filetests/filetests/x64/i32_lt_s/params.wat index b9ed8a3c63d2..78c9b51a3955 100644 --- a/winch/filetests/filetests/x64/i32_lt_s/params.wat +++ b/winch/filetests/filetests/x64/i32_lt_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f9cc1 setl cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_lt_u/const.wat b/winch/filetests/filetests/x64/i32_lt_u/const.wat index e3578a9a195a..6cdd57ec4030 100644 --- a/winch/filetests/filetests/x64/i32_lt_u/const.wat +++ b/winch/filetests/filetests/x64/i32_lt_u/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f92c0 setb al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_lt_u/locals.wat b/winch/filetests/filetests/x64/i32_lt_u/locals.wat index b5181038b3f4..021cf697e35a 100644 --- a/winch/filetests/filetests/x64/i32_lt_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_lt_u/locals.wat @@ -18,26 +18,27 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f92c1 setb cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_lt_u/params.wat b/winch/filetests/filetests/x64/i32_lt_u/params.wat index 90c9ad615397..c32c3c873cb2 100644 --- a/winch/filetests/filetests/x64/i32_lt_u/params.wat +++ b/winch/filetests/filetests/x64/i32_lt_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f92c1 setb cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/const.wat b/winch/filetests/filetests/x64/i32_mul/const.wat index cdfd0b5241a5..560d794666fc 100644 --- a/winch/filetests/filetests/x64/i32_mul/const.wat +++ b/winch/filetests/filetests/x64/i32_mul/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80a000000 mov eax, 0xa ;; 6bc014 imul eax, eax, 0x14 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/locals.wat b/winch/filetests/filetests/x64/i32_mul/locals.wat index 52cdae4ca99d..e7e776425b4b 100644 --- a/winch/filetests/filetests/x64/i32_mul/locals.wat +++ b/winch/filetests/filetests/x64/i32_mul/locals.wat @@ -18,24 +18,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8736000000 ja 0x51 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8739000000 ja 0x57 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b80a000000 mov eax, 0xa -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b814000000 mov eax, 0x14 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 0fafc8 imul ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 51: 0f0b ud2 +;; 57: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/max.wat b/winch/filetests/filetests/x64/i32_mul/max.wat index 2a341f76dee1..ee20994402f1 100644 --- a/winch/filetests/filetests/x64/i32_mul/max.wat +++ b/winch/filetests/filetests/x64/i32_mul/max.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffff7f mov eax, 0x7fffffff ;; 6bc0ff imul eax, eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/max_one.wat b/winch/filetests/filetests/x64/i32_mul/max_one.wat index 58eec28fb0f7..797cf6b929f9 100644 --- a/winch/filetests/filetests/x64/i32_mul/max_one.wat +++ b/winch/filetests/filetests/x64/i32_mul/max_one.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000080 mov eax, 0x80000000 ;; 6bc0ff imul eax, eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/mixed.wat b/winch/filetests/filetests/x64/i32_mul/mixed.wat index e82ca69076ab..acb022fc662c 100644 --- a/winch/filetests/filetests/x64/i32_mul/mixed.wat +++ b/winch/filetests/filetests/x64/i32_mul/mixed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffffff mov eax, 0xffffffff ;; 6bc001 imul eax, eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/params.wat b/winch/filetests/filetests/x64/i32_mul/params.wat index d8544b58840d..2fbe01c5b7d7 100644 --- a/winch/filetests/filetests/x64/i32_mul/params.wat +++ b/winch/filetests/filetests/x64/i32_mul/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8723000000 ja 0x3e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 0fafc8 imul ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3e: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/signed.wat b/winch/filetests/filetests/x64/i32_mul/signed.wat index bbb605dae820..f61c0adf1a82 100644 --- a/winch/filetests/filetests/x64/i32_mul/signed.wat +++ b/winch/filetests/filetests/x64/i32_mul/signed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffffff mov eax, 0xffffffff ;; 6bc0ff imul eax, eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_mul/unsigned_with_zero.wat b/winch/filetests/filetests/x64/i32_mul/unsigned_with_zero.wat index 59de91403d7a..42968820ad30 100644 --- a/winch/filetests/filetests/x64/i32_mul/unsigned_with_zero.wat +++ b/winch/filetests/filetests/x64/i32_mul/unsigned_with_zero.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 6bc000 imul eax, eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ne/const.wat b/winch/filetests/filetests/x64/i32_ne/const.wat index 49e8a4c6e1e1..734983b3e970 100644 --- a/winch/filetests/filetests/x64/i32_ne/const.wat +++ b/winch/filetests/filetests/x64/i32_ne/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 ;; 83f803 cmp eax, 3 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ne/locals.wat b/winch/filetests/filetests/x64/i32_ne/locals.wat index f544b6e98888..26d1f7557f54 100644 --- a/winch/filetests/filetests/x64/i32_ne/locals.wat +++ b/winch/filetests/filetests/x64/i32_ne/locals.wat @@ -17,26 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b802000000 mov eax, 2 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b803000000 mov eax, 3 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f95c1 setne cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_ne/params.wat b/winch/filetests/filetests/x64/i32_ne/params.wat index e4ef5a0359f5..c832de8c5559 100644 --- a/winch/filetests/filetests/x64/i32_ne/params.wat +++ b/winch/filetests/filetests/x64/i32_ne/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 39c1 cmp ecx, eax ;; b900000000 mov ecx, 0 ;; 400f95c1 setne cl ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_or/const.wat b/winch/filetests/filetests/x64/i32_or/const.wat index c3cee9b64a3f..4d52fe12c91f 100644 --- a/winch/filetests/filetests/x64/i32_or/const.wat +++ b/winch/filetests/filetests/x64/i32_or/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 83c802 or eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_or/locals.wat b/winch/filetests/filetests/x64/i32_or/locals.wat index 44e69b9004b4..de9471282833 100644 --- a/winch/filetests/filetests/x64/i32_or/locals.wat +++ b/winch/filetests/filetests/x64/i32_or/locals.wat @@ -18,24 +18,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8735000000 ja 0x50 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 09c1 or ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 50: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_or/params.wat b/winch/filetests/filetests/x64/i32_or/params.wat index 376f3cb66769..1fd1ad1df59c 100644 --- a/winch/filetests/filetests/x64/i32_or/params.wat +++ b/winch/filetests/filetests/x64/i32_or/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 09c1 or ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_popcnt/const.wat b/winch/filetests/filetests/x64/i32_popcnt/const.wat index 8c0200d4ca19..0df950b5b19c 100644 --- a/winch/filetests/filetests/x64/i32_popcnt/const.wat +++ b/winch/filetests/filetests/x64/i32_popcnt/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b803000000 mov eax, 3 ;; f30fb8c0 popcnt eax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_popcnt/fallback.wat b/winch/filetests/filetests/x64/i32_popcnt/fallback.wat index 30a93b55572e..9f92b5246084 100644 --- a/winch/filetests/filetests/x64/i32_popcnt/fallback.wat +++ b/winch/filetests/filetests/x64/i32_popcnt/fallback.wat @@ -8,13 +8,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8749000000 ja 0x64 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80f000000 mov eax, 0xf ;; 89c1 mov ecx, eax ;; c1e801 shr eax, 1 @@ -32,7 +34,7 @@ ;; 81e00f0f0f0f and eax, 0xf0f0f0f ;; 69c001010101 imul eax, eax, 0x1010101 ;; c1e818 shr eax, 0x18 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 64: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_popcnt/no_sse42.wat b/winch/filetests/filetests/x64/i32_popcnt/no_sse42.wat index f4dfb0fc9d9f..bfadc1c6b661 100644 --- a/winch/filetests/filetests/x64/i32_popcnt/no_sse42.wat +++ b/winch/filetests/filetests/x64/i32_popcnt/no_sse42.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8749000000 ja 0x64 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b803000000 mov eax, 3 ;; 89c1 mov ecx, eax ;; c1e801 shr eax, 1 @@ -33,7 +35,7 @@ ;; 81e00f0f0f0f and eax, 0xf0f0f0f ;; 69c001010101 imul eax, eax, 0x1010101 ;; c1e818 shr eax, 0x18 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 64: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_popcnt/reg.wat b/winch/filetests/filetests/x64/i32_popcnt/reg.wat index 2aceeff55558..c8853ac7a7c0 100644 --- a/winch/filetests/filetests/x64/i32_popcnt/reg.wat +++ b/winch/filetests/filetests/x64/i32_popcnt/reg.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; f30fb8c0 popcnt eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_reinterpret_f32/const.wat b/winch/filetests/filetests/x64/i32_reinterpret_f32/const.wat index 02d1f2b6b456..be9c7eb88be0 100644 --- a/winch/filetests/filetests/x64/i32_reinterpret_f32/const.wat +++ b/winch/filetests/filetests/x64/i32_reinterpret_f32/const.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10050d000000 movss xmm0, dword ptr [rip + 0xd] ;; 660f7ec0 movd eax, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 -;; 37: 0000 add byte ptr [rax], al +;; 3d: 0f0b ud2 +;; 3f: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i32_reinterpret_f32/locals.wat b/winch/filetests/filetests/x64/i32_reinterpret_f32/locals.wat index 2ce6207a60d4..ed12ab412072 100644 --- a/winch/filetests/filetests/x64/i32_reinterpret_f32/locals.wat +++ b/winch/filetests/filetests/x64/i32_reinterpret_f32/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 660f7ec0 movd eax, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_reinterpret_f32/params.wat b/winch/filetests/filetests/x64/i32_reinterpret_f32/params.wat index d8eac20a5fc0..0ab45ffa0032 100644 --- a/winch/filetests/filetests/x64/i32_reinterpret_f32/params.wat +++ b/winch/filetests/filetests/x64/i32_reinterpret_f32/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; 660f7ec0 movd eax, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_reinterpret_f32/ret_float.wat b/winch/filetests/filetests/x64/i32_reinterpret_f32/ret_float.wat index 55e092e16946..4f10bbb339b2 100644 --- a/winch/filetests/filetests/x64/i32_reinterpret_f32/ret_float.wat +++ b/winch/filetests/filetests/x64/i32_reinterpret_f32/ret_float.wat @@ -10,18 +10,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100515000000 movss xmm0, dword ptr [rip + 0x15] ;; 660f7ec0 movd eax, xmm0 ;; f30f100509000000 movss xmm0, dword ptr [rip + 9] -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 -;; 3f: 0000 add byte ptr [rax], al +;; 45: 0f0b ud2 +;; 47: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i32_rems/const.wat b/winch/filetests/filetests/x64/i32_rems/const.wat index 6684ac960103..5ca8422506fd 100644 --- a/winch/filetests/filetests/x64/i32_rems/const.wat +++ b/winch/filetests/filetests/x64/i32_rems/const.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b905000000 mov ecx, 5 ;; b807000000 mov eax, 7 ;; 99 cdq ;; 83f9ff cmp ecx, -1 -;; 0f850a000000 jne 0x41 -;; 37: ba00000000 mov edx, 0 -;; e902000000 jmp 0x43 -;; 41: f7f9 idiv ecx +;; 0f850a000000 jne 0x49 +;; 3f: ba00000000 mov edx, 0 +;; e902000000 jmp 0x4b +;; 49: f7f9 idiv ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rems/one_zero.wat b/winch/filetests/filetests/x64/i32_rems/one_zero.wat index 7fedbc6ea39a..da62c71ee4a8 100644 --- a/winch/filetests/filetests/x64/i32_rems/one_zero.wat +++ b/winch/filetests/filetests/x64/i32_rems/one_zero.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b801000000 mov eax, 1 ;; 99 cdq ;; 83f9ff cmp ecx, -1 -;; 0f850a000000 jne 0x41 -;; 37: ba00000000 mov edx, 0 -;; e902000000 jmp 0x43 -;; 41: f7f9 idiv ecx +;; 0f850a000000 jne 0x49 +;; 3f: ba00000000 mov edx, 0 +;; e902000000 jmp 0x4b +;; 49: f7f9 idiv ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rems/overflow.wat b/winch/filetests/filetests/x64/i32_rems/overflow.wat index 87baad763d47..af8657ef8c78 100644 --- a/winch/filetests/filetests/x64/i32_rems/overflow.wat +++ b/winch/filetests/filetests/x64/i32_rems/overflow.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b9ffffffff mov ecx, 0xffffffff ;; b800000080 mov eax, 0x80000000 ;; 99 cdq ;; 83f9ff cmp ecx, -1 -;; 0f850a000000 jne 0x41 -;; 37: ba00000000 mov edx, 0 -;; e902000000 jmp 0x43 -;; 41: f7f9 idiv ecx +;; 0f850a000000 jne 0x49 +;; 3f: ba00000000 mov edx, 0 +;; e902000000 jmp 0x4b +;; 49: f7f9 idiv ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rems/params.wat b/winch/filetests/filetests/x64/i32_rems/params.wat index 02f9a963719a..3c888e96e7ed 100644 --- a/winch/filetests/filetests/x64/i32_rems/params.wat +++ b/winch/filetests/filetests/x64/i32_rems/params.wat @@ -9,25 +9,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8736000000 ja 0x51 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f873a000000 ja 0x58 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 99 cdq ;; 83f9ff cmp ecx, -1 -;; 0f850a000000 jne 0x47 -;; 3d: ba00000000 mov edx, 0 -;; e902000000 jmp 0x49 -;; 47: f7f9 idiv ecx +;; 0f850a000000 jne 0x4e +;; 44: ba00000000 mov edx, 0 +;; e902000000 jmp 0x50 +;; 4e: f7f9 idiv ecx ;; 89d0 mov eax, edx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 51: 0f0b ud2 +;; 58: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rems/zero_zero.wat b/winch/filetests/filetests/x64/i32_rems/zero_zero.wat index 3b84a71e3c7a..c782ce39f29c 100644 --- a/winch/filetests/filetests/x64/i32_rems/zero_zero.wat +++ b/winch/filetests/filetests/x64/i32_rems/zero_zero.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b800000000 mov eax, 0 ;; 99 cdq ;; 83f9ff cmp ecx, -1 -;; 0f850a000000 jne 0x41 -;; 37: ba00000000 mov edx, 0 -;; e902000000 jmp 0x43 -;; 41: f7f9 idiv ecx +;; 0f850a000000 jne 0x49 +;; 3f: ba00000000 mov edx, 0 +;; e902000000 jmp 0x4b +;; 49: f7f9 idiv ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_remu/const.wat b/winch/filetests/filetests/x64/i32_remu/const.wat index 0003fede1e2a..3e39328f559b 100644 --- a/winch/filetests/filetests/x64/i32_remu/const.wat +++ b/winch/filetests/filetests/x64/i32_remu/const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b905000000 mov ecx, 5 ;; b807000000 mov eax, 7 ;; 31d2 xor edx, edx ;; f7f1 div ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_remu/one_zero.wat b/winch/filetests/filetests/x64/i32_remu/one_zero.wat index 8851d13a626e..e10813beddb4 100644 --- a/winch/filetests/filetests/x64/i32_remu/one_zero.wat +++ b/winch/filetests/filetests/x64/i32_remu/one_zero.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b801000000 mov eax, 1 ;; 31d2 xor edx, edx ;; f7f1 div ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_remu/params.wat b/winch/filetests/filetests/x64/i32_remu/params.wat index 0a9f83e2744c..2a4c9c7e03a0 100644 --- a/winch/filetests/filetests/x64/i32_remu/params.wat +++ b/winch/filetests/filetests/x64/i32_remu/params.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8724000000 ja 0x3f -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 31d2 xor edx, edx ;; f7f1 div ecx ;; 89d0 mov eax, edx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3f: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_remu/signed.wat b/winch/filetests/filetests/x64/i32_remu/signed.wat index 2c4c8d580d15..72590f50d05e 100644 --- a/winch/filetests/filetests/x64/i32_remu/signed.wat +++ b/winch/filetests/filetests/x64/i32_remu/signed.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b9ffffffff mov ecx, 0xffffffff ;; b8ffffffff mov eax, 0xffffffff ;; 31d2 xor edx, edx ;; f7f1 div ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_remu/zero_zero.wat b/winch/filetests/filetests/x64/i32_remu/zero_zero.wat index e14aa7f81298..4c5dacaaa28b 100644 --- a/winch/filetests/filetests/x64/i32_remu/zero_zero.wat +++ b/winch/filetests/filetests/x64/i32_remu/zero_zero.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b900000000 mov ecx, 0 ;; b800000000 mov eax, 0 ;; 31d2 xor edx, edx ;; f7f1 div ecx ;; 89d0 mov eax, edx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotl/16_const.wat b/winch/filetests/filetests/x64/i32_rotl/16_const.wat index 606d9cd476d6..06c3d6d0c6b4 100644 --- a/winch/filetests/filetests/x64/i32_rotl/16_const.wat +++ b/winch/filetests/filetests/x64/i32_rotl/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1c000 rol eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotl/8_const.wat b/winch/filetests/filetests/x64/i32_rotl/8_const.wat index db8eea758475..fffde624c104 100644 --- a/winch/filetests/filetests/x64/i32_rotl/8_const.wat +++ b/winch/filetests/filetests/x64/i32_rotl/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1c002 rol eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotl/locals.wat b/winch/filetests/filetests/x64/i32_rotl/locals.wat index f92b39879c86..d6788d2634ca 100644 --- a/winch/filetests/filetests/x64/i32_rotl/locals.wat +++ b/winch/filetests/filetests/x64/i32_rotl/locals.wat @@ -18,23 +18,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8733000000 ja 0x4e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3c0 rol eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4e: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotl/params.wat b/winch/filetests/filetests/x64/i32_rotl/params.wat index 800d74d393fd..ac64b64c06e3 100644 --- a/winch/filetests/filetests/x64/i32_rotl/params.wat +++ b/winch/filetests/filetests/x64/i32_rotl/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3c0 rol eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotr/16_const.wat b/winch/filetests/filetests/x64/i32_rotr/16_const.wat index f9aa0e2af755..af9ec8994d76 100644 --- a/winch/filetests/filetests/x64/i32_rotr/16_const.wat +++ b/winch/filetests/filetests/x64/i32_rotr/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1c800 ror eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotr/8_const.wat b/winch/filetests/filetests/x64/i32_rotr/8_const.wat index 44ffe7cb009f..53a8ca1ed91b 100644 --- a/winch/filetests/filetests/x64/i32_rotr/8_const.wat +++ b/winch/filetests/filetests/x64/i32_rotr/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1c802 ror eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotr/locals.wat b/winch/filetests/filetests/x64/i32_rotr/locals.wat index 9f03f4bdc841..290f32e3384e 100644 --- a/winch/filetests/filetests/x64/i32_rotr/locals.wat +++ b/winch/filetests/filetests/x64/i32_rotr/locals.wat @@ -18,23 +18,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8733000000 ja 0x4e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3c8 ror eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4e: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_rotr/params.wat b/winch/filetests/filetests/x64/i32_rotr/params.wat index a6f8cc6a0dd7..fdcf9434fda3 100644 --- a/winch/filetests/filetests/x64/i32_rotr/params.wat +++ b/winch/filetests/filetests/x64/i32_rotr/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3c8 ror eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shl/16_const.wat b/winch/filetests/filetests/x64/i32_shl/16_const.wat index 1538e5ad2245..74fc5a2915a6 100644 --- a/winch/filetests/filetests/x64/i32_shl/16_const.wat +++ b/winch/filetests/filetests/x64/i32_shl/16_const.wat @@ -10,16 +10,18 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1e000 shl eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shl/8_const.wat b/winch/filetests/filetests/x64/i32_shl/8_const.wat index eaa4c2db6bdf..3a0704d8d7a2 100644 --- a/winch/filetests/filetests/x64/i32_shl/8_const.wat +++ b/winch/filetests/filetests/x64/i32_shl/8_const.wat @@ -10,16 +10,18 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1e002 shl eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shl/locals.wat b/winch/filetests/filetests/x64/i32_shl/locals.wat index 7ebf7b9459e4..cdfc4a22e706 100644 --- a/winch/filetests/filetests/x64/i32_shl/locals.wat +++ b/winch/filetests/filetests/x64/i32_shl/locals.wat @@ -18,23 +18,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8733000000 ja 0x4e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3e0 shl eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4e: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shl/params.wat b/winch/filetests/filetests/x64/i32_shl/params.wat index 87db1b3e234b..560a808c29ad 100644 --- a/winch/filetests/filetests/x64/i32_shl/params.wat +++ b/winch/filetests/filetests/x64/i32_shl/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3e0 shl eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_s/16_const.wat b/winch/filetests/filetests/x64/i32_shr_s/16_const.wat index 06ee5af3ca84..cb8263fa1632 100644 --- a/winch/filetests/filetests/x64/i32_shr_s/16_const.wat +++ b/winch/filetests/filetests/x64/i32_shr_s/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1f800 sar eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_s/8_const.wat b/winch/filetests/filetests/x64/i32_shr_s/8_const.wat index 75f4d84824cd..3eb54b4cbcc1 100644 --- a/winch/filetests/filetests/x64/i32_shr_s/8_const.wat +++ b/winch/filetests/filetests/x64/i32_shr_s/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1f802 sar eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_s/locals.wat b/winch/filetests/filetests/x64/i32_shr_s/locals.wat index 2e9fba7dc706..d6222c27c25c 100644 --- a/winch/filetests/filetests/x64/i32_shr_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_shr_s/locals.wat @@ -18,23 +18,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8733000000 ja 0x4e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3f8 sar eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4e: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_s/params.wat b/winch/filetests/filetests/x64/i32_shr_s/params.wat index 9802c38f861d..3920bcd1327f 100644 --- a/winch/filetests/filetests/x64/i32_shr_s/params.wat +++ b/winch/filetests/filetests/x64/i32_shr_s/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3f8 sar eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_u/16_const.wat b/winch/filetests/filetests/x64/i32_shr_u/16_const.wat index 1621a6272c6d..51aa0862ca32 100644 --- a/winch/filetests/filetests/x64/i32_shr_u/16_const.wat +++ b/winch/filetests/filetests/x64/i32_shr_u/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1e800 shr eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_u/8_const.wat b/winch/filetests/filetests/x64/i32_shr_u/8_const.wat index 01a74a115cd5..00dac19bd6d8 100644 --- a/winch/filetests/filetests/x64/i32_shr_u/8_const.wat +++ b/winch/filetests/filetests/x64/i32_shr_u/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; c1e802 shr eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_u/locals.wat b/winch/filetests/filetests/x64/i32_shr_u/locals.wat index ae470c3ee12b..9ee2d86cf54a 100644 --- a/winch/filetests/filetests/x64/i32_shr_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_shr_u/locals.wat @@ -18,23 +18,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8733000000 ja 0x4e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8736000000 ja 0x54 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3e8 shr eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4e: 0f0b ud2 +;; 54: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_shr_u/params.wat b/winch/filetests/filetests/x64/i32_shr_u/params.wat index e5c9a510f853..ee31d602f6f3 100644 --- a/winch/filetests/filetests/x64/i32_shr_u/params.wat +++ b/winch/filetests/filetests/x64/i32_shr_u/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; d3e8 shr eax, cl -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/const.wat b/winch/filetests/filetests/x64/i32_sub/const.wat index 6475279f8428..1f64f4dc489c 100644 --- a/winch/filetests/filetests/x64/i32_sub/const.wat +++ b/winch/filetests/filetests/x64/i32_sub/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80a000000 mov eax, 0xa ;; 83e814 sub eax, 0x14 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/locals.wat b/winch/filetests/filetests/x64/i32_sub/locals.wat index ec337c5a5a66..7ad2a991d78e 100644 --- a/winch/filetests/filetests/x64/i32_sub/locals.wat +++ b/winch/filetests/filetests/x64/i32_sub/locals.wat @@ -18,24 +18,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8735000000 ja 0x50 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b80a000000 mov eax, 0xa -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b814000000 mov eax, 0x14 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 29c1 sub ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 50: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/max.wat b/winch/filetests/filetests/x64/i32_sub/max.wat index 0bfa3fe10353..9f56d34427ea 100644 --- a/winch/filetests/filetests/x64/i32_sub/max.wat +++ b/winch/filetests/filetests/x64/i32_sub/max.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffff7f mov eax, 0x7fffffff ;; 83e8ff sub eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/max_one.wat b/winch/filetests/filetests/x64/i32_sub/max_one.wat index 6d84bd1a5080..92309e8b129d 100644 --- a/winch/filetests/filetests/x64/i32_sub/max_one.wat +++ b/winch/filetests/filetests/x64/i32_sub/max_one.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000080 mov eax, 0x80000000 ;; 83e801 sub eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/mixed.wat b/winch/filetests/filetests/x64/i32_sub/mixed.wat index 5af0624b965a..ec9c81cd1409 100644 --- a/winch/filetests/filetests/x64/i32_sub/mixed.wat +++ b/winch/filetests/filetests/x64/i32_sub/mixed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffffff mov eax, 0xffffffff ;; 83e801 sub eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/params.wat b/winch/filetests/filetests/x64/i32_sub/params.wat index 3659643b7484..9768996745c1 100644 --- a/winch/filetests/filetests/x64/i32_sub/params.wat +++ b/winch/filetests/filetests/x64/i32_sub/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 29c1 sub ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/signed.wat b/winch/filetests/filetests/x64/i32_sub/signed.wat index 8e85e5ae7552..c89e60b828ad 100644 --- a/winch/filetests/filetests/x64/i32_sub/signed.wat +++ b/winch/filetests/filetests/x64/i32_sub/signed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b8ffffffff mov eax, 0xffffffff ;; 83e8ff sub eax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_sub/unsigned_with_zero.wat b/winch/filetests/filetests/x64/i32_sub/unsigned_with_zero.wat index f44bb2e970a5..3c3c74811134 100644 --- a/winch/filetests/filetests/x64/i32_sub/unsigned_with_zero.wat +++ b/winch/filetests/filetests/x64/i32_sub/unsigned_with_zero.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 83e800 sub eax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f32_s/const.wat b/winch/filetests/filetests/x64/i32_trunc_f32_s/const.wat index 10c77902e3ec..f486fa33790e 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f32_s/const.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f32_s/const.wat @@ -8,33 +8,35 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8750000000 ja 0x6b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8755000000 ja 0x73 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10054d000000 movss xmm0, dword ptr [rip + 0x4d] ;; f30f2cc0 cvttss2si eax, xmm0 ;; 83f801 cmp eax, 1 -;; 0f812d000000 jno 0x65 -;; 38: 0f2ec0 ucomiss xmm0, xmm0 -;; 0f8a2c000000 jp 0x6d -;; 41: 41bb000000cf mov r11d, 0xcf000000 +;; 0f812d000000 jno 0x6d +;; 40: 0f2ec0 ucomiss xmm0, xmm0 +;; 0f8a2c000000 jp 0x75 +;; 49: 41bb000000cf mov r11d, 0xcf000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ec7 ucomiss xmm0, xmm15 -;; 0f8219000000 jb 0x6f -;; 56: 66450f57ff xorpd xmm15, xmm15 +;; 0f8219000000 jb 0x77 +;; 5e: 66450f57ff xorpd xmm15, xmm15 ;; 440f2ef8 ucomiss xmm15, xmm0 -;; 0f820c000000 jb 0x71 -;; 65: 4883c408 add rsp, 8 +;; 0f820c000000 jb 0x79 +;; 6d: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 6b: 0f0b ud2 -;; 6d: 0f0b ud2 -;; 6f: 0f0b ud2 -;; 71: 0f0b ud2 -;; 73: 0000 add byte ptr [rax], al -;; 75: 0000 add byte ptr [rax], al -;; 77: 0000 add byte ptr [rax], al +;; 73: 0f0b ud2 +;; 75: 0f0b ud2 +;; 77: 0f0b ud2 +;; 79: 0f0b ud2 +;; 7b: 0000 add byte ptr [rax], al +;; 7d: 0000 add byte ptr [rax], al +;; 7f: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i32_trunc_f32_s/locals.wat b/winch/filetests/filetests/x64/i32_trunc_f32_s/locals.wat index 640da27b7fe3..fdadc9939584 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f32_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f32_s/locals.wat @@ -10,32 +10,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8757000000 ja 0x72 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f875c000000 ja 0x7a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f30f2cc0 cvttss2si eax, xmm0 ;; 83f801 cmp eax, 1 -;; 0f812d000000 jno 0x6c -;; 3f: 0f2ec0 ucomiss xmm0, xmm0 -;; 0f8a2c000000 jp 0x74 -;; 48: 41bb000000cf mov r11d, 0xcf000000 +;; 0f812d000000 jno 0x74 +;; 47: 0f2ec0 ucomiss xmm0, xmm0 +;; 0f8a2c000000 jp 0x7c +;; 50: 41bb000000cf mov r11d, 0xcf000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ec7 ucomiss xmm0, xmm15 -;; 0f8219000000 jb 0x76 -;; 5d: 66450f57ff xorpd xmm15, xmm15 +;; 0f8219000000 jb 0x7e +;; 65: 66450f57ff xorpd xmm15, xmm15 ;; 440f2ef8 ucomiss xmm15, xmm0 -;; 0f820c000000 jb 0x78 -;; 6c: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x80 +;; 74: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 72: 0f0b ud2 -;; 74: 0f0b ud2 -;; 76: 0f0b ud2 -;; 78: 0f0b ud2 +;; 7a: 0f0b ud2 +;; 7c: 0f0b ud2 +;; 7e: 0f0b ud2 +;; 80: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f32_s/params.wat b/winch/filetests/filetests/x64/i32_trunc_f32_s/params.wat index 433a314f28ed..16f1303cb7db 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f32_s/params.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f32_s/params.wat @@ -8,31 +8,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8754000000 ja 0x6f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f875a000000 ja 0x78 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f30f2cc0 cvttss2si eax, xmm0 ;; 83f801 cmp eax, 1 -;; 0f812d000000 jno 0x69 -;; 3c: 0f2ec0 ucomiss xmm0, xmm0 -;; 0f8a2c000000 jp 0x71 -;; 45: 41bb000000cf mov r11d, 0xcf000000 +;; 0f812d000000 jno 0x72 +;; 45: 0f2ec0 ucomiss xmm0, xmm0 +;; 0f8a2c000000 jp 0x7a +;; 4e: 41bb000000cf mov r11d, 0xcf000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ec7 ucomiss xmm0, xmm15 -;; 0f8219000000 jb 0x73 -;; 5a: 66450f57ff xorpd xmm15, xmm15 +;; 0f8219000000 jb 0x7c +;; 63: 66450f57ff xorpd xmm15, xmm15 ;; 440f2ef8 ucomiss xmm15, xmm0 -;; 0f820c000000 jb 0x75 -;; 69: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x7e +;; 72: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 6f: 0f0b ud2 -;; 71: 0f0b ud2 -;; 73: 0f0b ud2 -;; 75: 0f0b ud2 +;; 78: 0f0b ud2 +;; 7a: 0f0b ud2 +;; 7c: 0f0b ud2 +;; 7e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f32_u/const.wat b/winch/filetests/filetests/x64/i32_trunc_f32_u/const.wat index b3090c03703d..6442a22b575c 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f32_u/const.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f32_u/const.wat @@ -8,35 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f875b000000 ja 0x76 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8760000000 ja 0x7e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100d55000000 movss xmm1, dword ptr [rip + 0x55] ;; 41bb0000004f mov r11d, 0x4f000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ecf ucomiss xmm1, xmm15 -;; 0f8315000000 jae 0x55 -;; 0f8a32000000 jp 0x78 -;; 46: f30f2cc1 cvttss2si eax, xmm1 +;; 0f8315000000 jae 0x5d +;; 0f8a32000000 jp 0x80 +;; 4e: f30f2cc1 cvttss2si eax, xmm1 ;; 83f800 cmp eax, 0 -;; 0f8d1d000000 jge 0x70 -;; 53: 0f0b ud2 +;; 0f8d1d000000 jge 0x78 +;; 5b: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f3410f5cc7 subss xmm0, xmm15 ;; f30f2cc0 cvttss2si eax, xmm0 ;; 83f800 cmp eax, 0 -;; 0f8c10000000 jl 0x7a -;; 6a: 81c000000080 add eax, 0x80000000 -;; 4883c408 add rsp, 8 +;; 0f8c10000000 jl 0x82 +;; 72: 81c000000080 add eax, 0x80000000 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 76: 0f0b ud2 -;; 78: 0f0b ud2 -;; 7a: 0f0b ud2 -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al -;; 80: 0000 add byte ptr [rax], al +;; 7e: 0f0b ud2 +;; 80: 0f0b ud2 +;; 82: 0f0b ud2 +;; 84: 0000 add byte ptr [rax], al +;; 86: 0000 add byte ptr [rax], al +;; 88: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i32_trunc_f32_u/locals.wat b/winch/filetests/filetests/x64/i32_trunc_f32_u/locals.wat index 60ed0e5865b0..8400e14dcf84 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f32_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f32_u/locals.wat @@ -10,34 +10,35 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8762000000 ja 0x7d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8767000000 ja 0x85 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 41bb0000004f mov r11d, 0x4f000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ecf ucomiss xmm1, xmm15 -;; 0f8315000000 jae 0x5c -;; 0f8a32000000 jp 0x7f -;; 4d: f30f2cc1 cvttss2si eax, xmm1 +;; 0f8315000000 jae 0x64 +;; 0f8a32000000 jp 0x87 +;; 55: f30f2cc1 cvttss2si eax, xmm1 ;; 83f800 cmp eax, 0 -;; 0f8d1d000000 jge 0x77 -;; 5a: 0f0b ud2 +;; 0f8d1d000000 jge 0x7f +;; 62: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f3410f5cc7 subss xmm0, xmm15 ;; f30f2cc0 cvttss2si eax, xmm0 ;; 83f800 cmp eax, 0 -;; 0f8c10000000 jl 0x81 -;; 71: 81c000000080 add eax, 0x80000000 -;; 4883c410 add rsp, 0x10 +;; 0f8c10000000 jl 0x89 +;; 79: 81c000000080 add eax, 0x80000000 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 7d: 0f0b ud2 -;; 7f: 0f0b ud2 -;; 81: 0f0b ud2 +;; 85: 0f0b ud2 +;; 87: 0f0b ud2 +;; 89: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f32_u/params.wat b/winch/filetests/filetests/x64/i32_trunc_f32_u/params.wat index 271ad2782f2b..6f8ab8d5ffc0 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f32_u/params.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f32_u/params.wat @@ -8,33 +8,35 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f875f000000 ja 0x7a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8765000000 ja 0x83 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 41bb0000004f mov r11d, 0x4f000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ecf ucomiss xmm1, xmm15 -;; 0f8315000000 jae 0x59 -;; 0f8a32000000 jp 0x7c -;; 4a: f30f2cc1 cvttss2si eax, xmm1 +;; 0f8315000000 jae 0x62 +;; 0f8a32000000 jp 0x85 +;; 53: f30f2cc1 cvttss2si eax, xmm1 ;; 83f800 cmp eax, 0 -;; 0f8d1d000000 jge 0x74 -;; 57: 0f0b ud2 +;; 0f8d1d000000 jge 0x7d +;; 60: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f3410f5cc7 subss xmm0, xmm15 ;; f30f2cc0 cvttss2si eax, xmm0 ;; 83f800 cmp eax, 0 -;; 0f8c10000000 jl 0x7e -;; 6e: 81c000000080 add eax, 0x80000000 -;; 4883c410 add rsp, 0x10 +;; 0f8c10000000 jl 0x87 +;; 77: 81c000000080 add eax, 0x80000000 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 7a: 0f0b ud2 -;; 7c: 0f0b ud2 -;; 7e: 0f0b ud2 +;; 83: 0f0b ud2 +;; 85: 0f0b ud2 +;; 87: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f64_s/const.wat b/winch/filetests/filetests/x64/i32_trunc_f64_s/const.wat index 53634a58beb5..0d0c5ed56e82 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f64_s/const.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f64_s/const.wat @@ -8,37 +8,39 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8757000000 ja 0x72 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875c000000 ja 0x7a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100555000000 movsd xmm0, qword ptr [rip + 0x55] ;; f20f2cc0 cvttsd2si eax, xmm0 ;; 83f801 cmp eax, 1 -;; 0f8134000000 jno 0x6c -;; 38: 660f2ec0 ucomisd xmm0, xmm0 -;; 0f8a32000000 jp 0x74 -;; 42: 49bb000020000000e0c1 +;; 0f8134000000 jno 0x74 +;; 40: 660f2ec0 ucomisd xmm0, xmm0 +;; 0f8a32000000 jp 0x7c +;; 4a: 49bb000020000000e0c1 ;; movabs r11, 0xc1e0000000200000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ec7 ucomisd xmm0, xmm15 -;; 0f861a000000 jbe 0x76 -;; 5c: 66450f57ff xorpd xmm15, xmm15 +;; 0f861a000000 jbe 0x7e +;; 64: 66450f57ff xorpd xmm15, xmm15 ;; 66440f2ef8 ucomisd xmm15, xmm0 -;; 0f820c000000 jb 0x78 -;; 6c: 4883c408 add rsp, 8 +;; 0f820c000000 jb 0x80 +;; 74: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 72: 0f0b ud2 -;; 74: 0f0b ud2 -;; 76: 0f0b ud2 -;; 78: 0f0b ud2 -;; 7a: 0000 add byte ptr [rax], al -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al -;; 80: 0000 add byte ptr [rax], al +;; 7a: 0f0b ud2 +;; 7c: 0f0b ud2 +;; 7e: 0f0b ud2 +;; 80: 0f0b ud2 ;; 82: 0000 add byte ptr [rax], al ;; 84: 0000 add byte ptr [rax], al +;; 86: 0000 add byte ptr [rax], al +;; 88: 0000 add byte ptr [rax], al +;; 8a: 0000 add byte ptr [rax], al +;; 8c: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i32_trunc_f64_s/locals.wat b/winch/filetests/filetests/x64/i32_trunc_f64_s/locals.wat index b116a2dc3ee8..77602f09e889 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f64_s/locals.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f64_s/locals.wat @@ -10,33 +10,34 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f875e000000 ja 0x79 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8762000000 ja 0x80 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f20f2cc0 cvttsd2si eax, xmm0 ;; 83f801 cmp eax, 1 -;; 0f8134000000 jno 0x73 -;; 3f: 660f2ec0 ucomisd xmm0, xmm0 -;; 0f8a32000000 jp 0x7b -;; 49: 49bb000020000000e0c1 +;; 0f8134000000 jno 0x7a +;; 46: 660f2ec0 ucomisd xmm0, xmm0 +;; 0f8a32000000 jp 0x82 +;; 50: 49bb000020000000e0c1 ;; movabs r11, 0xc1e0000000200000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ec7 ucomisd xmm0, xmm15 -;; 0f861a000000 jbe 0x7d -;; 63: 66450f57ff xorpd xmm15, xmm15 +;; 0f861a000000 jbe 0x84 +;; 6a: 66450f57ff xorpd xmm15, xmm15 ;; 66440f2ef8 ucomisd xmm15, xmm0 -;; 0f820c000000 jb 0x7f -;; 73: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x86 +;; 7a: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 79: 0f0b ud2 -;; 7b: 0f0b ud2 -;; 7d: 0f0b ud2 -;; 7f: 0f0b ud2 +;; 80: 0f0b ud2 +;; 82: 0f0b ud2 +;; 84: 0f0b ud2 +;; 86: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f64_s/params.wat b/winch/filetests/filetests/x64/i32_trunc_f64_s/params.wat index 0e1de02cb84b..1583624c0b00 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f64_s/params.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f64_s/params.wat @@ -8,32 +8,34 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f875b000000 ja 0x76 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f875f000000 ja 0x7d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f20f2cc0 cvttsd2si eax, xmm0 ;; 83f801 cmp eax, 1 -;; 0f8134000000 jno 0x70 -;; 3c: 660f2ec0 ucomisd xmm0, xmm0 -;; 0f8a32000000 jp 0x78 -;; 46: 49bb000020000000e0c1 +;; 0f8134000000 jno 0x77 +;; 43: 660f2ec0 ucomisd xmm0, xmm0 +;; 0f8a32000000 jp 0x7f +;; 4d: 49bb000020000000e0c1 ;; movabs r11, 0xc1e0000000200000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ec7 ucomisd xmm0, xmm15 -;; 0f861a000000 jbe 0x7a -;; 60: 66450f57ff xorpd xmm15, xmm15 +;; 0f861a000000 jbe 0x81 +;; 67: 66450f57ff xorpd xmm15, xmm15 ;; 66440f2ef8 ucomisd xmm15, xmm0 -;; 0f820c000000 jb 0x7c -;; 70: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x83 +;; 77: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 76: 0f0b ud2 -;; 78: 0f0b ud2 -;; 7a: 0f0b ud2 -;; 7c: 0f0b ud2 +;; 7d: 0f0b ud2 +;; 7f: 0f0b ud2 +;; 81: 0f0b ud2 +;; 83: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f64_u/const.wat b/winch/filetests/filetests/x64/i32_trunc_f64_u/const.wat index b3471d721f0a..7a5a5ab77ca6 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f64_u/const.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f64_u/const.wat @@ -8,40 +8,42 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8760000000 ja 0x7b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8765000000 ja 0x83 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100d5d000000 movsd xmm1, qword ptr [rip + 0x5d] ;; 49bb000000000000e041 ;; movabs r11, 0x41e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ecf ucomisd xmm1, xmm15 -;; 0f8315000000 jae 0x5a -;; 0f8a32000000 jp 0x7d -;; 4b: f20f2cc1 cvttsd2si eax, xmm1 +;; 0f8315000000 jae 0x62 +;; 0f8a32000000 jp 0x85 +;; 53: f20f2cc1 cvttsd2si eax, xmm1 ;; 83f800 cmp eax, 0 -;; 0f8d1d000000 jge 0x75 -;; 58: 0f0b ud2 +;; 0f8d1d000000 jge 0x7d +;; 60: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f2410f5cc7 subsd xmm0, xmm15 ;; f20f2cc0 cvttsd2si eax, xmm0 ;; 83f800 cmp eax, 0 -;; 0f8c10000000 jl 0x7f -;; 6f: 81c000000080 add eax, 0x80000000 -;; 4883c408 add rsp, 8 +;; 0f8c10000000 jl 0x87 +;; 77: 81c000000080 add eax, 0x80000000 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 7b: 0f0b ud2 -;; 7d: 0f0b ud2 -;; 7f: 0f0b ud2 -;; 81: 0000 add byte ptr [rax], al -;; 83: 0000 add byte ptr [rax], al -;; 85: 0000 add byte ptr [rax], al -;; 87: 0000 add byte ptr [rax], al +;; 83: 0f0b ud2 +;; 85: 0f0b ud2 +;; 87: 0f0b ud2 ;; 89: 0000 add byte ptr [rax], al ;; 8b: 0000 add byte ptr [rax], al -;; 8d: 00f0 add al, dh +;; 8d: 0000 add byte ptr [rax], al +;; 8f: 0000 add byte ptr [rax], al +;; 91: 0000 add byte ptr [rax], al +;; 93: 0000 add byte ptr [rax], al +;; 95: 00f0 add al, dh diff --git a/winch/filetests/filetests/x64/i32_trunc_f64_u/locals.wat b/winch/filetests/filetests/x64/i32_trunc_f64_u/locals.wat index 6f3949a7c595..9e3b760200fe 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f64_u/locals.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f64_u/locals.wat @@ -10,35 +10,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8767000000 ja 0x82 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] +;; 0f876b000000 ja 0x89 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f20f100c24 movsd xmm1, qword ptr [rsp] ;; 49bb000000000000e041 ;; movabs r11, 0x41e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ecf ucomisd xmm1, xmm15 -;; 0f8315000000 jae 0x61 -;; 0f8a32000000 jp 0x84 -;; 52: f20f2cc1 cvttsd2si eax, xmm1 +;; 0f8315000000 jae 0x68 +;; 0f8a32000000 jp 0x8b +;; 59: f20f2cc1 cvttsd2si eax, xmm1 ;; 83f800 cmp eax, 0 -;; 0f8d1d000000 jge 0x7c -;; 5f: 0f0b ud2 +;; 0f8d1d000000 jge 0x83 +;; 66: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f2410f5cc7 subsd xmm0, xmm15 ;; f20f2cc0 cvttsd2si eax, xmm0 ;; 83f800 cmp eax, 0 -;; 0f8c10000000 jl 0x86 -;; 76: 81c000000080 add eax, 0x80000000 -;; 4883c410 add rsp, 0x10 +;; 0f8c10000000 jl 0x8d +;; 7d: 81c000000080 add eax, 0x80000000 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 82: 0f0b ud2 -;; 84: 0f0b ud2 -;; 86: 0f0b ud2 +;; 89: 0f0b ud2 +;; 8b: 0f0b ud2 +;; 8d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_trunc_f64_u/params.wat b/winch/filetests/filetests/x64/i32_trunc_f64_u/params.wat index 6c43d0913e26..a4749e5c0df2 100644 --- a/winch/filetests/filetests/x64/i32_trunc_f64_u/params.wat +++ b/winch/filetests/filetests/x64/i32_trunc_f64_u/params.wat @@ -8,34 +8,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8764000000 ja 0x7f -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] +;; 0f8768000000 ja 0x86 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100c24 movsd xmm1, qword ptr [rsp] ;; 49bb000000000000e041 ;; movabs r11, 0x41e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ecf ucomisd xmm1, xmm15 -;; 0f8315000000 jae 0x5e -;; 0f8a32000000 jp 0x81 -;; 4f: f20f2cc1 cvttsd2si eax, xmm1 +;; 0f8315000000 jae 0x65 +;; 0f8a32000000 jp 0x88 +;; 56: f20f2cc1 cvttsd2si eax, xmm1 ;; 83f800 cmp eax, 0 -;; 0f8d1d000000 jge 0x79 -;; 5c: 0f0b ud2 +;; 0f8d1d000000 jge 0x80 +;; 63: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f2410f5cc7 subsd xmm0, xmm15 ;; f20f2cc0 cvttsd2si eax, xmm0 ;; 83f800 cmp eax, 0 -;; 0f8c10000000 jl 0x83 -;; 73: 81c000000080 add eax, 0x80000000 -;; 4883c410 add rsp, 0x10 +;; 0f8c10000000 jl 0x8a +;; 7a: 81c000000080 add eax, 0x80000000 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 7f: 0f0b ud2 -;; 81: 0f0b ud2 -;; 83: 0f0b ud2 +;; 86: 0f0b ud2 +;; 88: 0f0b ud2 +;; 8a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_wrap_i64/const.wat b/winch/filetests/filetests/x64/i32_wrap_i64/const.wat index 2cb7b245a29e..36dcfd340d4e 100644 --- a/winch/filetests/filetests/x64/i32_wrap_i64/const.wat +++ b/winch/filetests/filetests/x64/i32_wrap_i64/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 89c0 mov eax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_wrap_i64/locals.wat b/winch/filetests/filetests/x64/i32_wrap_i64/locals.wat index 47a0f971e324..204f6a53b007 100644 --- a/winch/filetests/filetests/x64/i32_wrap_i64/locals.wat +++ b/winch/filetests/filetests/x64/i32_wrap_i64/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8722000000 ja 0x40 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; 89c0 mov eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 40: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_wrap_i64/params.wat b/winch/filetests/filetests/x64/i32_wrap_i64/params.wat index 3c72d32822aa..bf0b120d6c29 100644 --- a/winch/filetests/filetests/x64/i32_wrap_i64/params.wat +++ b/winch/filetests/filetests/x64/i32_wrap_i64/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 89c0 mov eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_wrap_i64/spilled.wat b/winch/filetests/filetests/x64/i32_wrap_i64/spilled.wat index 4bf668620ceb..68e92c88c159 100644 --- a/winch/filetests/filetests/x64/i32_wrap_i64/spilled.wat +++ b/winch/filetests/filetests/x64/i32_wrap_i64/spilled.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 89c0 mov eax, eax ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax ;; 8b0424 mov eax, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_xor/const.wat b/winch/filetests/filetests/x64/i32_xor/const.wat index 26ae9a79b357..6bd8baac9d80 100644 --- a/winch/filetests/filetests/x64/i32_xor/const.wat +++ b/winch/filetests/filetests/x64/i32_xor/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 83f002 xor eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_xor/locals.wat b/winch/filetests/filetests/x64/i32_xor/locals.wat index 9fefdc44eee9..fe9b5d314390 100644 --- a/winch/filetests/filetests/x64/i32_xor/locals.wat +++ b/winch/filetests/filetests/x64/i32_xor/locals.wat @@ -18,24 +18,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8735000000 ja 0x50 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax +;; 89442404 mov dword ptr [rsp + 4], eax ;; b802000000 mov eax, 2 -;; 89442408 mov dword ptr [rsp + 8], eax -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 890424 mov dword ptr [rsp], eax +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 31c1 xor ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 50: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i32_xor/params.wat b/winch/filetests/filetests/x64/i32_xor/params.wat index 416e014b8475..0fb346bca748 100644 --- a/winch/filetests/filetests/x64/i32_xor/params.wat +++ b/winch/filetests/filetests/x64/i32_xor/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b0424 mov eax, dword ptr [rsp] +;; 8b4c2404 mov ecx, dword ptr [rsp + 4] ;; 31c1 xor ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/const.wat b/winch/filetests/filetests/x64/i64_add/const.wat index 0f7130733fb5..68ac3c2dad79 100644 --- a/winch/filetests/filetests/x64/i64_add/const.wat +++ b/winch/filetests/filetests/x64/i64_add/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c00a000000 mov rax, 0xa ;; 4883c014 add rax, 0x14 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/locals.wat b/winch/filetests/filetests/x64/i64_add/locals.wat index 2cb2a2055b8f..609ddf039460 100644 --- a/winch/filetests/filetests/x64/i64_add/locals.wat +++ b/winch/filetests/filetests/x64/i64_add/locals.wat @@ -18,25 +18,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8746000000 ja 0x64 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c00a000000 mov rax, 0xa -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c014000000 mov rax, 0x14 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c014000000 mov rax, 0x14 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4801c1 add rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 64: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/max.wat b/winch/filetests/filetests/x64/i64_add/max.wat index 8c5c1f26e58d..734d76492cc4 100644 --- a/winch/filetests/filetests/x64/i64_add/max.wat +++ b/winch/filetests/filetests/x64/i64_add/max.wat @@ -8,18 +8,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 49bbffffffffffffff7f ;; movabs r11, 0x7fffffffffffffff ;; 4c01d8 add rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/max_one.wat b/winch/filetests/filetests/x64/i64_add/max_one.wat index 68347aa69b4d..060199fdca44 100644 --- a/winch/filetests/filetests/x64/i64_add/max_one.wat +++ b/winch/filetests/filetests/x64/i64_add/max_one.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b80000000000000080 ;; movabs rax, 0x8000000000000000 ;; 4883c0ff add rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/mixed.wat b/winch/filetests/filetests/x64/i64_add/mixed.wat index 73290b90f58f..5da6d66985a5 100644 --- a/winch/filetests/filetests/x64/i64_add/mixed.wat +++ b/winch/filetests/filetests/x64/i64_add/mixed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 4883c001 add rax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/params.wat b/winch/filetests/filetests/x64/i64_add/params.wat index b79885259751..82d6a61b4b24 100644 --- a/winch/filetests/filetests/x64/i64_add/params.wat +++ b/winch/filetests/filetests/x64/i64_add/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4801c1 add rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/signed.wat b/winch/filetests/filetests/x64/i64_add/signed.wat index 3e8b360d5a1c..7245104278a8 100644 --- a/winch/filetests/filetests/x64/i64_add/signed.wat +++ b/winch/filetests/filetests/x64/i64_add/signed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 4883c0ff add rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_add/unsigned_with_zero.wat b/winch/filetests/filetests/x64/i64_add/unsigned_with_zero.wat index 77c4a01fcb52..a71da39b8c0c 100644 --- a/winch/filetests/filetests/x64/i64_add/unsigned_with_zero.wat +++ b/winch/filetests/filetests/x64/i64_add/unsigned_with_zero.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 4883c000 add rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_and/32_const.wat b/winch/filetests/filetests/x64/i64_and/32_const.wat index b175c509d587..f1f983d93c47 100644 --- a/winch/filetests/filetests/x64/i64_and/32_const.wat +++ b/winch/filetests/filetests/x64/i64_and/32_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883e003 and rax, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_and/64_const.wat b/winch/filetests/filetests/x64/i64_and/64_const.wat index d85c4ce8d60c..b7c8a9fd99b1 100644 --- a/winch/filetests/filetests/x64/i64_and/64_const.wat +++ b/winch/filetests/filetests/x64/i64_and/64_const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f ;; movabs r11, 0x7fffffffffffffff ;; 4c21d8 and rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_and/locals.wat b/winch/filetests/filetests/x64/i64_and/locals.wat index 62dbe9e7ccd3..8ff362eb919d 100644 --- a/winch/filetests/filetests/x64/i64_and/locals.wat +++ b/winch/filetests/filetests/x64/i64_and/locals.wat @@ -17,25 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8746000000 ja 0x64 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4821c1 and rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 64: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_and/params.wat b/winch/filetests/filetests/x64/i64_and/params.wat index 054ad7bce207..0c24984f595e 100644 --- a/winch/filetests/filetests/x64/i64_and/params.wat +++ b/winch/filetests/filetests/x64/i64_and/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4821c1 and rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_clz/lzcnt_const.wat b/winch/filetests/filetests/x64/i64_clz/lzcnt_const.wat index 0fd5234c47e5..cad47dacece6 100644 --- a/winch/filetests/filetests/x64/i64_clz/lzcnt_const.wat +++ b/winch/filetests/filetests/x64/i64_clz/lzcnt_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; f3480fbdc0 lzcnt rax, rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_clz/lzcnt_local.wat b/winch/filetests/filetests/x64/i64_clz/lzcnt_local.wat index fa598666eecf..643bd9684070 100644 --- a/winch/filetests/filetests/x64/i64_clz/lzcnt_local.wat +++ b/winch/filetests/filetests/x64/i64_clz/lzcnt_local.wat @@ -14,20 +14,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; 48c7c002000000 mov rax, 2 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480fbdc0 lzcnt rax, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_clz/lzcnt_param.wat b/winch/filetests/filetests/x64/i64_clz/lzcnt_param.wat index 699a7fccdf48..08c1c81d5487 100644 --- a/winch/filetests/filetests/x64/i64_clz/lzcnt_param.wat +++ b/winch/filetests/filetests/x64/i64_clz/lzcnt_param.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480fbdc0 lzcnt rax, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_clz/no_lzcnt_const.wat b/winch/filetests/filetests/x64/i64_clz/no_lzcnt_const.wat index f40f3ed5df78..ff2f54658cd5 100644 --- a/winch/filetests/filetests/x64/i64_clz/no_lzcnt_const.wat +++ b/winch/filetests/filetests/x64/i64_clz/no_lzcnt_const.wat @@ -8,13 +8,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8732000000 ja 0x50 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 480fbdc0 bsr rax, rax ;; 41bb00000000 mov r11d, 0 @@ -22,7 +24,7 @@ ;; 48f7d8 neg rax ;; 4883c040 add rax, 0x40 ;; 4c29d8 sub rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_clz/no_lzcnt_local.wat b/winch/filetests/filetests/x64/i64_clz/no_lzcnt_local.wat index 0193d5ed9036..e4fd3da76b41 100644 --- a/winch/filetests/filetests/x64/i64_clz/no_lzcnt_local.wat +++ b/winch/filetests/filetests/x64/i64_clz/no_lzcnt_local.wat @@ -13,25 +13,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; 48c7c002000000 mov rax, 2 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbdc0 bsr rax, rax ;; 41bb00000000 mov r11d, 0 ;; 410f95c3 setne r11b ;; 48f7d8 neg rax ;; 4883c040 add rax, 0x40 ;; 4c29d8 sub rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_clz/no_lzcnt_param.wat b/winch/filetests/filetests/x64/i64_clz/no_lzcnt_param.wat index 8680444f3b60..f203217188e5 100644 --- a/winch/filetests/filetests/x64/i64_clz/no_lzcnt_param.wat +++ b/winch/filetests/filetests/x64/i64_clz/no_lzcnt_param.wat @@ -8,22 +8,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbdc0 bsr rax, rax ;; 41bb00000000 mov r11d, 0 ;; 410f95c3 setne r11b ;; 48f7d8 neg rax ;; 4883c040 add rax, 0x40 ;; 4c29d8 sub rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ctz/bmi1_const.wat b/winch/filetests/filetests/x64/i64_ctz/bmi1_const.wat index 98b52d163e63..0bdfe88e401c 100644 --- a/winch/filetests/filetests/x64/i64_ctz/bmi1_const.wat +++ b/winch/filetests/filetests/x64/i64_ctz/bmi1_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; f3480fbcc0 tzcnt rax, rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ctz/bmi1_local.wat b/winch/filetests/filetests/x64/i64_ctz/bmi1_local.wat index ec0e0aa2edae..6c001c969075 100644 --- a/winch/filetests/filetests/x64/i64_ctz/bmi1_local.wat +++ b/winch/filetests/filetests/x64/i64_ctz/bmi1_local.wat @@ -14,20 +14,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; 48c7c002000000 mov rax, 2 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480fbcc0 tzcnt rax, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ctz/bmi1_param.wat b/winch/filetests/filetests/x64/i64_ctz/bmi1_param.wat index 695b9d691035..896576d91c87 100644 --- a/winch/filetests/filetests/x64/i64_ctz/bmi1_param.wat +++ b/winch/filetests/filetests/x64/i64_ctz/bmi1_param.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480fbcc0 tzcnt rax, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ctz/no_bmi1_const.wat b/winch/filetests/filetests/x64/i64_ctz/no_bmi1_const.wat index f9275b2f9861..b640ba160aba 100644 --- a/winch/filetests/filetests/x64/i64_ctz/no_bmi1_const.wat +++ b/winch/filetests/filetests/x64/i64_ctz/no_bmi1_const.wat @@ -8,20 +8,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 480fbcc0 bsf rax, rax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 49c1e306 shl r11, 6 ;; 4c01d8 add rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ctz/no_bmi1_local.wat b/winch/filetests/filetests/x64/i64_ctz/no_bmi1_local.wat index 101cc64b62ff..16abf3d8a864 100644 --- a/winch/filetests/filetests/x64/i64_ctz/no_bmi1_local.wat +++ b/winch/filetests/filetests/x64/i64_ctz/no_bmi1_local.wat @@ -13,24 +13,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f873d000000 ja 0x58 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8740000000 ja 0x5e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; 48c7c002000000 mov rax, 2 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbcc0 bsf rax, rax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 49c1e306 shl r11, 6 ;; 4c01d8 add rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 58: 0f0b ud2 +;; 5e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ctz/no_bmi1_param.wat b/winch/filetests/filetests/x64/i64_ctz/no_bmi1_param.wat index 7da16f7f214a..0f98a5ea6d5f 100644 --- a/winch/filetests/filetests/x64/i64_ctz/no_bmi1_param.wat +++ b/winch/filetests/filetests/x64/i64_ctz/no_bmi1_param.wat @@ -8,21 +8,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbcc0 bsf rax, rax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 49c1e306 shl r11, 6 ;; 4c01d8 add rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divs/const.wat b/winch/filetests/filetests/x64/i64_divs/const.wat index d13ecc022155..6af52a24198a 100644 --- a/winch/filetests/filetests/x64/i64_divs/const.wat +++ b/winch/filetests/filetests/x64/i64_divs/const.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c10a000000 mov rcx, 0xa ;; 48c7c014000000 mov rax, 0x14 ;; 4883f900 cmp rcx, 0 -;; 0f840d000000 je 0x48 -;; 3b: 4899 cqo +;; 0f840d000000 je 0x50 +;; 43: 4899 cqo ;; 48f7f9 idiv rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 -;; 48: 0f0b ud2 +;; 4e: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divs/one_zero.wat b/winch/filetests/filetests/x64/i64_divs/one_zero.wat index 2146eab0b3a7..9e1e16ff932b 100644 --- a/winch/filetests/filetests/x64/i64_divs/one_zero.wat +++ b/winch/filetests/filetests/x64/i64_divs/one_zero.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c001000000 mov rax, 1 ;; 4883f900 cmp rcx, 0 -;; 0f840d000000 je 0x48 -;; 3b: 4899 cqo +;; 0f840d000000 je 0x50 +;; 43: 4899 cqo ;; 48f7f9 idiv rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 -;; 48: 0f0b ud2 +;; 4e: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divs/overflow.wat b/winch/filetests/filetests/x64/i64_divs/overflow.wat index ca9af1ce908b..2fcf322da7a0 100644 --- a/winch/filetests/filetests/x64/i64_divs/overflow.wat +++ b/winch/filetests/filetests/x64/i64_divs/overflow.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c1ffffffff mov rcx, 0xffffffffffffffff ;; 48b80000000000000080 ;; movabs rax, 0x8000000000000000 ;; 4883f900 cmp rcx, 0 -;; 0f840d000000 je 0x4b -;; 3e: 4899 cqo +;; 0f840d000000 je 0x53 +;; 46: 4899 cqo ;; 48f7f9 idiv rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 -;; 4b: 0f0b ud2 +;; 51: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divs/params.wat b/winch/filetests/filetests/x64/i64_divs/params.wat index 18bf46f94af9..e5c236d4d2db 100644 --- a/winch/filetests/filetests/x64/i64_divs/params.wat +++ b/winch/filetests/filetests/x64/i64_divs/params.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8731000000 ja 0x4c -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 4883f900 cmp rcx, 0 -;; 0f840d000000 je 0x4e -;; 41: 4899 cqo +;; 0f840d000000 je 0x55 +;; 48: 4899 cqo ;; 48f7f9 idiv rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4c: 0f0b ud2 -;; 4e: 0f0b ud2 +;; 53: 0f0b ud2 +;; 55: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divs/zero_zero.wat b/winch/filetests/filetests/x64/i64_divs/zero_zero.wat index e47dc27744da..ca70d692feb3 100644 --- a/winch/filetests/filetests/x64/i64_divs/zero_zero.wat +++ b/winch/filetests/filetests/x64/i64_divs/zero_zero.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c000000000 mov rax, 0 ;; 4883f900 cmp rcx, 0 -;; 0f840d000000 je 0x48 -;; 3b: 4899 cqo +;; 0f840d000000 je 0x50 +;; 43: 4899 cqo ;; 48f7f9 idiv rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 -;; 48: 0f0b ud2 +;; 4e: 0f0b ud2 +;; 50: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divu/const.wat b/winch/filetests/filetests/x64/i64_divu/const.wat index 40e718a672c0..ba3552468cf8 100644 --- a/winch/filetests/filetests/x64/i64_divu/const.wat +++ b/winch/filetests/filetests/x64/i64_divu/const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c10a000000 mov rcx, 0xa ;; 48c7c014000000 mov rax, 0x14 ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divu/one_zero.wat b/winch/filetests/filetests/x64/i64_divu/one_zero.wat index 7acafa98cf9b..c256e99c25ec 100644 --- a/winch/filetests/filetests/x64/i64_divu/one_zero.wat +++ b/winch/filetests/filetests/x64/i64_divu/one_zero.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c001000000 mov rax, 1 ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divu/params.wat b/winch/filetests/filetests/x64/i64_divu/params.wat index e0828297c09d..e671b413d671 100644 --- a/winch/filetests/filetests/x64/i64_divu/params.wat +++ b/winch/filetests/filetests/x64/i64_divu/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divu/signed.wat b/winch/filetests/filetests/x64/i64_divu/signed.wat index 8fe4b044fbe6..cde737d8d2dc 100644 --- a/winch/filetests/filetests/x64/i64_divu/signed.wat +++ b/winch/filetests/filetests/x64/i64_divu/signed.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c1ffffffff mov rcx, 0xffffffffffffffff ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_divu/zero_zero.wat b/winch/filetests/filetests/x64/i64_divu/zero_zero.wat index 90a4612ae84d..f1825e9f97a1 100644 --- a/winch/filetests/filetests/x64/i64_divu/zero_zero.wat +++ b/winch/filetests/filetests/x64/i64_divu/zero_zero.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c000000000 mov rax, 0 ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eq/32_const.wat b/winch/filetests/filetests/x64/i64_eq/32_const.wat index e1e9e73d31f7..621a54e41b32 100644 --- a/winch/filetests/filetests/x64/i64_eq/32_const.wat +++ b/winch/filetests/filetests/x64/i64_eq/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eq/64_const.wat b/winch/filetests/filetests/x64/i64_eq/64_const.wat index dc73320cde72..c23f947a96ba 100644 --- a/winch/filetests/filetests/x64/i64_eq/64_const.wat +++ b/winch/filetests/filetests/x64/i64_eq/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eq/locals.wat b/winch/filetests/filetests/x64/i64_eq/locals.wat index 2ac61c9518d4..a7fa8f966d25 100644 --- a/winch/filetests/filetests/x64/i64_eq/locals.wat +++ b/winch/filetests/filetests/x64/i64_eq/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f94c1 sete cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eq/params.wat b/winch/filetests/filetests/x64/i64_eq/params.wat index d65e236639db..ab7d4cf188c0 100644 --- a/winch/filetests/filetests/x64/i64_eq/params.wat +++ b/winch/filetests/filetests/x64/i64_eq/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f94c1 sete cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eqz/32_const.wat b/winch/filetests/filetests/x64/i64_eqz/32_const.wat index e5c1d8bf3157..d13aa4509701 100644 --- a/winch/filetests/filetests/x64/i64_eqz/32_const.wat +++ b/winch/filetests/filetests/x64/i64_eqz/32_const.wat @@ -8,18 +8,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 4883f800 cmp rax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eqz/64_const.wat b/winch/filetests/filetests/x64/i64_eqz/64_const.wat index fdaa92f4a130..386fc63f9ad8 100644 --- a/winch/filetests/filetests/x64/i64_eqz/64_const.wat +++ b/winch/filetests/filetests/x64/i64_eqz/64_const.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8ffffffffffffff7f ;; movabs rax, 0x7fffffffffffffff ;; 4883f800 cmp rax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eqz/local.wat b/winch/filetests/filetests/x64/i64_eqz/local.wat index 5606f4e67ccb..c8aee2ea597a 100644 --- a/winch/filetests/filetests/x64/i64_eqz/local.wat +++ b/winch/filetests/filetests/x64/i64_eqz/local.wat @@ -13,22 +13,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8735000000 ja 0x50 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; 48c7c002000000 mov rax, 2 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] ;; 4883f800 cmp rax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 50: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eqz/param.wat b/winch/filetests/filetests/x64/i64_eqz/param.wat index 29af6cbf8b70..d7ef4ffab084 100644 --- a/winch/filetests/filetests/x64/i64_eqz/param.wat +++ b/winch/filetests/filetests/x64/i64_eqz/param.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 4883f800 cmp rax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_eqz/spilled.wat b/winch/filetests/filetests/x64/i64_eqz/spilled.wat index 14317afc9ab1..b70c3579abe5 100644 --- a/winch/filetests/filetests/x64/i64_eqz/spilled.wat +++ b/winch/filetests/filetests/x64/i64_eqz/spilled.wat @@ -10,13 +10,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c30c000000 add r11, 0xc +;; 4981c314000000 add r11, 0x14 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 4883f800 cmp rax, 0 ;; b800000000 mov eax, 0 @@ -25,7 +27,7 @@ ;; 890424 mov dword ptr [rsp], eax ;; 8b0424 mov eax, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_16_s/const.wat b/winch/filetests/filetests/x64/i64_extend_16_s/const.wat index fba9f41fbc4a..9a3757668c21 100644 --- a/winch/filetests/filetests/x64/i64_extend_16_s/const.wat +++ b/winch/filetests/filetests/x64/i64_extend_16_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 480fbfc0 movsx rax, ax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_16_s/locals.wat b/winch/filetests/filetests/x64/i64_extend_16_s/locals.wat index 6f8aa4f162ff..370422bb3b22 100644 --- a/winch/filetests/filetests/x64/i64_extend_16_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_extend_16_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbfc0 movsx rax, ax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_16_s/params.wat b/winch/filetests/filetests/x64/i64_extend_16_s/params.wat index a577c963e32a..3b9efd004df1 100644 --- a/winch/filetests/filetests/x64/i64_extend_16_s/params.wat +++ b/winch/filetests/filetests/x64/i64_extend_16_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbfc0 movsx rax, ax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_32_s/const.wat b/winch/filetests/filetests/x64/i64_extend_32_s/const.wat index 7e22097b3f5c..67fc498df5e5 100644 --- a/winch/filetests/filetests/x64/i64_extend_32_s/const.wat +++ b/winch/filetests/filetests/x64/i64_extend_32_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8718000000 ja 0x33 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871d000000 ja 0x3b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 4863c0 movsxd rax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 33: 0f0b ud2 +;; 3b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_32_s/locals.wat b/winch/filetests/filetests/x64/i64_extend_32_s/locals.wat index 7c626e0c6ed3..830d4699ba5a 100644 --- a/winch/filetests/filetests/x64/i64_extend_32_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_extend_32_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; 4863c0 movsxd rax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_32_s/params.wat b/winch/filetests/filetests/x64/i64_extend_32_s/params.wat index dce71ab9ad25..dd6a180fee72 100644 --- a/winch/filetests/filetests/x64/i64_extend_32_s/params.wat +++ b/winch/filetests/filetests/x64/i64_extend_32_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871b000000 ja 0x36 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 4863c0 movsxd rax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 36: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_8_s/const.wat b/winch/filetests/filetests/x64/i64_extend_8_s/const.wat index 5a99d7225a17..fcaeafb19165 100644 --- a/winch/filetests/filetests/x64/i64_extend_8_s/const.wat +++ b/winch/filetests/filetests/x64/i64_extend_8_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 480fbec0 movsx rax, al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_8_s/locals.wat b/winch/filetests/filetests/x64/i64_extend_8_s/locals.wat index c41685f717bd..817696049ffd 100644 --- a/winch/filetests/filetests/x64/i64_extend_8_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_extend_8_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8724000000 ja 0x42 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbec0 movsx rax, al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 42: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_8_s/params.wat b/winch/filetests/filetests/x64/i64_extend_8_s/params.wat index b5a80bf5befa..45f9a3135fe8 100644 --- a/winch/filetests/filetests/x64/i64_extend_8_s/params.wat +++ b/winch/filetests/filetests/x64/i64_extend_8_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; 480fbec0 movsx rax, al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_s/const.wat b/winch/filetests/filetests/x64/i64_extend_i32_s/const.wat index 140a7dccbdb3..c8c59abfe0d7 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_s/const.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_s/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871b000000 ja 0x39 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 4863c0 movsxd rax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 39: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_s/locals.wat b/winch/filetests/filetests/x64/i64_extend_i32_s/locals.wat index 730087760362..33559e971f44 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_s/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 4863c0 movsxd rax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_s/params.wat b/winch/filetests/filetests/x64/i64_extend_i32_s/params.wat index 4fe657829a3f..b1cad3ff1c8f 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_s/params.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_s/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 4863c0 movsxd rax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_s/spilled.wat b/winch/filetests/filetests/x64/i64_extend_i32_s/spilled.wat index 6726d3b35581..c776156c1607 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_s/spilled.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_s/spilled.wat @@ -10,18 +10,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8718000000 ja 0x33 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871d000000 ja 0x3b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 4863c0 movsxd rax, eax ;; 50 push rax ;; 58 pop rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 33: 0f0b ud2 +;; 3b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_u/const.wat b/winch/filetests/filetests/x64/i64_extend_i32_u/const.wat index a4096d618794..0c73fe7799ed 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_u/const.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_u/const.wat @@ -8,16 +8,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8715000000 ja 0x30 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871a000000 ja 0x38 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 8bc0 mov eax, eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 30: 0f0b ud2 +;; 38: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_u/locals.wat b/winch/filetests/filetests/x64/i64_extend_i32_u/locals.wat index a2a07d58aa2c..7e02ab3ddf6f 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_u/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8722000000 ja 0x40 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 8bc0 mov eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 40: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_u/params.wat b/winch/filetests/filetests/x64/i64_extend_i32_u/params.wat index fa9f1d7b13e4..e7438cfbe980 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_u/params.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_u/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8718000000 ja 0x33 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 8bc0 mov eax, eax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 33: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_extend_i32_u/spilled.wat b/winch/filetests/filetests/x64/i64_extend_i32_u/spilled.wat index 92bb499a72c5..8f36c002e7ec 100644 --- a/winch/filetests/filetests/x64/i64_extend_i32_u/spilled.wat +++ b/winch/filetests/filetests/x64/i64_extend_i32_u/spilled.wat @@ -10,18 +10,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8717000000 ja 0x32 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 8bc0 mov eax, eax ;; 50 push rax ;; 58 pop rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 32: 0f0b ud2 +;; 3a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_s/32_const.wat b/winch/filetests/filetests/x64/i64_ge_s/32_const.wat index 691a3c5180ff..6eb9abc949ea 100644 --- a/winch/filetests/filetests/x64/i64_ge_s/32_const.wat +++ b/winch/filetests/filetests/x64/i64_ge_s/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f9dc0 setge al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_s/64_const.wat b/winch/filetests/filetests/x64/i64_ge_s/64_const.wat index 571c75e395d0..95a544164357 100644 --- a/winch/filetests/filetests/x64/i64_ge_s/64_const.wat +++ b/winch/filetests/filetests/x64/i64_ge_s/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f9dc0 setge al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_s/locals.wat b/winch/filetests/filetests/x64/i64_ge_s/locals.wat index 2913ac180144..cb51f4d125ca 100644 --- a/winch/filetests/filetests/x64/i64_ge_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_ge_s/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9dc1 setge cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_s/params.wat b/winch/filetests/filetests/x64/i64_ge_s/params.wat index 54ca42ad62e0..9ffd53533953 100644 --- a/winch/filetests/filetests/x64/i64_ge_s/params.wat +++ b/winch/filetests/filetests/x64/i64_ge_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9dc1 setge cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_u/32_const.wat b/winch/filetests/filetests/x64/i64_ge_u/32_const.wat index 22d09688303a..63e0a703949c 100644 --- a/winch/filetests/filetests/x64/i64_ge_u/32_const.wat +++ b/winch/filetests/filetests/x64/i64_ge_u/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_u/64_const.wat b/winch/filetests/filetests/x64/i64_ge_u/64_const.wat index e398dcf4feb8..3fced83e3a20 100644 --- a/winch/filetests/filetests/x64/i64_ge_u/64_const.wat +++ b/winch/filetests/filetests/x64/i64_ge_u/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f93c0 setae al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_u/locals.wat b/winch/filetests/filetests/x64/i64_ge_u/locals.wat index 8a370aaae772..50a6ba193513 100644 --- a/winch/filetests/filetests/x64/i64_ge_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_ge_u/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f93c1 setae cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ge_u/params.wat b/winch/filetests/filetests/x64/i64_ge_u/params.wat index 51b006e3963d..51fa7d5fb767 100644 --- a/winch/filetests/filetests/x64/i64_ge_u/params.wat +++ b/winch/filetests/filetests/x64/i64_ge_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f93c1 setae cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_s/32_const.wat b/winch/filetests/filetests/x64/i64_gt_s/32_const.wat index ae8ff12593e7..6cec4f1af3a7 100644 --- a/winch/filetests/filetests/x64/i64_gt_s/32_const.wat +++ b/winch/filetests/filetests/x64/i64_gt_s/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f9fc0 setg al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_s/64_const.wat b/winch/filetests/filetests/x64/i64_gt_s/64_const.wat index d9b21a5b8919..a21a5fea8db1 100644 --- a/winch/filetests/filetests/x64/i64_gt_s/64_const.wat +++ b/winch/filetests/filetests/x64/i64_gt_s/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f9fc0 setg al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_s/locals.wat b/winch/filetests/filetests/x64/i64_gt_s/locals.wat index f6e7e56d52ae..aea4cde6b10a 100644 --- a/winch/filetests/filetests/x64/i64_gt_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_gt_s/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9fc1 setg cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_s/params.wat b/winch/filetests/filetests/x64/i64_gt_s/params.wat index bbb9b4dca261..6abab98b73a1 100644 --- a/winch/filetests/filetests/x64/i64_gt_s/params.wat +++ b/winch/filetests/filetests/x64/i64_gt_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9fc1 setg cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_u/32_const.wat b/winch/filetests/filetests/x64/i64_gt_u/32_const.wat index 7951b7ee0500..f73d14b8e8d8 100644 --- a/winch/filetests/filetests/x64/i64_gt_u/32_const.wat +++ b/winch/filetests/filetests/x64/i64_gt_u/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_u/64_const.wat b/winch/filetests/filetests/x64/i64_gt_u/64_const.wat index 692ce48e03c7..f4a8215f1dab 100644 --- a/winch/filetests/filetests/x64/i64_gt_u/64_const.wat +++ b/winch/filetests/filetests/x64/i64_gt_u/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f97c0 seta al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_u/locals.wat b/winch/filetests/filetests/x64/i64_gt_u/locals.wat index 1294de0c1e21..0bffcf71e725 100644 --- a/winch/filetests/filetests/x64/i64_gt_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_gt_u/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f97c1 seta cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_gt_u/params.wat b/winch/filetests/filetests/x64/i64_gt_u/params.wat index 77b7fc45f0c7..c28c991642f5 100644 --- a/winch/filetests/filetests/x64/i64_gt_u/params.wat +++ b/winch/filetests/filetests/x64/i64_gt_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f97c1 seta cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_s/32_const.wat b/winch/filetests/filetests/x64/i64_le_s/32_const.wat index 5f294c96640e..14cc15dcd36f 100644 --- a/winch/filetests/filetests/x64/i64_le_s/32_const.wat +++ b/winch/filetests/filetests/x64/i64_le_s/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f9ec0 setle al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_s/64_const.wat b/winch/filetests/filetests/x64/i64_le_s/64_const.wat index 4b8d462fb79a..8579c2b11300 100644 --- a/winch/filetests/filetests/x64/i64_le_s/64_const.wat +++ b/winch/filetests/filetests/x64/i64_le_s/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f9ec0 setle al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_s/locals.wat b/winch/filetests/filetests/x64/i64_le_s/locals.wat index 6f748ebda9d3..5e191d48b610 100644 --- a/winch/filetests/filetests/x64/i64_le_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_le_s/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9ec1 setle cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_s/params.wat b/winch/filetests/filetests/x64/i64_le_s/params.wat index 84011d5ec00e..390432f3ef63 100644 --- a/winch/filetests/filetests/x64/i64_le_s/params.wat +++ b/winch/filetests/filetests/x64/i64_le_s/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9ec1 setle cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_u/32_const.wat b/winch/filetests/filetests/x64/i64_le_u/32_const.wat index 9d50c560f608..5e434e9f3b9d 100644 --- a/winch/filetests/filetests/x64/i64_le_u/32_const.wat +++ b/winch/filetests/filetests/x64/i64_le_u/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f96c0 setbe al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_u/64_const.wat b/winch/filetests/filetests/x64/i64_le_u/64_const.wat index 9431c03a4ec5..dcdb478605a7 100644 --- a/winch/filetests/filetests/x64/i64_le_u/64_const.wat +++ b/winch/filetests/filetests/x64/i64_le_u/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f96c0 setbe al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_u/locals.wat b/winch/filetests/filetests/x64/i64_le_u/locals.wat index 5f2d5feb3929..9e4041bbfb91 100644 --- a/winch/filetests/filetests/x64/i64_le_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_le_u/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f96c1 setbe cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_le_u/params.wat b/winch/filetests/filetests/x64/i64_le_u/params.wat index 4996ab16724b..c3bfde13fc4a 100644 --- a/winch/filetests/filetests/x64/i64_le_u/params.wat +++ b/winch/filetests/filetests/x64/i64_le_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f96c1 setbe cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_s/32_const.wat b/winch/filetests/filetests/x64/i64_lt_s/32_const.wat index 1261f214f81a..96a14059eb79 100644 --- a/winch/filetests/filetests/x64/i64_lt_s/32_const.wat +++ b/winch/filetests/filetests/x64/i64_lt_s/32_const.wat @@ -10,18 +10,20 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f9cc0 setl al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_s/64_const.wat b/winch/filetests/filetests/x64/i64_lt_s/64_const.wat index fd72e6286623..6771e8b39f9d 100644 --- a/winch/filetests/filetests/x64/i64_lt_s/64_const.wat +++ b/winch/filetests/filetests/x64/i64_lt_s/64_const.wat @@ -10,13 +10,15 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -24,7 +26,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f9cc0 setl al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_s/locals.wat b/winch/filetests/filetests/x64/i64_lt_s/locals.wat index c28478793aa2..137359358089 100644 --- a/winch/filetests/filetests/x64/i64_lt_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_lt_s/locals.wat @@ -18,27 +18,29 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9cc1 setl cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_s/params.wat b/winch/filetests/filetests/x64/i64_lt_s/params.wat index d9d7b23d4aa0..5d66c5771574 100644 --- a/winch/filetests/filetests/x64/i64_lt_s/params.wat +++ b/winch/filetests/filetests/x64/i64_lt_s/params.wat @@ -10,22 +10,24 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f9cc1 setl cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_u/32_const.wat b/winch/filetests/filetests/x64/i64_lt_u/32_const.wat index 4f8a24ab22d1..6988c4275036 100644 --- a/winch/filetests/filetests/x64/i64_lt_u/32_const.wat +++ b/winch/filetests/filetests/x64/i64_lt_u/32_const.wat @@ -9,18 +9,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f92c0 setb al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_u/64_const.wat b/winch/filetests/filetests/x64/i64_lt_u/64_const.wat index 4ae4d1bfdfb6..2ff02dde5ed0 100644 --- a/winch/filetests/filetests/x64/i64_lt_u/64_const.wat +++ b/winch/filetests/filetests/x64/i64_lt_u/64_const.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -23,7 +25,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f92c0 setb al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_u/locals.wat b/winch/filetests/filetests/x64/i64_lt_u/locals.wat index 6cc1cf6f0fe0..1544eeb98a3c 100644 --- a/winch/filetests/filetests/x64/i64_lt_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_lt_u/locals.wat @@ -17,27 +17,29 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f92c1 setb cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_lt_u/params.wat b/winch/filetests/filetests/x64/i64_lt_u/params.wat index 58b7054ab578..0969a42383bf 100644 --- a/winch/filetests/filetests/x64/i64_lt_u/params.wat +++ b/winch/filetests/filetests/x64/i64_lt_u/params.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f92c1 setb cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/const.wat b/winch/filetests/filetests/x64/i64_mul/const.wat index 03131cb013c6..39e63f2e75fe 100644 --- a/winch/filetests/filetests/x64/i64_mul/const.wat +++ b/winch/filetests/filetests/x64/i64_mul/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c00a000000 mov rax, 0xa ;; 486bc014 imul rax, rax, 0x14 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/locals.wat b/winch/filetests/filetests/x64/i64_mul/locals.wat index 4147234217f3..d636014a5176 100644 --- a/winch/filetests/filetests/x64/i64_mul/locals.wat +++ b/winch/filetests/filetests/x64/i64_mul/locals.wat @@ -18,25 +18,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8744000000 ja 0x5f -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8747000000 ja 0x65 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c00a000000 mov rax, 0xa -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c014000000 mov rax, 0x14 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c014000000 mov rax, 0x14 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 480fafc8 imul rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5f: 0f0b ud2 +;; 65: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/max.wat b/winch/filetests/filetests/x64/i64_mul/max.wat index 4c59e850d943..a7740d1591e0 100644 --- a/winch/filetests/filetests/x64/i64_mul/max.wat +++ b/winch/filetests/filetests/x64/i64_mul/max.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8ffffffffffffff7f ;; movabs rax, 0x7fffffffffffffff ;; 486bc0ff imul rax, rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/max_one.wat b/winch/filetests/filetests/x64/i64_mul/max_one.wat index b7e3ebf0565f..8a5824ba1ab1 100644 --- a/winch/filetests/filetests/x64/i64_mul/max_one.wat +++ b/winch/filetests/filetests/x64/i64_mul/max_one.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b80000000000000080 ;; movabs rax, 0x8000000000000000 ;; 486bc0ff imul rax, rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/mixed.wat b/winch/filetests/filetests/x64/i64_mul/mixed.wat index 13aa2094212e..f7fbba53aa50 100644 --- a/winch/filetests/filetests/x64/i64_mul/mixed.wat +++ b/winch/filetests/filetests/x64/i64_mul/mixed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 486bc001 imul rax, rax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/params.wat b/winch/filetests/filetests/x64/i64_mul/params.wat index 334109019fc4..4287eca5baf1 100644 --- a/winch/filetests/filetests/x64/i64_mul/params.wat +++ b/winch/filetests/filetests/x64/i64_mul/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8729000000 ja 0x44 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f872d000000 ja 0x4b +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 480fafc8 imul rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 44: 0f0b ud2 +;; 4b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/signed.wat b/winch/filetests/filetests/x64/i64_mul/signed.wat index ba35d328c88b..984948524c8a 100644 --- a/winch/filetests/filetests/x64/i64_mul/signed.wat +++ b/winch/filetests/filetests/x64/i64_mul/signed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 486bc0ff imul rax, rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_mul/unsigned_with_zero.wat b/winch/filetests/filetests/x64/i64_mul/unsigned_with_zero.wat index 271d181b095f..0af0445d030c 100644 --- a/winch/filetests/filetests/x64/i64_mul/unsigned_with_zero.wat +++ b/winch/filetests/filetests/x64/i64_mul/unsigned_with_zero.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 486bc000 imul rax, rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ne/32_const.wat b/winch/filetests/filetests/x64/i64_ne/32_const.wat index 63390824057c..269559cff8d7 100644 --- a/winch/filetests/filetests/x64/i64_ne/32_const.wat +++ b/winch/filetests/filetests/x64/i64_ne/32_const.wat @@ -10,18 +10,20 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8727000000 ja 0x45 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f803 cmp rax, 3 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 45: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ne/64_const.wat b/winch/filetests/filetests/x64/i64_ne/64_const.wat index a4fe9fdc8e35..4a38c711e2b4 100644 --- a/winch/filetests/filetests/x64/i64_ne/64_const.wat +++ b/winch/filetests/filetests/x64/i64_ne/64_const.wat @@ -10,13 +10,15 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f @@ -24,7 +26,7 @@ ;; 4c39d8 cmp rax, r11 ;; b800000000 mov eax, 0 ;; 400f95c0 setne al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ne/locals.wat b/winch/filetests/filetests/x64/i64_ne/locals.wat index 8e791acf5871..a012f025b678 100644 --- a/winch/filetests/filetests/x64/i64_ne/locals.wat +++ b/winch/filetests/filetests/x64/i64_ne/locals.wat @@ -18,27 +18,29 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874b000000 ja 0x66 -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f874e000000 ja 0x6c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f95c1 setne cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 66: 0f0b ud2 +;; 6c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_ne/params.wat b/winch/filetests/filetests/x64/i64_ne/params.wat index d4d149f8d365..4726daa95dd6 100644 --- a/winch/filetests/filetests/x64/i64_ne/params.wat +++ b/winch/filetests/filetests/x64/i64_ne/params.wat @@ -10,22 +10,24 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f95c1 setne cl ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_or/32_const.wat b/winch/filetests/filetests/x64/i64_or/32_const.wat index 89f920ac826f..bc9e7a345a36 100644 --- a/winch/filetests/filetests/x64/i64_or/32_const.wat +++ b/winch/filetests/filetests/x64/i64_or/32_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883c803 or rax, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_or/64_const.wat b/winch/filetests/filetests/x64/i64_or/64_const.wat index ad19629a40ca..f37c85df907e 100644 --- a/winch/filetests/filetests/x64/i64_or/64_const.wat +++ b/winch/filetests/filetests/x64/i64_or/64_const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f ;; movabs r11, 0x7fffffffffffffff ;; 4c09d8 or rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_or/locals.wat b/winch/filetests/filetests/x64/i64_or/locals.wat index 1baf1b0fd2c0..400fc48f71f9 100644 --- a/winch/filetests/filetests/x64/i64_or/locals.wat +++ b/winch/filetests/filetests/x64/i64_or/locals.wat @@ -17,25 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8746000000 ja 0x64 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4809c1 or rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 64: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_or/params.wat b/winch/filetests/filetests/x64/i64_or/params.wat index 56ac4b7c5bf8..53d43b59ff36 100644 --- a/winch/filetests/filetests/x64/i64_or/params.wat +++ b/winch/filetests/filetests/x64/i64_or/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4809c1 or rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_popcnt/const.wat b/winch/filetests/filetests/x64/i64_popcnt/const.wat index b26a2c946965..92858db364aa 100644 --- a/winch/filetests/filetests/x64/i64_popcnt/const.wat +++ b/winch/filetests/filetests/x64/i64_popcnt/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871f000000 ja 0x3d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c003000000 mov rax, 3 ;; f3480fb8c0 popcnt rax, rax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_popcnt/fallback.wat b/winch/filetests/filetests/x64/i64_popcnt/fallback.wat index de49bbd9d819..c5651cd9d8c8 100644 --- a/winch/filetests/filetests/x64/i64_popcnt/fallback.wat +++ b/winch/filetests/filetests/x64/i64_popcnt/fallback.wat @@ -8,13 +8,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f876f000000 ja 0x8a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8774000000 ja 0x92 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c00f000000 mov rax, 0xf ;; 4889c1 mov rcx, rax ;; 48c1e801 shr rax, 1 @@ -39,7 +41,7 @@ ;; movabs r11, 0x101010101010101 ;; 490fafc3 imul rax, r11 ;; 48c1e838 shr rax, 0x38 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 8a: 0f0b ud2 +;; 92: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_popcnt/no_sse42.wat b/winch/filetests/filetests/x64/i64_popcnt/no_sse42.wat index 9c0ddb16adf7..f2f721b28058 100644 --- a/winch/filetests/filetests/x64/i64_popcnt/no_sse42.wat +++ b/winch/filetests/filetests/x64/i64_popcnt/no_sse42.wat @@ -9,13 +9,15 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f876f000000 ja 0x8a -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8774000000 ja 0x92 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c003000000 mov rax, 3 ;; 4889c1 mov rcx, rax ;; 48c1e801 shr rax, 1 @@ -40,7 +42,7 @@ ;; movabs r11, 0x101010101010101 ;; 490fafc3 imul rax, r11 ;; 48c1e838 shr rax, 0x38 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 8a: 0f0b ud2 +;; 92: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_popcnt/reg.wat b/winch/filetests/filetests/x64/i64_popcnt/reg.wat index 0e00ef4b5164..bfa0d8674d31 100644 --- a/winch/filetests/filetests/x64/i64_popcnt/reg.wat +++ b/winch/filetests/filetests/x64/i64_popcnt/reg.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; f3480fb8c0 popcnt rax, rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_reinterpret_f64/const.wat b/winch/filetests/filetests/x64/i64_reinterpret_f64/const.wat index c24f9f8d4510..01d03caf2737 100644 --- a/winch/filetests/filetests/x64/i64_reinterpret_f64/const.wat +++ b/winch/filetests/filetests/x64/i64_reinterpret_f64/const.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871b000000 ja 0x36 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10050d000000 movsd xmm0, qword ptr [rip + 0xd] ;; 66480f7ec0 movq rax, xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 36: 0f0b ud2 -;; 38: 0000 add byte ptr [rax], al -;; 3a: 0000 add byte ptr [rax], al -;; 3c: 0000 add byte ptr [rax], al +;; 3e: 0f0b ud2 +;; 40: 0000 add byte ptr [rax], al +;; 42: 0000 add byte ptr [rax], al +;; 44: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i64_reinterpret_f64/locals.wat b/winch/filetests/filetests/x64/i64_reinterpret_f64/locals.wat index fffa5850c44e..5a3da90fe3d9 100644 --- a/winch/filetests/filetests/x64/i64_reinterpret_f64/locals.wat +++ b/winch/filetests/filetests/x64/i64_reinterpret_f64/locals.wat @@ -10,18 +10,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8722000000 ja 0x3d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 66480f7ec0 movq rax, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3d: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_reinterpret_f64/params.wat b/winch/filetests/filetests/x64/i64_reinterpret_f64/params.wat index cbbaa9f90d5f..bbca9f14ac23 100644 --- a/winch/filetests/filetests/x64/i64_reinterpret_f64/params.wat +++ b/winch/filetests/filetests/x64/i64_reinterpret_f64/params.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; 66480f7ec0 movq rax, xmm0 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_reinterpret_f64/ret_float.wat b/winch/filetests/filetests/x64/i64_reinterpret_f64/ret_float.wat index e73c0a18ecd8..4450827bd97d 100644 --- a/winch/filetests/filetests/x64/i64_reinterpret_f64/ret_float.wat +++ b/winch/filetests/filetests/x64/i64_reinterpret_f64/ret_float.wat @@ -10,20 +10,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8723000000 ja 0x3e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100515000000 movsd xmm0, qword ptr [rip + 0x15] ;; 66480f7ec0 movq rax, xmm0 ;; f20f100508000000 movsd xmm0, qword ptr [rip + 8] -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3e: 0f0b ud2 -;; 40: 0000 add byte ptr [rax], al -;; 42: 0000 add byte ptr [rax], al -;; 44: 0000 add byte ptr [rax], al +;; 46: 0f0b ud2 +;; 48: 0000 add byte ptr [rax], al +;; 4a: 0000 add byte ptr [rax], al +;; 4c: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i64_rems/const.wat b/winch/filetests/filetests/x64/i64_rems/const.wat index 9cfa373d0820..06fbf8e315af 100644 --- a/winch/filetests/filetests/x64/i64_rems/const.wat +++ b/winch/filetests/filetests/x64/i64_rems/const.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c105000000 mov rcx, 5 ;; 48c7c007000000 mov rax, 7 ;; 4899 cqo ;; 4883f9ff cmp rcx, -1 -;; 0f850a000000 jne 0x47 -;; 3d: ba00000000 mov edx, 0 -;; e903000000 jmp 0x4a -;; 47: 48f7f9 idiv rcx +;; 0f850a000000 jne 0x4f +;; 45: ba00000000 mov edx, 0 +;; e903000000 jmp 0x52 +;; 4f: 48f7f9 idiv rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 +;; 5b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rems/one_zero.wat b/winch/filetests/filetests/x64/i64_rems/one_zero.wat index 5f6d422e2d33..4c10ddf8b086 100644 --- a/winch/filetests/filetests/x64/i64_rems/one_zero.wat +++ b/winch/filetests/filetests/x64/i64_rems/one_zero.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c001000000 mov rax, 1 ;; 4899 cqo ;; 4883f9ff cmp rcx, -1 -;; 0f850a000000 jne 0x47 -;; 3d: ba00000000 mov edx, 0 -;; e903000000 jmp 0x4a -;; 47: 48f7f9 idiv rcx +;; 0f850a000000 jne 0x4f +;; 45: ba00000000 mov edx, 0 +;; e903000000 jmp 0x52 +;; 4f: 48f7f9 idiv rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 +;; 5b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rems/overflow.wat b/winch/filetests/filetests/x64/i64_rems/overflow.wat index 363c23f8ced0..5e3d414ba179 100644 --- a/winch/filetests/filetests/x64/i64_rems/overflow.wat +++ b/winch/filetests/filetests/x64/i64_rems/overflow.wat @@ -9,24 +9,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f873b000000 ja 0x56 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8740000000 ja 0x5e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c1ffffffff mov rcx, 0xffffffffffffffff ;; 48b80000000000000080 ;; movabs rax, 0x8000000000000000 ;; 4899 cqo ;; 4883f9ff cmp rcx, -1 -;; 0f850a000000 jne 0x4a -;; 40: ba00000000 mov edx, 0 -;; e903000000 jmp 0x4d -;; 4a: 48f7f9 idiv rcx +;; 0f850a000000 jne 0x52 +;; 48: ba00000000 mov edx, 0 +;; e903000000 jmp 0x55 +;; 52: 48f7f9 idiv rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 56: 0f0b ud2 +;; 5e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rems/params.wat b/winch/filetests/filetests/x64/i64_rems/params.wat index 2cce59332ed7..85e1fe1ea2ff 100644 --- a/winch/filetests/filetests/x64/i64_rems/params.wat +++ b/winch/filetests/filetests/x64/i64_rems/params.wat @@ -9,25 +9,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f873e000000 ja 0x59 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8742000000 ja 0x60 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 4899 cqo ;; 4883f9ff cmp rcx, -1 -;; 0f850a000000 jne 0x4d -;; 43: ba00000000 mov edx, 0 -;; e903000000 jmp 0x50 -;; 4d: 48f7f9 idiv rcx +;; 0f850a000000 jne 0x54 +;; 4a: ba00000000 mov edx, 0 +;; e903000000 jmp 0x57 +;; 54: 48f7f9 idiv rcx ;; 4889d0 mov rax, rdx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 59: 0f0b ud2 +;; 60: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rems/zero_zero.wat b/winch/filetests/filetests/x64/i64_rems/zero_zero.wat index d464c5aa03b6..b7e3747248a1 100644 --- a/winch/filetests/filetests/x64/i64_rems/zero_zero.wat +++ b/winch/filetests/filetests/x64/i64_rems/zero_zero.wat @@ -9,23 +9,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8738000000 ja 0x53 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f873d000000 ja 0x5b +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c000000000 mov rax, 0 ;; 4899 cqo ;; 4883f9ff cmp rcx, -1 -;; 0f850a000000 jne 0x47 -;; 3d: ba00000000 mov edx, 0 -;; e903000000 jmp 0x4a -;; 47: 48f7f9 idiv rcx +;; 0f850a000000 jne 0x4f +;; 45: ba00000000 mov edx, 0 +;; e903000000 jmp 0x52 +;; 4f: 48f7f9 idiv rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 53: 0f0b ud2 +;; 5b: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_remu/const.wat b/winch/filetests/filetests/x64/i64_remu/const.wat index 3f9fd329cc01..e2af07e00fe2 100644 --- a/winch/filetests/filetests/x64/i64_remu/const.wat +++ b/winch/filetests/filetests/x64/i64_remu/const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c105000000 mov rcx, 5 ;; 48c7c007000000 mov rax, 7 ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_remu/one_zero.wat b/winch/filetests/filetests/x64/i64_remu/one_zero.wat index 45aa1d5e4790..b2db122bbcfa 100644 --- a/winch/filetests/filetests/x64/i64_remu/one_zero.wat +++ b/winch/filetests/filetests/x64/i64_remu/one_zero.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c001000000 mov rax, 1 ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_remu/params.wat b/winch/filetests/filetests/x64/i64_remu/params.wat index 3605f1e9fc25..a4d80e3be2a3 100644 --- a/winch/filetests/filetests/x64/i64_remu/params.wat +++ b/winch/filetests/filetests/x64/i64_remu/params.wat @@ -9,21 +9,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872b000000 ja 0x46 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx ;; 4889d0 mov rax, rdx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 46: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_remu/signed.wat b/winch/filetests/filetests/x64/i64_remu/signed.wat index 38569a84b08a..95ff003b04d1 100644 --- a/winch/filetests/filetests/x64/i64_remu/signed.wat +++ b/winch/filetests/filetests/x64/i64_remu/signed.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c1ffffffff mov rcx, 0xffffffffffffffff ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_remu/zero_zero.wat b/winch/filetests/filetests/x64/i64_remu/zero_zero.wat index 7805ebbaeee4..61484cdbe02f 100644 --- a/winch/filetests/filetests/x64/i64_remu/zero_zero.wat +++ b/winch/filetests/filetests/x64/i64_remu/zero_zero.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c100000000 mov rcx, 0 ;; 48c7c000000000 mov rax, 0 ;; 4831d2 xor rdx, rdx ;; 48f7f1 div rcx ;; 4889d0 mov rax, rdx -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotl/16_const.wat b/winch/filetests/filetests/x64/i64_rotl/16_const.wat index 91753dac1597..0653ee430ca2 100644 --- a/winch/filetests/filetests/x64/i64_rotl/16_const.wat +++ b/winch/filetests/filetests/x64/i64_rotl/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1c000 rol rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotl/8_const.wat b/winch/filetests/filetests/x64/i64_rotl/8_const.wat index b775a8cef705..1a646b6f5ed0 100644 --- a/winch/filetests/filetests/x64/i64_rotl/8_const.wat +++ b/winch/filetests/filetests/x64/i64_rotl/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1c002 rol rax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotl/locals.wat b/winch/filetests/filetests/x64/i64_rotl/locals.wat index 89c6f610dec2..54ecec985168 100644 --- a/winch/filetests/filetests/x64/i64_rotl/locals.wat +++ b/winch/filetests/filetests/x64/i64_rotl/locals.wat @@ -18,24 +18,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c001000000 mov rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c002000000 mov rax, 2 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48c7c002000000 mov rax, 2 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3c0 rol rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotl/params.wat b/winch/filetests/filetests/x64/i64_rotl/params.wat index bcee5e42cc46..2c12c73e3d8b 100644 --- a/winch/filetests/filetests/x64/i64_rotl/params.wat +++ b/winch/filetests/filetests/x64/i64_rotl/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3c0 rol rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotr/16_const.wat b/winch/filetests/filetests/x64/i64_rotr/16_const.wat index 55e977b2283b..7514df9616bd 100644 --- a/winch/filetests/filetests/x64/i64_rotr/16_const.wat +++ b/winch/filetests/filetests/x64/i64_rotr/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1c800 ror rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotr/8_const.wat b/winch/filetests/filetests/x64/i64_rotr/8_const.wat index d514b21d2f1f..ec8383745b27 100644 --- a/winch/filetests/filetests/x64/i64_rotr/8_const.wat +++ b/winch/filetests/filetests/x64/i64_rotr/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1c802 ror rax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotr/locals.wat b/winch/filetests/filetests/x64/i64_rotr/locals.wat index ab0ffbb822ca..6b168b0ea9f6 100644 --- a/winch/filetests/filetests/x64/i64_rotr/locals.wat +++ b/winch/filetests/filetests/x64/i64_rotr/locals.wat @@ -18,24 +18,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c001000000 mov rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c002000000 mov rax, 2 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48c7c002000000 mov rax, 2 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3c8 ror rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_rotr/params.wat b/winch/filetests/filetests/x64/i64_rotr/params.wat index 646e2f05e768..a408fa225365 100644 --- a/winch/filetests/filetests/x64/i64_rotr/params.wat +++ b/winch/filetests/filetests/x64/i64_rotr/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3c8 ror rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shl/16_const.wat b/winch/filetests/filetests/x64/i64_shl/16_const.wat index 9e4bdf4d4dca..876852ee3f1e 100644 --- a/winch/filetests/filetests/x64/i64_shl/16_const.wat +++ b/winch/filetests/filetests/x64/i64_shl/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1e000 shl rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shl/8_const.wat b/winch/filetests/filetests/x64/i64_shl/8_const.wat index 512640493b84..2df81351b436 100644 --- a/winch/filetests/filetests/x64/i64_shl/8_const.wat +++ b/winch/filetests/filetests/x64/i64_shl/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1e002 shl rax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shl/locals.wat b/winch/filetests/filetests/x64/i64_shl/locals.wat index 30ea398a01f2..982e56d1abde 100644 --- a/winch/filetests/filetests/x64/i64_shl/locals.wat +++ b/winch/filetests/filetests/x64/i64_shl/locals.wat @@ -18,24 +18,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c001000000 mov rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c002000000 mov rax, 2 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48c7c002000000 mov rax, 2 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3e0 shl rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shl/params.wat b/winch/filetests/filetests/x64/i64_shl/params.wat index 56eed3ba74d6..106c7d807aec 100644 --- a/winch/filetests/filetests/x64/i64_shl/params.wat +++ b/winch/filetests/filetests/x64/i64_shl/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3e0 shl rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_s/16_const.wat b/winch/filetests/filetests/x64/i64_shr_s/16_const.wat index f7bcdd53aa70..63ed7af21e02 100644 --- a/winch/filetests/filetests/x64/i64_shr_s/16_const.wat +++ b/winch/filetests/filetests/x64/i64_shr_s/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1f800 sar rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_s/8_const.wat b/winch/filetests/filetests/x64/i64_shr_s/8_const.wat index 375b6f96ffce..a68d191c8bb0 100644 --- a/winch/filetests/filetests/x64/i64_shr_s/8_const.wat +++ b/winch/filetests/filetests/x64/i64_shr_s/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1f802 sar rax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_s/locals.wat b/winch/filetests/filetests/x64/i64_shr_s/locals.wat index f9156da43da2..8910e3153f3b 100644 --- a/winch/filetests/filetests/x64/i64_shr_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_shr_s/locals.wat @@ -18,24 +18,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c001000000 mov rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c002000000 mov rax, 2 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48c7c002000000 mov rax, 2 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3f8 sar rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_s/params.wat b/winch/filetests/filetests/x64/i64_shr_s/params.wat index 2b430ae33c5e..5efc3e5cc522 100644 --- a/winch/filetests/filetests/x64/i64_shr_s/params.wat +++ b/winch/filetests/filetests/x64/i64_shr_s/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3f8 sar rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_u/16_const.wat b/winch/filetests/filetests/x64/i64_shr_u/16_const.wat index f0795c574091..1557cb42dc4f 100644 --- a/winch/filetests/filetests/x64/i64_shr_u/16_const.wat +++ b/winch/filetests/filetests/x64/i64_shr_u/16_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1e800 shr rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_u/8_const.wat b/winch/filetests/filetests/x64/i64_shr_u/8_const.wat index 0666954a6515..3984e6099572 100644 --- a/winch/filetests/filetests/x64/i64_shr_u/8_const.wat +++ b/winch/filetests/filetests/x64/i64_shr_u/8_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 48c1e802 shr rax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_u/locals.wat b/winch/filetests/filetests/x64/i64_shr_u/locals.wat index 6d4f84cbe513..2528c07373e1 100644 --- a/winch/filetests/filetests/x64/i64_shr_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_shr_u/locals.wat @@ -18,24 +18,26 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8740000000 ja 0x5b -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8743000000 ja 0x61 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c001000000 mov rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c002000000 mov rax, 2 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48c7c002000000 mov rax, 2 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3e8 shr rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5b: 0f0b ud2 +;; 61: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_shr_u/params.wat b/winch/filetests/filetests/x64/i64_shr_u/params.wat index d9ea2110bbe3..28e4201a03a7 100644 --- a/winch/filetests/filetests/x64/i64_shr_u/params.wat +++ b/winch/filetests/filetests/x64/i64_shr_u/params.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0c24 mov rcx, qword ptr [rsp] +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 48d3e8 shr rax, cl -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/const.wat b/winch/filetests/filetests/x64/i64_sub/const.wat index d72768ff7193..47e358f3fe0f 100644 --- a/winch/filetests/filetests/x64/i64_sub/const.wat +++ b/winch/filetests/filetests/x64/i64_sub/const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c00a000000 mov rax, 0xa ;; 4883e814 sub rax, 0x14 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/locals.wat b/winch/filetests/filetests/x64/i64_sub/locals.wat index ec33375e4e2c..6f1a756227ff 100644 --- a/winch/filetests/filetests/x64/i64_sub/locals.wat +++ b/winch/filetests/filetests/x64/i64_sub/locals.wat @@ -18,25 +18,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8746000000 ja 0x64 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c00a000000 mov rax, 0xa -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c014000000 mov rax, 0x14 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c014000000 mov rax, 0x14 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4829c1 sub rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 64: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/max.wat b/winch/filetests/filetests/x64/i64_sub/max.wat index adf9b96a5d40..afb6e05ab014 100644 --- a/winch/filetests/filetests/x64/i64_sub/max.wat +++ b/winch/filetests/filetests/x64/i64_sub/max.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8ffffffffffffff7f ;; movabs rax, 0x7fffffffffffffff ;; 4883e8ff sub rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/max_one.wat b/winch/filetests/filetests/x64/i64_sub/max_one.wat index 91114897e520..7051ca55babf 100644 --- a/winch/filetests/filetests/x64/i64_sub/max_one.wat +++ b/winch/filetests/filetests/x64/i64_sub/max_one.wat @@ -9,17 +9,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b80000000000000080 ;; movabs rax, 0x8000000000000000 ;; 4883e801 sub rax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/mixed.wat b/winch/filetests/filetests/x64/i64_sub/mixed.wat index ca7affc97ad6..4e9a69e7df51 100644 --- a/winch/filetests/filetests/x64/i64_sub/mixed.wat +++ b/winch/filetests/filetests/x64/i64_sub/mixed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 4883e801 sub rax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/params.wat b/winch/filetests/filetests/x64/i64_sub/params.wat index 5618c58163ae..a8863813bc30 100644 --- a/winch/filetests/filetests/x64/i64_sub/params.wat +++ b/winch/filetests/filetests/x64/i64_sub/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4829c1 sub rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/signed.wat b/winch/filetests/filetests/x64/i64_sub/signed.wat index 4e66bf248861..cc6089905de5 100644 --- a/winch/filetests/filetests/x64/i64_sub/signed.wat +++ b/winch/filetests/filetests/x64/i64_sub/signed.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c0ffffffff mov rax, 0xffffffffffffffff ;; 4883e8ff sub rax, -1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_sub/unsigned_with_zero.wat b/winch/filetests/filetests/x64/i64_sub/unsigned_with_zero.wat index 74b2208ab9b3..86a512f87977 100644 --- a/winch/filetests/filetests/x64/i64_sub/unsigned_with_zero.wat +++ b/winch/filetests/filetests/x64/i64_sub/unsigned_with_zero.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c001000000 mov rax, 1 ;; 4883e800 sub rax, 0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f32_s/const.wat b/winch/filetests/filetests/x64/i64_trunc_f32_s/const.wat index 4638134f4a74..a2ec7245cd9a 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f32_s/const.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f32_s/const.wat @@ -8,32 +8,34 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8752000000 ja 0x6d -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8757000000 ja 0x75 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10054d000000 movss xmm0, dword ptr [rip + 0x4d] ;; f3480f2cc0 cvttss2si rax, xmm0 ;; 4883f801 cmp rax, 1 -;; 0f812d000000 jno 0x67 -;; 3a: 0f2ec0 ucomiss xmm0, xmm0 -;; 0f8a2c000000 jp 0x6f -;; 43: 41bb000000df mov r11d, 0xdf000000 +;; 0f812d000000 jno 0x6f +;; 42: 0f2ec0 ucomiss xmm0, xmm0 +;; 0f8a2c000000 jp 0x77 +;; 4b: 41bb000000df mov r11d, 0xdf000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ec7 ucomiss xmm0, xmm15 -;; 0f8219000000 jb 0x71 -;; 58: 66450f57ff xorpd xmm15, xmm15 +;; 0f8219000000 jb 0x79 +;; 60: 66450f57ff xorpd xmm15, xmm15 ;; 440f2ef8 ucomiss xmm15, xmm0 -;; 0f820c000000 jb 0x73 -;; 67: 4883c408 add rsp, 8 +;; 0f820c000000 jb 0x7b +;; 6f: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 6d: 0f0b ud2 -;; 6f: 0f0b ud2 -;; 71: 0f0b ud2 -;; 73: 0f0b ud2 -;; 75: 0000 add byte ptr [rax], al -;; 77: 0000 add byte ptr [rax], al +;; 75: 0f0b ud2 +;; 77: 0f0b ud2 +;; 79: 0f0b ud2 +;; 7b: 0f0b ud2 +;; 7d: 0000 add byte ptr [rax], al +;; 7f: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i64_trunc_f32_s/locals.wat b/winch/filetests/filetests/x64/i64_trunc_f32_s/locals.wat index a4b59fb4aec8..1f78763e5fd7 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f32_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f32_s/locals.wat @@ -10,32 +10,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8759000000 ja 0x74 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f875e000000 ja 0x7c +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f3480f2cc0 cvttss2si rax, xmm0 ;; 4883f801 cmp rax, 1 -;; 0f812d000000 jno 0x6e -;; 41: 0f2ec0 ucomiss xmm0, xmm0 -;; 0f8a2c000000 jp 0x76 -;; 4a: 41bb000000df mov r11d, 0xdf000000 +;; 0f812d000000 jno 0x76 +;; 49: 0f2ec0 ucomiss xmm0, xmm0 +;; 0f8a2c000000 jp 0x7e +;; 52: 41bb000000df mov r11d, 0xdf000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ec7 ucomiss xmm0, xmm15 -;; 0f8219000000 jb 0x78 -;; 5f: 66450f57ff xorpd xmm15, xmm15 +;; 0f8219000000 jb 0x80 +;; 67: 66450f57ff xorpd xmm15, xmm15 ;; 440f2ef8 ucomiss xmm15, xmm0 -;; 0f820c000000 jb 0x7a -;; 6e: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x82 +;; 76: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 74: 0f0b ud2 -;; 76: 0f0b ud2 -;; 78: 0f0b ud2 -;; 7a: 0f0b ud2 +;; 7c: 0f0b ud2 +;; 7e: 0f0b ud2 +;; 80: 0f0b ud2 +;; 82: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f32_s/params.wat b/winch/filetests/filetests/x64/i64_trunc_f32_s/params.wat index 3d8e0ff92769..23b3367f1a6b 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f32_s/params.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f32_s/params.wat @@ -8,31 +8,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8756000000 ja 0x71 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f1044240c movss xmm0, dword ptr [rsp + 0xc] +;; 0f875c000000 ja 0x7a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f10442404 movss xmm0, dword ptr [rsp + 4] ;; f3480f2cc0 cvttss2si rax, xmm0 ;; 4883f801 cmp rax, 1 -;; 0f812d000000 jno 0x6b -;; 3e: 0f2ec0 ucomiss xmm0, xmm0 -;; 0f8a2c000000 jp 0x73 -;; 47: 41bb000000df mov r11d, 0xdf000000 +;; 0f812d000000 jno 0x74 +;; 47: 0f2ec0 ucomiss xmm0, xmm0 +;; 0f8a2c000000 jp 0x7c +;; 50: 41bb000000df mov r11d, 0xdf000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ec7 ucomiss xmm0, xmm15 -;; 0f8219000000 jb 0x75 -;; 5c: 66450f57ff xorpd xmm15, xmm15 +;; 0f8219000000 jb 0x7e +;; 65: 66450f57ff xorpd xmm15, xmm15 ;; 440f2ef8 ucomiss xmm15, xmm0 -;; 0f820c000000 jb 0x77 -;; 6b: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x80 +;; 74: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 71: 0f0b ud2 -;; 73: 0f0b ud2 -;; 75: 0f0b ud2 -;; 77: 0f0b ud2 +;; 7a: 0f0b ud2 +;; 7c: 0f0b ud2 +;; 7e: 0f0b ud2 +;; 80: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f32_u/const.wat b/winch/filetests/filetests/x64/i64_trunc_f32_u/const.wat index d89babb24937..4813404fe85e 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f32_u/const.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f32_u/const.wat @@ -8,35 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8766000000 ja 0x81 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f876b000000 ja 0x89 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f100d5d000000 movss xmm1, dword ptr [rip + 0x5d] ;; 41bb0000005f mov r11d, 0x5f000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ecf ucomiss xmm1, xmm15 -;; 0f8317000000 jae 0x57 -;; 0f8a3d000000 jp 0x83 -;; 46: f3480f2cc1 cvttss2si rax, xmm1 +;; 0f8317000000 jae 0x5f +;; 0f8a3d000000 jp 0x8b +;; 4e: f3480f2cc1 cvttss2si rax, xmm1 ;; 4883f800 cmp rax, 0 -;; 0f8d26000000 jge 0x7b -;; 55: 0f0b ud2 +;; 0f8d26000000 jge 0x83 +;; 5d: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f3410f5cc7 subss xmm0, xmm15 ;; f3480f2cc0 cvttss2si rax, xmm0 ;; 4883f800 cmp rax, 0 -;; 0f8c17000000 jl 0x85 -;; 6e: 49bb0000000000000080 +;; 0f8c17000000 jl 0x8d +;; 76: 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 4c01d8 add rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 81: 0f0b ud2 -;; 83: 0f0b ud2 -;; 85: 0f0b ud2 -;; 87: 0000 add byte ptr [rax], al +;; 89: 0f0b ud2 +;; 8b: 0f0b ud2 +;; 8d: 0f0b ud2 +;; 8f: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i64_trunc_f32_u/locals.wat b/winch/filetests/filetests/x64/i64_trunc_f32_u/locals.wat index 646d27e2cef0..a711c70f2c20 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f32_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f32_u/locals.wat @@ -10,36 +10,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f876d000000 ja 0x88 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8772000000 ja 0x90 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 41bb0000005f mov r11d, 0x5f000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ecf ucomiss xmm1, xmm15 -;; 0f8317000000 jae 0x5e -;; 0f8a3d000000 jp 0x8a -;; 4d: f3480f2cc1 cvttss2si rax, xmm1 +;; 0f8317000000 jae 0x66 +;; 0f8a3d000000 jp 0x92 +;; 55: f3480f2cc1 cvttss2si rax, xmm1 ;; 4883f800 cmp rax, 0 -;; 0f8d26000000 jge 0x82 -;; 5c: 0f0b ud2 +;; 0f8d26000000 jge 0x8a +;; 64: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f3410f5cc7 subss xmm0, xmm15 ;; f3480f2cc0 cvttss2si rax, xmm0 ;; 4883f800 cmp rax, 0 -;; 0f8c17000000 jl 0x8c -;; 75: 49bb0000000000000080 +;; 0f8c17000000 jl 0x94 +;; 7d: 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 4c01d8 add rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 88: 0f0b ud2 -;; 8a: 0f0b ud2 -;; 8c: 0f0b ud2 +;; 90: 0f0b ud2 +;; 92: 0f0b ud2 +;; 94: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f32_u/params.wat b/winch/filetests/filetests/x64/i64_trunc_f32_u/params.wat index 436802276bc9..9417a5a5ca25 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f32_u/params.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f32_u/params.wat @@ -8,35 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f876a000000 ja 0x85 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] +;; 0f8770000000 ja 0x8e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f30f11442404 movss dword ptr [rsp + 4], xmm0 +;; f30f104c2404 movss xmm1, dword ptr [rsp + 4] ;; 41bb0000005f mov r11d, 0x5f000000 ;; 66450f6efb movd xmm15, r11d ;; 410f2ecf ucomiss xmm1, xmm15 -;; 0f8317000000 jae 0x5b -;; 0f8a3d000000 jp 0x87 -;; 4a: f3480f2cc1 cvttss2si rax, xmm1 +;; 0f8317000000 jae 0x64 +;; 0f8a3d000000 jp 0x90 +;; 53: f3480f2cc1 cvttss2si rax, xmm1 ;; 4883f800 cmp rax, 0 -;; 0f8d26000000 jge 0x7f -;; 59: 0f0b ud2 +;; 0f8d26000000 jge 0x88 +;; 62: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f3410f5cc7 subss xmm0, xmm15 ;; f3480f2cc0 cvttss2si rax, xmm0 ;; 4883f800 cmp rax, 0 -;; 0f8c17000000 jl 0x89 -;; 72: 49bb0000000000000080 +;; 0f8c17000000 jl 0x92 +;; 7b: 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 4c01d8 add rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 85: 0f0b ud2 -;; 87: 0f0b ud2 -;; 89: 0f0b ud2 +;; 8e: 0f0b ud2 +;; 90: 0f0b ud2 +;; 92: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f64_s/const.wat b/winch/filetests/filetests/x64/i64_trunc_f64_s/const.wat index 19eabae37bb9..843065ac9527 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f64_s/const.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f64_s/const.wat @@ -8,36 +8,38 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8759000000 ja 0x74 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f875e000000 ja 0x7c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100555000000 movsd xmm0, qword ptr [rip + 0x55] ;; f2480f2cc0 cvttsd2si rax, xmm0 ;; 4883f801 cmp rax, 1 -;; 0f8134000000 jno 0x6e -;; 3a: 660f2ec0 ucomisd xmm0, xmm0 -;; 0f8a32000000 jp 0x76 -;; 44: 49bb000000000000e0c3 +;; 0f8134000000 jno 0x76 +;; 42: 660f2ec0 ucomisd xmm0, xmm0 +;; 0f8a32000000 jp 0x7e +;; 4c: 49bb000000000000e0c3 ;; movabs r11, 0xc3e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ec7 ucomisd xmm0, xmm15 -;; 0f821a000000 jb 0x78 -;; 5e: 66450f57ff xorpd xmm15, xmm15 +;; 0f821a000000 jb 0x80 +;; 66: 66450f57ff xorpd xmm15, xmm15 ;; 66440f2ef8 ucomisd xmm15, xmm0 -;; 0f820c000000 jb 0x7a -;; 6e: 4883c408 add rsp, 8 +;; 0f820c000000 jb 0x82 +;; 76: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 74: 0f0b ud2 -;; 76: 0f0b ud2 -;; 78: 0f0b ud2 -;; 7a: 0f0b ud2 -;; 7c: 0000 add byte ptr [rax], al -;; 7e: 0000 add byte ptr [rax], al -;; 80: 0000 add byte ptr [rax], al -;; 82: 0000 add byte ptr [rax], al +;; 7c: 0f0b ud2 +;; 7e: 0f0b ud2 +;; 80: 0f0b ud2 +;; 82: 0f0b ud2 ;; 84: 0000 add byte ptr [rax], al +;; 86: 0000 add byte ptr [rax], al +;; 88: 0000 add byte ptr [rax], al +;; 8a: 0000 add byte ptr [rax], al +;; 8c: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i64_trunc_f64_s/locals.wat b/winch/filetests/filetests/x64/i64_trunc_f64_s/locals.wat index 61c35b9c8797..9d19dd4799eb 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f64_s/locals.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f64_s/locals.wat @@ -10,33 +10,34 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8760000000 ja 0x7b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8764000000 ja 0x82 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f2480f2cc0 cvttsd2si rax, xmm0 ;; 4883f801 cmp rax, 1 -;; 0f8134000000 jno 0x75 -;; 41: 660f2ec0 ucomisd xmm0, xmm0 -;; 0f8a32000000 jp 0x7d -;; 4b: 49bb000000000000e0c3 +;; 0f8134000000 jno 0x7c +;; 48: 660f2ec0 ucomisd xmm0, xmm0 +;; 0f8a32000000 jp 0x84 +;; 52: 49bb000000000000e0c3 ;; movabs r11, 0xc3e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ec7 ucomisd xmm0, xmm15 -;; 0f821a000000 jb 0x7f -;; 65: 66450f57ff xorpd xmm15, xmm15 +;; 0f821a000000 jb 0x86 +;; 6c: 66450f57ff xorpd xmm15, xmm15 ;; 66440f2ef8 ucomisd xmm15, xmm0 -;; 0f820c000000 jb 0x81 -;; 75: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x88 +;; 7c: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 7b: 0f0b ud2 -;; 7d: 0f0b ud2 -;; 7f: 0f0b ud2 -;; 81: 0f0b ud2 +;; 82: 0f0b ud2 +;; 84: 0f0b ud2 +;; 86: 0f0b ud2 +;; 88: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f64_s/params.wat b/winch/filetests/filetests/x64/i64_trunc_f64_s/params.wat index 90484f77f274..fd1f222be593 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f64_s/params.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f64_s/params.wat @@ -8,32 +8,34 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f875d000000 ja 0x78 -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; 0f8761000000 ja 0x7f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100424 movsd xmm0, qword ptr [rsp] ;; f2480f2cc0 cvttsd2si rax, xmm0 ;; 4883f801 cmp rax, 1 -;; 0f8134000000 jno 0x72 -;; 3e: 660f2ec0 ucomisd xmm0, xmm0 -;; 0f8a32000000 jp 0x7a -;; 48: 49bb000000000000e0c3 +;; 0f8134000000 jno 0x79 +;; 45: 660f2ec0 ucomisd xmm0, xmm0 +;; 0f8a32000000 jp 0x81 +;; 4f: 49bb000000000000e0c3 ;; movabs r11, 0xc3e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ec7 ucomisd xmm0, xmm15 -;; 0f821a000000 jb 0x7c -;; 62: 66450f57ff xorpd xmm15, xmm15 +;; 0f821a000000 jb 0x83 +;; 69: 66450f57ff xorpd xmm15, xmm15 ;; 66440f2ef8 ucomisd xmm15, xmm0 -;; 0f820c000000 jb 0x7e -;; 72: 4883c410 add rsp, 0x10 +;; 0f820c000000 jb 0x85 +;; 79: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 78: 0f0b ud2 -;; 7a: 0f0b ud2 -;; 7c: 0f0b ud2 -;; 7e: 0f0b ud2 +;; 7f: 0f0b ud2 +;; 81: 0f0b ud2 +;; 83: 0f0b ud2 +;; 85: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f64_u/const.wat b/winch/filetests/filetests/x64/i64_trunc_f64_u/const.wat index 7595fa50bb04..035bb6b713bb 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f64_u/const.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f64_u/const.wat @@ -8,40 +8,42 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f876b000000 ja 0x86 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8770000000 ja 0x8e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f100d65000000 movsd xmm1, qword ptr [rip + 0x65] ;; 49bb000000000000e043 ;; movabs r11, 0x43e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ecf ucomisd xmm1, xmm15 -;; 0f8317000000 jae 0x5c -;; 0f8a3d000000 jp 0x88 -;; 4b: f2480f2cc1 cvttsd2si rax, xmm1 +;; 0f8317000000 jae 0x64 +;; 0f8a3d000000 jp 0x90 +;; 53: f2480f2cc1 cvttsd2si rax, xmm1 ;; 4883f800 cmp rax, 0 -;; 0f8d26000000 jge 0x80 -;; 5a: 0f0b ud2 +;; 0f8d26000000 jge 0x88 +;; 62: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f2410f5cc7 subsd xmm0, xmm15 ;; f2480f2cc0 cvttsd2si rax, xmm0 ;; 4883f800 cmp rax, 0 -;; 0f8c17000000 jl 0x8a -;; 73: 49bb0000000000000080 +;; 0f8c17000000 jl 0x92 +;; 7b: 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 4c01d8 add rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 86: 0f0b ud2 -;; 88: 0f0b ud2 -;; 8a: 0f0b ud2 -;; 8c: 0000 add byte ptr [rax], al -;; 8e: 0000 add byte ptr [rax], al -;; 90: 0000 add byte ptr [rax], al -;; 92: 0000 add byte ptr [rax], al +;; 8e: 0f0b ud2 +;; 90: 0f0b ud2 +;; 92: 0f0b ud2 ;; 94: 0000 add byte ptr [rax], al +;; 96: 0000 add byte ptr [rax], al +;; 98: 0000 add byte ptr [rax], al +;; 9a: 0000 add byte ptr [rax], al +;; 9c: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/i64_trunc_f64_u/locals.wat b/winch/filetests/filetests/x64/i64_trunc_f64_u/locals.wat index 88e5df1e6651..014bde0add95 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f64_u/locals.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f64_u/locals.wat @@ -10,37 +10,38 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8772000000 ja 0x8d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] +;; 0f8776000000 ja 0x94 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; f20f100c24 movsd xmm1, qword ptr [rsp] ;; 49bb000000000000e043 ;; movabs r11, 0x43e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ecf ucomisd xmm1, xmm15 -;; 0f8317000000 jae 0x63 -;; 0f8a3d000000 jp 0x8f -;; 52: f2480f2cc1 cvttsd2si rax, xmm1 +;; 0f8317000000 jae 0x6a +;; 0f8a3d000000 jp 0x96 +;; 59: f2480f2cc1 cvttsd2si rax, xmm1 ;; 4883f800 cmp rax, 0 -;; 0f8d26000000 jge 0x87 -;; 61: 0f0b ud2 +;; 0f8d26000000 jge 0x8e +;; 68: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f2410f5cc7 subsd xmm0, xmm15 ;; f2480f2cc0 cvttsd2si rax, xmm0 ;; 4883f800 cmp rax, 0 -;; 0f8c17000000 jl 0x91 -;; 7a: 49bb0000000000000080 +;; 0f8c17000000 jl 0x98 +;; 81: 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 4c01d8 add rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 8d: 0f0b ud2 -;; 8f: 0f0b ud2 -;; 91: 0f0b ud2 +;; 94: 0f0b ud2 +;; 96: 0f0b ud2 +;; 98: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_trunc_f64_u/params.wat b/winch/filetests/filetests/x64/i64_trunc_f64_u/params.wat index a7c990e35d22..2d9791db1b15 100644 --- a/winch/filetests/filetests/x64/i64_trunc_f64_u/params.wat +++ b/winch/filetests/filetests/x64/i64_trunc_f64_u/params.wat @@ -8,36 +8,38 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f876f000000 ja 0x8a -;; 1b: 4883ec10 sub rsp, 0x10 -;; f20f11442408 movsd qword ptr [rsp + 8], xmm0 -;; 4c893424 mov qword ptr [rsp], r14 -;; f20f104c2408 movsd xmm1, qword ptr [rsp + 8] +;; 0f8773000000 ja 0x91 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; f20f110424 movsd qword ptr [rsp], xmm0 +;; f20f100c24 movsd xmm1, qword ptr [rsp] ;; 49bb000000000000e043 ;; movabs r11, 0x43e0000000000000 ;; 664d0f6efb movq xmm15, r11 ;; 66410f2ecf ucomisd xmm1, xmm15 -;; 0f8317000000 jae 0x60 -;; 0f8a3d000000 jp 0x8c -;; 4f: f2480f2cc1 cvttsd2si rax, xmm1 +;; 0f8317000000 jae 0x67 +;; 0f8a3d000000 jp 0x93 +;; 56: f2480f2cc1 cvttsd2si rax, xmm1 ;; 4883f800 cmp rax, 0 -;; 0f8d26000000 jge 0x84 -;; 5e: 0f0b ud2 +;; 0f8d26000000 jge 0x8b +;; 65: 0f0b ud2 ;; 0f28c1 movaps xmm0, xmm1 ;; f2410f5cc7 subsd xmm0, xmm15 ;; f2480f2cc0 cvttsd2si rax, xmm0 ;; 4883f800 cmp rax, 0 -;; 0f8c17000000 jl 0x8e -;; 77: 49bb0000000000000080 +;; 0f8c17000000 jl 0x95 +;; 7e: 49bb0000000000000080 ;; movabs r11, 0x8000000000000000 ;; 4c01d8 add rax, r11 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 8a: 0f0b ud2 -;; 8c: 0f0b ud2 -;; 8e: 0f0b ud2 +;; 91: 0f0b ud2 +;; 93: 0f0b ud2 +;; 95: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_xor/32_const.wat b/winch/filetests/filetests/x64/i64_xor/32_const.wat index a136d5ab0043..7e6a34ca217e 100644 --- a/winch/filetests/filetests/x64/i64_xor/32_const.wat +++ b/winch/filetests/filetests/x64/i64_xor/32_const.wat @@ -9,16 +9,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8719000000 ja 0x34 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871e000000 ja 0x3c +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 ;; 4883f003 xor rax, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 34: 0f0b ud2 +;; 3c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_xor/64_const.wat b/winch/filetests/filetests/x64/i64_xor/64_const.wat index 64956dc7dc14..d3c9d9a6e9e2 100644 --- a/winch/filetests/filetests/x64/i64_xor/64_const.wat +++ b/winch/filetests/filetests/x64/i64_xor/64_const.wat @@ -9,19 +9,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8725000000 ja 0x40 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872a000000 ja 0x48 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48b8feffffffffffff7f ;; movabs rax, 0x7ffffffffffffffe ;; 49bbffffffffffffff7f ;; movabs r11, 0x7fffffffffffffff ;; 4c31d8 xor rax, r11 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 40: 0f0b ud2 +;; 48: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_xor/locals.wat b/winch/filetests/filetests/x64/i64_xor/locals.wat index a277572ce3dc..15ffef627b63 100644 --- a/winch/filetests/filetests/x64/i64_xor/locals.wat +++ b/winch/filetests/filetests/x64/i64_xor/locals.wat @@ -17,25 +17,27 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec18 sub rsp, 0x18 +;; 0f8746000000 ja 0x64 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c002000000 mov rax, 2 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c003000000 mov rax, 3 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 48c7c003000000 mov rax, 3 +;; 48890424 mov qword ptr [rsp], rax +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4831c1 xor rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 64: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/i64_xor/params.wat b/winch/filetests/filetests/x64/i64_xor/params.wat index 279cf8a9d140..5df3fcc12440 100644 --- a/winch/filetests/filetests/x64/i64_xor/params.wat +++ b/winch/filetests/filetests/x64/i64_xor/params.wat @@ -9,20 +9,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 4831c1 xor rcx, rax ;; 4889c8 mov rax, rcx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/as_binop.wat b/winch/filetests/filetests/x64/if/as_binop.wat index 5772363f3f0a..c131566658fe 100644 --- a/winch/filetests/filetests/x64/if/as_binop.wat +++ b/winch/filetests/filetests/x64/if/as_binop.wat @@ -17,56 +17,76 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8783000000 ja 0x9e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f87c3000000 ja 0xe1 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840f000000 je 0x46 -;; 37: e800000000 call 0x3c +;; 0f8422000000 je 0x61 +;; 3f: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x4e +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b803000000 mov eax, 3 -;; e90a000000 jmp 0x50 -;; 46: e800000000 call 0x4b +;; e91d000000 jmp 0x7e +;; 61: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x70 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b8fdffffff mov eax, 0xfffffffd -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] +;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax ;; 85c9 test ecx, ecx -;; 0f8417000000 je 0x7a -;; 63: 4883ec0c sub rsp, 0xc -;; e800000000 call 0x6c -;; 4883c40c add rsp, 0xc +;; 0f8422000000 je 0xb2 +;; 90: 4883ec04 sub rsp, 4 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x9f +;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] ;; b804000000 mov eax, 4 -;; e912000000 jmp 0x8c -;; 7a: 4883ec0c sub rsp, 0xc -;; e800000000 call 0x83 -;; 4883c40c add rsp, 0xc +;; e91d000000 jmp 0xcf +;; b2: 4883ec04 sub rsp, 4 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0xc1 +;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] ;; b8fbffffff mov eax, 0xfffffffb ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 0fafc8 imul ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 9e: 0f0b ud2 +;; e1: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/as_br_if_last.wat b/winch/filetests/filetests/x64/if/as_br_if_last.wat index d88e992ab0e0..9f9b1ff62eb3 100644 --- a/winch/filetests/filetests/x64/if/as_br_if_last.wat +++ b/winch/filetests/filetests/x64/if/as_br_if_last.wat @@ -16,35 +16,49 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8762000000 ja 0x7d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f878e000000 ja 0xac +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840f000000 je 0x42 -;; 33: e800000000 call 0x38 +;; 0f8422000000 je 0x5e +;; 3c: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x4b +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b801000000 mov eax, 1 -;; e90a000000 jmp 0x4c -;; 42: e800000000 call 0x47 +;; e91d000000 jmp 0x7b +;; 5e: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x6d +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b800000000 mov eax, 0 ;; 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax @@ -52,12 +66,12 @@ ;; 4883c404 add rsp, 4 ;; b802000000 mov eax, 2 ;; 85c9 test ecx, ecx -;; 0f8510000000 jne 0x77 -;; 67: 4883ec04 sub rsp, 4 +;; 0f8510000000 jne 0xa6 +;; 96: 4883ec04 sub rsp, 4 ;; 890424 mov dword ptr [rsp], eax ;; b803000000 mov eax, 3 ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 7d: 0f0b ud2 +;; ac: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/as_if_cond.wat b/winch/filetests/filetests/x64/if/as_if_cond.wat index babb07e5474e..c88556d1cc71 100644 --- a/winch/filetests/filetests/x64/if/as_if_cond.wat +++ b/winch/filetests/filetests/x64/if/as_if_cond.wat @@ -14,42 +14,56 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874e000000 ja 0x69 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f877a000000 ja 0x98 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840a000000 je 0x3d -;; 33: b801000000 mov eax, 1 -;; e905000000 jmp 0x42 -;; 3d: b800000000 mov eax, 0 +;; 0f840a000000 je 0x46 +;; 3c: b801000000 mov eax, 1 +;; e905000000 jmp 0x4b +;; 46: b800000000 mov eax, 0 ;; 85c0 test eax, eax -;; 0f840f000000 je 0x59 -;; 4a: e800000000 call 0x4f +;; 0f8422000000 je 0x75 +;; 53: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x62 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b802000000 mov eax, 2 -;; e90a000000 jmp 0x63 -;; 59: e800000000 call 0x5e +;; e91d000000 jmp 0x92 +;; 75: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x84 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b803000000 mov eax, 3 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 69: 0f0b ud2 +;; 98: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/as_testop.wat b/winch/filetests/filetests/x64/if/as_testop.wat index 436a38fcfffc..c5639568bde6 100644 --- a/winch/filetests/filetests/x64/if/as_testop.wat +++ b/winch/filetests/filetests/x64/if/as_testop.wat @@ -12,40 +12,54 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f8743000000 ja 0x5e -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f876f000000 ja 0x8d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840f000000 je 0x42 -;; 33: e800000000 call 0x38 +;; 0f8422000000 je 0x5e +;; 3c: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x4b +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b80d000000 mov eax, 0xd -;; e90a000000 jmp 0x4c -;; 42: e800000000 call 0x47 +;; e91d000000 jmp 0x7b +;; 5e: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x6d +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b800000000 mov eax, 0 ;; 83f800 cmp eax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 5e: 0f0b ud2 +;; 8d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/break_value.wat b/winch/filetests/filetests/x64/if/break_value.wat index 823849e02921..c2de4e3543ce 100644 --- a/winch/filetests/filetests/x64/if/break_value.wat +++ b/winch/filetests/filetests/x64/if/break_value.wat @@ -10,21 +10,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8733000000 ja 0x51 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840a000000 je 0x3d -;; 33: b812000000 mov eax, 0x12 -;; e905000000 jmp 0x42 -;; 3d: b815000000 mov eax, 0x15 -;; 4883c410 add rsp, 0x10 +;; 0f840a000000 je 0x46 +;; 3c: b812000000 mov eax, 0x12 +;; e905000000 jmp 0x4b +;; 46: b815000000 mov eax, 0x15 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 51: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/nested.wat b/winch/filetests/filetests/x64/if/nested.wat index 5a12e4d59c82..10777f852842 100644 --- a/winch/filetests/filetests/x64/if/nested.wat +++ b/winch/filetests/filetests/x64/if/nested.wat @@ -24,68 +24,112 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f87bf000000 ja 0xda -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8756010000 ja 0x174 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8451000000 je 0x88 -;; 37: 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f849a000000 je 0xd9 +;; 3f: 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f8405000000 je 0x48 -;; 43: e800000000 call 0x48 -;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f8418000000 je 0x62 +;; 4a: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x59 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f8405000000 je 0x59 -;; e905000000 jmp 0x5e -;; 59: e800000000 call 0x5e -;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f8405000000 je 0x72 +;; e918000000 jmp 0x8a +;; 72: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x81 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f840f000000 je 0x79 -;; 6a: e800000000 call 0x6f +;; 0f8422000000 je 0xb7 +;; 95: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0xa4 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b809000000 mov eax, 9 -;; e95b000000 jmp 0xd4 -;; 79: e800000000 call 0x7e +;; e9b7000000 jmp 0x16e +;; b7: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0xc6 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b80a000000 mov eax, 0xa -;; e94c000000 jmp 0xd4 -;; 88: 8b442408 mov eax, dword ptr [rsp + 8] +;; e995000000 jmp 0x16e +;; d9: 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f8405000000 je 0x99 -;; 94: e800000000 call 0x99 -;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f8418000000 je 0xfc +;; e4: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0xf3 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f8405000000 je 0xaa -;; e905000000 jmp 0xaf -;; aa: e800000000 call 0xaf -;; 8b442408 mov eax, dword ptr [rsp + 8] +;; 0f8405000000 je 0x10c +;; e918000000 jmp 0x124 +;; 10c: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x11b +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 8b0424 mov eax, dword ptr [rsp] ;; 85c0 test eax, eax -;; 0f840f000000 je 0xca -;; bb: e800000000 call 0xc0 +;; 0f8422000000 je 0x151 +;; 12f: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x13e +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b80a000000 mov eax, 0xa -;; e90a000000 jmp 0xd4 -;; ca: e800000000 call 0xcf +;; e91d000000 jmp 0x16e +;; 151: 4883ec08 sub rsp, 8 +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x160 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] ;; b80b000000 mov eax, 0xb -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; da: 0f0b ud2 +;; 174: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/reachability.wat b/winch/filetests/filetests/x64/if/reachability.wat index 6505bc72385a..4a242f03b963 100644 --- a/winch/filetests/filetests/x64/if/reachability.wat +++ b/winch/filetests/filetests/x64/if/reachability.wat @@ -15,29 +15,31 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f8749000000 ja 0x64 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f874f000000 ja 0x6d +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 85c0 test eax, eax -;; 0f840e000000 je 0x4e -;; 40: b801000000 mov eax, 1 +;; 0f840e000000 je 0x57 +;; 49: b801000000 mov eax, 1 ;; 4883c404 add rsp, 4 -;; e910000000 jmp 0x5e -;; 4e: b802000000 mov eax, 2 +;; e910000000 jmp 0x67 +;; 57: b802000000 mov eax, 2 ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 29c1 sub ecx, eax ;; 89c8 mov eax, ecx -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 64: 0f0b ud2 +;; 6d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/if/singular.wat b/winch/filetests/filetests/x64/if/singular.wat index 207b44a85dd7..b2e94bec038b 100644 --- a/winch/filetests/filetests/x64/if/singular.wat +++ b/winch/filetests/filetests/x64/if/singular.wat @@ -10,41 +10,45 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8745000000 ja 0x60 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f874b000000 ja 0x69 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8400000000 je 0x33 -;; 33: 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8400000000 je 0x3c +;; 3c: 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8400000000 je 0x3f -;; 3f: 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8400000000 je 0x48 +;; 48: 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840a000000 je 0x55 -;; 4b: b807000000 mov eax, 7 -;; e905000000 jmp 0x5a -;; 55: b808000000 mov eax, 8 -;; 4883c410 add rsp, 0x10 +;; 0f840a000000 je 0x5e +;; 54: b807000000 mov eax, 7 +;; e905000000 jmp 0x63 +;; 5e: b808000000 mov eax, 8 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 60: 0f0b ud2 +;; 69: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/load/f32.wat b/winch/filetests/filetests/x64/load/f32.wat index 5c8b956601d3..72b3a2402523 100644 --- a/winch/filetests/filetests/x64/load/f32.wat +++ b/winch/filetests/filetests/x64/load/f32.wat @@ -7,18 +7,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000000 mov eax, 0 ;; 498b4e50 mov rcx, qword ptr [r14 + 0x50] ;; 4801c1 add rcx, rax ;; f30f1001 movss xmm0, dword ptr [rcx] -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/load/f64.wat b/winch/filetests/filetests/x64/load/f64.wat index 79e96c38ddde..0658062afe4a 100644 --- a/winch/filetests/filetests/x64/load/f64.wat +++ b/winch/filetests/filetests/x64/load/f64.wat @@ -6,18 +6,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871e000000 ja 0x39 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000000 mov eax, 0 ;; 498b4e50 mov rcx, qword ptr [r14 + 0x50] ;; 4801c1 add rcx, rax ;; f20f1001 movsd xmm0, qword ptr [rcx] -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 39: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/load/i32.wat b/winch/filetests/filetests/x64/load/i32.wat index 5a2b2e7a5b3c..a42bc5da2813 100644 --- a/winch/filetests/filetests/x64/load/i32.wat +++ b/winch/filetests/filetests/x64/load/i32.wat @@ -7,18 +7,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871c000000 ja 0x37 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b800000000 mov eax, 0 ;; 498b4e50 mov rcx, qword ptr [r14 + 0x50] ;; 4801c1 add rcx, rax ;; 8b01 mov eax, dword ptr [rcx] -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 37: 0f0b ud2 +;; 3f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/load/i64.wat b/winch/filetests/filetests/x64/load/i64.wat index 969e3744fa93..fe3003f1f442 100644 --- a/winch/filetests/filetests/x64/load/i64.wat +++ b/winch/filetests/filetests/x64/load/i64.wat @@ -8,15 +8,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8736000000 ja 0x51 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 0f873a000000 ja 0x58 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx +;; 488b0424 mov rax, qword ptr [rsp] ;; b908000000 mov ecx, 8 ;; 498b5650 mov rdx, qword ptr [r14 + 0x50] ;; 4801ca add rdx, rcx @@ -25,7 +27,7 @@ ;; 498b4e50 mov rcx, qword ptr [r14 + 0x50] ;; 4801c1 add rcx, rax ;; 480fbe01 movsx rax, byte ptr [rcx] -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 51: 0f0b ud2 +;; 58: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/local/latent.wat b/winch/filetests/filetests/x64/local/latent.wat index 69a6dd36d768..d606dffe1d42 100644 --- a/winch/filetests/filetests/x64/local/latent.wat +++ b/winch/filetests/filetests/x64/local/latent.wat @@ -9,22 +9,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f872f000000 ja 0x4a -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b801000000 mov eax, 1 -;; 89442410 mov dword ptr [rsp + 0x10], eax +;; 89442408 mov dword ptr [rsp + 8], eax ;; 8b0424 mov eax, dword ptr [rsp] ;; 4883c404 add rsp, 4 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4a: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/local/materialized.wat b/winch/filetests/filetests/x64/local/materialized.wat index 8f9216109023..ff4b0e0c26f8 100644 --- a/winch/filetests/filetests/x64/local/materialized.wat +++ b/winch/filetests/filetests/x64/local/materialized.wat @@ -8,17 +8,19 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 4883c410 add rsp, 0x10 +;; 0f8720000000 ja 0x3e +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_binary_operand.wat b/winch/filetests/filetests/x64/loop/as_binary_operand.wat index 307237dcf616..17e9979dddea 100644 --- a/winch/filetests/filetests/x64/loop/as_binary_operand.wat +++ b/winch/filetests/filetests/x64/loop/as_binary_operand.wat @@ -10,36 +10,42 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x39 -;; 4883c408 add rsp, 8 +;; 0f873b000000 ja 0x59 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x46 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b803000000 mov eax, 3 ;; 6bc004 imul eax, eax, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 59: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_br_if_first.wat b/winch/filetests/filetests/x64/loop/as_br_if_first.wat index 5dab9c3b9ed2..e81e16e2d3c2 100644 --- a/winch/filetests/filetests/x64/loop/as_br_if_first.wat +++ b/winch/filetests/filetests/x64/loop/as_br_if_first.wat @@ -6,18 +6,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b902000000 mov ecx, 2 ;; b801000000 mov eax, 1 ;; 85c9 test ecx, ecx -;; 0f8500000000 jne 0x35 -;; 35: 4883c408 add rsp, 8 +;; 0f8500000000 jne 0x3d +;; 3d: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_br_if_last.wat b/winch/filetests/filetests/x64/loop/as_br_if_last.wat index 507b2f735606..d85928472625 100644 --- a/winch/filetests/filetests/x64/loop/as_br_if_last.wat +++ b/winch/filetests/filetests/x64/loop/as_br_if_last.wat @@ -6,18 +6,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b901000000 mov ecx, 1 ;; b802000000 mov eax, 2 ;; 85c9 test ecx, ecx -;; 0f8500000000 jne 0x35 -;; 35: 4883c408 add rsp, 8 +;; 0f8500000000 jne 0x3d +;; 3d: 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_br_value.wat b/winch/filetests/filetests/x64/loop/as_br_value.wat index e104596cb7d4..c3ddff30e449 100644 --- a/winch/filetests/filetests/x64/loop/as_br_value.wat +++ b/winch/filetests/filetests/x64/loop/as_br_value.wat @@ -6,15 +6,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_call_value.wat b/winch/filetests/filetests/x64/loop/as_call_value.wat index 9a4e4d5cd418..afc1b7cd1a1a 100644 --- a/winch/filetests/filetests/x64/loop/as_call_value.wat +++ b/winch/filetests/filetests/x64/loop/as_call_value.wat @@ -7,34 +7,39 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8716000000 ja 0x31 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 4883c410 add rsp, 0x10 +;; 0f871c000000 ja 0x3a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 31: 0f0b ud2 +;; 3a: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; bf01000000 mov edi, 1 -;; e800000000 call 0x31 -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; ba01000000 mov edx, 1 +;; e800000000 call 0x3b +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_if_condition.wat b/winch/filetests/filetests/x64/loop/as_if_condition.wat index b835276aebae..3abded397f76 100644 --- a/winch/filetests/filetests/x64/loop/as_if_condition.wat +++ b/winch/filetests/filetests/x64/loop/as_if_condition.wat @@ -7,34 +7,39 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8730000000 ja 0x4e +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f840d000000 je 0x3d -;; 30: 4883ec08 sub rsp, 8 -;; e800000000 call 0x39 -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8410000000 je 0x48 +;; 38: 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x43 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4e: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_if_else.wat b/winch/filetests/filetests/x64/loop/as_if_else.wat index 1bcfcdd6b40c..9241e82217a9 100644 --- a/winch/filetests/filetests/x64/loop/as_if_else.wat +++ b/winch/filetests/filetests/x64/loop/as_if_else.wat @@ -6,20 +6,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f840a000000 je 0x3a -;; 30: b802000000 mov eax, 2 -;; e905000000 jmp 0x3f -;; 3a: b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 0f840a000000 je 0x42 +;; 38: b802000000 mov eax, 2 +;; e905000000 jmp 0x47 +;; 42: b801000000 mov eax, 1 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_if_then.wat b/winch/filetests/filetests/x64/loop/as_if_then.wat index 7ed4fc125650..0d5afeb392f9 100644 --- a/winch/filetests/filetests/x64/loop/as_if_then.wat +++ b/winch/filetests/filetests/x64/loop/as_if_then.wat @@ -6,20 +6,22 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872a000000 ja 0x45 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872f000000 ja 0x4d +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; 85c0 test eax, eax -;; 0f840a000000 je 0x3a -;; 30: b801000000 mov eax, 1 -;; e905000000 jmp 0x3f -;; 3a: b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 0f840a000000 je 0x42 +;; 38: b801000000 mov eax, 1 +;; e905000000 jmp 0x47 +;; 42: b802000000 mov eax, 2 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 45: 0f0b ud2 +;; 4d: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_local_set_value.wat b/winch/filetests/filetests/x64/loop/as_local_set_value.wat index f5bc59a75839..30e3331bee76 100644 --- a/winch/filetests/filetests/x64/loop/as_local_set_value.wat +++ b/winch/filetests/filetests/x64/loop/as_local_set_value.wat @@ -6,19 +6,20 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8724000000 ja 0x3f -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8729000000 ja 0x47 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 4883c410 add rsp, 0x10 +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 3f: 0f0b ud2 +;; 47: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_test_operand.wat b/winch/filetests/filetests/x64/loop/as_test_operand.wat index 518d755400d9..b3dc3d527e58 100644 --- a/winch/filetests/filetests/x64/loop/as_test_operand.wat +++ b/winch/filetests/filetests/x64/loop/as_test_operand.wat @@ -7,35 +7,40 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872c000000 ja 0x47 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b80d000000 mov eax, 0xd ;; 83f800 cmp eax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 47: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/as_unary_operand.wat b/winch/filetests/filetests/x64/loop/as_unary_operand.wat index 5a2909629197..1fdd58840437 100644 --- a/winch/filetests/filetests/x64/loop/as_unary_operand.wat +++ b/winch/filetests/filetests/x64/loop/as_unary_operand.wat @@ -7,37 +7,42 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8734000000 ja 0x4f -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f873c000000 ja 0x5a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b80d000000 mov eax, 0xd ;; 0fbcc0 bsf eax, eax ;; 41bb00000000 mov r11d, 0 ;; 410f94c3 sete r11b ;; 41c1e305 shl r11d, 5 ;; 4401d8 add eax, r11d -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 4f: 0f0b ud2 +;; 5a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/break_inner.wat b/winch/filetests/filetests/x64/loop/break_inner.wat index 991d6a3aa46e..eb0e5adab4f7 100644 --- a/winch/filetests/filetests/x64/loop/break_inner.wat +++ b/winch/filetests/filetests/x64/loop/break_inner.wat @@ -13,59 +13,60 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f87bf000000 ja 0xda -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f87c4000000 ja 0xe2 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b800000000 mov eax, 0 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b801000000 mov eax, 1 ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax -;; 894c240c mov dword ptr [rsp + 0xc], ecx -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 894c2404 mov dword ptr [rsp + 4], ecx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b802000000 mov eax, 2 ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax -;; 894c240c mov dword ptr [rsp + 0xc], ecx -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 894c2404 mov dword ptr [rsp + 4], ecx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b804000000 mov eax, 4 ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax -;; 894c240c mov dword ptr [rsp + 0xc], ecx -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 894c2404 mov dword ptr [rsp + 4], ecx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b808000000 mov eax, 8 ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax -;; 894c240c mov dword ptr [rsp + 0xc], ecx -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 894c2404 mov dword ptr [rsp + 4], ecx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; b810000000 mov eax, 0x10 ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 01c1 add ecx, eax -;; 894c240c mov dword ptr [rsp + 0xc], ecx -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 4883c410 add rsp, 0x10 +;; 894c2404 mov dword ptr [rsp + 4], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; da: 0f0b ud2 +;; e2: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/cont_inner.wat b/winch/filetests/filetests/x64/loop/cont_inner.wat index bce20a7f6166..07bbb0ca6c07 100644 --- a/winch/filetests/filetests/x64/loop/cont_inner.wat +++ b/winch/filetests/filetests/x64/loop/cont_inner.wat @@ -11,22 +11,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f8732000000 ja 0x4d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8737000000 ja 0x55 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b800000000 mov eax, 0 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; e9fbffffff jmp 0x42 -;; 47: 4883c410 add rsp, 0x10 +;; e9fbffffff jmp 0x4a +;; 4f: 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4d: 0f0b ud2 +;; 55: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/deep.wat b/winch/filetests/filetests/x64/loop/deep.wat index 7980d64a764f..46af70f4dde4 100644 --- a/winch/filetests/filetests/x64/loop/deep.wat +++ b/winch/filetests/filetests/x64/loop/deep.wat @@ -48,32 +48,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b896000000 mov eax, 0x96 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/effects.wat b/winch/filetests/filetests/x64/loop/effects.wat index 8a6a3de1e0f6..e2860fcf0b1e 100644 --- a/winch/filetests/filetests/x64/loop/effects.wat +++ b/winch/filetests/filetests/x64/loop/effects.wat @@ -17,31 +17,32 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8751000000 ja 0x6c -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8756000000 ja 0x74 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; b801000000 mov eax, 1 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 6bc003 imul eax, eax, 3 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83e805 sub eax, 5 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 6bc007 imul eax, eax, 7 -;; 8944240c mov dword ptr [rsp + 0xc], eax -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 89442404 mov dword ptr [rsp + 4], eax +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 83f8f2 cmp eax, -0xe ;; b800000000 mov eax, 0 ;; 400f94c0 sete al -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 6c: 0f0b ud2 +;; 74: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/empty.wat b/winch/filetests/filetests/x64/loop/empty.wat index ab1538f2d581..a1dff4981d24 100644 --- a/winch/filetests/filetests/x64/loop/empty.wat +++ b/winch/filetests/filetests/x64/loop/empty.wat @@ -8,14 +8,16 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/for.wat b/winch/filetests/filetests/x64/loop/for.wat index 41f79b0f8695..e62a786e089d 100644 --- a/winch/filetests/filetests/x64/loop/for.wat +++ b/winch/filetests/filetests/x64/loop/for.wat @@ -17,38 +17,40 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c320000000 add r11, 0x20 +;; 4981c328000000 add r11, 0x28 ;; 4939e3 cmp r11, rsp -;; 0f8781000000 ja 0x9c -;; 1b: 4883ec20 sub rsp, 0x20 -;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 0f8781000000 ja 0x9f +;; 1e: 4883ec28 sub rsp, 0x28 +;; 48897c2420 mov qword ptr [rsp + 0x20], rdi +;; 4889742418 mov qword ptr [rsp + 0x18], rsi +;; 4889542410 mov qword ptr [rsp + 0x10], rdx ;; 4531db xor r11d, r11d -;; 4c895c2410 mov qword ptr [rsp + 0x10], r11 ;; 4c895c2408 mov qword ptr [rsp + 8], r11 -;; 4c893424 mov qword ptr [rsp], r14 +;; 4c891c24 mov qword ptr [rsp], r11 ;; 48c7c001000000 mov rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; 48c7c002000000 mov rax, 2 ;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442418 mov rax, qword ptr [rsp + 0x18] -;; 488b4c2408 mov rcx, qword ptr [rsp + 8] +;; 48c7c002000000 mov rax, 2 +;; 48890424 mov qword ptr [rsp], rax +;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 488b0c24 mov rcx, qword ptr [rsp] ;; 4839c1 cmp rcx, rax ;; b900000000 mov ecx, 0 ;; 400f97c1 seta cl ;; 85c9 test ecx, ecx -;; 0f8526000000 jne 0x91 -;; 6b: 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8523000000 jne 0x94 +;; 71: 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 480fafc8 imul rcx, rax -;; 48894c2410 mov qword ptr [rsp + 0x10], rcx -;; 488b442408 mov rax, qword ptr [rsp + 8] +;; 48894c2408 mov qword ptr [rsp + 8], rcx +;; 488b0424 mov rax, qword ptr [rsp] ;; 4883c001 add rax, 1 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; e9bcffffff jmp 0x4d -;; 91: 488b442410 mov rax, qword ptr [rsp + 0x10] -;; 4883c420 add rsp, 0x20 +;; 48890424 mov qword ptr [rsp], rax +;; e9c0ffffff jmp 0x54 +;; 94: 488b442408 mov rax, qword ptr [rsp + 8] +;; 4883c428 add rsp, 0x28 ;; 5d pop rbp ;; c3 ret -;; 9c: 0f0b ud2 +;; 9f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/multi.wat b/winch/filetests/filetests/x64/loop/multi.wat index 0a3315671b21..5a6b2ab3b1a1 100644 --- a/winch/filetests/filetests/x64/loop/multi.wat +++ b/winch/filetests/filetests/x64/loop/multi.wat @@ -9,50 +9,61 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f876e000000 ja 0x89 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x39 -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 +;; 0f8788000000 ja 0xa6 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 ;; e800000000 call 0x46 -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x53 -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x60 -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x6d -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x7a -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x56 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x66 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x76 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x86 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x96 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b808000000 mov eax, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 89: 0f0b ud2 +;; a6: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/nested.wat b/winch/filetests/filetests/x64/loop/nested.wat index 56af9aea5b15..550aa09f4a5d 100644 --- a/winch/filetests/filetests/x64/loop/nested.wat +++ b/winch/filetests/filetests/x64/loop/nested.wat @@ -10,35 +10,41 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x39 -;; 4883c408 add rsp, 8 +;; 0f8738000000 ja 0x56 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x46 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b809000000 mov eax, 9 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 56: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/singular.wat b/winch/filetests/filetests/x64/loop/singular.wat index ceda06726f7b..18f4ee0bbfda 100644 --- a/winch/filetests/filetests/x64/loop/singular.wat +++ b/winch/filetests/filetests/x64/loop/singular.wat @@ -8,15 +8,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b807000000 mov eax, 7 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/loop/while.wat b/winch/filetests/filetests/x64/loop/while.wat index 0163ee88b0d3..8c060acdb8b4 100644 --- a/winch/filetests/filetests/x64/loop/while.wat +++ b/winch/filetests/filetests/x64/loop/while.wat @@ -16,34 +16,35 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f876d000000 ja 0x88 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 48897c2410 mov qword ptr [rsp + 0x10], rdi -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f876e000000 ja 0x8c +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 4889542408 mov qword ptr [rsp + 8], rdx +;; 48c7042400000000 mov qword ptr [rsp], 0 ;; 48c7c001000000 mov rax, 1 -;; 4889442408 mov qword ptr [rsp + 8], rax -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48890424 mov qword ptr [rsp], rax +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 4883f800 cmp rax, 0 ;; b800000000 mov eax, 0 ;; 400f94c0 sete al ;; 85c0 test eax, eax -;; 0f8526000000 jne 0x7d -;; 57: 488b442408 mov rax, qword ptr [rsp + 8] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] +;; 0f8524000000 jne 0x82 +;; 5e: 488b0424 mov rax, qword ptr [rsp] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] ;; 480fafc8 imul rcx, rax -;; 48894c2408 mov qword ptr [rsp + 8], rcx -;; 488b442410 mov rax, qword ptr [rsp + 0x10] +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b442408 mov rax, qword ptr [rsp + 8] ;; 4883e801 sub rax, 1 -;; 4889442410 mov qword ptr [rsp + 0x10], rax -;; e9c0ffffff jmp 0x3d -;; 7d: 488b442408 mov rax, qword ptr [rsp + 8] -;; 4883c418 add rsp, 0x18 +;; 4889442408 mov qword ptr [rsp + 8], rax +;; e9c2ffffff jmp 0x44 +;; 82: 488b0424 mov rax, qword ptr [rsp] +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 88: 0f0b ud2 +;; 8c: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/nop/nop.wat b/winch/filetests/filetests/x64/nop/nop.wat index 994dcd05ecc0..9f1b28a1aa09 100644 --- a/winch/filetests/filetests/x64/nop/nop.wat +++ b/winch/filetests/filetests/x64/nop/nop.wat @@ -8,14 +8,16 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_block_first.wat b/winch/filetests/filetests/x64/return/as_block_first.wat index 79791927d948..5c95eb587bdc 100644 --- a/winch/filetests/filetests/x64/return/as_block_first.wat +++ b/winch/filetests/filetests/x64/return/as_block_first.wat @@ -8,28 +8,32 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_block_last.wat b/winch/filetests/filetests/x64/return/as_block_last.wat index 60f3aad05f97..7354fbd16b91 100644 --- a/winch/filetests/filetests/x64/return/as_block_last.wat +++ b/winch/filetests/filetests/x64/return/as_block_last.wat @@ -8,31 +8,36 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871b000000 ja 0x36 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 36: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_block_mid.wat b/winch/filetests/filetests/x64/return/as_block_mid.wat index 66a575c5062c..1f1052b86ead 100644 --- a/winch/filetests/filetests/x64/return/as_block_mid.wat +++ b/winch/filetests/filetests/x64/return/as_block_mid.wat @@ -8,31 +8,36 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871b000000 ja 0x36 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 0f8723000000 ja 0x41 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 36: 0f0b ud2 +;; 41: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_block_value.wat b/winch/filetests/filetests/x64/return/as_block_value.wat index 618b9f1be6a0..efd665998c60 100644 --- a/winch/filetests/filetests/x64/return/as_block_value.wat +++ b/winch/filetests/filetests/x64/return/as_block_value.wat @@ -8,32 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_br_if_cond.wat b/winch/filetests/filetests/x64/return/as_br_if_cond.wat index 9035d04a7cf8..79d48c99cf36 100644 --- a/winch/filetests/filetests/x64/return/as_br_if_cond.wat +++ b/winch/filetests/filetests/x64/return/as_br_if_cond.wat @@ -8,28 +8,32 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_br_value.wat b/winch/filetests/filetests/x64/return/as_br_value.wat index 24bf06905568..bf8930ef1a62 100644 --- a/winch/filetests/filetests/x64/return/as_br_value.wat +++ b/winch/filetests/filetests/x64/return/as_br_value.wat @@ -8,29 +8,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b809000000 mov eax, 9 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_call_fist.wat b/winch/filetests/filetests/x64/return/as_call_fist.wat index 8ab36cc67c9a..2eba9fea19d2 100644 --- a/winch/filetests/filetests/x64/return/as_call_fist.wat +++ b/winch/filetests/filetests/x64/return/as_call_fist.wat @@ -8,33 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80c000000 mov eax, 0xc -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_call_last.wat b/winch/filetests/filetests/x64/return/as_call_last.wat index 3dc9e6f7cb9a..1f056b27d78a 100644 --- a/winch/filetests/filetests/x64/return/as_call_last.wat +++ b/winch/filetests/filetests/x64/return/as_call_last.wat @@ -8,33 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80e000000 mov eax, 0xe -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_call_mid.wat b/winch/filetests/filetests/x64/return/as_call_mid.wat index eacfca1766ae..1f28a71ca368 100644 --- a/winch/filetests/filetests/x64/return/as_call_mid.wat +++ b/winch/filetests/filetests/x64/return/as_call_mid.wat @@ -8,33 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871f000000 ja 0x3a -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d ;; b8ffffffff mov eax, 0xffffffff -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 3a: 0f0b ud2 +;; 44: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b80d000000 mov eax, 0xd -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_func_first.wat b/winch/filetests/filetests/x64/return/as_func_first.wat index 21d1a2bccccf..6928e7a49e04 100644 --- a/winch/filetests/filetests/x64/return/as_func_first.wat +++ b/winch/filetests/filetests/x64/return/as_func_first.wat @@ -8,29 +8,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_func_last.wat b/winch/filetests/filetests/x64/return/as_func_last.wat index 139f40470d5e..7b62b8edd219 100644 --- a/winch/filetests/filetests/x64/return/as_func_last.wat +++ b/winch/filetests/filetests/x64/return/as_func_last.wat @@ -5,14 +5,16 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_func_mid.wat b/winch/filetests/filetests/x64/return/as_func_mid.wat index 7564524ca4d6..7ddc3eb00ac3 100644 --- a/winch/filetests/filetests/x64/return/as_func_mid.wat +++ b/winch/filetests/filetests/x64/return/as_func_mid.wat @@ -8,32 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_func_value.wat b/winch/filetests/filetests/x64/return/as_func_value.wat index a6d2fe30ac57..245fa71e1e38 100644 --- a/winch/filetests/filetests/x64/return/as_func_value.wat +++ b/winch/filetests/filetests/x64/return/as_func_value.wat @@ -8,32 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b803000000 mov eax, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_if_cond.wat b/winch/filetests/filetests/x64/return/as_if_cond.wat index 4e636ef84648..26575a18f0aa 100644 --- a/winch/filetests/filetests/x64/return/as_if_cond.wat +++ b/winch/filetests/filetests/x64/return/as_if_cond.wat @@ -10,29 +10,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b802000000 mov eax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_if_else.wat b/winch/filetests/filetests/x64/return/as_if_else.wat index 7d18a99431d2..3e209e3de930 100644 --- a/winch/filetests/filetests/x64/return/as_if_else.wat +++ b/winch/filetests/filetests/x64/return/as_if_else.wat @@ -11,36 +11,40 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8409000000 je 0x40 -;; 37: 8b442408 mov eax, dword ptr [rsp + 8] -;; e905000000 jmp 0x45 -;; 40: b804000000 mov eax, 4 -;; 4883c410 add rsp, 0x10 +;; 0f8408000000 je 0x47 +;; 3f: 8b0424 mov eax, dword ptr [rsp] +;; e905000000 jmp 0x4c +;; 47: b804000000 mov eax, 4 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_if_then.wat b/winch/filetests/filetests/x64/return/as_if_then.wat index 6fce66bc567c..83cffdf5f56a 100644 --- a/winch/filetests/filetests/x64/return/as_if_then.wat +++ b/winch/filetests/filetests/x64/return/as_if_then.wat @@ -11,36 +11,40 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8730000000 ja 0x4b -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8734000000 ja 0x52 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840a000000 je 0x41 -;; 37: b803000000 mov eax, 3 -;; e904000000 jmp 0x45 -;; 41: 8b442408 mov eax, dword ptr [rsp + 8] -;; 4883c410 add rsp, 0x10 +;; 0f840a000000 je 0x49 +;; 3f: b803000000 mov eax, 3 +;; e903000000 jmp 0x4c +;; 49: 8b0424 mov eax, dword ptr [rsp] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4b: 0f0b ud2 +;; 52: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_loop_first.wat b/winch/filetests/filetests/x64/return/as_loop_first.wat index 6372d2e80753..af9a315003b5 100644 --- a/winch/filetests/filetests/x64/return/as_loop_first.wat +++ b/winch/filetests/filetests/x64/return/as_loop_first.wat @@ -8,29 +8,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b803000000 mov eax, 3 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_loop_last.wat b/winch/filetests/filetests/x64/return/as_loop_last.wat index 9f9aab241e98..99f7b16cf71d 100644 --- a/winch/filetests/filetests/x64/return/as_loop_last.wat +++ b/winch/filetests/filetests/x64/return/as_loop_last.wat @@ -8,32 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b805000000 mov eax, 5 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_loop_mid.wat b/winch/filetests/filetests/x64/return/as_loop_mid.wat index 58ea660351a7..c08ec7c07d4d 100644 --- a/winch/filetests/filetests/x64/return/as_loop_mid.wat +++ b/winch/filetests/filetests/x64/return/as_loop_mid.wat @@ -8,32 +8,37 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b804000000 mov eax, 4 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/as_return_value.wat b/winch/filetests/filetests/x64/return/as_return_value.wat index d0a608bfc9a9..0913fd560d9a 100644 --- a/winch/filetests/filetests/x64/return/as_return_value.wat +++ b/winch/filetests/filetests/x64/return/as_return_value.wat @@ -8,29 +8,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8715000000 ja 0x30 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871a000000 ja 0x38 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c007000000 mov rax, 7 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 30: 0f0b ud2 +;; 38: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/nullary.wat b/winch/filetests/filetests/x64/return/nullary.wat index 09186470dd87..55187143239b 100644 --- a/winch/filetests/filetests/x64/return/nullary.wat +++ b/winch/filetests/filetests/x64/return/nullary.wat @@ -6,28 +6,32 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/type_i32.wat b/winch/filetests/filetests/x64/return/type_i32.wat index 0f0146e3def6..b5ad8a373c1b 100644 --- a/winch/filetests/filetests/x64/return/type_i32.wat +++ b/winch/filetests/filetests/x64/return/type_i32.wat @@ -9,29 +9,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/return/type_i64_value.wat b/winch/filetests/filetests/x64/return/type_i64_value.wat index 672331043f6e..fe84ac888271 100644 --- a/winch/filetests/filetests/x64/return/type_i64_value.wat +++ b/winch/filetests/filetests/x64/return/type_i64_value.wat @@ -9,29 +9,33 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8715000000 ja 0x30 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871a000000 ja 0x38 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 48c7c002000000 mov rax, 2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 30: 0f0b ud2 +;; 38: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/select/f32.wat b/winch/filetests/filetests/x64/select/f32.wat index fbb72e5f2da5..c832c7d946b2 100644 --- a/winch/filetests/filetests/x64/select/f32.wat +++ b/winch/filetests/filetests/x64/select/f32.wat @@ -8,23 +8,25 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f873b000000 ja 0x56 -;; 1b: 4883ec18 sub rsp, 0x18 -;; f30f11442414 movss dword ptr [rsp + 0x14], xmm0 -;; f30f114c2410 movss dword ptr [rsp + 0x10], xmm1 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; f30f10442410 movss xmm0, dword ptr [rsp + 0x10] -;; f30f104c2414 movss xmm1, dword ptr [rsp + 0x14] +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; f30f1144240c movss dword ptr [rsp + 0xc], xmm0 +;; f30f114c2408 movss dword ptr [rsp + 8], xmm1 +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; f30f10442408 movss xmm0, dword ptr [rsp + 8] +;; f30f104c240c movss xmm1, dword ptr [rsp + 0xc] ;; 83f800 cmp eax, 0 -;; 0f8404000000 je 0x50 -;; 4c: f20f10c1 movsd xmm0, xmm1 -;; 4883c418 add rsp, 0x18 +;; 0f8404000000 je 0x59 +;; 55: f20f10c1 movsd xmm0, xmm1 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 56: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/select/f64.wat b/winch/filetests/filetests/x64/select/f64.wat index 73adb15b13a0..900e7b503696 100644 --- a/winch/filetests/filetests/x64/select/f64.wat +++ b/winch/filetests/filetests/x64/select/f64.wat @@ -8,23 +8,25 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c320000000 add r11, 0x20 +;; 4981c328000000 add r11, 0x28 ;; 4939e3 cmp r11, rsp -;; 0f873b000000 ja 0x56 -;; 1b: 4883ec20 sub rsp, 0x20 -;; f20f11442418 movsd qword ptr [rsp + 0x18], xmm0 -;; f20f114c2410 movsd qword ptr [rsp + 0x10], xmm1 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; f20f10442410 movsd xmm0, qword ptr [rsp + 0x10] -;; f20f104c2418 movsd xmm1, qword ptr [rsp + 0x18] +;; 0f8741000000 ja 0x5f +;; 1e: 4883ec28 sub rsp, 0x28 +;; 48897c2420 mov qword ptr [rsp + 0x20], rdi +;; 4889742418 mov qword ptr [rsp + 0x18], rsi +;; f20f11442410 movsd qword ptr [rsp + 0x10], xmm0 +;; f20f114c2408 movsd qword ptr [rsp + 8], xmm1 +;; 89542404 mov dword ptr [rsp + 4], edx +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; f20f10442408 movsd xmm0, qword ptr [rsp + 8] +;; f20f104c2410 movsd xmm1, qword ptr [rsp + 0x10] ;; 83f800 cmp eax, 0 -;; 0f8404000000 je 0x50 -;; 4c: f20f10c1 movsd xmm0, xmm1 -;; 4883c420 add rsp, 0x20 +;; 0f8404000000 je 0x59 +;; 55: f20f10c1 movsd xmm0, xmm1 +;; 4883c428 add rsp, 0x28 ;; 5d pop rbp ;; c3 ret -;; 56: 0f0b ud2 +;; 5f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/select/i32.wat b/winch/filetests/filetests/x64/select/i32.wat index 2575cee3b420..edb838d3b163 100644 --- a/winch/filetests/filetests/x64/select/i32.wat +++ b/winch/filetests/filetests/x64/select/i32.wat @@ -7,23 +7,25 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f872e000000 ja 0x49 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8735000000 ja 0x53 +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 8b4c2410 mov ecx, dword ptr [rsp + 0x10] -;; 8b542414 mov edx, dword ptr [rsp + 0x14] +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 8b4c2408 mov ecx, dword ptr [rsp + 8] +;; 8b54240c mov edx, dword ptr [rsp + 0xc] ;; 83f800 cmp eax, 0 ;; 0f45ca cmovne ecx, edx ;; 89c8 mov eax, ecx -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 49: 0f0b ud2 +;; 53: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/select/i64.wat b/winch/filetests/filetests/x64/select/i64.wat index ae506ea8d515..d76f9c558628 100644 --- a/winch/filetests/filetests/x64/select/i64.wat +++ b/winch/filetests/filetests/x64/select/i64.wat @@ -8,23 +8,25 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c320000000 add r11, 0x20 +;; 4981c328000000 add r11, 0x28 ;; 4939e3 cmp r11, rsp -;; 0f8734000000 ja 0x4f -;; 1b: 4883ec20 sub rsp, 0x20 -;; 48897c2418 mov qword ptr [rsp + 0x18], rdi -;; 4889742410 mov qword ptr [rsp + 0x10], rsi -;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] -;; 488b4c2410 mov rcx, qword ptr [rsp + 0x10] -;; 488b542418 mov rdx, qword ptr [rsp + 0x18] +;; 0f873b000000 ja 0x59 +;; 1e: 4883ec28 sub rsp, 0x28 +;; 48897c2420 mov qword ptr [rsp + 0x20], rdi +;; 4889742418 mov qword ptr [rsp + 0x18], rsi +;; 4889542410 mov qword ptr [rsp + 0x10], rdx +;; 48894c2408 mov qword ptr [rsp + 8], rcx +;; 4489442404 mov dword ptr [rsp + 4], r8d +;; 8b442404 mov eax, dword ptr [rsp + 4] +;; 488b4c2408 mov rcx, qword ptr [rsp + 8] +;; 488b542410 mov rdx, qword ptr [rsp + 0x10] ;; 83f800 cmp eax, 0 ;; 480f45ca cmovne rcx, rdx ;; 4889c8 mov rax, rcx -;; 4883c420 add rsp, 0x20 +;; 4883c428 add rsp, 0x28 ;; 5d pop rbp ;; c3 ret -;; 4f: 0f0b ud2 +;; 59: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/store/f32.wat b/winch/filetests/filetests/x64/store/f32.wat index dd9d04d4f006..4484d89121a3 100644 --- a/winch/filetests/filetests/x64/store/f32.wat +++ b/winch/filetests/filetests/x64/store/f32.wat @@ -6,22 +6,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f30f10051d000000 movss xmm0, dword ptr [rip + 0x1d] ;; b800000000 mov eax, 0 ;; 498b4e50 mov rcx, qword ptr [r14 + 0x50] ;; 4801c1 add rcx, rax ;; f30f1101 movss dword ptr [rcx], xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 -;; 43: 0000 add byte ptr [rax], al -;; 45: 0000 add byte ptr [rax], al -;; 47: 0000 add byte ptr [rax], al +;; 49: 0f0b ud2 +;; 4b: 0000 add byte ptr [rax], al +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 0000 add byte ptr [rax], al diff --git a/winch/filetests/filetests/x64/store/f64.wat b/winch/filetests/filetests/x64/store/f64.wat index a83d86ea5d20..64037fbc0c18 100644 --- a/winch/filetests/filetests/x64/store/f64.wat +++ b/winch/filetests/filetests/x64/store/f64.wat @@ -7,25 +7,27 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; f20f10051d000000 movsd xmm0, qword ptr [rip + 0x1d] ;; b800000000 mov eax, 0 ;; 498b4e50 mov rcx, qword ptr [r14 + 0x50] ;; 4801c1 add rcx, rax ;; f20f1101 movsd qword ptr [rcx], xmm0 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 -;; 43: 0000 add byte ptr [rax], al -;; 45: 0000 add byte ptr [rax], al -;; 47: 0000 add byte ptr [rax], al -;; 49: 0000 add byte ptr [rax], al +;; 49: 0f0b ud2 ;; 4b: 0000 add byte ptr [rax], al -;; 4d: 00f4 add ah, dh +;; 4d: 0000 add byte ptr [rax], al +;; 4f: 0000 add byte ptr [rax], al +;; 51: 0000 add byte ptr [rax], al +;; 53: 0000 add byte ptr [rax], al +;; 55: 00f4 add ah, dh diff --git a/winch/filetests/filetests/x64/store/i32.wat b/winch/filetests/filetests/x64/store/i32.wat index e8d28470ac48..5103cc0b83eb 100644 --- a/winch/filetests/filetests/x64/store/i32.wat +++ b/winch/filetests/filetests/x64/store/i32.wat @@ -8,19 +8,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8721000000 ja 0x3c -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8726000000 ja 0x44 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b801000000 mov eax, 1 ;; b900000000 mov ecx, 0 ;; 498b5650 mov rdx, qword ptr [r14 + 0x50] ;; 4801ca add rdx, rcx ;; 8902 mov dword ptr [rdx], eax -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3c: 0f0b ud2 +;; 44: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/store/i64.wat b/winch/filetests/filetests/x64/store/i64.wat index b578d234ed96..ed52f884b70d 100644 --- a/winch/filetests/filetests/x64/store/i64.wat +++ b/winch/filetests/filetests/x64/store/i64.wat @@ -9,15 +9,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b820000000 mov eax, 0x20 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/table/fill.wat b/winch/filetests/filetests/x64/table/fill.wat index 80869a572513..32f70f5d1d2f 100644 --- a/winch/filetests/filetests/x64/table/fill.wat +++ b/winch/filetests/filetests/x64/table/fill.wat @@ -21,67 +21,78 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c340000000 add r11, 0x40 ;; 4939e3 cmp r11, rsp -;; 0f87ec000000 ja 0x107 -;; 1b: 4883ec20 sub rsp, 0x20 -;; 897c241c mov dword ptr [rsp + 0x1c], edi -;; 89742418 mov dword ptr [rsp + 0x18], esi +;; 0f8704010000 ja 0x122 +;; 1e: 4883ec28 sub rsp, 0x28 +;; 48897c2420 mov qword ptr [rsp + 0x20], rdi +;; 4889742418 mov qword ptr [rsp + 0x18], rsi ;; 89542414 mov dword ptr [rsp + 0x14], edx -;; c744241000000000 mov dword ptr [rsp + 0x10], 0 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2418 mov ecx, dword ptr [rsp + 0x18] +;; 894c2410 mov dword ptr [rsp + 0x10], ecx +;; 448944240c mov dword ptr [rsp + 0xc], r8d +;; c744240800000000 mov dword ptr [rsp + 8], 0 +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 448b5c2410 mov r11d, dword ptr [rsp + 0x10] +;; 4883ec04 sub rsp, 4 +;; 44891c24 mov dword ptr [rsp], r11d +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 4883c404 add rsp, 4 ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f83b7000000 jae 0x109 -;; 52: 4189cb mov r11d, ecx +;; 0f83b9000000 jae 0x124 +;; 6b: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -90,44 +101,44 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8532000000 jne 0xa7 -;; 75: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f8533000000 jne 0xc1 +;; 8e: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx ;; 4883ec04 sub rsp, 4 -;; 488b7c2408 mov rdi, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b542404 mov edx, dword ptr [rsp + 4] ;; ffd3 call rbx ;; 4883c404 add rsp, 4 -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0xab -;; a7: 4883e0fe and rax, 0xfffffffffffffffe -;; 488944240c mov qword ptr [rsp + 0xc], rax +;; 4883c404 add rsp, 4 +;; 4c8b742420 mov r14, qword ptr [rsp + 0x20] +;; e904000000 jmp 0xc5 +;; c1: 4883e0fe and rax, 0xfffffffffffffffe +;; 4889442404 mov qword ptr [rsp + 4], rax ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4368 mov rax, qword ptr [r11 + 0x68] -;; 4156 push r14 -;; 448b5c2424 mov r11d, dword ptr [rsp + 0x24] +;; 448b5c2414 mov r11d, dword ptr [rsp + 0x14] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d -;; 4c8b5c2418 mov r11, qword ptr [rsp + 0x18] +;; 4c8b5c2408 mov r11, qword ptr [rsp + 8] ;; 4153 push r11 -;; 448b5c2428 mov r11d, dword ptr [rsp + 0x28] +;; 448b5c2418 mov r11d, dword ptr [rsp + 0x18] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 4883ec08 sub rsp, 8 -;; 488b7c2418 mov rdi, qword ptr [rsp + 0x18] +;; 4c89f7 mov rdi, r14 ;; be01000000 mov esi, 1 ;; 8b542414 mov edx, dword ptr [rsp + 0x14] ;; 488b4c240c mov rcx, qword ptr [rsp + 0xc] ;; 448b442408 mov r8d, dword ptr [rsp + 8] ;; ffd0 call rax ;; 4883c408 add rsp, 8 -;; 4883c418 add rsp, 0x18 -;; 4883c420 add rsp, 0x20 +;; 4883c410 add rsp, 0x10 +;; 4c8b742420 mov r14, qword ptr [rsp + 0x20] +;; 4883c428 add rsp, 0x28 ;; 5d pop rbp ;; c3 ret -;; 107: 0f0b ud2 -;; 109: 0f0b ud2 +;; 122: 0f0b ud2 +;; 124: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/table/get.wat b/winch/filetests/filetests/x64/table/get.wat index 755f1ea3c88e..9854b7c09e1a 100644 --- a/winch/filetests/filetests/x64/table/get.wat +++ b/winch/filetests/filetests/x64/table/get.wat @@ -11,34 +11,42 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f877d000000 ja 0x98 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] +;; 0f8794000000 ja 0xb2 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] +;; 4883ec04 sub rsp, 4 +;; 44891c24 mov dword ptr [rsp], r11d +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 4883c404 add rsp, 4 ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f8361000000 jae 0x9a -;; 39: 4189cb mov r11d, ecx +;; 0f8362000000 jae 0xb4 +;; 52: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -47,23 +55,23 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8532000000 jne 0x8e -;; 5c: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f8533000000 jne 0xa8 +;; 75: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx ;; 4883ec04 sub rsp, 4 -;; 488b7c2408 mov rdi, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b542404 mov edx, dword ptr [rsp + 4] ;; ffd3 call rbx ;; 4883c404 add rsp, 4 -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0x92 -;; 8e: 4883e0fe and rax, 0xfffffffffffffffe -;; 4883c410 add rsp, 0x10 +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; e904000000 jmp 0xac +;; a8: 4883e0fe and rax, 0xfffffffffffffffe +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 98: 0f0b ud2 -;; 9a: 0f0b ud2 +;; b2: 0f0b ud2 +;; b4: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/table/grow.wat b/winch/filetests/filetests/x64/table/grow.wat index 4c3055c92f0f..71f7369fa7c2 100644 --- a/winch/filetests/filetests/x64/table/grow.wat +++ b/winch/filetests/filetests/x64/table/grow.wat @@ -11,26 +11,28 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f873d000000 ja 0x58 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48897c2408 mov qword ptr [rsp + 8], rdi -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8742000000 ja 0x60 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48891424 mov qword ptr [rsp], rdx ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b50 mov rbx, qword ptr [r11 + 0x50] -;; 4156 push r14 -;; 4c8b5c2410 mov r11, qword ptr [rsp + 0x10] +;; 4c8b1c24 mov r11, qword ptr [rsp] ;; 4153 push r11 -;; 488b7c2408 mov rdi, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba0a000000 mov edx, 0xa ;; 488b0c24 mov rcx, qword ptr [rsp] ;; ffd3 call rbx -;; 4883c410 add rsp, 0x10 -;; 4883c410 add rsp, 0x10 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 58: 0f0b ud2 +;; 60: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/table/init_copy_drop.wat b/winch/filetests/filetests/x64/table/init_copy_drop.wat index d92f2d8b5330..9ce15313fdde 100644 --- a/winch/filetests/filetests/x64/table/init_copy_drop.wat +++ b/winch/filetests/filetests/x64/table/init_copy_drop.wat @@ -35,195 +35,200 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b805000000 mov eax, 5 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b806000000 mov eax, 6 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b807000000 mov eax, 7 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b808000000 mov eax, 8 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8713000000 ja 0x2e -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8718000000 ja 0x36 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; b809000000 mov eax, 9 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2e: 0f0b ud2 +;; 36: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8789010000 ja 0x1a4 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f877c010000 ja 0x19a +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4310 mov rax, qword ptr [r11 + 0x10] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba01000000 mov edx, 1 ;; b907000000 mov ecx, 7 ;; 41b800000000 mov r8d, 0 ;; 41b904000000 mov r9d, 4 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4318 mov rax, qword ptr [r11 + 0x18] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be01000000 mov esi, 1 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4310 mov rax, qword ptr [r11 + 0x10] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba03000000 mov edx, 3 ;; b90f000000 mov ecx, 0xf ;; 41b801000000 mov r8d, 1 ;; 41b903000000 mov r9d, 3 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4318 mov rax, qword ptr [r11 + 0x18] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be03000000 mov esi, 3 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4308 mov rax, qword ptr [r11 + 8] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba00000000 mov edx, 0 ;; b914000000 mov ecx, 0x14 ;; 41b80f000000 mov r8d, 0xf ;; 41b905000000 mov r9d, 5 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4308 mov rax, qword ptr [r11 + 8] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba00000000 mov edx, 0 ;; b915000000 mov ecx, 0x15 ;; 41b81d000000 mov r8d, 0x1d ;; 41b901000000 mov r9d, 1 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4308 mov rax, qword ptr [r11 + 8] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba00000000 mov edx, 0 ;; b918000000 mov ecx, 0x18 ;; 41b80a000000 mov r8d, 0xa ;; 41b901000000 mov r9d, 1 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4308 mov rax, qword ptr [r11 + 8] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba00000000 mov edx, 0 ;; b90d000000 mov ecx, 0xd ;; 41b80b000000 mov r8d, 0xb ;; 41b904000000 mov r9d, 4 ;; ffd0 call rax -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b4308 mov rax, qword ptr [r11 + 8] -;; 4156 push r14 -;; 488b3c24 mov rdi, qword ptr [rsp] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; ba00000000 mov edx, 0 ;; b913000000 mov ecx, 0x13 ;; 41b814000000 mov r8d, 0x14 ;; 41b905000000 mov r9d, 5 ;; ffd0 call rax -;; 4883c408 add rsp, 8 -;; 4883c408 add rsp, 8 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 1a4: 0f0b ud2 +;; 19a: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f87b6000000 ja 0xd1 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f87d4000000 ja 0xf2 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 8b0c24 mov ecx, dword ptr [rsp] @@ -231,8 +236,8 @@ ;; 4c89f2 mov rdx, r14 ;; 8b9af0000000 mov ebx, dword ptr [rdx + 0xf0] ;; 39d9 cmp ecx, ebx -;; 0f8387000000 jae 0xd3 -;; 4c: 4189cb mov r11d, ecx +;; 0f839f000000 jae 0xf4 +;; 55: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b92e8000000 mov rdx, qword ptr [rdx + 0xe8] ;; 4889d6 mov rsi, rdx @@ -241,36 +246,42 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8532000000 jne 0xa4 -;; 72: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f8533000000 jne 0xae +;; 7b: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx ;; 4883ec04 sub rsp, 4 -;; 488b7c2408 mov rdi, qword ptr [rsp + 8] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b542404 mov edx, dword ptr [rsp + 4] ;; ffd3 call rbx ;; 4883c404 add rsp, 4 -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0xa8 -;; a4: 4883e0fe and rax, 0xfffffffffffffffe +;; 4883c404 add rsp, 4 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; e904000000 jmp 0xb2 +;; ae: 4883e0fe and rax, 0xfffffffffffffffe ;; 4885c0 test rax, rax -;; 0f8424000000 je 0xd5 -;; b1: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] +;; 0f843b000000 je 0xf6 +;; bb: 4d8b5e40 mov r11, qword ptr [r14 + 0x40] ;; 418b0b mov ecx, dword ptr [r11] ;; 8b5018 mov edx, dword ptr [rax + 0x18] ;; 39d1 cmp ecx, edx -;; 0f8514000000 jne 0xd7 -;; c3: 50 push rax +;; 0f852b000000 jne 0xf8 +;; cd: 50 push rax ;; 59 pop rcx +;; 488b5920 mov rbx, qword ptr [rcx + 0x20] ;; 488b5110 mov rdx, qword ptr [rcx + 0x10] +;; 4883ec08 sub rsp, 8 +;; 4889df mov rdi, rbx +;; 4c89f6 mov rsi, r14 ;; ffd2 call rdx -;; 4883c410 add rsp, 0x10 +;; 4883c408 add rsp, 8 +;; 4c8b742410 mov r14, qword ptr [rsp + 0x10] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; d1: 0f0b ud2 -;; d3: 0f0b ud2 -;; d5: 0f0b ud2 -;; d7: 0f0b ud2 +;; f2: 0f0b ud2 +;; f4: 0f0b ud2 +;; f6: 0f0b ud2 +;; f8: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/table/set.wat b/winch/filetests/filetests/x64/table/set.wat index 39b76e2b71d7..f466ac659397 100644 --- a/winch/filetests/filetests/x64/table/set.wat +++ b/winch/filetests/filetests/x64/table/set.wat @@ -16,36 +16,40 @@ ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f874c000000 ja 0x67 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 4889742408 mov qword ptr [rsp + 8], rsi -;; 4c893424 mov qword ptr [rsp], r14 -;; 488b442408 mov rax, qword ptr [rsp + 8] -;; 8b4c2414 mov ecx, dword ptr [rsp + 0x14] +;; 0f8750000000 ja 0x6e +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi +;; 8954240c mov dword ptr [rsp + 0xc], edx +;; 48890c24 mov qword ptr [rsp], rcx +;; 488b0424 mov rax, qword ptr [rsp] +;; 8b4c240c mov ecx, dword ptr [rsp + 0xc] ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f8326000000 jae 0x69 -;; 43: 4189cb mov r11d, ecx +;; 0f8326000000 jae 0x70 +;; 4a: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -54,29 +58,38 @@ ;; 480f43d6 cmovae rdx, rsi ;; 4883c801 or rax, 1 ;; 488902 mov qword ptr [rdx], rax -;; 4883c418 add rsp, 0x18 +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 67: 0f0b ud2 -;; 69: 0f0b ud2 +;; 6e: 0f0b ud2 +;; 70: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f87b8000000 ja 0xd3 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b4c2408 mov ecx, dword ptr [rsp + 8] +;; 0f87ce000000 ja 0xec +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] +;; 4883ec04 sub rsp, 4 +;; 44891c24 mov dword ptr [rsp], r11d +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] +;; 4883ec04 sub rsp, 4 +;; 44891c24 mov dword ptr [rsp], r11d +;; 8b0c24 mov ecx, dword ptr [rsp] +;; 4883c404 add rsp, 4 ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f8398000000 jae 0xd5 -;; 3d: 4189cb mov r11d, ecx +;; 0f838c000000 jae 0xee +;; 62: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -85,29 +98,26 @@ ;; 480f43d6 cmovae rdx, rsi ;; 488b02 mov rax, qword ptr [rdx] ;; 4885c0 test rax, rax -;; 0f8536000000 jne 0x96 -;; 60: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] +;; 0f852a000000 jne 0xaf +;; 85: 4d8b5e38 mov r11, qword ptr [r14 + 0x38] ;; 498b5b48 mov rbx, qword ptr [r11 + 0x48] -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] -;; 4883ec04 sub rsp, 4 -;; 44891c24 mov dword ptr [rsp], r11d -;; 4156 push r14 ;; 4883ec04 sub rsp, 4 ;; 890c24 mov dword ptr [rsp], ecx -;; 488b7c2404 mov rdi, qword ptr [rsp + 4] +;; 4c89f7 mov rdi, r14 ;; be00000000 mov esi, 0 ;; 8b1424 mov edx, dword ptr [rsp] ;; ffd3 call rbx -;; 4883c40c add rsp, 0xc -;; e904000000 jmp 0x9a -;; 96: 4883e0fe and rax, 0xfffffffffffffffe +;; 4883c404 add rsp, 4 +;; 4c8b742414 mov r14, qword ptr [rsp + 0x14] +;; e904000000 jmp 0xb3 +;; af: 4883e0fe and rax, 0xfffffffffffffffe ;; 8b0c24 mov ecx, dword ptr [rsp] ;; 4883c404 add rsp, 4 ;; 4c89f2 mov rdx, r14 ;; 8b5a50 mov ebx, dword ptr [rdx + 0x50] ;; 39d9 cmp ecx, ebx -;; 0f8328000000 jae 0xd7 -;; af: 4189cb mov r11d, ecx +;; 0f8328000000 jae 0xf0 +;; c8: 4189cb mov r11d, ecx ;; 4d6bdb08 imul r11, r11, 8 ;; 488b5248 mov rdx, qword ptr [rdx + 0x48] ;; 4889d6 mov rsi, rdx @@ -116,9 +126,9 @@ ;; 480f43d6 cmovae rdx, rsi ;; 4883c801 or rax, 1 ;; 488902 mov qword ptr [rdx], rax -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; d3: 0f0b ud2 -;; d5: 0f0b ud2 -;; d7: 0f0b ud2 +;; ec: 0f0b ud2 +;; ee: 0f0b ud2 +;; f0: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/table/size.wat b/winch/filetests/filetests/x64/table/size.wat index 003cc399445a..573b31096923 100644 --- a/winch/filetests/filetests/x64/table/size.wat +++ b/winch/filetests/filetests/x64/table/size.wat @@ -6,16 +6,18 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8715000000 ja 0x30 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f871a000000 ja 0x38 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 4d89f3 mov r11, r14 ;; 418b4350 mov eax, dword ptr [r11 + 0x50] -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 30: 0f0b ud2 +;; 38: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_block_broke.wat b/winch/filetests/filetests/x64/unreachable/as_block_broke.wat index bb0549cec053..2019edf90996 100644 --- a/winch/filetests/filetests/x64/unreachable/as_block_broke.wat +++ b/winch/filetests/filetests/x64/unreachable/as_block_broke.wat @@ -8,32 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_block_first.wat b/winch/filetests/filetests/x64/unreachable/as_block_first.wat index 8347956ec1ed..77013aed290a 100644 --- a/winch/filetests/filetests/x64/unreachable/as_block_first.wat +++ b/winch/filetests/filetests/x64/unreachable/as_block_first.wat @@ -6,15 +6,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_block_last.wat b/winch/filetests/filetests/x64/unreachable/as_block_last.wat index 84b508a69502..629928417919 100644 --- a/winch/filetests/filetests/x64/unreachable/as_block_last.wat +++ b/winch/filetests/filetests/x64/unreachable/as_block_last.wat @@ -7,32 +7,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_block_mid.wat b/winch/filetests/filetests/x64/unreachable/as_block_mid.wat index 94a3509c939a..1835a19db5b2 100644 --- a/winch/filetests/filetests/x64/unreachable/as_block_mid.wat +++ b/winch/filetests/filetests/x64/unreachable/as_block_mid.wat @@ -8,32 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_block_value.wat b/winch/filetests/filetests/x64/unreachable/as_block_value.wat index 167e34d59d6d..1415b9185d84 100644 --- a/winch/filetests/filetests/x64/unreachable/as_block_value.wat +++ b/winch/filetests/filetests/x64/unreachable/as_block_value.wat @@ -7,32 +7,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_br_if_cond.wat b/winch/filetests/filetests/x64/unreachable/as_br_if_cond.wat index 69377e3ea7af..ae99bb856533 100644 --- a/winch/filetests/filetests/x64/unreachable/as_br_if_cond.wat +++ b/winch/filetests/filetests/x64/unreachable/as_br_if_cond.wat @@ -7,15 +7,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_br_value.wat b/winch/filetests/filetests/x64/unreachable/as_br_value.wat index aa02b90ebde1..730b91f32804 100644 --- a/winch/filetests/filetests/x64/unreachable/as_br_value.wat +++ b/winch/filetests/filetests/x64/unreachable/as_br_value.wat @@ -7,15 +7,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_call_first.wat b/winch/filetests/filetests/x64/unreachable/as_call_first.wat index b3306c3f9684..cd0e7653004d 100644 --- a/winch/filetests/filetests/x64/unreachable/as_call_first.wat +++ b/winch/filetests/filetests/x64/unreachable/as_call_first.wat @@ -8,32 +8,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c418 add rsp, 0x18 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3f: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_call_last.wat b/winch/filetests/filetests/x64/unreachable/as_call_last.wat index b26684820f44..4274eb750166 100644 --- a/winch/filetests/filetests/x64/unreachable/as_call_last.wat +++ b/winch/filetests/filetests/x64/unreachable/as_call_last.wat @@ -9,32 +9,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c418 add rsp, 0x18 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3f: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_call_mid.wat b/winch/filetests/filetests/x64/unreachable/as_call_mid.wat index 77c28489f767..f4cee1a2b439 100644 --- a/winch/filetests/filetests/x64/unreachable/as_call_mid.wat +++ b/winch/filetests/filetests/x64/unreachable/as_call_mid.wat @@ -8,32 +8,36 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c318000000 add r11, 0x18 +;; 4981c320000000 add r11, 0x20 ;; 4939e3 cmp r11, rsp -;; 0f871a000000 ja 0x35 -;; 1b: 4883ec18 sub rsp, 0x18 -;; 897c2414 mov dword ptr [rsp + 0x14], edi -;; 89742410 mov dword ptr [rsp + 0x10], esi +;; 0f8721000000 ja 0x3f +;; 1e: 4883ec20 sub rsp, 0x20 +;; 48897c2418 mov qword ptr [rsp + 0x18], rdi +;; 4889742410 mov qword ptr [rsp + 0x10], rsi ;; 8954240c mov dword ptr [rsp + 0xc], edx -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c418 add rsp, 0x18 +;; 894c2408 mov dword ptr [rsp + 8], ecx +;; 4489442404 mov dword ptr [rsp + 4], r8d +;; 4883c420 add rsp, 0x20 ;; 5d pop rbp ;; c3 ret -;; 35: 0f0b ud2 +;; 3f: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_func_first.wat b/winch/filetests/filetests/x64/unreachable/as_func_first.wat index 05c4c25b188f..8609b4a4d440 100644 --- a/winch/filetests/filetests/x64/unreachable/as_func_first.wat +++ b/winch/filetests/filetests/x64/unreachable/as_func_first.wat @@ -7,29 +7,33 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_func_last.wat b/winch/filetests/filetests/x64/unreachable/as_func_last.wat index 66dff9ceb846..2caaa0ded701 100644 --- a/winch/filetests/filetests/x64/unreachable/as_func_last.wat +++ b/winch/filetests/filetests/x64/unreachable/as_func_last.wat @@ -7,32 +7,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_func_mid.wat b/winch/filetests/filetests/x64/unreachable/as_func_mid.wat index faf2ea1b3a67..674cf26b203b 100644 --- a/winch/filetests/filetests/x64/unreachable/as_func_mid.wat +++ b/winch/filetests/filetests/x64/unreachable/as_func_mid.wat @@ -8,32 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_func_value.wat b/winch/filetests/filetests/x64/unreachable/as_func_value.wat index a253786b3fc4..f23433572ae8 100644 --- a/winch/filetests/filetests/x64/unreachable/as_func_value.wat +++ b/winch/filetests/filetests/x64/unreachable/as_func_value.wat @@ -8,32 +8,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_if_cond.wat b/winch/filetests/filetests/x64/unreachable/as_if_cond.wat index 4ab5cd23368b..24c33d491392 100644 --- a/winch/filetests/filetests/x64/unreachable/as_if_cond.wat +++ b/winch/filetests/filetests/x64/unreachable/as_if_cond.wat @@ -7,15 +7,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_if_else.wat b/winch/filetests/filetests/x64/unreachable/as_if_else.wat index 289a5ec0c41a..1a22b8299175 100644 --- a/winch/filetests/filetests/x64/unreachable/as_if_else.wat +++ b/winch/filetests/filetests/x64/unreachable/as_if_else.wat @@ -8,22 +8,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f872d000000 ja 0x48 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8731000000 ja 0x4f +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8409000000 je 0x40 -;; 37: 8b442408 mov eax, dword ptr [rsp + 8] -;; e902000000 jmp 0x42 -;; 40: 0f0b ud2 -;; 4883c410 add rsp, 0x10 +;; 0f8408000000 je 0x47 +;; 3f: 8b0424 mov eax, dword ptr [rsp] +;; e902000000 jmp 0x49 +;; 47: 0f0b ud2 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 48: 0f0b ud2 +;; 4f: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_if_then.wat b/winch/filetests/filetests/x64/unreachable/as_if_then.wat index 05d49629644c..24c0e1f4def2 100644 --- a/winch/filetests/filetests/x64/unreachable/as_if_then.wat +++ b/winch/filetests/filetests/x64/unreachable/as_if_then.wat @@ -7,21 +7,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8402000000 je 0x39 -;; 37: 0f0b ud2 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 4883c410 add rsp, 0x10 +;; 0f8402000000 je 0x41 +;; 3f: 0f0b ud2 +;; 8b0424 mov eax, dword ptr [rsp] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_if_then_no_else.wat b/winch/filetests/filetests/x64/unreachable/as_if_then_no_else.wat index 65c5ebda82b3..5ee047ac8a82 100644 --- a/winch/filetests/filetests/x64/unreachable/as_if_then_no_else.wat +++ b/winch/filetests/filetests/x64/unreachable/as_if_then_no_else.wat @@ -7,21 +7,23 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c310000000 add r11, 0x10 +;; 4981c318000000 add r11, 0x18 ;; 4939e3 cmp r11, rsp -;; 0f8728000000 ja 0x43 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 897c240c mov dword ptr [rsp + 0xc], edi -;; 89742408 mov dword ptr [rsp + 8], esi -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f872c000000 ja 0x4a +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 89542404 mov dword ptr [rsp + 4], edx +;; 890c24 mov dword ptr [rsp], ecx +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f8402000000 je 0x39 -;; 37: 0f0b ud2 -;; 8b442408 mov eax, dword ptr [rsp + 8] -;; 4883c410 add rsp, 0x10 +;; 0f8402000000 je 0x41 +;; 3f: 0f0b ud2 +;; 8b0424 mov eax, dword ptr [rsp] +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 43: 0f0b ud2 +;; 4a: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_loop_broke.wat b/winch/filetests/filetests/x64/unreachable/as_loop_broke.wat index 3e67d54ceb83..888561d2a951 100644 --- a/winch/filetests/filetests/x64/unreachable/as_loop_broke.wat +++ b/winch/filetests/filetests/x64/unreachable/as_loop_broke.wat @@ -10,32 +10,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8720000000 ja 0x3b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8728000000 ja 0x46 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; b801000000 mov eax, 1 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 3b: 0f0b ud2 +;; 46: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_loop_first.wat b/winch/filetests/filetests/x64/unreachable/as_loop_first.wat index 1c285f526b68..3eeee1067e0d 100644 --- a/winch/filetests/filetests/x64/unreachable/as_loop_first.wat +++ b/winch/filetests/filetests/x64/unreachable/as_loop_first.wat @@ -8,15 +8,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_loop_last.wat b/winch/filetests/filetests/x64/unreachable/as_loop_last.wat index 7e3745a88c5a..cf14878a210f 100644 --- a/winch/filetests/filetests/x64/unreachable/as_loop_last.wat +++ b/winch/filetests/filetests/x64/unreachable/as_loop_last.wat @@ -9,32 +9,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_loop_mid.wat b/winch/filetests/filetests/x64/unreachable/as_loop_mid.wat index 226ae159e1a4..2f57efd2e3c9 100644 --- a/winch/filetests/filetests/x64/unreachable/as_loop_mid.wat +++ b/winch/filetests/filetests/x64/unreachable/as_loop_mid.wat @@ -9,32 +9,37 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f870e000000 ja 0x29 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883c408 add rsp, 8 +;; 0f8713000000 ja 0x31 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 29: 0f0b ud2 +;; 31: 0f0b ud2 ;; ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] ;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f871d000000 ja 0x38 -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 -;; 4883ec08 sub rsp, 8 -;; e800000000 call 0x2c -;; 4883c408 add rsp, 8 +;; 0f8725000000 ja 0x43 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi +;; 4c89f7 mov rdi, r14 +;; 4c89f6 mov rsi, r14 +;; e800000000 call 0x36 +;; 4c8b742408 mov r14, qword ptr [rsp + 8] ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 38: 0f0b ud2 +;; 43: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/as_return_value.wat b/winch/filetests/filetests/x64/unreachable/as_return_value.wat index 4c4ed3e72615..79f7bac4a256 100644 --- a/winch/filetests/filetests/x64/unreachable/as_return_value.wat +++ b/winch/filetests/filetests/x64/unreachable/as_return_value.wat @@ -7,15 +7,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/type_i32.wat b/winch/filetests/filetests/x64/unreachable/type_i32.wat index 01523410fd73..bd7d1c54a340 100644 --- a/winch/filetests/filetests/x64/unreachable/type_i32.wat +++ b/winch/filetests/filetests/x64/unreachable/type_i32.wat @@ -5,15 +5,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/type_i64.wat b/winch/filetests/filetests/x64/unreachable/type_i64.wat index 715d5c2033f8..b507d77a121d 100644 --- a/winch/filetests/filetests/x64/unreachable/type_i64.wat +++ b/winch/filetests/filetests/x64/unreachable/type_i64.wat @@ -5,15 +5,17 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c308000000 add r11, 8 +;; 4981c310000000 add r11, 0x10 ;; 4939e3 cmp r11, rsp -;; 0f8710000000 ja 0x2b -;; 1b: 4883ec08 sub rsp, 8 -;; 4c893424 mov qword ptr [rsp], r14 +;; 0f8715000000 ja 0x33 +;; 1e: 4883ec10 sub rsp, 0x10 +;; 48897c2408 mov qword ptr [rsp + 8], rdi +;; 48893424 mov qword ptr [rsp], rsi ;; 0f0b ud2 -;; 4883c408 add rsp, 8 +;; 4883c410 add rsp, 0x10 ;; 5d pop rbp ;; c3 ret -;; 2b: 0f0b ud2 +;; 33: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/with_spilled_local.wat b/winch/filetests/filetests/x64/unreachable/with_spilled_local.wat index 2d7f63195d69..d1972c440922 100644 --- a/winch/filetests/filetests/x64/unreachable/with_spilled_local.wat +++ b/winch/filetests/filetests/x64/unreachable/with_spilled_local.wat @@ -11,20 +11,21 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f8726000000 ja 0x41 -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f872b000000 ja 0x49 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 0f0b ud2 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 41: 0f0b ud2 +;; 49: 0f0b ud2 diff --git a/winch/filetests/filetests/x64/unreachable/with_spilled_local_in_if.wat b/winch/filetests/filetests/x64/unreachable/with_spilled_local_in_if.wat index 86c18d3bd0af..e615ae3e0fef 100644 --- a/winch/filetests/filetests/x64/unreachable/with_spilled_local_in_if.wat +++ b/winch/filetests/filetests/x64/unreachable/with_spilled_local_in_if.wat @@ -16,23 +16,24 @@ ) ;; 55 push rbp ;; 4889e5 mov rbp, rsp +;; 4989fe mov r14, rdi ;; 4d8b5e08 mov r11, qword ptr [r14 + 8] ;; 4d8b1b mov r11, qword ptr [r11] -;; 4981c314000000 add r11, 0x14 +;; 4981c31c000000 add r11, 0x1c ;; 4939e3 cmp r11, rsp -;; 0f8732000000 ja 0x4d -;; 1b: 4883ec10 sub rsp, 0x10 -;; 48c744240800000000 -;; mov qword ptr [rsp + 8], 0 -;; 4c893424 mov qword ptr [rsp], r14 -;; 8b44240c mov eax, dword ptr [rsp + 0xc] +;; 0f8737000000 ja 0x55 +;; 1e: 4883ec18 sub rsp, 0x18 +;; 48897c2410 mov qword ptr [rsp + 0x10], rdi +;; 4889742408 mov qword ptr [rsp + 8], rsi +;; 48c7042400000000 mov qword ptr [rsp], 0 +;; 8b442404 mov eax, dword ptr [rsp + 4] ;; 85c0 test eax, eax -;; 0f840f000000 je 0x47 -;; 38: 448b5c240c mov r11d, dword ptr [rsp + 0xc] +;; 0f840f000000 je 0x4f +;; 40: 448b5c2404 mov r11d, dword ptr [rsp + 4] ;; 4883ec04 sub rsp, 4 ;; 44891c24 mov dword ptr [rsp], r11d ;; 0f0b ud2 -;; 4883c410 add rsp, 0x10 +;; 4883c418 add rsp, 0x18 ;; 5d pop rbp ;; c3 ret -;; 4d: 0f0b ud2 +;; 55: 0f0b ud2