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 06ff566f50..9999da5015 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 0c39976f7b..b9bb921767 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 9e3817f746..ea0b38a1da 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 542c1c246c..553295ec8e 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 12da9b5248..5b0cadaa36 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 a0ff08f9d5..05bc71116d 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 47861ac3e1..1438b20265 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 2c1b931375..a467f61ac4 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 c4e1924547..4e7db5ac0e 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 bcb263a5c2..b420711bb8 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 428dd112ba..7aba29328b 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 179929717c..37e2ae1a02 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 e073556165..3ad1ec585a 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 6a632c1d67..969a5479a5 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 4a5a410285..a404a9500c 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 c59efbd6a7..6dd2300e09 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 94e784060c..5b85216ed2 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 1ba12b3560..f026232639 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 93d1335b7e..4da6b3cdab 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 9ca41aa797..212a2f9049 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 7015e5ef27..ddc8914e99 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 2123d262ac..bf362f26b4 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 22433c270c..aef9967f92 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 0636475bbd..bff663e7ec 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 860984ea43..95c0fc1b2e 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 07e3874313..f6ca3609e6 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 fd2ead6bb4..d86b7c4498 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 78ed0894e6..1111438270 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 e7f352fa71..f9b3a5782a 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 71d199c0ec..818c97bd0e 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 6e54580bcc..d0caf5687f 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 454e780373..0bef1ff99a 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 a42494c1b5..178bb7b045 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 9981775561..ff45fa7cb3 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 f30ada72cd..969f6df194 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 75cbc5e465..0471752d59 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 219c1b9724..64f990457e 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 6e969770b9..4cc460d7a8 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 8174615ed6..e60559fd89 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 8592112300..0fba573d99 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 da9fbced92..c053880e47 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 324a80a60a..9d6d7612ca 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 a1173c076b..584a049b8c 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 45b7be4171..7ee0179f42 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 f0c9782428..9397030460 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 aefa644222..f229996547 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 4e68719623..0980831c58 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 41f91cb155..2547a96fc4 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 2eaa76ce30..ed0477e8fc 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 4ef2c2a261..f2f1a07be3 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 f902742516..7760c60327 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 c52600d989..d74ad5d37e 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 9f80cebbf1..7bc58f9687 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 be4f018d3d..676474e64e 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 ec93d32767..d7e9680240 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 76d6429054..016429b4d9 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 36fb2f7a1d..3417837a8b 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 ae06566e26..c01d43e145 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 30560c7c4d..4c67eee2bb 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 6fd70be787..e273e04f6a 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 a2e977fe1a..ed4486c22c 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 fa28e83bc2..718a7dad6c 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 3d9a3124cb..994bf8484d 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 49a119e53d..e4894746d2 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 80e116244a..c205372e53 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 0894a40824..50989d3e43 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 b416fb8e4d..6863a26cad 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 3091e5f355..72dd256590 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 aa7d7ca3c2..636b57b7be 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 6fd51c6944..a2dd862d87 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 2126f09395..a26619faca 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 30be2cada3..d822a45c51 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 a5087c9e23..c8af683d5f 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 269087a296..18d0f57d0c 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 04d5dcf3fe..5e1e34ed46 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 e7dbc47d9c..fae4d8eecb 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 163e96d406..30b3227452 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 4aa1d93213..66f14e9e0b 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 94d9b0aa2e..89d276b3a6 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 e1038bbf85..da7cf082e1 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 601d413ffa..8509faccd7 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 915792c6e1..9b3c4fca9b 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 c05186358c..3a6afcfd23 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 87e564441e..64db18cfe5 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 84f7c7b2ec..c9bb07024b 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 fd27556483..d3b85bceae 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 714c094f89..57ce6677e2 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 e6746d5c54..5d337eaf97 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 9bde2851fa..5a1864c0ec 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 c68d93c239..aa8ba23f4a 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 dba2bd24a5..6eb50867f2 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 9707358956..6080e23d87 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 d5a0c8a905..45f2620c47 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 0c71efa251..80d41f9a99 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 324b7fe885..f1ee010980 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 870ab7e6ba..22df527bc4 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 b11742631d..4bf770f705 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 4a241545ab..d4a6c95764 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 feb8a3f172..b46cff6fcf 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 1114cdb367..9334667018 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 6b7399a61f..f307f6f8c2 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 e0d47ef88f..1de40a1efd 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 4d512f4289..d527947e49 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 2773bf6b17..633a119c38 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 3dc861c8ce..20ad73296d 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 e57169ddc9..0ad40a8331 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 8f41a9e911..6689e96035 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 33cb786859..7a3cf3c4b0 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 226273148a..38b2978ac8 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 54b00b5372..182266c9ab 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 bb83657d50..94abda63a5 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 1382aec7a1..05c43c782d 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 2dac811cb2..2ef69e1f8a 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 739a778aac..8aed366718 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 46719c76a4..b377c03741 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 cff3e0c524..d6f3a8dabf 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 13694a6793..2f4790de70 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 fdf05e94aa..e7a23c0024 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 1044a46ea0..2776af08dc 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 5e25be59c9..c463ebdb26 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 66e6d9fc7d..f73339b8d9 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 65d9ff773c..02aa268d6a 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 a95547a80b..ef439bc11f 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 7cb39964db..a8e2733249 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 2f81f55d6f..8437677f4d 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 a334e4f7f5..11abc4b5f4 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 d1a737c3fa..091c9f2592 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 fd8d04c811..500c43135e 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 f8d484c9ba..51b59f670c 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 66d2357c0c..77c9fd9b6c 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 4c4f76d8bb..83c3c72358 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 3933069611..f885240fff 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 30a99d840f..a988b84573 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 ea1faa1a4a..417a1ee7c6 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 249c541727..8a3d482807 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 7edf7e2502..05f6b9b309 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 f1b15d42a8..04fdd2f99b 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 f610c527c8..fa31e0044f 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 dbeae84433..1976eabc21 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 2fd2eef9ce..f2e7f52f80 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 4eb30cebc8..b8c032f920 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 7be0a4fb97..33c80c4c33 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 f2cb6cfce9..65d9128f8d 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 75ab89a906..bd956655c2 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 7306709d83..3a0810e7c9 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 113cb043ae..3357389852 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 c14a5b8998..f02dff5cff 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 91785221ed..a06af01d30 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 c5816afd07..6ccb5df96c 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 91225ce8c2..50b9f2ff41 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 792c870bb3..47d436ce9c 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 adbe8ebfbc..b945db9ab7 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 32c07f03e7..aa880d9d79 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 6ffcf06f1f..c0ef875649 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 24858ddcb5..7f8d27c379 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 29ed4cdc21..bf547e972a 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 8086825bb5..3fd706cfb0 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 87349c0f3a..b21aa03859 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 c5e24dd173..518c6cc384 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 5094f13e16..a2d3a36752 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 49297f075f..5a286bf246 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 76e2182b60..d325a54a65 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 b57945fc31..d04a666410 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 34943a7c54..de1c1ea904 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 03a585d105..bab972b4b3 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 04471a5506..d5a67fd2d0 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 33876c1f0f..9856ee24d3 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 7c082a0813..34323b9995 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 35b4d3ee06..c646a1738d 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 b8431caed0..dc6df9435e 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 022264c875..c78b9db797 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 5697dabf89..01ec6a772a 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 fba06519f7..77ed092977 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 4a21770f19..7ffa4a45ca 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 25217d4f7d..9989dbffb4 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 8094636b74..d11ec61d99 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 7e01edc011..321a36a762 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 0bce734649..43d3ad5569 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 26d3b6e24e..4549e5b2b0 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 b882d2b511..8fa42abbd7 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 b3209736c3..e2379d1c90 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 9e4a2f8911..aacee9fdd9 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 8678e9fd69..8df5f26cf0 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 6ae1270089..6c043f5598 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 93c4343fd9..1ba756394b 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 750b7dbceb..2d224c23f1 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 aa05ae1484..dc6401a4f8 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 8cce719cde..cce0ddf71a 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 306fa1ab41..b9eed231e7 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 2bc51132a2..3628925081 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 3fd628b931..fc296238a5 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 8d0c682e0c..3acd2e3bcf 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 410ddc596a..b27f2c4b5a 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 23bbedf91a..fa680d0e08 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 5c2f3ea910..354895c7d1 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 18f3fdaa56..b5712ce359 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 6317d293f0..c6c2efc6a0 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 467d74702b..c73c9ec000 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 d2274c533b..9d0a30341d 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 8dcb2a119b..bd6bbc965b 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 b946727f75..3e928b8855 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 a6bbc8ee2c..2047a81acf 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 0183ffcba1..41a43a3a0a 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 8da3e82785..d897f5fba2 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 3e39dcbea9..a85f6cb2d0 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 0766cdf471..36277b33c4 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 63a88facc4..653b78548f 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 79636c6285..1abe6df59b 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 e83534d60c..ef67f1b0a9 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 6b4f9851ff..afcbb29fea 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 15b7289a66..2b5f65dfc6 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 5581187d1a..21b49a4c76 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 133a369a61..a847c03ad4 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 4710e8ac90..5396597c47 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 4daf0a257a..1324e9e34f 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 957ac50d3a..b5b249dca3 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 760c7320d1..1bfa0169fc 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 e823f6b481..e2aeb8e169 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 23fcf844e8..8c187d66fb 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 d2d2ec54e2..f8556ca7a7 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 477a63b62e..113203dd7c 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 c8b9d19731..84d23a22f5 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 800d55f25a..646ed8593a 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 62de7b9286..b650ba1b28 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 86862c8ccd..4b4d7fdc6a 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 0cd26b40ae..b805916800 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 0ef4c18c08..c3d761ce35 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 8ce4fc84de..033194c7e6 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 c8ed922412..fa1457b697 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 627d29fbcd..dc3b302727 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 fc1cf637ac..a93cb94046 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 c7ea9af76e..23ae88e4fe 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 3f0c4404d5..be634b2cf5 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 4aa85d0034..552cd6e85e 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 678e9dba06..2eb4688ad8 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 80aea31412..5a7d10c910 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 768a36b0a7..c2bd954dae 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 796b5f59d0..a6e3fa5763 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 92e447a7fc..2756d7b14a 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 8d68495379..42591edb0e 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 07abc3b8ae..d2a36887cf 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 98db4e8dce..20401dba5f 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 98db4e8dce..20401dba5f 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 7f4a439714..1f1190477e 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 140b6c6d10..fe73513b0e 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 42d1181600..2e0354cecb 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 23131b9284..1570827fc4 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 366ecaa4cb..481737fa92 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 f3807c0070..7cf51516f8 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 bd12efb580..1e7ad628d1 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 c70dcaba5c..d9c5294a49 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 049448287f..92e54c26a0 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 4920c4f2c3..186422df19 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 c2314ba977..ebb5a401a1 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 7bb94378c6..2788755a1b 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 a87119fec4..1b90213a2a 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 fd22829d8b..6793ff49d9 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 dc9f7c74d8..5cf09af188 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 7092031ee1..2d5f7cd847 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 7b09bf8069..a647efabcb 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 66768057ea..43ca1db4c3 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 0d2cbc28e0..1a0e779b2b 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 871e1414cb..0102cd4b8b 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 98e1d2eac4..7413f04838 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 23c3f79dd0..0021ec1652 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 f4f41df13d..8af1a9dd31 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 6e35eb8817..261268ede7 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 2fe8c5cb78..80ce3b3184 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 ad8d7cbc9f..053a84d6b7 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 c0fe8c7f4f..58a7c27a49 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 2dca718c24..3104de4fcb 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 5a45fa2cf3..0d0521a179 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 88aebf62fb..1c580227b6 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 d5bace4899..b902a4bd8f 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 516312cdf0..5eeaf16d9c 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 3ea17db754..87ac53d6c9 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 87d6b6f12d..0369e1d057 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 f85237b635..12310ccc7f 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 99042a1b4e..be1ca0dc38 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 520e731eba..0a79d2a203 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 e26e410abd..246e1c1b82 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 929b69d396..dec969ae92 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 5a6b519014..6f9df1fef4 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 1362b73c7c..6adf482ce4 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 d86ee8dbad..04a3757b12 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 8b32760528..bbdf1794e7 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 23d0191049..5c06fb12e6 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 e9ec61704b..cb0b37b1e4 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 c3011ece08..ec8c5b7949 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 50de75b783..495f756f4c 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 6e5c7952e5..9b9432e023 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 b8f177da3e..715acfd388 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 f3748ee8f2..dc2e8e2c81 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 1eff384d7d..ef2c65cf99 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 0b40470f4f..4dc841f2eb 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 c8ddac67f5..1adb151d8e 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 9317d3fd17..c256ea971b 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 bd203e1f13..415f4dbce7 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 c2802dfa8d..189d726050 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 51058bc623..4807202a66 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 175e1714bc..a689f425c8 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 7c2e5dd837..31cbd722ce 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 b2b0b757f0..f4900174c7 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 7003f479b5..608f4d1b64 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 3c80ca5fe7..85f2dfe641 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 f87441786b..100ea9b956 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 9aa818fedd..81a7dac951 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 d3d6181914..9a9544a494 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 06130346bc..daf50e2ff3 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 14d09d3840..272978dc26 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 23e06f77e6..7382035003 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 5dbd59762a..9aaf45ceea 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 306d2c7a70..7cbbce9e80 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 2d03f3a82a..928c1fc671 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 50fa124636..7cbed624fd 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 4313faeb82..13e9cfe8c6 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 36beacbed3..421647414e 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 415083b9c9..874f965f71 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 7379aef20f..109aea1870 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 cb862913d7..a8c7b5d5e7 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 704ca768ee..3f64e8f42f 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 316bd5ccbd..5e1b50db10 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 466c066bf2..37b79ff005 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 14cd0b124f..236475bab2 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 326ea47df3..95fbe425d1 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 d2424e9187..faab734a80 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 0de352f43a..105ff9ed76 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 fa14df9681..3775aa3c10 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 c153b72edc..81dda0ee2c 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 3d9ba2018d..2e58ccbf41 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 d78f89c990..47c8eb4a2c 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 d2cd91fec7..7727a1e70d 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 bf2478c6f7..551880484c 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 5b81954e19..f0c6a9c5a0 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 3d7e65effd..75d92d4a39 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 555d3643f6..4f0399900c 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 345afe3c8e..cd77b857c7 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 d24cfa621f..e939da2f26 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 c34f7ef2f6..31a1a74c32 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 cfec07c245..a34392f67f 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 5dfdbbd365..3fdc2591fc 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 c4a51c29e9..fe08dde241 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 a6b87b8094..48e43b8820 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 761c3eac4c..8cbf03040f 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 ad997f4794..988b5a8f8c 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 b9ed8a3c63..78c9b51a39 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 e3578a9a19..6cdd57ec40 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 b5181038b3..021cf697e3 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 90c9ad6153..c32c3c873c 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 cdfd0b5241..560d794666 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 52cdae4ca9..e7e776425b 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 2a341f76de..ee20994402 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 58eec28fb0..797cf6b929 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 e82ca69076..acb022fc66 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 d8544b5884..2fbe01c5b7 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 bbb605dae8..f61c0adf1a 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 59de91403d..42968820ad 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 49e8a4c6e1..734983b3e9 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 f544b6e988..26d1f7557f 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 e4ef5a0359..c832de8c55 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 c3cee9b64a..4d52fe12c9 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 44e69b9004..de94712828 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 376f3cb667..1fd1ad1df5 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 8c0200d4ca..0df950b5b1 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 30a93b5557..9f92b52460 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 f4dfb0fc9d..bfadc1c6b6 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 2aceeff555..c8853ac7a7 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 02d1f2b6b4..be9c7eb88b 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 2ce6207a60..ed12ab4120 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 d8eac20a5f..0ab45ffa00 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 55e092e169..4f10bbb339 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 6684ac9601..5ca8422506 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 7fedbc6ea3..da62c71ee4 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 87baad763d..af8657ef8c 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 02f9a96371..3c888e96e7 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 3b84a71e3c..c782ce39f2 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 0003fede1e..3e39328f55 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 8851d13a62..e10813bedd 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 0a9f83e274..2a4c9c7e03 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 2c4c8d580d..72590f50d0 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 e14aa7f812..4c5dacaaa2 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 606d9cd476..06c3d6d0c6 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 db8eea7584..fffde624c1 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 f92b39879c..d6788d2634 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 800d74d393..ac64b64c06 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 f9aa0e2af7..af9ec8994d 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 44ffe7cb00..53a8ca1ed9 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 9f03f4bdc8..290f32e338 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 a6f8cc6a0d..fdcf9434fd 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 1538e5ad22..74fc5a2915 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 eaa4c2db6b..3a0704d8d7 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 7ebf7b9459..cdfc4a22e7 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 87db1b3e23..560a808c29 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 06ee5af3ca..cb8263fa16 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 75f4d84824..3eb54b4cbc 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 2e9fba7dc7..d6222c27c2 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 9802c38f86..3920bcd132 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 1621a6272c..51aa0862ca 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 01a74a115c..00dac19bd6 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 ae470c3ee1..9ee2d86cf5 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 e5c9a510f8..ee31d602f6 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 6475279f84..1f64f4dc48 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 ec337c5a5a..7ad2a991d7 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 0bfa3fe103..9f56d34427 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 6d84bd1a50..92309e8b12 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 5af0624b96..ec9c81cd14 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 3659643b74..9768996745 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 8e85e5ae75..c89e60b828 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 f44bb2e970..3c3c748111 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 10c77902e3..f486fa3379 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 640da27b7f..fdadc99395 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 433a314f28..16f1303cb7 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 b3090c0370..6442a22b57 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 60ed0e5865..8400e14dcf 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 271ad2782f..6f8ab8d5ff 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 53634a58be..0d0c5ed56e 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 b116a2dc3e..77602f09e8 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 0e1de02cb8..1583624c0b 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 b3471d721f..7a5a5ab77c 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 6f3949a7c5..9e3b760200 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 6c43d0913e..a4749e5c0d 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 2cb7b245a2..36dcfd340d 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 47a0f971e3..204f6a53b0 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 3c72d32822..bf0b120d6c 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 4bf668620c..68e92c88c1 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 26ae9a79b3..6bd8baac9d 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 9fefdc44ee..fe9b5d3143 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 416e014b84..0fb346bca7 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 0f7130733f..68ac3c2dad 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 2cb2a2055b..609ddf0394 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 8c5c1f26e5..734d76492c 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 68347aa69b..060199fdca 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 73290b90f5..5da6d66985 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 b798852597..82d6a61b4b 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 3e8b360d5a..7245104278 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 77c4a01fcb..a71da39b8c 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 b175c509d5..f1f983d93c 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 d85c4ce8d6..b7c8a9fd99 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 62dbe9e7cc..8ff362eb91 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 054ad7bce2..0c24984f59 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 0fd5234c47..cad47dacec 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 fa598666ee..643bd96840 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 699a7fccdf..08c1c81d54 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 f40f3ed5df..ff2f54658c 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 0193d5ed90..e4fd3da76b 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 8680444f3b..f203217188 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 98b52d163e..0bdfe88e40 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 ec0e0aa2ed..6c001c9690 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 695b9d6910..896576d91c 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 f9275b2f98..b640ba160a 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 101cc64b62..16abf3d8a8 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 7da16f7f21..0f98a5ea6d 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 d13ecc0221..6af52a2419 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 2146eab0b3..9e1e16ff93 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 ca9af1ce90..2fcf322da7 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 18bf46f94a..e5c236d4d2 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 e47dc27744..ca70d692fe 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 40e718a672..ba3552468c 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 7acafa98cf..c256e99c25 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 e0828297c0..e671b413d6 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 8fe4b044fb..cde737d8d2 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 90a4612ae8..f1825e9f97 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 e1e9e73d31..621a54e41b 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 dc73320cde..c23f947a96 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 2ac61c9518..a7fa8f966d 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 d65e236639..ab7d4cf188 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 e5c1d8bf31..d13aa45097 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 fdaa92f4a1..386fc63f9a 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 5606f4e67c..c8aee2ea59 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 29af6cbf8b..d7ef4ffab0 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 14317afc9a..b70c3579ab 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 fba9f41fbc..9a3757668c 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 6f8aa4f162..370422bb3b 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 a577c963e3..3b9efd004d 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 7e22097b3f..67fc498df5 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 7c626e0c6e..830d4699ba 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 dce71ab9ad..dd6a180fee 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 5a99d7225a..fcaeafb191 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 c41685f717..817696049f 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 b5a80bf5be..45f9a3135f 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 140a7dccbd..c8c59abfe0 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 7300877603..33559e971f 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 4fe657829a..b1cad3ff1c 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 6726d3b355..c776156c16 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 a4096d6187..0c73fe7799 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 a2a07d58aa..7e02ab3ddf 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 fa9f1d7b13..e7438cfbe9 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 92bb499a72..8f36c002e7 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 691a3c5180..6eb9abc949 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 571c75e395..95a5441643 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 2913ac1801..cb51f4d125 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 54ca42ad62..9ffd535339 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 22d0968830..63e0a70394 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 e398dcf4fe..3fced83e3a 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 8a370aaae7..50a6ba1935 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 51b006e396..51fa7d5fb7 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 ae8ff12593..6cec4f1af3 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 d9b21a5b89..a21a5fea8d 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 f6e7e56d52..aea4cde6b1 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 bbb9b4dca2..6abab98b73 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 7951b7ee05..f73d14b8e8 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 692ce48e03..f4a8215f1d 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 1294de0c1e..0bffcf71e7 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 77b7fc45f0..c28c991642 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 5f294c9664..14cc15dcd3 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 4b8d462fb7..8579c2b113 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 6f748ebda9..5e191d48b6 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 84011d5ec0..390432f3ef 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 9d50c560f6..5e434e9f3b 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 9431c03a4e..dcdb478605 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 5f2d5feb39..9e4041bbfb 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 4996ab1672..c3bfde13fc 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 1261f214f8..96a14059eb 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 fd72e62866..6771e8b39f 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 c28478793a..1373593580 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 d9d7b23d4a..5d66c57715 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 4f8a24ab22..6988c42750 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 4ae4d1bfdf..2ff02dde5e 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 6cc1cf6f0f..1544eeb98a 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 58b7054ab5..0969a42383 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 03131cb013..39e63f2e75 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 4147234217..d636014a51 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 4c59e850d9..a7740d1591 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 b7e3ebf056..8a5824ba1a 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 13aa209421..f7fbba53aa 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 334109019f..4287eca5ba 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 ba35d328c8..984948524c 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 271d181b09..0af0445d03 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 6339082405..269559cff8 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 a4fe9fdc8e..4a38c711e2 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 8e791acf58..a012f025b6 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 d4d149f8d3..4726daa95d 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 89f920ac82..bc9e7a345a 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 ad19629a40..f37c85df90 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 1baf1b0fd2..400fc48f71 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 56ac4b7c5b..53d43b59ff 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 b26a2c9469..92858db364 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 de49bbd9d8..c5651cd9d8 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 9c0ddb16ad..f2f721b280 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 0e00ef4b51..bfa0d8674d 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 c24f9f8d45..01d03caf27 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 fffa5850c4..5a3da90fe3 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 cbbaa9f90d..bbca9f14ac 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 e73c0a18ec..4450827bd9 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 9cfa373d08..06fbf8e315 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 5f6d422e2d..4c10ddf8b0 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 363c23f8ce..5e3d414ba1 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 2cce59332e..85e1fe1ea2 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 d464c5aa03..b7e3747248 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 3f9fd329cc..e2af07e00f 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 45aa1d5e47..b2db122bbc 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 3605f1e9fc..a4d80e3be2 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 38569a84b0..95ff003b04 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 7805ebbaee..61484cdbe0 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 91753dac15..0653ee430c 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 b775a8cef7..1a646b6f5e 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 89c6f610de..54ecec9851 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 bcee5e42cc..2c12c73e3d 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 55e977b228..7514df9616 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 d514b21d2f..ec8383745b 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 ab0ffbb822..6b168b0ea9 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 646e2f05e7..a408fa2253 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 9e4bdf4d4d..876852ee3f 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 512640493b..2df81351b4 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 30ea398a01..982e56d1ab 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 56eed3ba74..106c7d807a 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 f7bcdd53aa..63ed7af21e 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 375b6f96ff..a68d191c8b 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 f9156da43d..8910e3153f 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 2b430ae33c..5efc3e5cc5 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 f0795c5740..1557cb42dc 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 0666954a65..3984e60995 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 6d4f84cbe5..2528c07373 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 d9ea2110bb..28e4201a03 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 d72768ff71..47e358f3fe 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 ec33375e4e..6f1a756227 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 adf9b96a5d..afb6e05ab0 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 91114897e5..7051ca55ba 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 ca7affc97a..4e9a69e7df 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 5618c58163..a8863813bc 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 4e66bf2488..cc6089905d 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 74b2208ab9..86a512f879 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 4638134f4a..a2ec7245cd 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 a4b59fb4ae..1f78763e5f 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 3d8e0ff927..23b3367f1a 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 d89babb249..4813404fe8 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 646d27e2ce..a711c70f2c 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 436802276b..9417a5a5ca 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 19eabae37b..843065ac95 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 61c35b9c87..9d19dd4799 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 90484f77f2..fd1f222be5 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 7595fa50bb..035bb6b713 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 88e5df1e66..014bde0add 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 a7c990e35d..2d9791db1b 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 a136d5ab00..7e6a34ca21 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 64956dc7dc..d3c9d9a6e9 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 a277572ce3..15ffef627b 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 279cf8a9d1..5df3fcc124 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 5772363f3f..c131566658 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 d88e992ab0..9f9b1ff62e 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 babb07e547..c88556d1cc 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 436a38fcff..c5639568bd 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 823849e029..c2de4e3543 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 5a12e4d59c..10777f8528 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 6505bc7238..4a242f03b9 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 207b44a85d..b2e94bec03 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 5c8b956601..72b3a24025 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 79e96c38dd..0658062afe 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 5a2b2e7a5b..a42bc5da28 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 969e3744fa..fe3003f1f4 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 69a6dd36d7..d606dffe1d 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 8f92161090..ff4b0e0c26 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 307237dcf6..17e9979ddd 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 5dab9c3b9e..e81e16e2d3 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 507b2f7356..d859284726 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 e104596cb7..c3ddff30e4 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 9a4e4d5cd4..afc1b7cd1a 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 b835276aeb..3abded397f 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 1bcfcdd6b4..9241e82217 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 7ed4fc1256..0d5afeb392 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 f5bc59a758..30e3331bee 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 518d755400..b3dc3d527e 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 5a29096291..1fdd588404 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 991d6a3aa4..eb0e5adab4 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 bce20a7f61..07bbb0ca6c 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 7980d64a76..46af70f4dd 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 8a6a3de1e0..e2860fcf0b 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 ab1538f2d5..a1dff4981d 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 41f79b0f86..e62a786e08 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 0a3315671b..5a6b2ab3b1 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 56af9aea5b..550aa09f4a 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 ceda06726f..18f4ee0bbf 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 0163ee88b0..8c060acdb8 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 994dcd05ec..9f1b28a1aa 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 79791927d9..5c95eb587b 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 60f3aad05f..7354fbd16b 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 66a575c506..1f1052b86e 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 618b9f1be6..efd665998c 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 9035d04a7c..79d48c99cf 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 24bf069055..bf8930ef1a 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 8ab36cc67c..2eba9fea19 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 3dc9e6f7cb..1f056b27d7 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 eacfca1766..1f28a71ca3 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 21d1a2bccc..6928e7a49e 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 139f40470d..7b62b8edd2 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 7564524ca4..7ddc3eb00a 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 a6d2fe30ac..245fa71e1e 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 4e636ef846..26575a18f0 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 7d18a99431..3e209e3de9 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 6fce66bc56..83cffdf5f5 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 6372d2e807..af9a315003 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 9f9aab241e..99f7b16cf7 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 58ea660351..c08ec7c07d 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 d0a608bfc9..0913fd560d 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 09186470dd..5518714323 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 0f0146e3de..b5ad8a373c 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 672331043f..fe84ac8882 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 fbb72e5f2d..c832c7d946 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 73adb15b13..900e7b5036 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 2575cee3b4..edb838d3b1 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 ae506ea8d5..d76f9c5586 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 dd9d04d4f0..4484d89121 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 a83d86ea5d..64037fbc0c 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 e8d28470ac..5103cc0b83 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 b578d234ed..ed52f884b7 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 80869a5725..32f70f5d1d 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 755f1ea3c8..9854b7c09e 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 4c3055c92f..71f7369fa7 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 d92f2d8b53..9ce15313fd 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 39b76e2b71..f466ac6593 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 003cc39944..573b310969 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 bb0549cec0..2019edf909 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 8347956ec1..77013aed29 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 84b508a695..6299284179 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 94a3509c93..1835a19db5 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 167e34d59d..1415b9185d 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 69377e3ea7..ae99bb8565 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 aa02b90ebd..730b91f328 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 b3306c3f96..cd0e765300 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 b26684820f..4274eb7501 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 77c28489f7..f4cee1a2b4 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 05c4c25b18..8609b4a4d4 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 66dff9ceb8..2caaa0ded7 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 faf2ea1b3a..674cf26b20 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 a253786b3f..f23433572a 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 4ab5cd2336..24c33d4913 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 289a5ec0c4..1a22b82991 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 05d4962964..24c0e1f4de 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 65c5ebda82..5ee047ac8a 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 3e67d54ceb..888561d2a9 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 1c285f526b..3eeee1067e 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 7e3745a88c..cf14878a21 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 226ae159e1..2f57efd2e3 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 4c4ed3e726..79f7bac4a2 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 01523410fd..bd7d1c54a3 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 715d5c2033..b507d77a12 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 2d7f63195d..d1972c4409 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 86c18d3bd0..e615ae3e0f 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