diff --git a/.github/actions/cancel-on-failure/action.yml b/.github/actions/cancel-on-failure/action.yml new file mode 100644 index 000000000000..36b4c143668e --- /dev/null +++ b/.github/actions/cancel-on-failure/action.yml @@ -0,0 +1,16 @@ +name: 'Cancel workflow on failure' +description: 'If the current job is failing, cancel the whole workflow' + +runs: + using: composite + steps: + # Don't cancel on PRs which don't have permissions to do so and also don't + # cancel on Windows because that often results in a race between marking the + # job as failed or cancelled, often marking it as canceled. This doesn't + # seem to be an issue for other platforms though. If a failure happens on + # Windows let the failure naturally propagate. + - run: gh run cancel ${{ github.run_id }} + shell: bash + if: github.event_name != 'pull_request' && runner.os != 'Windows' + env: + GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a53b85b42ec8..57f8b7049020 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,10 +50,8 @@ jobs: - run: cargo fmt --all -- --check # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Quick JS formatting/linting checks for the little bits of JS we have for the # `wasmtime explore` UI. @@ -70,10 +68,8 @@ jobs: working-directory: ./crates/explorer # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Check Code style quickly by running `clang-format` over all the C/C++ code # @@ -92,10 +88,8 @@ jobs: xargs clang-format-18 --dry-run --Werror --verbose # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Lint dependency graph for security advisories, duplicate versions, and # incompatible licences @@ -117,10 +111,8 @@ jobs: - run: cargo deny check bans licenses # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Ensure dependencies are vetted. See https://mozilla.github.io/cargo-vet/ # @@ -154,10 +146,8 @@ jobs: name: Ensure `cargo vet` works if versions are bumped # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() cargo_vet_failure_for_prs: name: Cargo vet failed on a Pull Request @@ -337,10 +327,8 @@ jobs: # path: gh-pages.tar.gz # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Checks of various feature combinations and whether things compile. The goal # here isn't to run tests, mostly just serve as a double-check that Rust code @@ -435,11 +423,9 @@ jobs: ) echo "$checks" | xargs -I CHECK sh -c 'echo "=== cargo check CHECK ==="; cargo check CHECK' - # Common logic to cancel the entire run if this job fails. - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + # common logic to cancel the entire run if this job fails + - uses: ./.github/actions/cancel-on-failure + if: failure() fiber_tests: name: wasmtime-fiber tests @@ -453,6 +439,10 @@ jobs: - uses: ./.github/actions/install-rust - run: cargo test -p wasmtime-fiber --no-default-features + # common logic to cancel the entire run if this job fails + - uses: ./.github/actions/cancel-on-failure + if: failure() + # Checks for no_std support, ensure that crates can build on a no_std target no_std_checks: name: no_std checks @@ -474,10 +464,8 @@ jobs: # - run: cargo check --target x86_64-unknown-none -p pulley-interpreter --features encode,decode,disas,interp # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Check that Clippy lints are passing. clippy: @@ -495,10 +483,8 @@ jobs: - run: cargo clippy --workspace --all-targets # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Similar to `micro_checks` but where we need to install some more state # (e.g. Android NDK) and we haven't factored support for those things out into @@ -551,10 +537,8 @@ jobs: - run: git diff --exit-code # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() checks_illumos: name: Check illumos @@ -576,10 +560,8 @@ jobs: cross build --target x86_64-unknown-illumos # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Check whether `wasmtime` cross-compiles to aarch64-pc-windows-msvc # We don't build nor test it because it lacks trap handling. @@ -599,10 +581,8 @@ jobs: - run: cargo check -p wasmtime --target aarch64-pc-windows-msvc # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Run tests that require a nightly compiler, such as building fuzz targets. test_nightly: @@ -642,10 +622,8 @@ jobs: - run: cargo fuzz build --dev --fuzz-dir ./crates/environ/fuzz --features component-model # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Perform all tests of the c-api test_capi: @@ -673,9 +651,13 @@ jobs: - run: cmake -Sexamples -Bexamples/build -DBUILD_SHARED_LIBS=OFF - run: cmake --build examples/build --config Debug - run: cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build examples/build --config Debug --target RUN_TESTS - if: matrix.os == 'windows-latest' + if: runner.os == 'Windows' - run: cmake -E env CTEST_OUTPUT_ON_FAILURE=1 cmake --build examples/build --config Debug --target test - if: matrix.os != 'windows-latest' + if: runner.os != 'Windows' + + # common logic to cancel the entire run if this job fails + - uses: ./.github/actions/cancel-on-failure + if: failure() # Perform all tests (debug mode) for `wasmtime`. # @@ -773,14 +755,14 @@ jobs: # to CPU-specific features. - name: CPU information run: lscpu - if: matrix.os == 'ubuntu-latest' + if: runner.os == 'Linux' - name: CPU information run: sysctl hw - if: contains(matrix.os, 'macos') + if: runner.os == 'macOS' - name: CPU information run: wmic cpu list /format:list shell: pwsh - if: matrix.os == 'windows-latest' + if: runner.os == 'Windows' # Since MPK (PKU) is not present on some GitHub runners, we check if it is # available before force-enabling it. This occasional testing is better than @@ -803,10 +785,9 @@ jobs: # Build and test all features - run: ./ci/run-tests.sh --locked ${{ matrix.bucket }} - # NB: the test job here is explicitly lacking in cancellation of this run if - # something goes wrong. These take the longest anyway and otherwise if - # Windows fails GitHub Actions will confusingly mark the failed Windows job - # as cancelled instead of failed. + # common logic to cancel the entire run if this job fails + - uses: ./.github/actions/cancel-on-failure + if: failure() # Test `wasmtime-wasi-nn` in its own job, as not all of its backends are # compatible with all targets, and each must be tested separately anyways. @@ -839,9 +820,9 @@ jobs: # GitHub Actions Window Server image doesn't have desktop experience # enabled, so we download the standalone library from ONNX Runtime project. - uses: nuget/setup-nuget@v2 - if: (matrix.os == 'windows-latest') && (matrix.feature == 'winml') + if: (runner.os == 'Windows') && (matrix.feature == 'winml') - run: nuget install Microsoft.AI.MachineLearning - if: (matrix.os == 'windows-latest') && (matrix.feature == 'winml') + if: (runner.os == 'Windows') && (matrix.feature == 'winml') # Install Rust targets. - run: rustup target add wasm32-wasip1 @@ -850,10 +831,8 @@ jobs: - run: cargo test -p wasmtime-wasi-nn --features ${{ matrix.feature }} # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Test the `wasmtime-fuzzing` crate. Split out from the main tests because # `--all-features` brings in OCaml, which is a pain to get setup for all @@ -874,10 +853,8 @@ jobs: cargo test -p wasmtime-fuzzing -p wasm-spec-interpreter # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Test debug (DWARF) related functionality. test_debug_dwarf: @@ -918,10 +895,8 @@ jobs: RUST_BACKTRACE: 1 # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() build-preview1-component-adapter: name: Build wasi-preview1-component-adapter @@ -956,10 +931,8 @@ jobs: # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() build-preview1-component-adapter-provider: name: Build wasi-preview1-component-adapter-provider @@ -974,12 +947,9 @@ jobs: with: run-id: ${{ github.run_id }} - # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Verify the "min platform" example still works. test-min-platform-example: @@ -1015,10 +985,8 @@ jobs: path: examples/min-platform/embedding/wasmtime-platform.h # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() build-wasmtime-target-wasm32: @@ -1037,10 +1005,8 @@ jobs: VERSION: ${{ github.sha }} # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() bench: @@ -1057,10 +1023,8 @@ jobs: - run: cargo test --benches --release # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Verify that cranelift's code generation is deterministic meta_deterministic_check: @@ -1077,10 +1041,8 @@ jobs: - run: ci/ensure_deterministic_build.sh # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() verify-publish: needs: determine @@ -1103,10 +1065,8 @@ jobs: - run: ./publish bump # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Run a subset of tests under MIRI on CI to help check the `unsafe` code in # Wasmtime to make sure it's at least not obviously incorrect for basic usage. @@ -1121,9 +1081,9 @@ jobs: strategy: matrix: crate: - - "wasmtime" + - "wasmtime --features pulley" - "wasmtime-cli" - - "wasmtime-environ" + - "wasmtime-environ --all-features" - "pulley-interpreter --all-features" needs: determine if: needs.determine.outputs.test-miri && github.repository == 'bytecodealliance/wasmtime' @@ -1151,10 +1111,8 @@ jobs: MIRIFLAGS: -Zmiri-strict-provenance # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # Perform release builds of `wasmtime` and `libwasmtime.so`. Builds a variety # of platforms and architectures and then uploads the release artifacts to @@ -1207,10 +1165,8 @@ jobs: path: dist # common logic to cancel the entire run if this job fails - - run: gh run cancel ${{ github.run_id }} - if: failure() && github.event_name != 'pull_request' - env: - GH_TOKEN: ${{ github.token }} + - uses: ./.github/actions/cancel-on-failure + if: failure() # This is a "join node" which depends on all prior workflows. The merge queue, # for example, gates on this to ensure that everything has executed diff --git a/Cargo.lock b/Cargo.lock index 09a2fb0e88c8..30c08e474995 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,7 +645,9 @@ dependencies = [ "anyhow", "arbitrary", "env_logger 0.11.5", + "target-lexicon", "wasmtime", + "wasmtime-environ", "wasmtime-wast-util", ] @@ -1426,9 +1428,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" @@ -1438,21 +1440,21 @@ checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-sink", @@ -1604,9 +1606,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.0" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856b5cb0902c2b6d65d5fd97dfa30f9b70c7538e770b98eab5ed52d8db923e01" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hmac" @@ -1700,9 +1702,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1907,10 +1909,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -3004,9 +3007,9 @@ dependencies = [ [[package]] name = "spin" -version = "0.9.4" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "sptr" @@ -3125,9 +3128,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.16" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +checksum = "4ff4a4048091358129767b8a200d6927f58876c8b5ea16fb7b0222d43b79bfa8" [[package]] name = "tch" @@ -3708,19 +3711,20 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", @@ -3733,9 +3737,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3743,9 +3747,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", @@ -3756,9 +3760,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "wasm-encoder" diff --git a/Cargo.toml b/Cargo.toml index c19050e8da0a..64c09dcf4e59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -263,7 +263,7 @@ byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-arra regalloc2 = "0.11.1" # cap-std family: -target-lexicon = "0.12.16" +target-lexicon = "0.13.0" cap-std = "3.4.1" cap-rand = { version = "3.4.1", features = ["small_rng"] } cap-fs-ext = "3.4.1" diff --git a/ci/build-test-matrix.js b/ci/build-test-matrix.js index 8e7da72f6710..875070c79d33 100644 --- a/ci/build-test-matrix.js +++ b/ci/build-test-matrix.js @@ -36,7 +36,7 @@ function supports32Bit(pkg) { if (pkg.indexOf("pulley") !== -1) return true; - return pkg == 'wasmtime-fiber'; + return pkg == 'wasmtime-fiber' || pkg == 'wasmtime'; } // This is the full, unsharded, and unfiltered matrix of what we test on @@ -233,7 +233,9 @@ async function shard(configs) { for (const config of configs) { // Special case 32-bit configs. Only some crates, according to // `supports32Bit`, run on this target. At this time the set of supported - // crates is small enough that they're not sharded. + // crates is small enough that they're not sharded. A second shard, however, + // is included which runs `--test wast` to run the full `*.wast` test suite + // in CI on 32-bit platforms, at this time effectively testing Pulley. if (config["32-bit"] === true) { sharded.push(Object.assign( {}, @@ -244,6 +246,11 @@ async function shard(configs) { .join(" "), } )); + sharded.push(Object.assign( + {}, + config, + { bucket: '--test wast' }, + )); continue; } diff --git a/cranelift/codegen/meta/src/isa/pulley.rs b/cranelift/codegen/meta/src/isa/pulley.rs index 7ae14ae682a2..a0ab5c203f8a 100644 --- a/cranelift/codegen/meta/src/isa/pulley.rs +++ b/cranelift/codegen/meta/src/isa/pulley.rs @@ -10,5 +10,11 @@ pub(crate) fn define() -> TargetIsa { * 'pointer64'\n", vec!["pointer32", "pointer64"], ); + settings.add_bool( + "big_endian", + "Whether this is a big-endian target", + "Whether this is a big-endian target", + false, + ); TargetIsa::new("pulley", settings.build()) } diff --git a/cranelift/codegen/src/binemit/mod.rs b/cranelift/codegen/src/binemit/mod.rs index 300369cf7dc1..39490849a877 100644 --- a/cranelift/codegen/src/binemit/mod.rs +++ b/cranelift/codegen/src/binemit/mod.rs @@ -121,7 +121,8 @@ pub enum Reloc { S390xTlsGdCall, /// Pulley - call a host function indirectly where the embedder resolving - /// this relocation needs to fill in the expected signature. + /// this relocation needs to fill the 8-bit immediate that's part of the + /// `call_indirect_host` opcode (an opaque identifier used by the host). PulleyCallIndirectHost, } diff --git a/cranelift/codegen/src/isa/aarch64/mod.rs b/cranelift/codegen/src/isa/aarch64/mod.rs index fb2f2382fd88..ce70f51e184f 100644 --- a/cranelift/codegen/src/isa/aarch64/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/mod.rs @@ -150,10 +150,10 @@ impl TargetIsa for AArch64Backend { #[cfg(feature = "unwind")] fn create_systemv_cie(&self) -> Option { let is_apple_os = match self.triple.operating_system { - OperatingSystem::Darwin - | OperatingSystem::Ios + OperatingSystem::Darwin(_) + | OperatingSystem::IOS(_) | OperatingSystem::MacOSX { .. } - | OperatingSystem::Tvos => true, + | OperatingSystem::TvOS(_) => true, _ => false, }; @@ -184,9 +184,9 @@ impl TargetIsa for AArch64Backend { use target_lexicon::*; match self.triple().operating_system { OperatingSystem::MacOSX { .. } - | OperatingSystem::Darwin - | OperatingSystem::Ios - | OperatingSystem::Tvos => { + | OperatingSystem::Darwin(_) + | OperatingSystem::IOS(_) + | OperatingSystem::TvOS(_) => { debug_assert_eq!(1 << 14, 0x4000); 14 } diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs index ebd457435b7f..ba9b5ab3f3f7 100644 --- a/cranelift/codegen/src/isa/mod.rs +++ b/cranelift/codegen/src/isa/mod.rs @@ -112,8 +112,12 @@ pub fn lookup(triple: Triple) -> Result { Architecture::Aarch64 { .. } => isa_builder!(aarch64, (feature = "arm64"), triple), Architecture::S390x { .. } => isa_builder!(s390x, (feature = "s390x"), triple), Architecture::Riscv64 { .. } => isa_builder!(riscv64, (feature = "riscv64"), triple), - Architecture::Pulley32 => isa_builder!(pulley32, (feature = "pulley"), triple), - Architecture::Pulley64 => isa_builder!(pulley64, (feature = "pulley"), triple), + Architecture::Pulley32 | Architecture::Pulley32be => { + isa_builder!(pulley32, (feature = "pulley"), triple) + } + Architecture::Pulley64 | Architecture::Pulley64be => { + isa_builder!(pulley64, (feature = "pulley"), triple) + } _ => Err(LookupError::Unsupported), } } diff --git a/cranelift/codegen/src/isa/pulley_shared/abi.rs b/cranelift/codegen/src/isa/pulley_shared/abi.rs index 3d2bfe43f8b2..831dbe282865 100644 --- a/cranelift/codegen/src/isa/pulley_shared/abi.rs +++ b/cranelift/codegen/src/isa/pulley_shared/abi.rs @@ -1,7 +1,7 @@ //! Implementation of a standard Pulley ABI. use super::{inst::*, PulleyFlags, PulleyTargetKind}; -use crate::isa::pulley_shared::PulleyBackend; +use crate::isa::pulley_shared::{PointerWidth, PulleyBackend}; use crate::{ ir::{self, types::*, MemFlags, Signature}, isa::{self, unwind::UnwindInst}, @@ -172,14 +172,24 @@ where } fn gen_extend( - _to_reg: Writable, - _from_reg: Reg, - _signed: bool, + dst: Writable, + src: Reg, + signed: bool, from_bits: u8, to_bits: u8, ) -> Self::I { assert!(from_bits < to_bits); - todo!() + let src = XReg::new(src).unwrap(); + let dst = dst.try_into().unwrap(); + match (signed, from_bits) { + (true, 8) => Inst::Sext8 { dst, src }.into(), + (true, 16) => Inst::Sext16 { dst, src }.into(), + (true, 32) => Inst::Sext32 { dst, src }.into(), + (false, 8) => Inst::Zext8 { dst, src }.into(), + (false, 16) => Inst::Zext16 { dst, src }.into(), + (false, 32) => Inst::Zext32 { dst, src }.into(), + _ => unimplemented!("extend {from_bits} to {to_bits} as signed? {signed}"), + } } fn get_ext_mode( @@ -523,7 +533,15 @@ where _isa_flags: &PulleyFlags, ) -> u32 { match rc { - RegClass::Int => 1, + // Spilling an integer register requires spilling 8 bytes, and spill + // slots are defined in terms of "word bytes" or the size of a + // pointer. That means on 32-bit pulley we need to take up two spill + // slots for integers where on 64-bit pulley we need to only take up + // one spill slot for integers. + RegClass::Int => match P::pointer_width() { + PointerWidth::PointerWidth32 => 2, + PointerWidth::PointerWidth64 => 1, + }, RegClass::Float => todo!(), RegClass::Vector => unreachable!(), } diff --git a/cranelift/codegen/src/isa/pulley_shared/inst.isle b/cranelift/codegen/src/isa/pulley_shared/inst.isle index 6a15e140148c..c80cacd0b5b1 100644 --- a/cranelift/codegen/src/isa/pulley_shared/inst.isle +++ b/cranelift/codegen/src/isa/pulley_shared/inst.isle @@ -126,6 +126,18 @@ (PopFrame) (StackAlloc32 (amt u32)) (StackFree32 (amt u32)) + + ;; Sign extensions. + (Zext8 (dst WritableXReg) (src XReg)) + (Zext16 (dst WritableXReg) (src XReg)) + (Zext32 (dst WritableXReg) (src XReg)) + (Sext8 (dst WritableXReg) (src XReg)) + (Sext16 (dst WritableXReg) (src XReg)) + (Sext32 (dst WritableXReg) (src XReg)) + + ;; Byte swaps. + (Bswap32 (dst WritableXReg) (src XReg)) + (Bswap64 (dst WritableXReg) (src XReg)) ) ) @@ -580,6 +592,54 @@ (rule (gen_br_table idx default labels) (emit (MInst.BrTable idx default labels))) +(decl pulley_zext8 (XReg) XReg) +(rule (pulley_zext8 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Zext8 dst src)))) + dst)) + +(decl pulley_zext16 (XReg) XReg) +(rule (pulley_zext16 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Zext16 dst src)))) + dst)) + +(decl pulley_zext32 (XReg) XReg) +(rule (pulley_zext32 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Zext32 dst src)))) + dst)) + +(decl pulley_sext8 (XReg) XReg) +(rule (pulley_sext8 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Sext8 dst src)))) + dst)) + +(decl pulley_sext16 (XReg) XReg) +(rule (pulley_sext16 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Sext16 dst src)))) + dst)) + +(decl pulley_sext32 (XReg) XReg) +(rule (pulley_sext32 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Sext32 dst src)))) + dst)) + +(decl pulley_bswap32 (XReg) XReg) +(rule (pulley_bswap32 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Bswap32 dst src)))) + dst)) + +(decl pulley_bswap64 (XReg) XReg) +(rule (pulley_bswap64 src) + (let ((dst WritableXReg (temp_writable_xreg)) + (_ Unit (emit (MInst.Bswap64 dst src)))) + dst)) + ;;;; Helpers for Emitting Calls ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (decl gen_call (SigRef ExternalName RelocDistance ValueSlice) InstOutput) diff --git a/cranelift/codegen/src/isa/pulley_shared/inst/args.rs b/cranelift/codegen/src/isa/pulley_shared/inst/args.rs index e70dfbaf2249..0d6dc6161104 100644 --- a/cranelift/codegen/src/isa/pulley_shared/inst/args.rs +++ b/cranelift/codegen/src/isa/pulley_shared/inst/args.rs @@ -180,7 +180,9 @@ impl Amode { + frame_layout.outgoing_args_size; i64::from(sp_offset) - offset } - StackAMode::Slot(offset) => *offset, + StackAMode::Slot(offset) => { + offset + i64::from(state.frame_layout().outgoing_args_size) + } StackAMode::OutgoingArg(offset) => *offset, }, } diff --git a/cranelift/codegen/src/isa/pulley_shared/inst/emit.rs b/cranelift/codegen/src/isa/pulley_shared/inst/emit.rs index b103e4fee04d..78c13ed96e74 100644 --- a/cranelift/codegen/src/isa/pulley_shared/inst/emit.rs +++ b/cranelift/codegen/src/isa/pulley_shared/inst/emit.rs @@ -549,10 +549,25 @@ fn pulley_emit

( *start_offset = sink.cur_offset(); } - Inst::PushFrame => enc::push_frame(sink), + Inst::PushFrame => { + sink.add_trap(ir::TrapCode::STACK_OVERFLOW); + enc::push_frame(sink); + } Inst::PopFrame => enc::pop_frame(sink), - Inst::StackAlloc32 { amt } => enc::stack_alloc32(sink, *amt), + Inst::StackAlloc32 { amt } => { + sink.add_trap(ir::TrapCode::STACK_OVERFLOW); + enc::stack_alloc32(sink, *amt); + } Inst::StackFree32 { amt } => enc::stack_free32(sink, *amt), + + Inst::Zext8 { dst, src } => enc::zext8(sink, dst, src), + Inst::Zext16 { dst, src } => enc::zext16(sink, dst, src), + Inst::Zext32 { dst, src } => enc::zext32(sink, dst, src), + Inst::Sext8 { dst, src } => enc::sext8(sink, dst, src), + Inst::Sext16 { dst, src } => enc::sext16(sink, dst, src), + Inst::Sext32 { dst, src } => enc::sext32(sink, dst, src), + Inst::Bswap32 { dst, src } => enc::bswap32(sink, dst, src), + Inst::Bswap64 { dst, src } => enc::bswap64(sink, dst, src), } } diff --git a/cranelift/codegen/src/isa/pulley_shared/inst/mod.rs b/cranelift/codegen/src/isa/pulley_shared/inst/mod.rs index 7b8768c1ec99..460ad9fe30db 100644 --- a/cranelift/codegen/src/isa/pulley_shared/inst/mod.rs +++ b/cranelift/codegen/src/isa/pulley_shared/inst/mod.rs @@ -255,6 +255,18 @@ fn pulley_get_operands(inst: &mut Inst, collector: &mut impl OperandVisitor) { Inst::StackAlloc32 { .. } | Inst::StackFree32 { .. } | Inst::PushFrame | Inst::PopFrame => { } + + Inst::Zext8 { dst, src } + | Inst::Zext16 { dst, src } + | Inst::Zext32 { dst, src } + | Inst::Sext8 { dst, src } + | Inst::Sext16 { dst, src } + | Inst::Sext32 { dst, src } + | Inst::Bswap32 { dst, src } + | Inst::Bswap64 { dst, src } => { + collector.reg_use(src); + collector.reg_def(dst); + } } } @@ -449,8 +461,8 @@ where } } - fn gen_jump(target: MachLabel) -> Self { - Inst::Jump { label: target }.into() + fn gen_jump(label: MachLabel) -> Self { + Inst::Jump { label }.into() } fn worst_case_size() -> CodeOffset { @@ -874,6 +886,47 @@ impl Inst { } Inst::PushFrame => format!("push_frame"), Inst::PopFrame => format!("pop_frame"), + + Inst::Zext8 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("zext8 {dst}, {src}") + } + Inst::Zext16 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("zext16 {dst}, {src}") + } + Inst::Zext32 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("zext32 {dst}, {src}") + } + Inst::Sext8 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("sext8 {dst}, {src}") + } + Inst::Sext16 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("sext16 {dst}, {src}") + } + Inst::Sext32 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("sext32 {dst}, {src}") + } + Inst::Bswap32 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("bswap32 {dst}, {src}") + } + Inst::Bswap64 { dst, src } => { + let dst = format_reg(*dst.to_reg()); + let src = format_reg(**src); + format!("bswap64 {dst}, {src}") + } } } } diff --git a/cranelift/codegen/src/isa/pulley_shared/lower.isle b/cranelift/codegen/src/isa/pulley_shared/lower.isle index 00de3b70838c..dbbd6fad8fb8 100644 --- a/cranelift/codegen/src/isa/pulley_shared/lower.isle +++ b/cranelift/codegen/src/isa/pulley_shared/lower.isle @@ -59,7 +59,7 @@ ;;;; Rules for `trapz` and `trapnz` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(rule (lower (trapz a @ (value_type (fits_in_64 ty)) code)) +(rule (lower (trapz a @ (value_type (ty_32_or_64 ty)) code)) (let ((zero Reg (pulley_xconst8 0))) (side_effect (pulley_trap_if (IntCC.Equal) (ty_to_operand_size ty) @@ -67,7 +67,7 @@ zero code)))) -(rule (lower (trapnz a @ (value_type (fits_in_64 ty)) code)) +(rule (lower (trapnz a @ (value_type (ty_32_or_64 ty)) code)) (let ((zero Reg (pulley_xconst8 0))) (side_effect (pulley_trap_if (IntCC.NotEqual) (ty_to_operand_size ty) @@ -77,14 +77,14 @@ ;; Fold `(trap[n]z (icmp ...))` together. -(rule 1 (lower (trapz (icmp cc a b @ (value_type (fits_in_64 ty))) code)) +(rule 1 (lower (trapz (icmp cc a b @ (value_type (ty_32_or_64 ty))) code)) (side_effect (pulley_trap_if (intcc_complement cc) (ty_to_operand_size ty) a b code))) -(rule 1 (lower (trapnz (icmp cc a b @ (value_type (fits_in_64 ty))) code)) +(rule 1 (lower (trapnz (icmp cc a b @ (value_type (ty_32_or_64 ty))) code)) (side_effect (pulley_trap_if cc (ty_to_operand_size ty) a @@ -226,19 +226,36 @@ ;;;; Rules for `load` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (rule (lower (has_type ty (load flags addr (offset32 offset)))) - (pulley_load (Amode.RegOffset addr (i32_as_i64 offset)) - ty - flags - (ExtKind.Zero))) + (let ((le Reg (pulley_load (Amode.RegOffset addr (i32_as_i64 offset)) + ty + flags + (ExtKind.Zero)))) + (xswap_if_be le ty flags))) + ;;;; Rules for `store` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(type Endianness extern (enum Big Little)) +(decl pure endianness (MemFlags) Endianness) +(extern constructor endianness endianness) + (rule (lower (store flags src @ (value_type ty) addr (offset32 offset))) (side_effect (pulley_store (Amode.RegOffset addr (i32_as_i64 offset)) - src + (xswap_if_be src ty flags) ty flags))) +(decl xswap_if_be (XReg Type MemFlags) XReg) +(rule (xswap_if_be val _ty flags) + (if-let (Endianness.Little) (endianness flags)) + val) +(rule (xswap_if_be val $I32 flags) + (if-let (Endianness.Big) (endianness flags)) + (pulley_bswap32 val)) +(rule (xswap_if_be val $I64 flags) + (if-let (Endianness.Big) (endianness flags)) + (pulley_bswap64 val)) + ;;;; Rules for `stack_addr` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (rule (lower (stack_addr stack_slot offset)) diff --git a/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs b/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs index ae61bbc18fbc..cbe78d7d31d0 100644 --- a/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs +++ b/cranelift/codegen/src/isa/pulley_shared/lower/isle.rs @@ -114,6 +114,10 @@ where fn lr_reg(&mut self) -> XReg { XReg::new(regs::lr_reg()).unwrap() } + + fn endianness(&mut self, flags: MemFlags) -> Endianness { + flags.endianness(self.backend.target_endianness()) + } } /// The main entry point for lowering with ISLE. diff --git a/cranelift/codegen/src/isa/pulley_shared/mod.rs b/cranelift/codegen/src/isa/pulley_shared/mod.rs index 84824de2f785..faf3a3ca72ef 100644 --- a/cranelift/codegen/src/isa/pulley_shared/mod.rs +++ b/cranelift/codegen/src/isa/pulley_shared/mod.rs @@ -7,6 +7,7 @@ mod settings; use self::inst::EmitInfo; use super::{Builder as IsaBuilder, FunctionAlignment}; +use crate::ir::Endianness; use crate::{ dominator_tree::DominatorTree, ir, @@ -124,6 +125,14 @@ where let abi = abi::PulleyCallee::new(func, self, &self.isa_flags, &sigs)?; machinst::compile::(func, domtree, self, abi, emit_info, sigs, ctrl_plane) } + + pub fn target_endianness(&self) -> Endianness { + if self.isa_flags.big_endian() { + Endianness::Big + } else { + Endianness::Little + } + } } impl

TargetIsa for PulleyBackend

@@ -234,14 +243,10 @@ where /// Create a new Pulley ISA builder. pub fn isa_builder(triple: Triple) -> IsaBuilder { - assert!(matches!( - triple.architecture, - Architecture::Pulley32 | Architecture::Pulley64 - )); let constructor = match triple.architecture { - Architecture::Pulley32 => isa_constructor_32, - Architecture::Pulley64 => isa_constructor_64, - _ => unreachable!(), + Architecture::Pulley32 | Architecture::Pulley32be => isa_constructor_32, + Architecture::Pulley64 | Architecture::Pulley64be => isa_constructor_64, + other => panic!("unexpected architecture {other:?}"), }; IsaBuilder { triple, @@ -258,6 +263,9 @@ fn isa_constructor_32( use crate::settings::Configurable; let mut builder = builder.clone(); builder.set("pointer_width", "pointer32").unwrap(); + if triple.endianness().unwrap() == target_lexicon::Endianness::Big { + builder.enable("big_endian").unwrap(); + } let isa_flags = PulleyFlags::new(&shared_flags, &builder); let backend = @@ -273,6 +281,9 @@ fn isa_constructor_64( use crate::settings::Configurable; let mut builder = builder.clone(); builder.set("pointer_width", "pointer64").unwrap(); + if triple.endianness().unwrap() == target_lexicon::Endianness::Big { + builder.enable("big_endian").unwrap(); + } let isa_flags = PulleyFlags::new(&shared_flags, &builder); let backend = diff --git a/cranelift/codegen/src/isa/x64/lower/isle.rs b/cranelift/codegen/src/isa/x64/lower/isle.rs index c0229e6eb5bf..85268a90b6b8 100644 --- a/cranelift/codegen/src/isa/x64/lower/isle.rs +++ b/cranelift/codegen/src/isa/x64/lower/isle.rs @@ -7,24 +7,20 @@ use generated_code::{Context, MInst, RegisterClass}; // Types that the generated ISLE code uses via `use super::*`. use super::{is_int_or_ref_ty, is_mergeable_load, lower_to_amode, MergeableLoadSize}; -use crate::ir::LibCall; +use crate::ir::condcodes::{FloatCC, IntCC}; +use crate::ir::immediates::*; +use crate::ir::types::*; +use crate::ir::{ + BlockCall, Inst, InstructionData, LibCall, MemFlags, Opcode, TrapCode, Value, ValueList, +}; +use crate::isa::x64::abi::X64CallSite; +use crate::isa::x64::inst::{args::*, regs, ReturnCallInfo}; use crate::isa::x64::lower::emit_vm_call; use crate::isa::x64::X64Backend; -use crate::{ - ir::{ - condcodes::{FloatCC, IntCC}, - immediates::*, - types::*, - BlockCall, Inst, InstructionData, MemFlags, Opcode, TrapCode, Value, ValueList, - }, - isa::x64::{ - abi::X64CallSite, - inst::{args::*, regs, ReturnCallInfo}, - }, - machinst::{ - isle::*, ArgPair, CallInfo, InsnInput, InstOutput, IsTailCall, MachInst, VCodeConstant, - VCodeConstantData, - }, +use crate::machinst::isle::*; +use crate::machinst::{ + ArgPair, CallInfo, InsnInput, InstOutput, IsTailCall, MachInst, VCodeConstant, + VCodeConstantData, }; use alloc::vec::Vec; use regalloc2::PReg; diff --git a/cranelift/codegen/src/isa/x64/lower/isle/generated_code.rs b/cranelift/codegen/src/isa/x64/lower/isle/generated_code.rs index 49ec3dc4ce8d..56d19ead88e4 100644 --- a/cranelift/codegen/src/isa/x64/lower/isle/generated_code.rs +++ b/cranelift/codegen/src/isa/x64/lower/isle/generated_code.rs @@ -1,7 +1,8 @@ -// See https://github.com/rust-lang/rust/issues/47995: we cannot use `#![...]` attributes inside of -// the generated ISLE source below because we include!() it. We must include!() it because its path -// depends on an environment variable; and also because of this, we can't do the `#[path = "..."] -// mod generated_code;` trick either. +// See https://github.com/rust-lang/rust/issues/47995: we cannot use `#![...]` +// attributes inside of the generated ISLE source below because we include!() +// it. We must include!() it because its path depends on an environment +// variable; and also because of this, we can't do the `#[path = "..."] mod +// generated_code;` trick either. #![allow(dead_code, unreachable_code, unreachable_patterns)] #![allow(unused_imports, unused_variables, non_snake_case, unused_mut)] #![allow( diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs index c9beb52b8012..f08a32011a39 100644 --- a/cranelift/codegen/src/machinst/buffer.rs +++ b/cranelift/codegen/src/machinst/buffer.rs @@ -152,7 +152,7 @@ //! but is conservative. //! //! - The fixup list can interact with island emission to create -//! "quadratic island behvior". In a little more detail, one can hit +//! "quadratic island behavior". In a little more detail, one can hit //! this behavior by having some pending fixups (forward label //! references) with long-range label-use kinds, and some others //! with shorter-range references that nonetheless still are pending diff --git a/cranelift/codegen/src/machinst/lower.rs b/cranelift/codegen/src/machinst/lower.rs index 5d4e2e885ee8..ea4fda7fc8e8 100644 --- a/cranelift/codegen/src/machinst/lower.rs +++ b/cranelift/codegen/src/machinst/lower.rs @@ -1524,8 +1524,9 @@ impl<'func, I: VCodeInst> Lower<'func, I> { self.vcode.constants().insert(constant) } - /// Cause the value in `reg` to be in a virtual reg, by copying it into a new virtual reg - /// if `reg` is a real reg. `ty` describes the type of the value in `reg`. + /// Cause the value in `reg` to be in a virtual reg, by copying it into a + /// new virtual reg if `reg` is a real reg. `ty` describes the type of the + /// value in `reg`. pub fn ensure_in_vreg(&mut self, reg: Reg, ty: Type) -> Reg { if reg.to_virtual_reg().is_some() { reg diff --git a/cranelift/filetests/filetests/isa/pulley32/extend.clif b/cranelift/filetests/filetests/isa/pulley32/extend.clif new file mode 100644 index 000000000000..f6a01744472f --- /dev/null +++ b/cranelift/filetests/filetests/isa/pulley32/extend.clif @@ -0,0 +1,172 @@ +test compile precise-output +target pulley32 + +function %uext8(i8) { + fn0 = colocated %g(i8 uext) +block0(v0: i8): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; zext8 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; zext8 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %uext16(i16) { + fn0 = colocated %g(i16 uext) +block0(v0: i16): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; zext16 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; zext16 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %uext32(i32) { + fn0 = colocated %g(i32 uext) +block0(v0: i32): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; call 0x0 // target = 0x1 +; pop_frame +; ret + +function %uext64(i64) { + fn0 = colocated %g(i64 uext) +block0(v0: i64): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; call 0x0 // target = 0x1 +; pop_frame +; ret + +function %sext8(i8) { + fn0 = colocated %g(i8 sext) +block0(v0: i8): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; sext8 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; sext8 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %sext16(i16) { + fn0 = colocated %g(i16 sext) +block0(v0: i16): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; sext16 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; sext16 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %sext32(i32) { + fn0 = colocated %g(i32 sext) +block0(v0: i32): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; call 0x0 // target = 0x1 +; pop_frame +; ret + +function %sext64(i64) { + fn0 = colocated %g(i64 sext) +block0(v0: i64): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; call 0x0 // target = 0x1 +; pop_frame +; ret + + diff --git a/cranelift/filetests/filetests/isa/pulley64/extend.clif b/cranelift/filetests/filetests/isa/pulley64/extend.clif new file mode 100644 index 000000000000..6feb7bba021c --- /dev/null +++ b/cranelift/filetests/filetests/isa/pulley64/extend.clif @@ -0,0 +1,175 @@ +test compile precise-output +target pulley64 + +function %uext8(i8) { + fn0 = colocated %g(i8 uext) +block0(v0: i8): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; zext8 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; zext8 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %uext16(i16) { + fn0 = colocated %g(i16 uext) +block0(v0: i16): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; zext16 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; zext16 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %uext32(i32) { + fn0 = colocated %g(i32 uext) +block0(v0: i32): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; zext32 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; zext32 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %uext64(i64) { + fn0 = colocated %g(i64 uext) +block0(v0: i64): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; call 0x0 // target = 0x1 +; pop_frame +; ret + +function %sext8(i8) { + fn0 = colocated %g(i8 sext) +block0(v0: i8): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; sext8 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; sext8 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %sext16(i16) { + fn0 = colocated %g(i16 sext) +block0(v0: i16): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; sext16 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; sext16 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %sext32(i32) { + fn0 = colocated %g(i32 sext) +block0(v0: i32): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; sext32 x0, x0 +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; sext32 x0, x0 +; call 0x0 // target = 0x4 +; pop_frame +; ret + +function %sext64(i64) { + fn0 = colocated %g(i64 sext) +block0(v0: i64): + call fn0(v0) + return +} + +; VCode: +; push_frame +; block0: +; call CallInfo { dest: TestCase(%g), uses: [CallArgPair { vreg: p0i, preg: p0i }], defs: [], clobbers: PRegSet { bits: [65535, 65279, 4294967295, 0] }, callee_conv: Fast, caller_conv: Fast, callee_pop_size: 0 } +; pop_frame +; ret +; +; Disassembled: +; push_frame +; call 0x0 // target = 0x1 +; pop_frame +; ret + diff --git a/cranelift/filetests/filetests/isa/pulley64/loadbe.clif b/cranelift/filetests/filetests/isa/pulley64/loadbe.clif new file mode 100644 index 000000000000..ef8c6e0f2f4c --- /dev/null +++ b/cranelift/filetests/filetests/isa/pulley64/loadbe.clif @@ -0,0 +1,71 @@ +test compile precise-output +target pulley64 big_endian + +function %load_i32(i64) -> i32 { +block0(v0: i64): + v1 = load.i32 v0 + return v1 +} + +; VCode: +; block0: +; x2 = load32_u x0+0 // flags = +; bswap32 x0, x2 +; ret +; +; Disassembled: +; load32_u x2, x0 +; bswap32 x0, x2 +; ret + +function %load_i64(i64) -> i64 { +block0(v0: i64): + v1 = load.i64 v0 + return v1 +} + +; VCode: +; block0: +; x2 = load64_u x0+0 // flags = +; bswap64 x0, x2 +; ret +; +; Disassembled: +; load64 x2, x0 +; bswap64 x0, x2 +; ret + +function %load_i32_with_offset(i64) -> i32 { +block0(v0: i64): + v1 = load.i32 v0+4 + return v1 +} + +; VCode: +; block0: +; x2 = load32_u x0+4 // flags = +; bswap32 x0, x2 +; ret +; +; Disassembled: +; load32_u_offset8 x2, x0, 4 +; bswap32 x0, x2 +; ret + +function %load_i64_with_offset(i64) -> i64 { +block0(v0: i64): + v1 = load.i64 v0+8 + return v1 +} + +; VCode: +; block0: +; x2 = load64_u x0+8 // flags = +; bswap64 x0, x2 +; ret +; +; Disassembled: +; load64_offset8 x2, x0, 8 +; bswap64 x0, x2 +; ret + diff --git a/cranelift/filetests/filetests/isa/pulley64/storebe.clif b/cranelift/filetests/filetests/isa/pulley64/storebe.clif new file mode 100644 index 000000000000..d9d59f5c5a94 --- /dev/null +++ b/cranelift/filetests/filetests/isa/pulley64/storebe.clif @@ -0,0 +1,71 @@ +test compile precise-output +target pulley64 big_endian + +function %store_i32(i32, i64) { +block0(v0: i32, v1: i64): + store v0, v1 + return +} + +; VCode: +; block0: +; bswap32 x3, x0 +; store32 x1+0, x3 // flags = +; ret +; +; Disassembled: +; bswap32 x3, x0 +; store32 x1, x3 +; ret + +function %store_i64(i64, i64) { +block0(v0: i64, v1: i64): + store v0, v1 + return +} + +; VCode: +; block0: +; bswap64 x3, x0 +; store64 x1+0, x3 // flags = +; ret +; +; Disassembled: +; bswap64 x3, x0 +; store64 x1, x3 +; ret + +function %store_i32_with_offset(i32, i64) { +block0(v0: i32, v1: i64): + store v0, v1+4 + return +} + +; VCode: +; block0: +; bswap32 x3, x0 +; store32 x1+4, x3 // flags = +; ret +; +; Disassembled: +; bswap32 x3, x0 +; store32_offset8 x1, 4, x3 +; ret + +function %store_i64_with_offset(i64, i64) { +block0(v0: i64, v1: i64): + store v0, v1+8 + return +} + +; VCode: +; block0: +; bswap64 x3, x0 +; store64 x1+8, x3 // flags = +; ret +; +; Disassembled: +; bswap64 x3, x0 +; store64_offset8 x1, 8, x3 +; ret + diff --git a/cranelift/jit/src/compiled_blob.rs b/cranelift/jit/src/compiled_blob.rs index 4eab207ff011..95c3d2495b79 100644 --- a/cranelift/jit/src/compiled_blob.rs +++ b/cranelift/jit/src/compiled_blob.rs @@ -102,7 +102,7 @@ impl CompiledBlob { let at_page = (at as usize) & !0xfff; let pcrel = (what_page as isize).checked_sub(at_page as isize).unwrap(); assert!( - (-1 << 32) <= pcrel && pcrel < (1 << 32), + (-1 << 32) <= (pcrel as i64) && (pcrel as i64) < (1 << 32), "can't reach GOT page with ±4GB `adrp` instruction" ); let val = pcrel >> 12; diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index 6196bec284cd..2de22223868b 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -33,6 +33,7 @@ pub struct ObjectBuilder { name: Vec, libcall_names: Box String + Send + Sync>, per_function_section: bool, + per_data_object_section: bool, } impl ObjectBuilder { @@ -122,6 +123,7 @@ impl ObjectBuilder { name: name.into(), libcall_names, per_function_section: false, + per_data_object_section: false, }) } @@ -130,6 +132,12 @@ impl ObjectBuilder { self.per_function_section = per_function_section; self } + + /// Set if every data object should end up in their own section. + pub fn per_data_object_section(&mut self, per_data_object_section: bool) -> &mut Self { + self.per_data_object_section = per_data_object_section; + self + } } /// An `ObjectModule` implements `Module` and emits ".o" files using the `object` library. @@ -147,6 +155,7 @@ pub struct ObjectModule { known_symbols: HashMap, known_labels: HashMap<(FuncId, CodeOffset), SymbolId>, per_function_section: bool, + per_data_object_section: bool, } impl ObjectModule { @@ -168,6 +177,7 @@ impl ObjectModule { known_symbols: HashMap::new(), known_labels: HashMap::new(), per_function_section: builder.per_function_section, + per_data_object_section: builder.per_data_object_section, } } } @@ -369,9 +379,11 @@ impl Module for ObjectModule { .max(self.isa.function_alignment().minimum.into()) .max(self.isa.symbol_alignment()); let section = if self.per_function_section { - let symbol_name = self.object.symbol(symbol).name.clone(); + // FIXME pass empty symbol name once add_subsection produces `.text` as section name + // instead of `.text.` when passed an empty symbol name. (object#748) Until then pass + // `subsection` to produce `.text.subsection` as section name to reduce confusion. self.object - .add_subsection(StandardSection::Text, &symbol_name) + .add_subsection(StandardSection::Text, b"subsection") } else { self.object.section_id(StandardSection::Text) }; @@ -446,7 +458,15 @@ impl Module for ObjectModule { } else { StandardSection::ReadOnlyDataWithRel }; - self.object.section_id(section_kind) + if self.per_data_object_section { + // FIXME pass empty symbol name once add_subsection produces `.text` as section name + // instead of `.text.` when passed an empty symbol name. (object#748) Until then + // pass `subsection` to produce `.text.subsection` as section name to reduce + // confusion. + self.object.add_subsection(section_kind, b"subsection") + } else { + self.object.section_id(section_kind) + } } else { if decl.tls { return Err(cranelift_module::ModuleError::Backend(anyhow::anyhow!( diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs index 4ec769398291..ea87148ca01a 100644 --- a/crates/cranelift/src/compiler.rs +++ b/crates/cranelift/src/compiler.rs @@ -1,12 +1,13 @@ use crate::debug::DwarfSectionRelocTarget; use crate::func_environ::FuncEnvironment; -use crate::translate::{FuncEnvironment as _, FuncTranslator}; +use crate::translate::FuncTranslator; use crate::TRAP_INTERNAL_ASSERT; use crate::{array_call_signature, CompiledFunction, ModuleTextBuilder}; use crate::{builder::LinkOptions, wasm_call_signature, BuiltinFunctionSignatures}; use anyhow::{Context as _, Result}; use cranelift_codegen::binemit::CodeOffset; use cranelift_codegen::bitset::CompoundBitSet; +use cranelift_codegen::ir::condcodes::IntCC; use cranelift_codegen::ir::{self, InstBuilder, MemFlags, UserExternalName, UserFuncName, Value}; use cranelift_codegen::isa::{ unwind::{UnwindInfo, UnwindInfoKind}, @@ -27,9 +28,9 @@ use std::sync::{Arc, Mutex}; use wasmparser::{FuncValidatorAllocations, FunctionBody}; use wasmtime_environ::{ AddressMapSection, BuiltinFunctionIndex, CacheStore, CompileError, DefinedFuncIndex, FlagValue, - FunctionBodyData, FunctionLoc, ModuleTranslation, ModuleTypesBuilder, PtrSize, - RelocationTarget, StackMapInformation, StaticModuleIndex, TrapEncodingBuilder, Tunables, - VMOffsets, WasmFuncType, WasmFunctionInfo, WasmValType, + FunctionBodyData, FunctionLoc, HostCall, ModuleTranslation, ModuleTypesBuilder, PtrSize, + RelocationTarget, StackMapInformation, StaticModuleIndex, TrapEncodingBuilder, TrapSentinel, + TripleExt, Tunables, VMOffsets, WasmFuncType, WasmFunctionInfo, WasmValType, }; #[cfg(feature = "component-model")] @@ -69,7 +70,8 @@ pub struct Compiler { linkopts: LinkOptions, cache_store: Option>, clif_dir: Option, - wmemcheck: bool, + #[cfg(feature = "wmemcheck")] + pub(crate) wmemcheck: bool, } impl Drop for Compiler { @@ -109,6 +111,7 @@ impl Compiler { clif_dir: Option, wmemcheck: bool, ) -> Compiler { + let _ = wmemcheck; Compiler { contexts: Default::default(), tunables, @@ -116,6 +119,7 @@ impl Compiler { linkopts, cache_store, clif_dir, + #[cfg(feature = "wmemcheck")] wmemcheck, } } @@ -131,6 +135,7 @@ impl Compiler { fn call_indirect_host( &self, builder: &mut FunctionBuilder<'_>, + hostcall: impl Into, sig: ir::SigRef, addr: Value, args: &[Value], @@ -142,17 +147,12 @@ impl Compiler { // Wasmtime itself. assert_eq!(signature.call_conv, self.isa.default_call_conv()); - // If this target is actually pulley then a custom `call` - // instruction is emitted. This will generate a new function with - // the Cranelift-name of a "backend intrinsic" which is how the - // Pulley backend models this special opcode that doesn't otherwise - // map into the Cranelift set of opcodes. - let is_pulley = match self.isa.triple().architecture { - target_lexicon::Architecture::Pulley32 => true, - target_lexicon::Architecture::Pulley64 => true, - _ => false, - }; - if is_pulley { + // If this target is actually pulley then the goal is to emit the custom + // `call_indirect_host` pulley opcode. That's encoded in Cranelift as a + // `call` instruction where the name is `colocated: false`. This will + // force a pulley-specific relocation to get emitted in addition to + // using the `call_indirect_host` instruction. + if self.isa.triple().is_pulley() { let mut new_signature = signature.clone(); new_signature .params @@ -161,27 +161,7 @@ impl Compiler { let name = ir::ExternalName::User(builder.func.declare_imported_user_function( ir::UserExternalName { namespace: crate::NS_PULLEY_HOSTCALL, - // FIXME: this'll require some more refactoring to get this - // working entirely. The goal is to enumerate all possible - // reasons to call the host in some sort of enum, probably - // something like: - // - // enum wasmtime_environ::HostCall { - // ArrayCall, - // Builtin(BuiltinFunctionIndex), - // ComponentCall, - // ComponentBuiltin(ComponentBuiltinFunctionIndex), - // } - // - // that doesn't exist yet though but would be pretty - // reasonable to encode within a `u32` here. Doing that work - // is left as a future refactoring for Pulley. - index: { - let pulley_hostcall_index = || { - unimplemented!(); - }; - pulley_hostcall_index() - }, + index: hostcall.into().index(), }, )); let func = builder.func.import_function(ir::ExtFuncData { @@ -227,14 +207,7 @@ impl wasmtime_environ::Compiler for Compiler { context.func.collect_debug_info(); } - let mut func_env = FuncEnvironment::new( - isa, - translation, - types, - &self.tunables, - self.wmemcheck, - wasm_func_ty, - ); + let mut func_env = FuncEnvironment::new(self, translation, types, wasm_func_ty); // The `stack_limit` global value below is the implementation of stack // overflow checks in Wasmtime. @@ -268,7 +241,7 @@ impl wasmtime_environ::Compiler for Compiler { // abort for the whole program since the runtime limits configured by // the embedder should cause wasm to trap before it reaches that // (ensuring the host has enough space as well for its functionality). - if !func_env.is_pulley() { + if !isa.triple().is_pulley() { let vmctx = context .func .create_global_value(ir::GlobalValueData::VMContext); @@ -284,7 +257,7 @@ impl wasmtime_environ::Compiler for Compiler { global_type: isa.pointer_type(), flags: MemFlags::trusted(), }); - if func_env.signals_based_traps() { + if self.tunables.signals_based_traps { context.func.stack_limit = Some(stack_limit); } else { func_env.stack_limit_at_function_entry = Some(stack_limit); @@ -448,6 +421,7 @@ impl wasmtime_environ::Compiler for Compiler { let callee_signature = builder.func.import_signature(array_call_sig); let call = self.call_indirect_host( &mut builder, + HostCall::ArrayCall, callee_signature, callee, &[callee_vmctx, caller_vmctx, args_base, args_len], @@ -604,7 +578,7 @@ impl wasmtime_environ::Compiler for Compiler { let isa = &*self.isa; let ptr_size = isa.pointer_bytes(); let pointer_type = isa.pointer_type(); - let sigs = BuiltinFunctionSignatures::new(isa, &self.tunables); + let sigs = BuiltinFunctionSignatures::new(self); let wasm_sig = sigs.wasm_signature(index); let host_sig = sigs.host_signature(index); @@ -626,11 +600,46 @@ impl wasmtime_environ::Compiler for Compiler { save_last_wasm_exit_fp_and_pc(&mut builder, pointer_type, &ptr_size, limits); // Now it's time to delegate to the actual builtin. Forward all our own - // arguments to the libcall itself, and then return all the same results - // as the libcall. + // arguments to the libcall itself. let args = builder.block_params(block0).to_vec(); let call = self.call_builtin(&mut builder, vmctx, &args, index, host_sig); let results = builder.func.dfg.inst_results(call).to_vec(); + + // Libcalls do not explicitly `longjmp` for example but instead return a + // code indicating whether they trapped or not. This means that it's the + // responsibility of the trampoline to check for an trapping return + // value and raise a trap as appropriate. With the `results` above check + // what `index` is and for each libcall that has a trapping return value + // process it here. + match index.trap_sentinel() { + Some(TrapSentinel::Falsy) => { + self.raise_if_host_trapped(&mut builder, vmctx, results[0]); + } + Some(TrapSentinel::NegativeTwo) => { + let ty = builder.func.dfg.value_type(results[0]); + let trapped = builder.ins().iconst(ty, -2); + let succeeded = builder.ins().icmp(IntCC::NotEqual, results[0], trapped); + self.raise_if_host_trapped(&mut builder, vmctx, succeeded); + } + Some(TrapSentinel::Negative) => { + let ty = builder.func.dfg.value_type(results[0]); + let zero = builder.ins().iconst(ty, 0); + let succeeded = + builder + .ins() + .icmp(IntCC::SignedGreaterThanOrEqual, results[0], zero); + self.raise_if_host_trapped(&mut builder, vmctx, succeeded); + } + Some(TrapSentinel::NegativeOne) => { + let ty = builder.func.dfg.value_type(results[0]); + let minus_one = builder.ins().iconst(ty, -1); + let succeeded = builder.ins().icmp(IntCC::NotEqual, results[0], minus_one); + self.raise_if_host_trapped(&mut builder, vmctx, succeeded); + } + None => {} + } + + // And finally, return all the results of this libcall. builder.ins().return_(&results); builder.finalize(); @@ -863,7 +872,7 @@ impl Compiler { /// Additionally in the future for pulley this will emit a special trap /// opcode for Pulley itself to cease interpretation and exit the /// interpreter. - fn raise_if_host_trapped( + pub fn raise_if_host_trapped( &self, builder: &mut FunctionBuilder<'_>, vmctx: ir::Value, @@ -880,7 +889,7 @@ impl Compiler { builder.seal_block(continuation_block); builder.switch_to_block(trapped_block); - let sigs = BuiltinFunctionSignatures::new(&*self.isa, &self.tunables); + let sigs = BuiltinFunctionSignatures::new(self); let sig = sigs.host_signature(BuiltinFunctionIndex::raise()); self.call_builtin(builder, vmctx, &[vmctx], BuiltinFunctionIndex::raise(), sig); builder.ins().trap(TRAP_INTERNAL_ASSERT); @@ -918,7 +927,15 @@ impl Compiler { .load(pointer_type, mem_flags, array_addr, body_offset); let sig = builder.func.import_signature(sig); - self.call_indirect_host(builder, sig, func_addr, args) + self.call_indirect_host(builder, builtin, sig, func_addr, args) + } + + pub fn isa(&self) -> &dyn TargetIsa { + &*self.isa + } + + pub fn tunables(&self) -> &Tunables { + &self.tunables } } diff --git a/crates/cranelift/src/compiler/component.rs b/crates/cranelift/src/compiler/component.rs index 1ab7064fc86c..c3c84ad6bfc8 100644 --- a/crates/cranelift/src/compiler/component.rs +++ b/crates/cranelift/src/compiler/component.rs @@ -2,12 +2,13 @@ use crate::{compiler::Compiler, TRAP_ALWAYS, TRAP_CANNOT_ENTER, TRAP_INTERNAL_ASSERT}; use anyhow::Result; +use cranelift_codegen::ir::condcodes::IntCC; use cranelift_codegen::ir::{self, InstBuilder, MemFlags}; use cranelift_codegen::isa::{CallConv, TargetIsa}; use cranelift_frontend::FunctionBuilder; use std::any::Any; use wasmtime_environ::component::*; -use wasmtime_environ::{ModuleInternedTypeIndex, PtrSize, Tunables, WasmValType}; +use wasmtime_environ::{HostCall, ModuleInternedTypeIndex, PtrSize, Tunables, WasmValType}; struct TrampolineCompiler<'a> { compiler: &'a Compiler, @@ -97,16 +98,22 @@ impl<'a> TrampolineCompiler<'a> { Trampoline::ResourceRep(ty) => self.translate_resource_rep(*ty), Trampoline::ResourceDrop(ty) => self.translate_resource_drop(*ty), Trampoline::ResourceTransferOwn => { - self.translate_resource_libcall(host::resource_transfer_own) + self.translate_resource_libcall(host::resource_transfer_own, |me, rets| { + rets[0] = me.raise_if_resource_trapped(rets[0]); + }) } Trampoline::ResourceTransferBorrow => { - self.translate_resource_libcall(host::resource_transfer_borrow) + self.translate_resource_libcall(host::resource_transfer_borrow, |me, rets| { + rets[0] = me.raise_if_resource_trapped(rets[0]); + }) } Trampoline::ResourceEnterCall => { - self.translate_resource_libcall(host::resource_enter_call) + self.translate_resource_libcall(host::resource_enter_call, |_, _| {}) } Trampoline::ResourceExitCall => { - self.translate_resource_libcall(host::resource_exit_call) + self.translate_resource_libcall(host::resource_exit_call, |me, rets| { + me.raise_if_host_trapped(rets.pop().unwrap()); + }) } } } @@ -120,7 +127,6 @@ impl<'a> TrampolineCompiler<'a> { let pointer_type = self.isa.pointer_type(); let args = self.builder.func.dfg.block_params(self.block0).to_vec(); let vmctx = args[0]; - let caller_vmctx = args[1]; let wasm_func_ty = self.types[self.signature].unwrap_func(); // Start off by spilling all the wasm arguments into a stack slot to be @@ -241,15 +247,18 @@ impl<'a> TrampolineCompiler<'a> { i32::try_from(self.offsets.lowering_callee(index)).unwrap(), ); let host_sig = self.builder.import_signature(host_sig); - let call = - self.compiler - .call_indirect_host(&mut self.builder, host_sig, host_fn, &callee_args); + let call = self.compiler.call_indirect_host( + &mut self.builder, + HostCall::ComponentLowerImport, + host_sig, + host_fn, + &callee_args, + ); let succeeded = self.builder.func.dfg.inst_results(call)[0]; match self.abi { Abi::Wasm => { - self.compiler - .raise_if_host_trapped(&mut self.builder, caller_vmctx, succeeded); + self.raise_if_host_trapped(succeeded); // After the host function has returned the results are loaded from // `values_vec_ptr` and then returned. let results = self.compiler.load_values_from_array( @@ -275,15 +284,22 @@ impl<'a> TrampolineCompiler<'a> { let args = self.abi_load_params(); let vmctx = args[0]; - let (host_sig, offset) = host::trap(self.isa, &mut self.builder.func); - let host_fn = self.load_libcall(vmctx, offset); + let (host_sig, index) = host::trap(self.isa, &mut self.builder.func); + let host_fn = self.load_libcall(vmctx, index); let code = self.builder.ins().iconst( ir::types::I8, i64::from(wasmtime_environ::Trap::AlwaysTrapAdapter as u8), ); - self.compiler - .call_indirect_host(&mut self.builder, host_sig, host_fn, &[vmctx, code]); + self.compiler.call_indirect_host( + &mut self.builder, + index, + host_sig, + host_fn, + &[vmctx, code], + ); + let succeeded = self.builder.ins().iconst(ir::types::I8, 0); + self.raise_if_host_trapped(succeeded); // debug trap in case execution actually falls through, but this // shouldn't ever get hit at runtime. self.builder.ins().trap(TRAP_INTERNAL_ASSERT); @@ -312,13 +328,9 @@ impl<'a> TrampolineCompiler<'a> { self.types[self.signature].unwrap_func().params()[0], WasmValType::I32 ); - let (host_sig, offset) = host::resource_new32(self.isa, &mut self.builder.func); - - let host_fn = self.load_libcall(vmctx, offset); - let call = - self.compiler - .call_indirect_host(&mut self.builder, host_sig, host_fn, &host_args); + let call = self.call_libcall(vmctx, host::resource_new32, &host_args); let result = self.builder.func.dfg.inst_results(call)[0]; + let result = self.raise_if_resource_trapped(result); self.abi_store_results(&[result]); } @@ -345,13 +357,9 @@ impl<'a> TrampolineCompiler<'a> { self.types[self.signature].unwrap_func().returns()[0], WasmValType::I32 ); - let (host_sig, offset) = host::resource_rep32(self.isa, &mut self.builder.func); - - let host_fn = self.load_libcall(vmctx, offset); - let call = - self.compiler - .call_indirect_host(&mut self.builder, host_sig, host_fn, &host_args); + let call = self.call_libcall(vmctx, host::resource_rep32, &host_args); let result = self.builder.func.dfg.inst_results(call)[0]; + let result = self.raise_if_resource_trapped(result); self.abi_store_results(&[result]); } @@ -375,13 +383,17 @@ impl<'a> TrampolineCompiler<'a> { ); host_args.push(args[2]); - let (host_sig, offset) = host::resource_drop(self.isa, &mut self.builder.func); - let host_fn = self.load_libcall(vmctx, offset); - let call = - self.compiler - .call_indirect_host(&mut self.builder, host_sig, host_fn, &host_args); + let call = self.call_libcall(vmctx, host::resource_drop, &host_args); let should_run_destructor = self.builder.func.dfg.inst_results(call)[0]; + // Immediately raise a trap if requested by the host + let minus_one = self.builder.ins().iconst(ir::types::I64, -1); + let succeeded = self + .builder + .ins() + .icmp(IntCC::NotEqual, should_run_destructor, minus_one); + self.raise_if_host_trapped(succeeded); + let resource_ty = self.types[resource].ty; let resource_def = self .component @@ -540,7 +552,11 @@ impl<'a> TrampolineCompiler<'a> { /// from the wasm abi to host. fn translate_resource_libcall( &mut self, - get_libcall: fn(&dyn TargetIsa, &mut ir::Function) -> (ir::SigRef, u32), + get_libcall: fn( + &dyn TargetIsa, + &mut ir::Function, + ) -> (ir::SigRef, ComponentBuiltinFunctionIndex), + handle_results: fn(&mut Self, &mut Vec), ) { match self.abi { Abi::Wasm => {} @@ -557,12 +573,10 @@ impl<'a> TrampolineCompiler<'a> { let vmctx = args[0]; let mut host_args = vec![vmctx]; host_args.extend(args[2..].iter().copied()); - let (host_sig, offset) = get_libcall(self.isa, &mut self.builder.func); - let host_fn = self.load_libcall(vmctx, offset); - let call = - self.compiler - .call_indirect_host(&mut self.builder, host_sig, host_fn, &host_args); - let results = self.builder.func.dfg.inst_results(call).to_vec(); + + let call = self.call_libcall(vmctx, get_libcall, &host_args); + let mut results = self.builder.func.dfg.inst_results(call).to_vec(); + handle_results(self, &mut results); self.builder.ins().return_(&results); } @@ -570,22 +584,26 @@ impl<'a> TrampolineCompiler<'a> { /// provided in the libcalls array. /// /// The offset is calculated in the `host` module below. - fn load_libcall(&mut self, vmctx: ir::Value, offset: u32) -> ir::Value { + fn load_libcall( + &mut self, + vmctx: ir::Value, + index: ComponentBuiltinFunctionIndex, + ) -> ir::Value { let pointer_type = self.isa.pointer_type(); - // First load the pointer to the libcalls structure which is static + // First load the pointer to the builtins structure which is static // per-process. - let libcalls_array = self.builder.ins().load( + let builtins_array = self.builder.ins().load( pointer_type, MemFlags::trusted().with_readonly(), vmctx, - i32::try_from(self.offsets.libcalls()).unwrap(), + i32::try_from(self.offsets.builtins()).unwrap(), ); // Next load the function pointer at `offset` and return that. self.builder.ins().load( pointer_type, MemFlags::trusted().with_readonly(), - libcalls_array, - i32::try_from(offset * u32::from(self.offsets.ptr.size())).unwrap(), + builtins_array, + i32::try_from(index.index() * u32::from(self.offsets.ptr.size())).unwrap(), ) } @@ -637,6 +655,44 @@ impl<'a> TrampolineCompiler<'a> { } } } + + fn raise_if_host_trapped(&mut self, succeeded: ir::Value) { + let caller_vmctx = self.builder.func.dfg.block_params(self.block0)[1]; + self.compiler + .raise_if_host_trapped(&mut self.builder, caller_vmctx, succeeded); + } + + fn raise_if_transcode_trapped(&mut self, amount_copied: ir::Value) { + let pointer_type = self.isa.pointer_type(); + let minus_one = self.builder.ins().iconst(pointer_type, -1); + let succeeded = self + .builder + .ins() + .icmp(IntCC::NotEqual, amount_copied, minus_one); + self.raise_if_host_trapped(succeeded); + } + + fn raise_if_resource_trapped(&mut self, ret: ir::Value) -> ir::Value { + let minus_one = self.builder.ins().iconst(ir::types::I64, -1); + let succeeded = self.builder.ins().icmp(IntCC::NotEqual, ret, minus_one); + self.raise_if_host_trapped(succeeded); + self.builder.ins().ireduce(ir::types::I32, ret) + } + + fn call_libcall( + &mut self, + vmctx: ir::Value, + get_libcall: fn( + &dyn TargetIsa, + &mut ir::Function, + ) -> (ir::SigRef, ComponentBuiltinFunctionIndex), + args: &[ir::Value], + ) -> ir::Inst { + let (host_sig, index) = get_libcall(self.isa, &mut self.builder.func); + let host_fn = self.load_libcall(vmctx, index); + self.compiler + .call_indirect_host(&mut self.builder, index, host_sig, host_fn, args) + } } impl ComponentCompiler for Compiler { @@ -714,26 +770,21 @@ impl TrampolineCompiler<'_> { // Determine the static signature of the host libcall for this transcode // operation and additionally calculate the static offset within the // transode libcalls array. - let func = &mut self.builder.func; - let (sig, offset) = match op { - Transcode::Copy(FixedEncoding::Utf8) => host::utf8_to_utf8(self.isa, func), - Transcode::Copy(FixedEncoding::Utf16) => host::utf16_to_utf16(self.isa, func), - Transcode::Copy(FixedEncoding::Latin1) => host::latin1_to_latin1(self.isa, func), - Transcode::Latin1ToUtf16 => host::latin1_to_utf16(self.isa, func), - Transcode::Latin1ToUtf8 => host::latin1_to_utf8(self.isa, func), - Transcode::Utf16ToCompactProbablyUtf16 => { - host::utf16_to_compact_probably_utf16(self.isa, func) - } - Transcode::Utf16ToCompactUtf16 => host::utf16_to_compact_utf16(self.isa, func), - Transcode::Utf16ToLatin1 => host::utf16_to_latin1(self.isa, func), - Transcode::Utf16ToUtf8 => host::utf16_to_utf8(self.isa, func), - Transcode::Utf8ToCompactUtf16 => host::utf8_to_compact_utf16(self.isa, func), - Transcode::Utf8ToLatin1 => host::utf8_to_latin1(self.isa, func), - Transcode::Utf8ToUtf16 => host::utf8_to_utf16(self.isa, func), + let get_libcall = match op { + Transcode::Copy(FixedEncoding::Utf8) => host::utf8_to_utf8, + Transcode::Copy(FixedEncoding::Utf16) => host::utf16_to_utf16, + Transcode::Copy(FixedEncoding::Latin1) => host::latin1_to_latin1, + Transcode::Latin1ToUtf16 => host::latin1_to_utf16, + Transcode::Latin1ToUtf8 => host::latin1_to_utf8, + Transcode::Utf16ToCompactProbablyUtf16 => host::utf16_to_compact_probably_utf16, + Transcode::Utf16ToCompactUtf16 => host::utf16_to_compact_utf16, + Transcode::Utf16ToLatin1 => host::utf16_to_latin1, + Transcode::Utf16ToUtf8 => host::utf16_to_utf8, + Transcode::Utf8ToCompactUtf16 => host::utf8_to_compact_utf16, + Transcode::Utf8ToLatin1 => host::utf8_to_latin1, + Transcode::Utf8ToUtf16 => host::utf8_to_utf16, }; - let libcall = self.load_libcall(vmctx, offset); - // Load the base pointers for the from/to linear memories. let from_base = self.load_runtime_memory_base(vmctx, from); let to_base = self.load_runtime_memory_base(vmctx, to); @@ -789,9 +840,7 @@ impl TrampolineCompiler<'_> { )); args.push(self.builder.ins().stack_addr(pointer_type, slot, 0)); } - let call = self - .compiler - .call_indirect_host(&mut self.builder, sig, libcall, &args); + let call = self.call_libcall(vmctx, get_libcall, &args); let mut results = self.builder.func.dfg.inst_results(call).to_vec(); if uses_retptr { results.push(self.builder.ins().load( @@ -806,12 +855,15 @@ impl TrampolineCompiler<'_> { // Like the arguments the results are fairly similar across libcalls, so // they're lumped into various buckets here. match op { - Transcode::Copy(_) | Transcode::Latin1ToUtf16 => {} + Transcode::Copy(_) | Transcode::Latin1ToUtf16 => { + self.raise_if_host_trapped(results[0]); + } Transcode::Utf8ToUtf16 | Transcode::Utf16ToCompactProbablyUtf16 | Transcode::Utf8ToCompactUtf16 | Transcode::Utf16ToCompactUtf16 => { + self.raise_if_transcode_trapped(results[0]); raw_results.push(self.cast_from_pointer(results[0], to64)); } @@ -819,6 +871,7 @@ impl TrampolineCompiler<'_> { | Transcode::Utf16ToUtf8 | Transcode::Utf8ToLatin1 | Transcode::Utf16ToLatin1 => { + self.raise_if_transcode_trapped(results[0]); raw_results.push(self.cast_from_pointer(results[0], from64)); raw_results.push(self.cast_from_pointer(results[1], to64)); } @@ -899,6 +952,7 @@ impl TrampolineCompiler<'_> { mod host { use cranelift_codegen::ir::{self, AbiParam}; use cranelift_codegen::isa::{CallConv, TargetIsa}; + use wasmtime_environ::component::ComponentBuiltinFunctionIndex; macro_rules! define { ( @@ -908,7 +962,7 @@ mod host { )* ) => { $( - pub(super) fn $name(isa: &dyn TargetIsa, func: &mut ir::Function) -> (ir::SigRef, u32) { + pub(super) fn $name(isa: &dyn TargetIsa, func: &mut ir::Function) -> (ir::SigRef, ComponentBuiltinFunctionIndex) { let pointer_type = isa.pointer_type(); let params = vec![ $( AbiParam::new(define!(@ty pointer_type $param)) ),* @@ -922,7 +976,7 @@ mod host { call_conv: CallConv::triple_default(isa.triple()), }); - (sig, offsets::$name) + (sig, ComponentBuiltinFunctionIndex::$name()) } )* }; @@ -931,52 +985,12 @@ mod host { (@ty $ptr:ident ptr_u8) => ($ptr); (@ty $ptr:ident ptr_u16) => ($ptr); (@ty $ptr:ident ptr_size) => ($ptr); + (@ty $ptr:ident bool) => (ir::types::I8); (@ty $ptr:ident u8) => (ir::types::I8); (@ty $ptr:ident u32) => (ir::types::I32); (@ty $ptr:ident u64) => (ir::types::I64); (@ty $ptr:ident vmctx) => ($ptr); } - wasmtime_environ::foreach_transcoder!(define); wasmtime_environ::foreach_builtin_component_function!(define); - - mod offsets { - macro_rules! offsets { - ( - $( - $( #[$attr:meta] )* - $name:ident($($t:tt)*) $( -> $result:ident )?; - )* - ) => { - offsets!(@declare (0) $($name)*); - }; - - (@declare ($n:expr)) => (const LAST_BUILTIN: u32 = $n;); - (@declare ($n:expr) $name:ident $($rest:tt)*) => ( - pub const $name: u32 = $n; - offsets!(@declare ($n + 1) $($rest)*); - ); - } - - wasmtime_environ::foreach_builtin_component_function!(offsets); - - macro_rules! transcode_offsets { - ( - $( - $( #[$attr:meta] )* - $name:ident($($t:tt)*) $( -> $result:ident )?; - )* - ) => { - transcode_offsets!(@declare (0) $($name)*); - }; - - (@declare ($n:expr)) => (); - (@declare ($n:expr) $name:ident $($rest:tt)*) => ( - pub const $name: u32 = LAST_BUILTIN + $n; - transcode_offsets!(@declare ($n + 1) $($rest)*); - ); - } - - wasmtime_environ::foreach_transcoder!(transcode_offsets); - } } diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs index d2e7ade3a717..39311a2f247a 100644 --- a/crates/cranelift/src/func_environ.rs +++ b/crates/cranelift/src/func_environ.rs @@ -1,6 +1,7 @@ +use crate::compiler::Compiler; use crate::translate::{ - FuncEnvironment as _, FuncTranslationState, GlobalVariable, Heap, HeapData, StructFieldsVec, - TableData, TableSize, TargetEnvironment, + FuncTranslationState, GlobalVariable, Heap, HeapData, StructFieldsVec, TableData, TableSize, + TargetEnvironment, }; use crate::{gc, BuiltinFunctionSignatures, TRAP_INTERNAL_ASSERT}; use cranelift_codegen::cursor::FuncCursor; @@ -21,9 +22,9 @@ use wasmparser::{Operator, WasmFeatures}; use wasmtime_environ::{ BuiltinFunctionIndex, DataIndex, ElemIndex, EngineOrModuleTypeIndex, FuncIndex, GlobalIndex, IndexType, Memory, MemoryIndex, Module, ModuleInternedTypeIndex, ModuleTranslation, - ModuleTypesBuilder, PtrSize, Table, TableIndex, TagIndex, Tunables, TypeConvert, TypeIndex, - VMOffsets, WasmCompositeInnerType, WasmFuncType, WasmHeapTopType, WasmHeapType, WasmRefType, - WasmResult, WasmValType, + ModuleTypesBuilder, PtrSize, Table, TableIndex, TagIndex, TripleExt, Tunables, TypeConvert, + TypeIndex, VMOffsets, WasmCompositeInnerType, WasmFuncType, WasmHeapTopType, WasmHeapType, + WasmRefType, WasmResult, WasmValType, }; use wasmtime_environ::{FUNCREF_INIT_BIT, FUNCREF_MASK}; @@ -40,15 +41,14 @@ cfg_if::cfg_if! { pub(crate) struct BuiltinFunctions { types: BuiltinFunctionSignatures, - builtins: - [Option; BuiltinFunctionIndex::builtin_functions_total_number() as usize], + builtins: [Option; BuiltinFunctionIndex::len() as usize], } impl BuiltinFunctions { - fn new(isa: &dyn TargetIsa, tunables: &Tunables) -> Self { + fn new(compiler: &Compiler) -> Self { Self { - types: BuiltinFunctionSignatures::new(isa, tunables), - builtins: [None; BuiltinFunctionIndex::builtin_functions_total_number() as usize], + types: BuiltinFunctionSignatures::new(compiler), + builtins: [None; BuiltinFunctionIndex::len() as usize], } } @@ -92,6 +92,7 @@ wasmtime_environ::foreach_builtin_function!(declare_function_signatures); /// The `FuncEnvironment` implementation for use by the `ModuleEnvironment`. pub struct FuncEnvironment<'module_environment> { + compiler: &'module_environment Compiler, /// NOTE(frank-emrich) pub for use in crate::wasmfx::* modules pub(crate) isa: &'module_environment (dyn TargetIsa + 'module_environment), pub(crate) module: &'module_environment Module, @@ -157,9 +158,6 @@ pub struct FuncEnvironment<'module_environment> { fuel_consumed: i64, - #[cfg(feature = "wmemcheck")] - wmemcheck: bool, - /// A `GlobalValue` in CLIF which represents the stack limit. /// /// Typically this resides in the `stack_limit` value of `ir::Function` but @@ -172,26 +170,22 @@ pub struct FuncEnvironment<'module_environment> { impl<'module_environment> FuncEnvironment<'module_environment> { pub fn new( - isa: &'module_environment (dyn TargetIsa + 'module_environment), + compiler: &'module_environment Compiler, translation: &'module_environment ModuleTranslation<'module_environment>, types: &'module_environment ModuleTypesBuilder, - tunables: &'module_environment Tunables, - wmemcheck: bool, wasm_func_ty: &'module_environment WasmFuncType, ) -> Self { - let builtin_functions = BuiltinFunctions::new(isa, tunables); + let tunables = compiler.tunables(); + let builtin_functions = BuiltinFunctions::new(compiler); // This isn't used during translation, so squash the warning about this // being unused from the compiler. let _ = BuiltinFunctions::raise; - // Avoid unused warning in default build. - #[cfg(not(feature = "wmemcheck"))] - let _ = wmemcheck; - Self { - isa, + isa: compiler.isa(), module: &translation.module, + compiler, types, wasm_func_ty, sig_ref_to_ty: SecondaryMap::default(), @@ -204,7 +198,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> { vmctx: None, pcc_vmctx_memtype: None, builtin_functions, - offsets: VMOffsets::new(isa.pointer_bytes(), &translation.module), + offsets: VMOffsets::new(compiler.isa().pointer_bytes(), &translation.module), tunables, fuel_var: Variable::new(0), epoch_deadline_var: Variable::new(0), @@ -215,8 +209,6 @@ impl<'module_environment> FuncEnvironment<'module_environment> { // functions should consume at least some fuel. fuel_consumed: 1, - #[cfg(feature = "wmemcheck")] - wmemcheck, #[cfg(feature = "wmemcheck")] translation, @@ -1053,15 +1045,15 @@ impl<'module_environment> FuncEnvironment<'module_environment> { /// Helper to emit a conditional trap based on `trap_cond`. /// - /// This should only be used if `self.signals_based_traps()` is false, - /// otherwise native CLIF instructions should be used instead. + /// This should only be used if `self.clif_instruction_traps_enabled()` is + /// false, otherwise native CLIF instructions should be used instead. pub fn conditionally_trap( &mut self, builder: &mut FunctionBuilder, trap_cond: ir::Value, trap: ir::TrapCode, ) { - assert!(!self.signals_based_traps()); + assert!(!self.clif_instruction_traps_enabled()); let trap_block = builder.create_block(); builder.set_cold_block(trap_block); @@ -1079,24 +1071,24 @@ impl<'module_environment> FuncEnvironment<'module_environment> { builder.switch_to_block(continuation_block); } - /// Helper used when `!self.signals_based_traps()` is enabled to test - /// whether the divisor is zero. + /// Helper used when `!self.clif_instruction_traps_enabled()` is enabled to + /// test whether the divisor is zero. fn guard_zero_divisor(&mut self, builder: &mut FunctionBuilder, rhs: ir::Value) { - if self.signals_based_traps() { + if self.clif_instruction_traps_enabled() { return; } self.trapz(builder, rhs, ir::TrapCode::INTEGER_DIVISION_BY_ZERO); } - /// Helper used when `!self.signals_based_traps()` is enabled to test - /// whether a signed division operation will raise a trap. + /// Helper used when `!self.clif_instruction_traps_enabled()` is enabled to + /// test whether a signed division operation will raise a trap. fn guard_signed_divide( &mut self, builder: &mut FunctionBuilder, lhs: ir::Value, rhs: ir::Value, ) { - if self.signals_based_traps() { + if self.clif_instruction_traps_enabled() { return; } self.trapz(builder, rhs, ir::TrapCode::INTEGER_DIVISION_BY_ZERO); @@ -1117,8 +1109,8 @@ impl<'module_environment> FuncEnvironment<'module_environment> { self.conditionally_trap(builder, is_integer_overflow, ir::TrapCode::INTEGER_OVERFLOW); } - /// Helper used when `!self.signals_based_traps()` is enabled to guard the - /// traps from float-to-int conversions. + /// Helper used when `!self.clif_instruction_traps_enabled()` is enabled to + /// guard the traps from float-to-int conversions. fn guard_fcvt_to_int( &mut self, builder: &mut FunctionBuilder, @@ -1127,7 +1119,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> { range32: (f64, f64), range64: (f64, f64), ) { - assert!(!self.signals_based_traps()); + assert!(!self.clif_instruction_traps_enabled()); let val_ty = builder.func.dfg.value_type(val); let val = if val_ty == F64 { val @@ -1205,14 +1197,6 @@ impl<'module_environment> FuncEnvironment<'module_environment> { i32::from(self.offsets.ptr.vm_func_ref_type_index()), ) } - - pub fn is_pulley(&self) -> bool { - match self.isa.triple().architecture { - target_lexicon::Architecture::Pulley32 => true, - target_lexicon::Architecture::Pulley64 => true, - _ => false, - } - } } struct Call<'a, 'func, 'module_env> { @@ -1448,7 +1432,7 @@ impl<'a, 'func, 'module_env> Call<'a, 'func, 'module_env> { // if it succeeds then we know it won't match, so trap // anyway. if table.ref_type.nullable { - if self.env.signals_based_traps() { + if self.env.clif_memory_traps_enabled() { let mem_flags = ir::MemFlags::trusted().with_readonly(); self.builder.ins().load( sig_id_type, @@ -1512,7 +1496,7 @@ impl<'a, 'func, 'module_env> Call<'a, 'func, 'module_env> { // Note that the callee may be null in which case this load may // trap. If so use the `TRAP_INDIRECT_CALL_TO_NULL` trap code. let mut mem_flags = ir::MemFlags::trusted().with_readonly(); - if self.env.signals_based_traps() { + if self.env.clif_memory_traps_enabled() { mem_flags = mem_flags.with_trap_code(Some(crate::TRAP_INDIRECT_CALL_TO_NULL)); } else { self.env @@ -1594,7 +1578,7 @@ impl<'a, 'func, 'module_env> Call<'a, 'func, 'module_env> { // non-null or may trap. let mem_flags = ir::MemFlags::trusted().with_readonly(); let mut callee_flags = mem_flags; - if self.env.signals_based_traps() { + if self.env.clif_memory_traps_enabled() { callee_flags = callee_flags.with_trap_code(callee_load_trap_code); } else { if let Some(trap) = callee_load_trap_code { @@ -1735,24 +1719,22 @@ impl<'module_environment> TargetEnvironment for FuncEnvironment<'module_environm } fn tunables(&self) -> &Tunables { - self.tunables + self.compiler.tunables() } } -impl<'module_environment> crate::translate::FuncEnvironment - for FuncEnvironment<'module_environment> -{ - fn heaps(&self) -> &PrimaryMap { +impl FuncEnvironment<'_> { + pub fn heaps(&self) -> &PrimaryMap { &self.heaps } - fn is_wasm_parameter(&self, _signature: &ir::Signature, index: usize) -> bool { + pub fn is_wasm_parameter(&self, _signature: &ir::Signature, index: usize) -> bool { // The first two parameters are the vmctx and caller vmctx. The rest are // the wasm parameters. index >= 2 } - fn param_needs_stack_map(&self, _signature: &ir::Signature, index: usize) -> bool { + pub fn param_needs_stack_map(&self, _signature: &ir::Signature, index: usize) -> bool { // Skip the caller and callee vmctx. if index < 2 { return false; @@ -1761,12 +1743,12 @@ impl<'module_environment> crate::translate::FuncEnvironment self.wasm_func_ty.params()[index - 2].is_vmgcref_type_and_not_i31() } - fn sig_ref_result_needs_stack_map(&self, sig_ref: ir::SigRef, index: usize) -> bool { + pub fn sig_ref_result_needs_stack_map(&self, sig_ref: ir::SigRef, index: usize) -> bool { let wasm_func_ty = self.sig_ref_to_ty[sig_ref].as_ref().unwrap(); wasm_func_ty.returns()[index].is_vmgcref_type_and_not_i31() } - fn func_ref_result_needs_stack_map( + pub fn func_ref_result_needs_stack_map( &self, func: &ir::Function, func_ref: ir::FuncRef, @@ -1777,22 +1759,23 @@ impl<'module_environment> crate::translate::FuncEnvironment wasm_func_ty.returns()[index].is_vmgcref_type_and_not_i31() } - fn after_locals(&mut self, num_locals: usize) { + pub fn after_locals(&mut self, num_locals: usize) { self.fuel_var = Variable::new(num_locals); self.epoch_deadline_var = Variable::new(num_locals + 1); self.epoch_ptr_var = Variable::new(num_locals + 2); } - fn translate_table_grow( + pub fn translate_table_grow( &mut self, - builder: &mut FunctionBuilder, + builder: &mut FunctionBuilder<'_>, table_index: TableIndex, delta: ir::Value, init_value: ir::Value, ) -> WasmResult { + let mut pos = builder.cursor(); let table = self.table(table_index); let ty = table.ref_type.heap_type; - let vmctx = self.vmctx_val(&mut builder.cursor()); + let vmctx = self.vmctx_val(&mut pos); let index_type = table.idx_type; let delta = self.cast_index_to_i64(&mut builder.cursor(), delta, index_type); let table_index_arg = builder.ins().iconst(I32, table_index.as_u32() as i64); @@ -1828,7 +1811,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(self.convert_pointer_to_index_type(builder.cursor(), result, index_type, false)) } - fn translate_table_get( + pub fn translate_table_get( &mut self, builder: &mut FunctionBuilder, table_index: TableIndex, @@ -1869,7 +1852,7 @@ impl<'module_environment> crate::translate::FuncEnvironment } } - fn translate_table_set( + pub fn translate_table_set( &mut self, builder: &mut FunctionBuilder, table_index: TableIndex, @@ -1922,17 +1905,18 @@ impl<'module_environment> crate::translate::FuncEnvironment } } - fn translate_table_fill( + pub fn translate_table_fill( &mut self, - builder: &mut FunctionBuilder, + builder: &mut FunctionBuilder<'_>, table_index: TableIndex, dst: ir::Value, val: ir::Value, len: ir::Value, ) -> WasmResult<()> { + let mut pos = builder.cursor(); let table = self.table(table_index); let ty = table.ref_type.heap_type; - let vmctx = self.vmctx_val(&mut builder.cursor()); + let vmctx = self.vmctx_val(&mut pos); let index_type = table.idx_type; let table_index_arg = builder.ins().iconst(I32, table_index.as_u32() as i64); let dst = self.cast_index_to_i64(&mut builder.cursor(), dst, index_type); @@ -1964,7 +1948,11 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_ref_i31(&mut self, mut pos: FuncCursor, val: ir::Value) -> WasmResult { + pub fn translate_ref_i31( + &mut self, + mut pos: FuncCursor, + val: ir::Value, + ) -> WasmResult { debug_assert_eq!(pos.func.dfg.value_type(val), ir::types::I32); let shifted = pos.ins().ishl_imm(val, 1); let tagged = pos @@ -1975,7 +1963,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(tagged) } - fn translate_i31_get_s( + pub fn translate_i31_get_s( &mut self, builder: &mut FunctionBuilder, i31ref: ir::Value, @@ -1987,7 +1975,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(builder.ins().sshr_imm(i31ref, 1)) } - fn translate_i31_get_u( + pub fn translate_i31_get_u( &mut self, builder: &mut FunctionBuilder, i31ref: ir::Value, @@ -1999,7 +1987,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(builder.ins().ushr_imm(i31ref, 1)) } - fn struct_fields_len(&mut self, struct_type_index: TypeIndex) -> WasmResult { + pub fn struct_fields_len(&mut self, struct_type_index: TypeIndex) -> WasmResult { let ty = self.module.types[struct_type_index]; match &self.types[ty].composite_type.inner { WasmCompositeInnerType::Struct(s) => Ok(s.fields.len()), @@ -2007,7 +1995,7 @@ impl<'module_environment> crate::translate::FuncEnvironment } } - fn translate_struct_new( + pub fn translate_struct_new( &mut self, builder: &mut FunctionBuilder, struct_type_index: TypeIndex, @@ -2016,7 +2004,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_struct_new(self, builder, struct_type_index, &fields) } - fn translate_struct_new_default( + pub fn translate_struct_new_default( &mut self, builder: &mut FunctionBuilder, struct_type_index: TypeIndex, @@ -2024,7 +2012,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_struct_new_default(self, builder, struct_type_index) } - fn translate_struct_get( + pub fn translate_struct_get( &mut self, builder: &mut FunctionBuilder, struct_type_index: TypeIndex, @@ -2034,7 +2022,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_struct_get(self, builder, struct_type_index, field_index, struct_ref) } - fn translate_struct_get_s( + pub fn translate_struct_get_s( &mut self, builder: &mut FunctionBuilder, struct_type_index: TypeIndex, @@ -2044,7 +2032,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_struct_get_s(self, builder, struct_type_index, field_index, struct_ref) } - fn translate_struct_get_u( + pub fn translate_struct_get_u( &mut self, builder: &mut FunctionBuilder, struct_type_index: TypeIndex, @@ -2054,7 +2042,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_struct_get_u(self, builder, struct_type_index, field_index, struct_ref) } - fn translate_struct_set( + pub fn translate_struct_set( &mut self, builder: &mut FunctionBuilder, struct_type_index: TypeIndex, @@ -2072,7 +2060,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) } - fn translate_array_new( + pub fn translate_array_new( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2082,7 +2070,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_new(self, builder, array_type_index, elem, len) } - fn translate_array_new_default( + pub fn translate_array_new_default( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2091,7 +2079,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_new_default(self, builder, array_type_index, len) } - fn translate_array_new_fixed( + pub fn translate_array_new_fixed( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2100,7 +2088,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_new_fixed(self, builder, array_type_index, elems) } - fn translate_array_new_data( + pub fn translate_array_new_data( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2119,10 +2107,11 @@ impl<'module_environment> crate::translate::FuncEnvironment libcall, &[vmctx, interned_type_index, data_index, data_offset, len], ); - Ok(builder.func.dfg.first_result(call_inst)) + let result = builder.func.dfg.first_result(call_inst); + Ok(builder.ins().ireduce(ir::types::I32, result)) } - fn translate_array_new_elem( + pub fn translate_array_new_elem( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2141,10 +2130,11 @@ impl<'module_environment> crate::translate::FuncEnvironment libcall, &[vmctx, interned_type_index, elem_index, elem_offset, len], ); - Ok(builder.func.dfg.first_result(call_inst)) + let result = builder.func.dfg.first_result(call_inst); + Ok(builder.ins().ireduce(ir::types::I32, result)) } - fn translate_array_copy( + pub fn translate_array_copy( &mut self, builder: &mut FunctionBuilder, _dst_array_type_index: TypeIndex, @@ -2164,7 +2154,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_array_fill( + pub fn translate_array_fill( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2176,7 +2166,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_fill(self, builder, array_type_index, array, index, value, len) } - fn translate_array_init_data( + pub fn translate_array_init_data( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2208,7 +2198,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_array_init_elem( + pub fn translate_array_init_elem( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2240,7 +2230,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_array_len( + pub fn translate_array_len( &mut self, builder: &mut FunctionBuilder, array: ir::Value, @@ -2248,7 +2238,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_len(self, builder, array) } - fn translate_array_get( + pub fn translate_array_get( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2258,7 +2248,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_get(self, builder, array_type_index, array, index) } - fn translate_array_get_s( + pub fn translate_array_get_s( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2268,7 +2258,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_get_s(self, builder, array_type_index, array, index) } - fn translate_array_get_u( + pub fn translate_array_get_u( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2278,7 +2268,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_get_u(self, builder, array_type_index, array, index) } - fn translate_array_set( + pub fn translate_array_set( &mut self, builder: &mut FunctionBuilder, array_type_index: TypeIndex, @@ -2289,7 +2279,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_array_set(self, builder, array_type_index, array, index, value) } - fn translate_ref_test( + pub fn translate_ref_test( &mut self, builder: &mut FunctionBuilder<'_>, ref_ty: WasmRefType, @@ -2298,7 +2288,7 @@ impl<'module_environment> crate::translate::FuncEnvironment gc::translate_ref_test(self, builder, ref_ty, gc_ref) } - fn translate_ref_null( + pub fn translate_ref_null( &mut self, builder: &mut FunctionBuilder, ht: WasmHeapType, @@ -2315,7 +2305,7 @@ impl<'module_environment> crate::translate::FuncEnvironment }) } - fn translate_ref_is_null( + pub fn translate_ref_is_null( &mut self, builder: &mut FunctionBuilder, value: ir::Value, @@ -2336,7 +2326,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(builder.ins().uextend(ir::types::I32, byte_is_null)) } - fn translate_ref_func( + pub fn translate_ref_func( &mut self, mut pos: cranelift_codegen::cursor::FuncCursor<'_>, func_index: FuncIndex, @@ -2349,7 +2339,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(pos.func.dfg.first_result(call_inst)) } - fn translate_custom_global_get( + pub fn translate_custom_global_get( &mut self, builder: &mut FunctionBuilder, index: GlobalIndex, @@ -2376,7 +2366,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) } - fn translate_custom_global_set( + pub fn translate_custom_global_set( &mut self, builder: &mut FunctionBuilder, index: GlobalIndex, @@ -2405,7 +2395,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) } - fn make_heap(&mut self, func: &mut ir::Function, index: MemoryIndex) -> WasmResult { + pub fn make_heap(&mut self, func: &mut ir::Function, index: MemoryIndex) -> WasmResult { let pointer_type = self.pointer_type(); let memory = self.module.memories[index]; let is_shared = memory.shared; @@ -2596,7 +2586,7 @@ impl<'module_environment> crate::translate::FuncEnvironment })) } - fn make_global( + pub fn make_global( &mut self, func: &mut ir::Function, index: GlobalIndex, @@ -2621,7 +2611,7 @@ impl<'module_environment> crate::translate::FuncEnvironment }) } - fn make_indirect_sig( + pub fn make_indirect_sig( &mut self, func: &mut ir::Function, index: TypeIndex, @@ -2634,7 +2624,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(sig_ref) } - fn make_direct_func( + pub fn make_direct_func( &mut self, func: &mut ir::Function, index: FuncIndex, @@ -2671,7 +2661,7 @@ impl<'module_environment> crate::translate::FuncEnvironment })) } - fn translate_call_indirect( + pub fn translate_call_indirect( &mut self, builder: &mut FunctionBuilder, features: &WasmFeatures, @@ -2691,7 +2681,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) } - fn translate_call( + pub fn translate_call( &mut self, builder: &mut FunctionBuilder, callee_index: FuncIndex, @@ -2701,7 +2691,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Call::new(builder, self).direct_call(callee_index, callee, call_args) } - fn translate_call_ref( + pub fn translate_call_ref( &mut self, builder: &mut FunctionBuilder, sig_ref: ir::SigRef, @@ -2711,7 +2701,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Call::new(builder, self).call_ref(sig_ref, callee, call_args) } - fn translate_return_call( + pub fn translate_return_call( &mut self, builder: &mut FunctionBuilder, callee_index: FuncIndex, @@ -2722,7 +2712,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_return_call_indirect( + pub fn translate_return_call_indirect( &mut self, builder: &mut FunctionBuilder, features: &WasmFeatures, @@ -2743,7 +2733,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_return_call_ref( + pub fn translate_return_call_ref( &mut self, builder: &mut FunctionBuilder, sig_ref: ir::SigRef, @@ -2754,13 +2744,14 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_memory_grow( + pub fn translate_memory_grow( &mut self, - mut pos: FuncCursor<'_>, + builder: &mut FunctionBuilder<'_>, index: MemoryIndex, _heap: Heap, val: ir::Value, ) -> WasmResult { + let mut pos = builder.cursor(); let memory_grow = self.builtin_functions.memory32_grow(&mut pos.func); let index_arg = index.index(); @@ -2776,10 +2767,15 @@ impl<'module_environment> crate::translate::FuncEnvironment 0 => true, _ => unreachable!("only page sizes 2**0 and 2**16 are currently valid"), }; - Ok(self.convert_pointer_to_index_type(pos, result, index_type, single_byte_pages)) + Ok(self.convert_pointer_to_index_type( + builder.cursor(), + result, + index_type, + single_byte_pages, + )) } - fn translate_memory_size( + pub fn translate_memory_size( &mut self, mut pos: FuncCursor<'_>, index: MemoryIndex, @@ -2864,9 +2860,9 @@ impl<'module_environment> crate::translate::FuncEnvironment )) } - fn translate_memory_copy( + pub fn translate_memory_copy( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, src_index: MemoryIndex, _src_heap: Heap, dst_index: MemoryIndex, @@ -2875,6 +2871,7 @@ impl<'module_environment> crate::translate::FuncEnvironment src: ir::Value, len: ir::Value, ) -> WasmResult<()> { + let mut pos = builder.cursor(); let vmctx = self.vmctx_val(&mut pos); let memory_copy = self.builtin_functions.memory_copy(&mut pos.func); @@ -2900,15 +2897,16 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_memory_fill( + pub fn translate_memory_fill( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, memory_index: MemoryIndex, _heap: Heap, dst: ir::Value, val: ir::Value, len: ir::Value, ) -> WasmResult<()> { + let mut pos = builder.cursor(); let memory_fill = self.builtin_functions.memory_fill(&mut pos.func); let dst = self.cast_index_to_i64(&mut pos, dst, self.memory(memory_index).idx_type); let len = self.cast_index_to_i64(&mut pos, len, self.memory(memory_index).idx_type); @@ -2922,9 +2920,9 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_memory_init( + pub fn translate_memory_init( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, memory_index: MemoryIndex, _heap: Heap, seg_index: u32, @@ -2932,6 +2930,7 @@ impl<'module_environment> crate::translate::FuncEnvironment src: ir::Value, len: ir::Value, ) -> WasmResult<()> { + let mut pos = builder.cursor(); let memory_init = self.builtin_functions.memory_init(&mut pos.func); let memory_index_arg = pos.ins().iconst(I32, memory_index.index() as i64); @@ -2949,7 +2948,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_data_drop(&mut self, mut pos: FuncCursor, seg_index: u32) -> WasmResult<()> { + pub fn translate_data_drop(&mut self, mut pos: FuncCursor, seg_index: u32) -> WasmResult<()> { let data_drop = self.builtin_functions.data_drop(&mut pos.func); let seg_index_arg = pos.ins().iconst(I32, seg_index as i64); let vmctx = self.vmctx_val(&mut pos); @@ -2957,7 +2956,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_table_size( + pub fn translate_table_size( &mut self, pos: FuncCursor, table_index: TableIndex, @@ -2968,9 +2967,9 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(table_data.bound.bound(&*self.isa, pos, index_type)) } - fn translate_table_copy( + pub fn translate_table_copy( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, dst_table_index: TableIndex, src_table_index: TableIndex, dst: ir::Value, @@ -2978,8 +2977,9 @@ impl<'module_environment> crate::translate::FuncEnvironment len: ir::Value, ) -> WasmResult<()> { let (table_copy, dst_table_index_arg, src_table_index_arg) = - self.get_table_copy_func(&mut pos.func, dst_table_index, src_table_index); + self.get_table_copy_func(&mut builder.func, dst_table_index, src_table_index); + let mut pos = builder.cursor(); let dst = self.cast_index_to_i64(&mut pos, dst, self.table(dst_table_index).idx_type); let src = self.cast_index_to_i64(&mut pos, src, self.table(src_table_index).idx_type); let len = if index_type_to_ir_type(self.table(dst_table_index).idx_type) == I64 @@ -3007,15 +3007,16 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_table_init( + pub fn translate_table_init( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, seg_index: u32, table_index: TableIndex, dst: ir::Value, src: ir::Value, len: ir::Value, ) -> WasmResult<()> { + let mut pos = builder.cursor(); let table_init = self.builtin_functions.table_init(&mut pos.func); let table_index_arg = pos.ins().iconst(I32, i64::from(table_index.as_u32())); let seg_index_arg = pos.ins().iconst(I32, i64::from(seg_index)); @@ -3033,7 +3034,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_elem_drop(&mut self, mut pos: FuncCursor, elem_index: u32) -> WasmResult<()> { + pub fn translate_elem_drop(&mut self, mut pos: FuncCursor, elem_index: u32) -> WasmResult<()> { let elem_drop = self.builtin_functions.elem_drop(&mut pos.func); let elem_index_arg = pos.ins().iconst(I32, elem_index as i64); let vmctx = self.vmctx_val(&mut pos); @@ -3041,9 +3042,9 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn translate_atomic_wait( + pub fn translate_atomic_wait( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, memory_index: MemoryIndex, _heap: Heap, addr: ir::Value, @@ -3052,6 +3053,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) -> WasmResult { #[cfg(feature = "threads")] { + let mut pos = builder.cursor(); let addr = self.cast_index_to_i64(&mut pos, addr, self.memory(memory_index).idx_type); let implied_ty = pos.func.dfg.value_type(expected); let (wait_func, memory_index) = @@ -3065,21 +3067,21 @@ impl<'module_environment> crate::translate::FuncEnvironment wait_func, &[vmctx, memory_index_arg, addr, expected, timeout], ); - - Ok(*pos.func.dfg.inst_results(call_inst).first().unwrap()) + let ret = pos.func.dfg.inst_results(call_inst)[0]; + Ok(builder.ins().ireduce(ir::types::I32, ret)) } #[cfg(not(feature = "threads"))] { - let _ = (&mut pos, memory_index, addr, expected, timeout); + let _ = (builder, memory_index, addr, expected, timeout); Err(wasmtime_environ::WasmError::Unsupported( "threads support disabled at compile time".to_string(), )) } } - fn translate_atomic_notify( + pub fn translate_atomic_notify( &mut self, - mut pos: FuncCursor, + builder: &mut FunctionBuilder<'_>, memory_index: MemoryIndex, _heap: Heap, addr: ir::Value, @@ -3087,6 +3089,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) -> WasmResult { #[cfg(feature = "threads")] { + let mut pos = builder.cursor(); let addr = self.cast_index_to_i64(&mut pos, addr, self.memory(memory_index).idx_type); let atomic_notify = self.builtin_functions.memory_atomic_notify(&mut pos.func); @@ -3095,19 +3098,19 @@ impl<'module_environment> crate::translate::FuncEnvironment let call_inst = pos .ins() .call(atomic_notify, &[vmctx, memory_index_arg, addr, count]); - - Ok(*pos.func.dfg.inst_results(call_inst).first().unwrap()) + let ret = pos.func.dfg.inst_results(call_inst)[0]; + Ok(builder.ins().ireduce(ir::types::I32, ret)) } #[cfg(not(feature = "threads"))] { - let _ = (&mut pos, memory_index, addr, count); + let _ = (builder, memory_index, addr, count); Err(wasmtime_environ::WasmError::Unsupported( "threads support disabled at compile time".to_string(), )) } } - fn translate_loop_header(&mut self, builder: &mut FunctionBuilder) -> WasmResult<()> { + pub fn translate_loop_header(&mut self, builder: &mut FunctionBuilder) -> WasmResult<()> { // Additionally if enabled check how much fuel we have remaining to see // if we've run out by this point. if self.tunables.consume_fuel { @@ -3123,7 +3126,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn before_translate_operator( + pub fn before_translate_operator( &mut self, op: &Operator, builder: &mut FunctionBuilder, @@ -3135,7 +3138,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn after_translate_operator( + pub fn after_translate_operator( &mut self, op: &Operator, builder: &mut FunctionBuilder, @@ -3147,7 +3150,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn before_unconditionally_trapping_memory_access( + pub fn before_unconditionally_trapping_memory_access( &mut self, builder: &mut FunctionBuilder, ) -> WasmResult<()> { @@ -3158,7 +3161,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn before_translate_function( + pub fn before_translate_function( &mut self, builder: &mut FunctionBuilder, _state: &FuncTranslationState, @@ -3195,7 +3198,7 @@ impl<'module_environment> crate::translate::FuncEnvironment } #[cfg(feature = "wmemcheck")] - if self.wmemcheck { + if self.compiler.wmemcheck { let func_name = self.current_func_name(builder); if func_name == Some("malloc") { self.check_malloc_start(builder); @@ -3207,7 +3210,7 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn after_translate_function( + pub fn after_translate_function( &mut self, builder: &mut FunctionBuilder, state: &FuncTranslationState, @@ -3218,21 +3221,21 @@ impl<'module_environment> crate::translate::FuncEnvironment Ok(()) } - fn relaxed_simd_deterministic(&self) -> bool { + pub fn relaxed_simd_deterministic(&self) -> bool { self.tunables.relaxed_simd_deterministic } - fn has_native_fma(&self) -> bool { + pub fn has_native_fma(&self) -> bool { self.isa.has_native_fma() } - fn is_x86(&self) -> bool { + pub fn is_x86(&self) -> bool { self.isa.triple().architecture == target_lexicon::Architecture::X86_64 } - fn translate_cont_bind( + pub fn translate_cont_bind( &mut self, - builder: &mut FunctionBuilder, + builder: &mut FunctionBuilder<'_>, contobj: ir::Value, args: &[ir::Value], remaining_arg_count: usize, @@ -3240,24 +3243,24 @@ impl<'module_environment> crate::translate::FuncEnvironment wasmfx_impl::translate_cont_bind(self, builder, contobj, args, remaining_arg_count) } - fn translate_cont_new( + pub fn translate_cont_new( &mut self, - builder: &mut FunctionBuilder, - state: &FuncTranslationState, + builder: &mut FunctionBuilder<'_>, + _state: &FuncTranslationState, func: ir::Value, arg_types: &[WasmValType], return_types: &[WasmValType], ) -> WasmResult { - wasmfx_impl::translate_cont_new(self, builder, state, func, arg_types, return_types) + wasmfx_impl::translate_cont_new(self, builder, func, arg_types, return_types) } // TODO(dhil): Currently, this function invokes // `translate_load_builtin_function_address` multiple times, which // causes repeated allocation of values pointing to the vmctx. We // should refactor or inline this logic at some point. - fn translate_resume( + pub fn translate_resume( &mut self, - builder: &mut FunctionBuilder, + builder: &mut FunctionBuilder<'_>, type_index: u32, contobj: ir::Value, resume_args: &[ir::Value], @@ -3266,7 +3269,8 @@ impl<'module_environment> crate::translate::FuncEnvironment wasmfx_impl::translate_resume(self, builder, type_index, contobj, resume_args, resumetable) } - fn translate_resume_throw( + #[allow(dead_code, reason = "TODO")] + pub fn translate_resume_throw( &mut self, _pos: FuncCursor, _state: &FuncTranslationState, @@ -3276,9 +3280,9 @@ impl<'module_environment> crate::translate::FuncEnvironment todo!() } - fn translate_suspend( + pub fn translate_suspend( &mut self, - builder: &mut FunctionBuilder, + builder: &mut FunctionBuilder<'_>, tag_index: u32, suspend_args: &[ir::Value], tag_return_types: &[WasmValType], @@ -3287,7 +3291,7 @@ impl<'module_environment> crate::translate::FuncEnvironment } /// Translates switch instructions. - fn translate_switch( + pub fn translate_switch( &mut self, builder: &mut FunctionBuilder, tag_index: u32, @@ -3298,53 +3302,53 @@ impl<'module_environment> crate::translate::FuncEnvironment wasmfx_impl::translate_switch(self, builder, tag_index, contobj, switch_args, return_types) } - fn continuation_arguments(&self, index: u32) -> &[WasmValType] { + pub fn continuation_arguments(&self, index: u32) -> &[WasmValType] { let idx = self.module.types[TypeIndex::from_u32(index)]; self.types[self.types[idx].unwrap_cont().clone().interned_type_index()] .unwrap_func() .params() } - fn continuation_returns(&self, index: u32) -> &[WasmValType] { + pub fn continuation_returns(&self, index: u32) -> &[WasmValType] { let idx = self.module.types[TypeIndex::from_u32(index)]; self.types[self.types[idx].unwrap_cont().clone().interned_type_index()] .unwrap_func() .returns() } - fn tag_params(&self, tag_index: u32) -> &[WasmValType] { + pub fn tag_params(&self, tag_index: u32) -> &[WasmValType] { let idx = self.module.tags[TagIndex::from_u32(tag_index)].signature; self.types[idx.unwrap_module_type_index()] .unwrap_func() .params() } - fn tag_returns(&self, tag_index: u32) -> &[WasmValType] { + pub fn tag_returns(&self, tag_index: u32) -> &[WasmValType] { let idx = self.module.tags[TagIndex::from_u32(tag_index)].signature; self.types[idx.unwrap_module_type_index()] .unwrap_func() .returns() } - fn use_x86_blendv_for_relaxed_laneselect(&self, ty: Type) -> bool { + pub fn use_x86_blendv_for_relaxed_laneselect(&self, ty: Type) -> bool { self.isa.has_x86_blendv_lowering(ty) } - fn use_x86_pshufb_for_relaxed_swizzle(&self) -> bool { + pub fn use_x86_pshufb_for_relaxed_swizzle(&self) -> bool { self.isa.has_x86_pshufb_lowering() } - fn use_x86_pmulhrsw_for_relaxed_q15mul(&self) -> bool { + pub fn use_x86_pmulhrsw_for_relaxed_q15mul(&self) -> bool { self.isa.has_x86_pmulhrsw_lowering() } - fn use_x86_pmaddubsw_for_dot(&self) -> bool { + pub fn use_x86_pmaddubsw_for_dot(&self) -> bool { self.isa.has_x86_pmaddubsw_lowering() } - #[cfg(feature = "wmemcheck")] - fn handle_before_return(&mut self, retvals: &[ir::Value], builder: &mut FunctionBuilder) { - if self.wmemcheck { + pub fn handle_before_return(&mut self, retvals: &[ir::Value], builder: &mut FunctionBuilder) { + #[cfg(feature = "wmemcheck")] + if self.compiler.wmemcheck { let func_name = self.current_func_name(builder); if func_name == Some("malloc") { self.hook_malloc_exit(builder, retvals); @@ -3352,17 +3356,19 @@ impl<'module_environment> crate::translate::FuncEnvironment self.hook_free_exit(builder); } } + #[cfg(not(feature = "wmemcheck"))] + let _ = (retvals, builder); } - #[cfg(feature = "wmemcheck")] - fn before_load( + pub fn before_load( &mut self, builder: &mut FunctionBuilder, val_size: u8, addr: ir::Value, offset: u64, ) { - if self.wmemcheck { + #[cfg(feature = "wmemcheck")] + if self.compiler.wmemcheck { let check_load = self.builtin_functions.check_load(builder.func); let vmctx = self.vmctx_val(&mut builder.cursor()); let num_bytes = builder.ins().iconst(I32, val_size as i64); @@ -3371,17 +3377,19 @@ impl<'module_environment> crate::translate::FuncEnvironment .ins() .call(check_load, &[vmctx, num_bytes, addr, offset_val]); } + #[cfg(not(feature = "wmemcheck"))] + let _ = (builder, val_size, addr, offset); } - #[cfg(feature = "wmemcheck")] - fn before_store( + pub fn before_store( &mut self, builder: &mut FunctionBuilder, val_size: u8, addr: ir::Value, offset: u64, ) { - if self.wmemcheck { + #[cfg(feature = "wmemcheck")] + if self.compiler.wmemcheck { let check_store = self.builtin_functions.check_store(builder.func); let vmctx = self.vmctx_val(&mut builder.cursor()); let num_bytes = builder.ins().iconst(I32, val_size as i64); @@ -3390,16 +3398,18 @@ impl<'module_environment> crate::translate::FuncEnvironment .ins() .call(check_store, &[vmctx, num_bytes, addr, offset_val]); } + #[cfg(not(feature = "wmemcheck"))] + let _ = (builder, val_size, addr, offset); } - #[cfg(feature = "wmemcheck")] - fn update_global( + pub fn update_global( &mut self, builder: &mut FunctionBuilder, global_index: u32, value: ir::Value, ) { - if self.wmemcheck { + #[cfg(feature = "wmemcheck")] + if self.compiler.wmemcheck { if global_index == 0 { // We are making the assumption that global 0 is the auxiliary stack pointer. let update_stack_pointer = @@ -3408,29 +3418,33 @@ impl<'module_environment> crate::translate::FuncEnvironment builder.ins().call(update_stack_pointer, &[vmctx, value]); } } + #[cfg(not(feature = "wmemcheck"))] + let _ = (builder, global_index, value); } - #[cfg(feature = "wmemcheck")] - fn before_memory_grow( + pub fn before_memory_grow( &mut self, builder: &mut FunctionBuilder, num_pages: ir::Value, mem_index: MemoryIndex, ) { - if self.wmemcheck && mem_index.as_u32() == 0 { + #[cfg(feature = "wmemcheck")] + if self.compiler.wmemcheck && mem_index.as_u32() == 0 { let update_mem_size = self.builtin_functions.update_mem_size(builder.func); let vmctx = self.vmctx_val(&mut builder.cursor()); builder.ins().call(update_mem_size, &[vmctx, num_pages]); } + #[cfg(not(feature = "wmemcheck"))] + let _ = (builder, num_pages, mem_index); } - fn isa(&self) -> &dyn TargetIsa { + pub fn isa(&self) -> &dyn TargetIsa { &*self.isa } - fn trap(&mut self, builder: &mut FunctionBuilder, trap: ir::TrapCode) { + pub fn trap(&mut self, builder: &mut FunctionBuilder, trap: ir::TrapCode) { match ( - self.signals_based_traps(), + self.clif_instruction_traps_enabled(), crate::clif_trap_to_env_trap(trap), ) { // If libcall traps are disabled or there's no wasmtime-defined trap @@ -3447,13 +3461,15 @@ impl<'module_environment> crate::translate::FuncEnvironment let vmctx = self.vmctx_val(&mut builder.cursor()); let trap_code = builder.ins().iconst(I8, i64::from(trap as u8)); builder.ins().call(libcall, &[vmctx, trap_code]); + let raise = self.builtin_functions.raise(&mut builder.func); + builder.ins().call(raise, &[vmctx]); builder.ins().trap(TRAP_INTERNAL_ASSERT); } } } - fn trapz(&mut self, builder: &mut FunctionBuilder, value: ir::Value, trap: ir::TrapCode) { - if self.signals_based_traps() { + pub fn trapz(&mut self, builder: &mut FunctionBuilder, value: ir::Value, trap: ir::TrapCode) { + if self.clif_instruction_traps_enabled() { builder.ins().trapz(value, trap); } else { let ty = builder.func.dfg.value_type(value); @@ -3463,8 +3479,8 @@ impl<'module_environment> crate::translate::FuncEnvironment } } - fn trapnz(&mut self, builder: &mut FunctionBuilder, value: ir::Value, trap: ir::TrapCode) { - if self.signals_based_traps() { + pub fn trapnz(&mut self, builder: &mut FunctionBuilder, value: ir::Value, trap: ir::TrapCode) { + if self.clif_instruction_traps_enabled() { builder.ins().trapnz(value, trap); } else { let ty = builder.func.dfg.value_type(value); @@ -3474,14 +3490,14 @@ impl<'module_environment> crate::translate::FuncEnvironment } } - fn uadd_overflow_trap( + pub fn uadd_overflow_trap( &mut self, builder: &mut FunctionBuilder, lhs: ir::Value, rhs: ir::Value, trap: ir::TrapCode, ) -> ir::Value { - if self.signals_based_traps() { + if self.clif_instruction_traps_enabled() { builder.ins().uadd_overflow_trap(lhs, rhs, trap) } else { let (ret, overflow) = builder.ins().uadd_overflow(lhs, rhs); @@ -3490,11 +3506,7 @@ impl<'module_environment> crate::translate::FuncEnvironment } } - fn signals_based_traps(&self) -> bool { - self.tunables.signals_based_traps - } - - fn translate_sdiv( + pub fn translate_sdiv( &mut self, builder: &mut FunctionBuilder, lhs: ir::Value, @@ -3504,7 +3516,7 @@ impl<'module_environment> crate::translate::FuncEnvironment builder.ins().sdiv(lhs, rhs) } - fn translate_udiv( + pub fn translate_udiv( &mut self, builder: &mut FunctionBuilder, lhs: ir::Value, @@ -3514,7 +3526,7 @@ impl<'module_environment> crate::translate::FuncEnvironment builder.ins().udiv(lhs, rhs) } - fn translate_srem( + pub fn translate_srem( &mut self, builder: &mut FunctionBuilder, lhs: ir::Value, @@ -3524,7 +3536,7 @@ impl<'module_environment> crate::translate::FuncEnvironment builder.ins().srem(lhs, rhs) } - fn translate_urem( + pub fn translate_urem( &mut self, builder: &mut FunctionBuilder, lhs: ir::Value, @@ -3534,7 +3546,7 @@ impl<'module_environment> crate::translate::FuncEnvironment builder.ins().urem(lhs, rhs) } - fn translate_fcvt_to_sint( + pub fn translate_fcvt_to_sint( &mut self, builder: &mut FunctionBuilder, ty: ir::Type, @@ -3542,7 +3554,7 @@ impl<'module_environment> crate::translate::FuncEnvironment ) -> ir::Value { // NB: for now avoid translating this entire instruction to CLIF and // just do it in a libcall. - if !self.signals_based_traps() { + if !self.clif_instruction_traps_enabled() { self.guard_fcvt_to_int( builder, ty, @@ -3554,13 +3566,13 @@ impl<'module_environment> crate::translate::FuncEnvironment builder.ins().fcvt_to_sint(ty, val) } - fn translate_fcvt_to_uint( + pub fn translate_fcvt_to_uint( &mut self, builder: &mut FunctionBuilder, ty: ir::Type, val: ir::Value, ) -> ir::Value { - if !self.signals_based_traps() { + if !self.clif_instruction_traps_enabled() { self.guard_fcvt_to_int( builder, ty, @@ -3571,6 +3583,27 @@ impl<'module_environment> crate::translate::FuncEnvironment } builder.ins().fcvt_to_uint(ty, val) } + + /// Returns whether it's acceptable to rely on traps in CLIF memory-related + /// instructions (e.g. loads and stores). + /// + /// This is enabled if `signals_based_traps` is `true` since signal handlers + /// are available, but this is additionally forcibly disabled if Pulley is + /// being targetted since the Pulley runtime doesn't catch segfaults for + /// itself. + pub fn clif_memory_traps_enabled(&self) -> bool { + self.tunables.signals_based_traps && !self.isa.triple().is_pulley() + } + + /// Returns whether it's acceptable to have CLIF instructions natively trap, + /// such as division-by-zero. + /// + /// This enabled if `signals_based_traps` is `true` or on Pulley + /// unconditionally since Pulley doesn't use hardware-based traps in its + /// runtime. + pub fn clif_instruction_traps_enabled(&self) -> bool { + self.tunables.signals_based_traps || self.isa.triple().is_pulley() + } } // Helper function to convert an `IndexType` to an `ir::Type`. diff --git a/crates/cranelift/src/gc/enabled.rs b/crates/cranelift/src/gc/enabled.rs index 16477f5b95a6..14dd88efc77f 100644 --- a/crates/cranelift/src/gc/enabled.rs +++ b/crates/cranelift/src/gc/enabled.rs @@ -1,7 +1,7 @@ use super::GcCompiler; use crate::func_environ::FuncEnvironment; use crate::gc::ArrayInit; -use crate::translate::{FuncEnvironment as _, StructFieldsVec, TargetEnvironment}; +use crate::translate::{StructFieldsVec, TargetEnvironment}; use crate::TRAP_INTERNAL_ASSERT; use cranelift_codegen::{ cursor::FuncCursor, @@ -203,6 +203,7 @@ fn write_func_ref_at_addr( .ins() .call(intern_func_ref_for_gc_heap, &[vmctx, func_ref]); let func_ref_id = builder.func.dfg.first_result(call_inst); + let func_ref_id = builder.ins().ireduce(ir::types::I32, func_ref_id); // Store the id in the field. builder.ins().store(flags, func_ref_id, field_addr, 0); @@ -903,8 +904,6 @@ pub fn translate_ref_test( ref_ty: WasmRefType, val: ir::Value, ) -> WasmResult { - use crate::translate::FuncEnvironment as _; - // First special case: testing for references to bottom types. if ref_ty.heap_type.is_bottom() { let result = if ref_ty.nullable { diff --git a/crates/cranelift/src/gc/enabled/drc.rs b/crates/cranelift/src/gc/enabled/drc.rs index e0b565530126..47b066607238 100644 --- a/crates/cranelift/src/gc/enabled/drc.rs +++ b/crates/cranelift/src/gc/enabled/drc.rs @@ -283,8 +283,8 @@ fn emit_gc_raw_alloc( .call(gc_alloc_raw_builtin, &[vmctx, kind, ty, size, align]); let gc_ref = builder.func.dfg.first_result(call_inst); + let gc_ref = builder.ins().ireduce(ir::types::I32, gc_ref); builder.declare_value_needs_stack_map(gc_ref); - gc_ref } diff --git a/crates/cranelift/src/lib.rs b/crates/cranelift/src/lib.rs index c15dfb96a6a3..264d0ef87cb9 100644 --- a/crates/cranelift/src/lib.rs +++ b/crates/cranelift/src/lib.rs @@ -38,6 +38,8 @@ mod gc; mod translate; mod wasmfx; +use self::compiler::Compiler; + const TRAP_INTERNAL_ASSERT: TrapCode = TrapCode::unwrap_user(1); const TRAP_OFFSET: u8 = 2; pub const TRAP_ALWAYS: TrapCode = @@ -347,22 +349,16 @@ fn libcall_cranelift_to_wasmtime(call: ir::LibCall) -> wasmtime_environ::obj::Li struct BuiltinFunctionSignatures { pointer_type: ir::Type, - #[cfg(feature = "gc")] - reference_type: ir::Type, - host_call_conv: CallConv, wasm_call_conv: CallConv, } impl BuiltinFunctionSignatures { - fn new(isa: &dyn TargetIsa, tunables: &Tunables) -> Self { + fn new(compiler: &Compiler) -> Self { Self { - pointer_type: isa.pointer_type(), - host_call_conv: CallConv::triple_default(isa.triple()), - wasm_call_conv: wasm_call_conv(isa, tunables), - - #[cfg(feature = "gc")] - reference_type: ir::types::I32, + pointer_type: compiler.isa().pointer_type(), + host_call_conv: CallConv::triple_default(compiler.isa().triple()), + wasm_call_conv: wasm_call_conv(compiler.isa(), compiler.tunables()), } } @@ -370,11 +366,6 @@ impl BuiltinFunctionSignatures { AbiParam::special(self.pointer_type, ArgumentPurpose::VMContext) } - #[cfg(feature = "gc")] - fn reference(&self) -> AbiParam { - AbiParam::new(self.reference_type) - } - fn pointer(&self) -> AbiParam { AbiParam::new(self.pointer_type) } @@ -400,6 +391,10 @@ impl BuiltinFunctionSignatures { AbiParam::new(ir::types::I8) } + fn bool(&self) -> AbiParam { + AbiParam::new(ir::types::I8) + } + fn wasm_signature(&self, builtin: BuiltinFunctionIndex) -> Signature { let mut _cur = 0; macro_rules! iter { diff --git a/crates/cranelift/src/obj.rs b/crates/cranelift/src/obj.rs index 72bf49b76b6b..e64be78367a3 100644 --- a/crates/cranelift/src/obj.rs +++ b/crates/cranelift/src/obj.rs @@ -22,11 +22,11 @@ use cranelift_control::ControlPlane; use gimli::write::{Address, EhFrame, EndianVec, FrameTable, Writer}; use gimli::RunTimeEndian; use object::write::{Object, SectionId, StandardSegment, Symbol, SymbolId, SymbolSection}; -use object::{Architecture, SectionKind, SymbolFlags, SymbolKind, SymbolScope}; +use object::{Architecture, SectionFlags, SectionKind, SymbolFlags, SymbolKind, SymbolScope}; use std::collections::HashMap; use std::ops::Range; -use wasmtime_environ::obj::LibCall; -use wasmtime_environ::{Compiler, Unsigned}; +use wasmtime_environ::obj::{self, LibCall}; +use wasmtime_environ::{Compiler, TripleExt, Unsigned}; const TEXT_SECTION_NAME: &[u8] = b".text"; @@ -83,6 +83,18 @@ impl<'a> ModuleTextBuilder<'a> { SectionKind::Text, ); + // If this target is Pulley then flag the text section as not needing the + // executable bit in virtual memory which means that the runtime won't + // try to call `Mmap::make_exectuable`, which makes Pulley more + // portable. + if compiler.triple().is_pulley() { + let section = obj.section_mut(text_section); + assert!(matches!(section.flags, SectionFlags::None)); + section.flags = SectionFlags::Elf { + sh_flags: obj::SH_WASMTIME_NOT_EXECUTED, + }; + } + Self { compiler, obj, @@ -206,8 +218,8 @@ impl<'a> ModuleTextBuilder<'a> { .unwrap(); } - // This relocation is used to fill in which hostcall signature - // is desired within the `call_indirect_host` opcode of Pulley + // This relocation is used to fill in which hostcall id is + // desired within the `call_indirect_host` opcode of Pulley // itself. The relocation target is the start of the instruction // and the goal is to insert the static signature number, `n`, // into the instruction. @@ -225,10 +237,17 @@ impl<'a> ModuleTextBuilder<'a> { // // See the `test_call_indirect_host_width` in // `pulley/tests/all.rs` for this guarantee as well. + #[cfg(feature = "pulley")] RelocationTarget::PulleyHostcall(n) => { + use pulley_interpreter::encode::Encode; + + assert_eq!(pulley_interpreter::CallIndirectHost::WIDTH, 4); let byte = u8::try_from(n).unwrap(); self.text.write(reloc_offset + 3, &[byte]); } + + #[cfg(not(feature = "pulley"))] + RelocationTarget::PulleyHostcall(_) => unreachable!(), }; } (symbol_id, off..off + body_len) diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs index d65bab2a3311..7ccc0d3d9c14 100644 --- a/crates/cranelift/src/translate/code_translator.rs +++ b/crates/cranelift/src/translate/code_translator.rs @@ -73,7 +73,8 @@ mod bounds_checks; -use crate::translate::environ::{FuncEnvironment, GlobalVariable, StructFieldsVec}; +use crate::func_environ::FuncEnvironment; +use crate::translate::environ::{GlobalVariable, StructFieldsVec}; use crate::translate::state::{ControlStackFrame, ElseData, FuncTranslationState}; use crate::translate::translation_utils::{ block_with_params, blocktype_params_results, f32_translation, f64_translation, @@ -93,7 +94,7 @@ use std::vec::Vec; use wasmparser::{FuncValidator, MemArg, Operator, WasmModuleResources}; use wasmtime_environ::{ wasm_unsupported, DataIndex, ElemIndex, FuncIndex, GlobalIndex, MemoryIndex, Signed, - TableIndex, TypeIndex, Unsigned, WasmHeapType, WasmRefType, WasmResult, + TableIndex, TypeConvert, TypeIndex, Unsigned, WasmHeapType, WasmRefType, WasmResult, }; /// Given a `Reachability`, unwrap the inner `T` or, when unreachable, set @@ -115,12 +116,12 @@ macro_rules! unwrap_or_return_unreachable_state { } /// Translates wasm operators into Cranelift IR instructions. -pub fn translate_operator( +pub fn translate_operator( validator: &mut FuncValidator, op: &Operator, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { if !state.reachable { translate_unreachable_operator(validator, &op, builder, state, environ)?; @@ -581,7 +582,7 @@ pub fn translate_operator( { let return_args = state.peekn_mut(return_count); environ.handle_before_return(&return_args, builder); - bitcast_wasm_returns(environ, return_args, builder); + bitcast_wasm_returns(return_args, builder); builder.ins().return_(return_args); } state.popn(return_count); @@ -755,7 +756,7 @@ pub fn translate_operator( let heap = state.get_heap(builder.func, *mem, environ)?; let val = state.pop1(); environ.before_memory_grow(builder, val, heap_index); - state.push1(environ.translate_memory_grow(builder.cursor(), heap_index, heap, val)?) + state.push1(environ.translate_memory_grow(builder, heap_index, heap, val)?) } Operator::MemorySize { mem } => { let heap_index = MemoryIndex::from_u32(*mem); @@ -1261,7 +1262,7 @@ pub fn translate_operator( // `fn translate_atomic_wait` can inspect the type of `expected` to figure out what // code it needs to generate, if it wants. let res = environ.translate_atomic_wait( - builder.cursor(), + builder, heap_index, heap, effective_addr, @@ -1283,7 +1284,7 @@ pub fn translate_operator( environ.uadd_overflow_trap(builder, addr, offset, ir::TrapCode::HEAP_OUT_OF_BOUNDS) }; let res = environ.translate_atomic_notify( - builder.cursor(), + builder, heap_index, heap, effective_addr, @@ -1501,14 +1502,7 @@ pub fn translate_operator( let src_pos = state.pop1(); let dst_pos = state.pop1(); environ.translate_memory_copy( - builder.cursor(), - src_index, - src_heap, - dst_index, - dst_heap, - dst_pos, - src_pos, - len, + builder, src_index, src_heap, dst_index, dst_heap, dst_pos, src_pos, len, )?; } Operator::MemoryFill { mem } => { @@ -1517,7 +1511,7 @@ pub fn translate_operator( let len = state.pop1(); let val = state.pop1(); let dest = state.pop1(); - environ.translate_memory_fill(builder.cursor(), heap_index, heap, dest, val, len)?; + environ.translate_memory_fill(builder, heap_index, heap, dest, val, len)?; } Operator::MemoryInit { data_index, mem } => { let heap_index = MemoryIndex::from_u32(*mem); @@ -1526,7 +1520,7 @@ pub fn translate_operator( let src = state.pop1(); let dest = state.pop1(); environ.translate_memory_init( - builder.cursor(), + builder, heap_index, heap, *data_index, @@ -1568,7 +1562,7 @@ pub fn translate_operator( let src = state.pop1(); let dest = state.pop1(); environ.translate_table_copy( - builder.cursor(), + builder, TableIndex::from_u32(*dst_table_index), TableIndex::from_u32(*src_table_index), dest, @@ -1591,7 +1585,7 @@ pub fn translate_operator( let src = state.pop1(); let dest = state.pop1(); environ.translate_table_init( - builder.cursor(), + builder, *elem_index, TableIndex::from_u32(*table_index), dest, @@ -3057,12 +3051,12 @@ pub fn translate_operator( /// Deals with a Wasm instruction located in an unreachable portion of the code. Most of them /// are dropped but special ones like `End` or `Else` signal the potential end of the unreachable /// portion so the translation state must be updated accordingly. -fn translate_unreachable_operator( +fn translate_unreachable_operator( validator: &FuncValidator, op: &Operator, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { debug_assert!(!state.reachable); match *op { @@ -3205,16 +3199,13 @@ fn translate_unreachable_operator( /// Returns `None` when the Wasm access will unconditionally trap. /// /// Returns `(flags, wasm_addr, native_addr)`. -fn prepare_addr( +fn prepare_addr( memarg: &MemArg, access_size: u8, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, -) -> WasmResult> -where - FE: FuncEnvironment + ?Sized, -{ + environ: &mut FuncEnvironment<'_>, +) -> WasmResult> { let index = state.pop1(); let heap = state.get_heap(builder.func, memarg.memory, environ)?; @@ -3373,12 +3364,12 @@ where Ok(Reachability::Reachable((flags, index, addr))) } -fn align_atomic_addr( +fn align_atomic_addr( memarg: &MemArg, loaded_bytes: u8, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) { // Atomic addresses must all be aligned correctly, and for now we check // alignment before we check out-of-bounds-ness. The order of this check may @@ -3410,12 +3401,12 @@ fn align_atomic_addr( /// Like `prepare_addr` but for atomic accesses. /// /// Returns `None` when the Wasm access will unconditionally trap. -fn prepare_atomic_addr( +fn prepare_atomic_addr( memarg: &MemArg, loaded_bytes: u8, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult> { align_atomic_addr(memarg, loaded_bytes, builder, state, environ); prepare_addr(memarg, loaded_bytes, builder, state, environ) @@ -3440,13 +3431,13 @@ pub enum Reachability { /// Translate a load instruction. /// /// Returns the execution state's reachability after the load is translated. -fn translate_load( +fn translate_load( memarg: &MemArg, opcode: ir::Opcode, result_ty: Type, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult> { let mem_op_size = mem_op_size(opcode, result_ty); let (flags, wasm_index, base) = @@ -3465,12 +3456,12 @@ fn translate_load( } /// Translate a store instruction. -fn translate_store( +fn translate_store( memarg: &MemArg, opcode: ir::Opcode, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { let val = state.pop1(); let val_ty = builder.func.dfg.value_type(val); @@ -3505,14 +3496,14 @@ fn translate_icmp(cc: IntCC, builder: &mut FunctionBuilder, state: &mut FuncTran state.push1(builder.ins().uextend(I32, val)); } -fn translate_atomic_rmw( +fn translate_atomic_rmw( widened_ty: Type, access_ty: Type, op: AtomicRmwOp, memarg: &MemArg, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { let mut arg2 = state.pop1(); let arg2_ty = builder.func.dfg.value_type(arg2); @@ -3558,13 +3549,13 @@ fn translate_atomic_rmw( Ok(()) } -fn translate_atomic_cas( +fn translate_atomic_cas( widened_ty: Type, access_ty: Type, memarg: &MemArg, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { let (mut expected, mut replacement) = state.pop2(); let expected_ty = builder.func.dfg.value_type(expected); @@ -3614,13 +3605,13 @@ fn translate_atomic_cas( Ok(()) } -fn translate_atomic_load( +fn translate_atomic_load( widened_ty: Type, access_ty: Type, memarg: &MemArg, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { // The load is performed at type `access_ty`, and the loaded value is zero extended // to `widened_ty`. @@ -3657,12 +3648,12 @@ fn translate_atomic_load( Ok(()) } -fn translate_atomic_store( +fn translate_atomic_store( access_ty: Type, memarg: &MemArg, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { let mut data = state.pop1(); let data_ty = builder.func.dfg.value_type(data); @@ -4159,13 +4150,9 @@ fn bitcast_arguments<'a>( /// place to point to the result of a `bitcast`. This conversion is necessary to translate Wasm /// code that uses `V128` as function parameters (or implicitly in block parameters) and still use /// specific CLIF types (e.g. `I32X4`) in the function body. -pub fn bitcast_wasm_returns( - environ: &mut FE, - arguments: &mut [Value], - builder: &mut FunctionBuilder, -) { +pub fn bitcast_wasm_returns(arguments: &mut [Value], builder: &mut FunctionBuilder) { let changes = bitcast_arguments(builder, arguments, &builder.func.signature.returns, |i| { - environ.is_wasm_return(&builder.func.signature, i) + builder.func.signature.returns[i].purpose == ir::ArgumentPurpose::Normal }); for (t, arg) in changes { let mut flags = MemFlags::new(); @@ -4175,8 +4162,8 @@ pub fn bitcast_wasm_returns( } /// Like `bitcast_wasm_returns`, but for the parameters being passed to a specified callee. -fn bitcast_wasm_params( - environ: &mut FE, +fn bitcast_wasm_params( + environ: &mut FuncEnvironment<'_>, callee_signature: ir::SigRef, arguments: &mut [Value], builder: &mut FunctionBuilder, diff --git a/crates/cranelift/src/translate/code_translator/bounds_checks.rs b/crates/cranelift/src/translate/code_translator/bounds_checks.rs index ec2869606f54..b2379e335c1f 100644 --- a/crates/cranelift/src/translate/code_translator/bounds_checks.rs +++ b/crates/cranelift/src/translate/code_translator/bounds_checks.rs @@ -20,7 +20,8 @@ //! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use super::Reachability; -use crate::translate::{FuncEnvironment, HeapData}; +use crate::func_environ::FuncEnvironment; +use crate::translate::{HeapData, TargetEnvironment}; use cranelift_codegen::{ cursor::{Cursor, FuncCursor}, ir::{self, condcodes::IntCC, InstBuilder, RelSourceLoc}, @@ -35,9 +36,9 @@ use Reachability::*; /// /// Returns the `ir::Value` holding the native address of the heap access, or /// `None` if the heap access will unconditionally trap. -pub fn bounds_check_and_compute_addr( +pub fn bounds_check_and_compute_addr( builder: &mut FunctionBuilder, - env: &mut Env, + env: &mut FuncEnvironment<'_>, heap: &HeapData, // Dynamic operand indexing into the heap. index: ir::Value, @@ -45,10 +46,7 @@ pub fn bounds_check_and_compute_addr( offset: u32, // Static size of the heap access. access_size: u8, -) -> WasmResult> -where - Env: FuncEnvironment + ?Sized, -{ +) -> WasmResult> { let pointer_bit_width = u16::try_from(env.pointer_type().bits()).unwrap(); let bound_gv = heap.bound; let orig_index = index; @@ -60,16 +58,20 @@ where &mut builder.cursor(), ); let offset_and_size = offset_plus_size(offset, access_size); - let spectre_mitigations_enabled = env.heap_access_spectre_mitigation(); + let clif_memory_traps_enabled = env.clif_memory_traps_enabled(); + let spectre_mitigations_enabled = + env.heap_access_spectre_mitigation() && clif_memory_traps_enabled; let pcc = env.proof_carrying_code(); let host_page_size_log2 = env.target_config().page_size_align_log2; let can_use_virtual_memory = heap .memory - .can_use_virtual_memory(env.tunables(), host_page_size_log2); + .can_use_virtual_memory(env.tunables(), host_page_size_log2) + && clif_memory_traps_enabled; let can_elide_bounds_check = heap .memory - .can_elide_bounds_check(env.tunables(), host_page_size_log2); + .can_elide_bounds_check(env.tunables(), host_page_size_log2) + && clif_memory_traps_enabled; let memory_guard_size = env.tunables().memory_guard_size; let memory_reservation = env.tunables().memory_reservation; @@ -429,14 +431,11 @@ where } /// Get the bound of a dynamic heap as an `ir::Value`. -fn get_dynamic_heap_bound( +fn get_dynamic_heap_bound( builder: &mut FunctionBuilder, - env: &mut Env, + env: &mut FuncEnvironment<'_>, heap: &HeapData, -) -> ir::Value -where - Env: FuncEnvironment + ?Sized, -{ +) -> ir::Value { let enable_pcc = heap.pcc_memory_type.is_some(); let (value, gv) = match heap.memory.static_heap_size() { @@ -535,8 +534,8 @@ impl AddrPcc { /// /// This function deduplicates explicit bounds checks and Spectre mitigations /// that inherently also implement bounds checking. -fn explicit_check_oob_condition_and_compute_addr( - env: &mut FE, +fn explicit_check_oob_condition_and_compute_addr( + env: &mut FuncEnvironment<'_>, builder: &mut FunctionBuilder, heap: &HeapData, index: ir::Value, @@ -560,8 +559,9 @@ fn explicit_check_oob_condition_and_compute_addr( if spectre_mitigations_enabled { // These mitigations rely on trapping when loading from NULL so - // signals-based traps must be allowed for this to be generated. - assert!(env.signals_based_traps()); + // CLIF memory instruction traps must be allowed for this to be + // generated. + assert!(env.clif_memory_traps_enabled()); let null = builder.ins().iconst(addr_ty, 0); addr = builder .ins() diff --git a/crates/cranelift/src/translate/environ/mod.rs b/crates/cranelift/src/translate/environ/mod.rs index e6378ebd9371..d4bc1db7e748 100644 --- a/crates/cranelift/src/translate/environ/mod.rs +++ b/crates/cranelift/src/translate/environ/mod.rs @@ -3,6 +3,4 @@ #[macro_use] mod spec; -pub use crate::translate::environ::spec::{ - FuncEnvironment, GlobalVariable, StructFieldsVec, TargetEnvironment, -}; +pub use crate::translate::environ::spec::{GlobalVariable, StructFieldsVec, TargetEnvironment}; diff --git a/crates/cranelift/src/translate/environ/spec.rs b/crates/cranelift/src/translate/environ/spec.rs index 590be6cc150c..54e47f634b5f 100644 --- a/crates/cranelift/src/translate/environ/spec.rs +++ b/crates/cranelift/src/translate/environ/spec.rs @@ -6,20 +6,11 @@ //! //! [Wasmtime]: https://github.com/bytecodealliance/wasmtime -use crate::translate::state::FuncTranslationState; -use crate::translate::{Heap, HeapData}; -use cranelift_codegen::cursor::FuncCursor; +use cranelift_codegen::ir; use cranelift_codegen::ir::immediates::Offset32; -use cranelift_codegen::ir::{self, InstBuilder, Type}; -use cranelift_codegen::isa::{TargetFrontendConfig, TargetIsa}; -use cranelift_entity::PrimaryMap; -use cranelift_frontend::FunctionBuilder; +use cranelift_codegen::isa::TargetFrontendConfig; use smallvec::SmallVec; -use wasmparser::{Operator, WasmFeatures}; -use wasmtime_environ::{ - DataIndex, ElemIndex, FuncIndex, GlobalIndex, MemoryIndex, TableIndex, Tunables, TypeConvert, - TypeIndex, WasmHeapType, WasmRefType, WasmResult, WasmValType, -}; +use wasmtime_environ::{Tunables, TypeConvert, WasmHeapType}; /// The value of a WebAssembly global variable. #[derive(Clone, Copy)] @@ -49,13 +40,6 @@ pub trait TargetEnvironment: TypeConvert { /// Whether to add proof-carrying-code facts to verify memory accesses. fn proof_carrying_code(&self) -> bool; - /// Get the Cranelift integer type to use for native pointers. - /// - /// This returns `I64` for 64-bit architectures and `I32` for 32-bit architectures. - fn pointer_type(&self) -> ir::Type { - ir::Type::int(u16::from(self.target_config().pointer_bits())).unwrap() - } - /// Get the Cranelift reference type to use for the given Wasm reference /// type. /// @@ -69,975 +53,3 @@ pub trait TargetEnvironment: TypeConvert { /// A smallvec that holds the IR values for a struct's fields. pub type StructFieldsVec = SmallVec<[ir::Value; 4]>; - -/// Environment affecting the translation of a single WebAssembly function. -/// -/// A `FuncEnvironment` trait object is required to translate a WebAssembly function to Cranelift -/// IR. The function environment provides information about the WebAssembly module as well as the -/// runtime environment. -pub trait FuncEnvironment: TargetEnvironment { - /// Is the given parameter of the given function a wasm-level parameter, as opposed to a hidden - /// parameter added for use by the implementation? - fn is_wasm_parameter(&self, signature: &ir::Signature, index: usize) -> bool { - signature.params[index].purpose == ir::ArgumentPurpose::Normal - } - - /// Does the given parameter require inclusion in stack maps? - fn param_needs_stack_map(&self, signature: &ir::Signature, index: usize) -> bool; - - /// Does the given result require inclusion in stack maps? - fn sig_ref_result_needs_stack_map(&self, sig_ref: ir::SigRef, index: usize) -> bool; - - /// Does the given result require inclusion in stack maps? - fn func_ref_result_needs_stack_map( - &self, - func: &ir::Function, - func_ref: ir::FuncRef, - index: usize, - ) -> bool; - - /// Is the given return of the given function a wasm-level parameter, as - /// opposed to a hidden parameter added for use by the implementation? - fn is_wasm_return(&self, signature: &ir::Signature, index: usize) -> bool { - signature.returns[index].purpose == ir::ArgumentPurpose::Normal - } - - /// Called after the locals for a function have been parsed, and the number - /// of variables defined by this function is provided. - fn after_locals(&mut self, num_locals_defined: usize) { - let _ = num_locals_defined; - } - - /// Set up the necessary preamble definitions in `func` to access the global variable - /// identified by `index`. - /// - /// The index space covers both imported globals and globals defined by the module. - /// - /// Return the global variable reference that should be used to access the global and the - /// WebAssembly type of the global. - fn make_global( - &mut self, - func: &mut ir::Function, - index: GlobalIndex, - ) -> WasmResult; - - /// Get the heaps for this function environment. - /// - /// The returned map should provide heap format details (encoded in - /// `HeapData`) for each `Heap` that was previously returned by - /// `make_heap()`. The translator will first call make_heap for each Wasm - /// memory, and then later when translating code, will invoke `heaps()` to - /// learn how to access the environment's implementation of each memory. - fn heaps(&self) -> &PrimaryMap; - - /// Set up the necessary preamble definitions in `func` to access the linear memory identified - /// by `index`. - /// - /// The index space covers both imported and locally declared memories. - fn make_heap(&mut self, func: &mut ir::Function, index: MemoryIndex) -> WasmResult; - - /// Set up a signature definition in the preamble of `func` that can be used for an indirect - /// call with signature `index`. - /// - /// The signature may contain additional arguments needed for an indirect call, but the - /// arguments marked as `ArgumentPurpose::Normal` must correspond to the WebAssembly signature - /// arguments. - /// - /// The signature will only be used for indirect calls, even if the module has direct function - /// calls with the same WebAssembly type. - fn make_indirect_sig( - &mut self, - func: &mut ir::Function, - index: TypeIndex, - ) -> WasmResult; - - /// Set up an external function definition in the preamble of `func` that can be used to - /// directly call the function `index`. - /// - /// The index space covers both imported functions and functions defined in the current module. - /// - /// The function's signature may contain additional arguments needed for a direct call, but the - /// arguments marked as `ArgumentPurpose::Normal` must correspond to the WebAssembly signature - /// arguments. - /// - /// The function's signature will only be used for direct calls, even if the module has - /// indirect calls with the same WebAssembly type. - fn make_direct_func( - &mut self, - func: &mut ir::Function, - index: FuncIndex, - ) -> WasmResult; - - /// Translate a `call` WebAssembly instruction at `pos`. - /// - /// Insert instructions at `pos` for a direct call to the function `callee_index`. - /// - /// The function reference `callee` was previously created by `make_direct_func()`. - /// - /// Return the call instruction whose results are the WebAssembly return values. - fn translate_call( - &mut self, - builder: &mut FunctionBuilder, - _callee_index: FuncIndex, - callee: ir::FuncRef, - call_args: &[ir::Value], - ) -> WasmResult { - Ok(builder.ins().call(callee, call_args)) - } - - /// Translate a `call_indirect` WebAssembly instruction at `pos`. - /// - /// Insert instructions at `pos` for an indirect call to the function `callee` in the table - /// `table_index` with WebAssembly signature `sig_index`. The `callee` value will have type - /// `i32`. - /// - /// The signature `sig_ref` was previously created by `make_indirect_sig()`. - /// - /// Return the call instruction whose results are the WebAssembly return values. - /// Returns `None` if this statically traps instead of creating a call - /// instruction. - fn translate_call_indirect( - &mut self, - builder: &mut FunctionBuilder, - features: &WasmFeatures, - table_index: TableIndex, - sig_index: TypeIndex, - sig_ref: ir::SigRef, - callee: ir::Value, - call_args: &[ir::Value], - ) -> WasmResult>; - - /// Translate a `return_call` WebAssembly instruction at the builder's - /// current position. - /// - /// Insert instructions at the builder's current position for a direct tail - /// call to the function `callee_index`. - /// - /// The function reference `callee` was previously created by `make_direct_func()`. - /// - /// Return the call instruction whose results are the WebAssembly return values. - fn translate_return_call( - &mut self, - builder: &mut FunctionBuilder, - _callee_index: FuncIndex, - callee: ir::FuncRef, - call_args: &[ir::Value], - ) -> WasmResult<()> { - builder.ins().return_call(callee, call_args); - Ok(()) - } - - /// Translate a `return_call_indirect` WebAssembly instruction at the - /// builder's current position. - /// - /// Insert instructions at the builder's current position for an indirect - /// tail call to the function `callee` in the table `table_index` with - /// WebAssembly signature `sig_index`. The `callee` value will have type - /// `i32`. - /// - /// The signature `sig_ref` was previously created by `make_indirect_sig()`. - fn translate_return_call_indirect( - &mut self, - builder: &mut FunctionBuilder, - features: &WasmFeatures, - table_index: TableIndex, - sig_index: TypeIndex, - sig_ref: ir::SigRef, - callee: ir::Value, - call_args: &[ir::Value], - ) -> WasmResult<()>; - - /// Translate a `return_call_ref` WebAssembly instruction at the builder's - /// given position. - /// - /// Insert instructions at the builder's current position for an indirect - /// tail call to the function `callee`. The `callee` value will be a Wasm - /// funcref that may need to be translated to a native function address - /// depending on your implementation of this trait. - /// - /// The signature `sig_ref` was previously created by `make_indirect_sig()`. - fn translate_return_call_ref( - &mut self, - builder: &mut FunctionBuilder, - sig_ref: ir::SigRef, - callee: ir::Value, - call_args: &[ir::Value], - ) -> WasmResult<()>; - - /// Translate a `call_ref` WebAssembly instruction at the builder's current - /// position. - /// - /// Insert instructions at the builder's current position for an indirect - /// call to the function `callee`. The `callee` value will be a Wasm funcref - /// that may need to be translated to a native function address depending on - /// your implementation of this trait. - /// - /// The signature `sig_ref` was previously created by `make_indirect_sig()`. - /// - /// Return the call instruction whose results are the WebAssembly return values. - fn translate_call_ref( - &mut self, - builder: &mut FunctionBuilder, - sig_ref: ir::SigRef, - callee: ir::Value, - call_args: &[ir::Value], - ) -> WasmResult; - - /// Translate a `memory.grow` WebAssembly instruction. - /// - /// The `index` provided identifies the linear memory to grow, and `heap` is the heap reference - /// returned by `make_heap` for the same index. - /// - /// The `val` value is the requested memory size in pages. - /// - /// Returns the old size (in pages) of the memory. - fn translate_memory_grow( - &mut self, - pos: FuncCursor, - index: MemoryIndex, - heap: Heap, - val: ir::Value, - ) -> WasmResult; - - /// Translates a `memory.size` WebAssembly instruction. - /// - /// The `index` provided identifies the linear memory to query, and `heap` is the heap reference - /// returned by `make_heap` for the same index. - /// - /// Returns the size in pages of the memory. - fn translate_memory_size( - &mut self, - pos: FuncCursor, - index: MemoryIndex, - heap: Heap, - ) -> WasmResult; - - /// Translate a `memory.copy` WebAssembly instruction. - /// - /// The `index` provided identifies the linear memory to query, and `heap` is the heap reference - /// returned by `make_heap` for the same index. - fn translate_memory_copy( - &mut self, - pos: FuncCursor, - src_index: MemoryIndex, - src_heap: Heap, - dst_index: MemoryIndex, - dst_heap: Heap, - dst: ir::Value, - src: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `memory.fill` WebAssembly instruction. - /// - /// The `index` provided identifies the linear memory to query, and `heap` is the heap reference - /// returned by `make_heap` for the same index. - fn translate_memory_fill( - &mut self, - pos: FuncCursor, - index: MemoryIndex, - heap: Heap, - dst: ir::Value, - val: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `memory.init` WebAssembly instruction. - /// - /// The `index` provided identifies the linear memory to query, and `heap` is the heap reference - /// returned by `make_heap` for the same index. `seg_index` is the index of the segment to copy - /// from. - fn translate_memory_init( - &mut self, - pos: FuncCursor, - index: MemoryIndex, - heap: Heap, - seg_index: u32, - dst: ir::Value, - src: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `data.drop` WebAssembly instruction. - fn translate_data_drop(&mut self, pos: FuncCursor, seg_index: u32) -> WasmResult<()>; - - /// Translate a `table.size` WebAssembly instruction. - fn translate_table_size(&mut self, pos: FuncCursor, index: TableIndex) - -> WasmResult; - - /// Translate a `table.grow` WebAssembly instruction. - fn translate_table_grow( - &mut self, - builder: &mut FunctionBuilder, - table_index: TableIndex, - delta: ir::Value, - init_value: ir::Value, - ) -> WasmResult; - - /// Translate a `table.get` WebAssembly instruction. - fn translate_table_get( - &mut self, - builder: &mut FunctionBuilder, - table_index: TableIndex, - index: ir::Value, - ) -> WasmResult; - - /// Translate a `table.set` WebAssembly instruction. - fn translate_table_set( - &mut self, - builder: &mut FunctionBuilder, - table_index: TableIndex, - value: ir::Value, - index: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `table.copy` WebAssembly instruction. - fn translate_table_copy( - &mut self, - pos: FuncCursor, - dst_table_index: TableIndex, - src_table_index: TableIndex, - dst: ir::Value, - src: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `table.fill` WebAssembly instruction. - fn translate_table_fill( - &mut self, - builder: &mut FunctionBuilder, - table_index: TableIndex, - dst: ir::Value, - val: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `table.init` WebAssembly instruction. - fn translate_table_init( - &mut self, - pos: FuncCursor, - seg_index: u32, - table_index: TableIndex, - dst: ir::Value, - src: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `elem.drop` WebAssembly instruction. - fn translate_elem_drop(&mut self, pos: FuncCursor, seg_index: u32) -> WasmResult<()>; - - /// Translate a `ref.null T` WebAssembly instruction. - fn translate_ref_null( - &mut self, - builder: &mut FunctionBuilder, - ty: WasmHeapType, - ) -> WasmResult; - - /// Translate a `ref.is_null` WebAssembly instruction. - fn translate_ref_is_null( - &mut self, - builder: &mut FunctionBuilder, - value: ir::Value, - ) -> WasmResult; - - /// Translate a `ref.func` WebAssembly instruction. - fn translate_ref_func( - &mut self, - pos: FuncCursor, - func_index: FuncIndex, - ) -> WasmResult; - - /// Translate a `global.get` WebAssembly instruction at `pos` for a global - /// that is custom. - fn translate_custom_global_get( - &mut self, - builder: &mut FunctionBuilder, - global_index: GlobalIndex, - ) -> WasmResult; - - /// Translate a `global.set` WebAssembly instruction at `pos` for a global - /// that is custom. - fn translate_custom_global_set( - &mut self, - builder: &mut FunctionBuilder, - global_index: GlobalIndex, - val: ir::Value, - ) -> WasmResult<()>; - - /// Translate an `i32.atomic.wait` or `i64.atomic.wait` WebAssembly instruction. - /// The `index` provided identifies the linear memory containing the value - /// to wait on, and `heap` is the heap reference returned by `make_heap` - /// for the same index. Whether the waited-on value is 32- or 64-bit can be - /// determined by examining the type of `expected`, which must be only I32 or I64. - /// - /// Note that the `addr` here is the host linear memory address rather - /// than a relative wasm linear memory address. The type of this value is - /// the same as the host's pointer. - /// - /// Returns an i32, which is negative if the helper call failed. - fn translate_atomic_wait( - &mut self, - pos: FuncCursor, - index: MemoryIndex, - heap: Heap, - addr: ir::Value, - expected: ir::Value, - timeout: ir::Value, - ) -> WasmResult; - - /// Translate an `atomic.notify` WebAssembly instruction. - /// The `index` provided identifies the linear memory containing the value - /// to wait on, and `heap` is the heap reference returned by `make_heap` - /// for the same index. - /// - /// Note that the `addr` here is the host linear memory address rather - /// than a relative wasm linear memory address. The type of this value is - /// the same as the host's pointer. - /// - /// Returns an i64, which is negative if the helper call failed. - fn translate_atomic_notify( - &mut self, - pos: FuncCursor, - index: MemoryIndex, - heap: Heap, - addr: ir::Value, - count: ir::Value, - ) -> WasmResult; - - /// Translate an `i32` value into an `i31ref`. - fn translate_ref_i31(&mut self, pos: FuncCursor, val: ir::Value) -> WasmResult; - - /// Sign-extend an `i31ref` into an `i32`. - fn translate_i31_get_s( - &mut self, - pos: &mut FunctionBuilder, - i31ref: ir::Value, - ) -> WasmResult; - - /// Zero-extend an `i31ref` into an `i32`. - fn translate_i31_get_u( - &mut self, - pos: &mut FunctionBuilder, - i31ref: ir::Value, - ) -> WasmResult; - - /// Get the number of fields in a struct type. - fn struct_fields_len(&mut self, struct_type_index: TypeIndex) -> WasmResult; - - /// Translate a `struct.new` instruction. - fn translate_struct_new( - &mut self, - builder: &mut FunctionBuilder, - struct_type_index: TypeIndex, - fields: StructFieldsVec, - ) -> WasmResult; - - /// Translate a `struct.new_default` instruction. - fn translate_struct_new_default( - &mut self, - builder: &mut FunctionBuilder, - struct_type_index: TypeIndex, - ) -> WasmResult; - - /// Translate a `struct.set` instruction. - fn translate_struct_set( - &mut self, - builder: &mut FunctionBuilder, - struct_type_index: TypeIndex, - field_index: u32, - struct_ref: ir::Value, - value: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `struct.get` instruction. - fn translate_struct_get( - &mut self, - builder: &mut FunctionBuilder, - struct_type_index: TypeIndex, - field_index: u32, - struct_ref: ir::Value, - ) -> WasmResult; - - /// Translate a `struct.get_s` instruction. - fn translate_struct_get_s( - &mut self, - builder: &mut FunctionBuilder, - struct_type_index: TypeIndex, - field_index: u32, - struct_ref: ir::Value, - ) -> WasmResult; - - /// Translate a `struct.get_u` instruction. - fn translate_struct_get_u( - &mut self, - builder: &mut FunctionBuilder, - struct_type_index: TypeIndex, - field_index: u32, - struct_ref: ir::Value, - ) -> WasmResult; - - /// Translate an `array.new` instruction. - fn translate_array_new( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - elem: ir::Value, - len: ir::Value, - ) -> WasmResult; - - /// Translate an `array.new_default` instruction. - fn translate_array_new_default( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - len: ir::Value, - ) -> WasmResult; - - /// Translate an `array.new_fixed` instruction. - fn translate_array_new_fixed( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - elems: &[ir::Value], - ) -> WasmResult; - - /// Translate an `array.new_data` instruction. - fn translate_array_new_data( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - data_index: DataIndex, - data_offset: ir::Value, - len: ir::Value, - ) -> WasmResult; - - /// Translate an `array.new_elem` instruction. - fn translate_array_new_elem( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - elem_index: ElemIndex, - elem_offset: ir::Value, - len: ir::Value, - ) -> WasmResult; - - /// Translate an `array.copy` instruction. - fn translate_array_copy( - &mut self, - builder: &mut FunctionBuilder, - dst_array_type_index: TypeIndex, - dst_array: ir::Value, - dst_index: ir::Value, - src_array_type_index: TypeIndex, - src_array: ir::Value, - src_index: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate an `array.fill` instruction. - fn translate_array_fill( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - index: ir::Value, - value: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate an `array.init_data` instruction. - fn translate_array_init_data( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - dst_index: ir::Value, - data_index: DataIndex, - data_offset: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate an `array.init_elem` instruction. - fn translate_array_init_elem( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - dst_index: ir::Value, - elem_index: ElemIndex, - elem_offset: ir::Value, - len: ir::Value, - ) -> WasmResult<()>; - - /// Translate an `array.len` instruction. - fn translate_array_len( - &mut self, - builder: &mut FunctionBuilder, - array: ir::Value, - ) -> WasmResult; - - /// Translate an `array.get` instruction. - fn translate_array_get( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - index: ir::Value, - ) -> WasmResult; - - /// Translate an `array.get_s` instruction. - fn translate_array_get_s( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - index: ir::Value, - ) -> WasmResult; - - /// Translate an `array.get_u` instruction. - fn translate_array_get_u( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - index: ir::Value, - ) -> WasmResult; - - /// Translate an `array.set` instruction. - fn translate_array_set( - &mut self, - builder: &mut FunctionBuilder, - array_type_index: TypeIndex, - array: ir::Value, - index: ir::Value, - value: ir::Value, - ) -> WasmResult<()>; - - /// Translate a `ref.test` instruction. - fn translate_ref_test( - &mut self, - builder: &mut FunctionBuilder<'_>, - ref_ty: WasmRefType, - gc_ref: ir::Value, - ) -> WasmResult; - - /// Emit code at the beginning of every wasm loop. - /// - /// This can be used to insert explicit interrupt or safepoint checking at - /// the beginnings of loops. - fn translate_loop_header(&mut self, _builder: &mut FunctionBuilder) -> WasmResult<()> { - // By default, don't emit anything. - Ok(()) - } - - /// Optional callback for the `FunctionEnvironment` performing this translation to maintain - /// internal state or prepare custom state for the operator to translate - fn before_translate_operator( - &mut self, - _op: &Operator, - _builder: &mut FunctionBuilder, - _state: &FuncTranslationState, - ) -> WasmResult<()> { - Ok(()) - } - - /// Optional callback for the `FunctionEnvironment` performing this translation to maintain - /// internal state or finalize custom state for the operator that was translated - fn after_translate_operator( - &mut self, - _op: &Operator, - _builder: &mut FunctionBuilder, - _state: &FuncTranslationState, - ) -> WasmResult<()> { - Ok(()) - } - - /// Optional callback for the `FuncEnvironment` performing this translation - /// to maintain, prepare, or finalize custom, internal state when we - /// statically determine that a Wasm memory access will unconditionally - /// trap, rendering the rest of the block unreachable. Called just before - /// the unconditional trap is emitted. - fn before_unconditionally_trapping_memory_access( - &mut self, - _builder: &mut FunctionBuilder, - ) -> WasmResult<()> { - Ok(()) - } - - /// Optional callback for the `FunctionEnvironment` performing this translation to perform work - /// before the function body is translated. - fn before_translate_function( - &mut self, - _builder: &mut FunctionBuilder, - _state: &FuncTranslationState, - ) -> WasmResult<()> { - Ok(()) - } - - /// Optional callback for the `FunctionEnvironment` performing this translation to perform work - /// after the function body is translated. - fn after_translate_function( - &mut self, - _builder: &mut FunctionBuilder, - _state: &FuncTranslationState, - ) -> WasmResult<()> { - Ok(()) - } - - /// Whether or not to force relaxed simd instructions to have deterministic - /// lowerings meaning they will produce the same results across all hosts, - /// regardless of the cost to performance. - fn relaxed_simd_deterministic(&self) -> bool { - true - } - - /// Whether or not the target being translated for has a native fma - /// instruction. If it does not then when relaxed simd isn't deterministic - /// the translation of the `f32x4.relaxed_fma` instruction, for example, - /// will do a multiplication and then an add instead of the fused version. - fn has_native_fma(&self) -> bool { - false - } - - /// Returns whether this is an x86 target, which may alter lowerings of - /// relaxed simd instructions. - fn is_x86(&self) -> bool { - false - } - - /// TODO(dhil): write documentation. - fn translate_cont_new( - &mut self, - builder: &mut FunctionBuilder, - state: &FuncTranslationState, - func: ir::Value, - arg_types: &[WasmValType], - return_types: &[WasmValType], - ) -> WasmResult; - - /// Translates cont.bind instructions. - /// `remaining_arg_count` is the *overall* number of remaining arguments of - /// the continuation before supplying `args` (i.e., it is the number of - /// parameters of the continuation's type before cont.bind was executed). - fn translate_cont_bind( - &mut self, - builder: &mut FunctionBuilder, - contobj: ir::Value, - args: &[ir::Value], - remaining_arg_count: usize, - ) -> ir::Value; - - /// TODO(dhil): write documentation. - fn translate_suspend( - &mut self, - builder: &mut FunctionBuilder, - tag_index: u32, - suspend_args: &[ir::Value], - tag_return_types: &[WasmValType], - ) -> Vec; - - /// Translates resume instructions. - /// Returns the values returned by the instruction (i.e., the values - /// returned by the resumed continuation once it returns normally) - fn translate_resume( - &mut self, - builder: &mut FunctionBuilder, - type_index: u32, - contobj: ir::Value, - resume_args: &[ir::Value], - resumetable: &[(u32, Option)], - ) -> WasmResult>; - - /// Translates switch instructions. - fn translate_switch( - &mut self, - builder: &mut FunctionBuilder, - tag_index: u32, - contobj: ir::Value, - switch_args: &[ir::Value], - return_types: &[WasmValType], - ) -> WasmResult>; - - /// TODO(dhil): write documentation. - #[allow(unused, reason = "TODO")] - fn translate_resume_throw( - &mut self, - pos: FuncCursor, - state: &FuncTranslationState, - tag_index: u32, - cont: ir::Value, - ) -> WasmResult; - - /// TODO - fn continuation_arguments(&self, type_index: u32) -> &[WasmValType]; - - /// TODO - fn continuation_returns(&self, type_index: u32) -> &[WasmValType]; - - /// TODO - fn tag_params(&self, tag_index: u32) -> &[WasmValType]; - - /// TODO - fn tag_returns(&self, tag_index: u32) -> &[WasmValType]; - - /// Returns whether the CLIF `x86_blendv` instruction should be used for the - /// relaxed simd `*.relaxed_laneselect` instruction for the specified type. - fn use_x86_blendv_for_relaxed_laneselect(&self, ty: Type) -> bool { - let _ = ty; - false - } - - /// Returns whether the CLIF `x86_pshufb` instruction should be used for the - /// `i8x16.relaxed_swizzle` instruction. - fn use_x86_pshufb_for_relaxed_swizzle(&self) -> bool { - false - } - - /// Returns whether the CLIF `x86_pmulhrsw` instruction should be used for - /// the `i8x16.relaxed_q15mulr_s` instruction. - fn use_x86_pmulhrsw_for_relaxed_q15mul(&self) -> bool { - false - } - - /// Returns whether the CLIF `x86_pmaddubsw` instruction should be used for - /// the relaxed-simd dot-product instructions instruction. - fn use_x86_pmaddubsw_for_dot(&self) -> bool { - false - } - - /// Inserts code before a function return. - fn handle_before_return(&mut self, _retvals: &[ir::Value], _builder: &mut FunctionBuilder) {} - - /// Inserts code before a load. - fn before_load( - &mut self, - _builder: &mut FunctionBuilder, - _val_size: u8, - _addr: ir::Value, - _offset: u64, - ) { - } - - /// Inserts code before a store. - fn before_store( - &mut self, - _builder: &mut FunctionBuilder, - _val_size: u8, - _addr: ir::Value, - _offset: u64, - ) { - } - - /// Inserts code before updating a global. - fn update_global( - &mut self, - _builder: &mut FunctionBuilder, - _global_index: u32, - _value: ir::Value, - ) { - } - - /// Inserts code before memory.grow. - fn before_memory_grow( - &mut self, - _builder: &mut FunctionBuilder, - _num_bytes: ir::Value, - _mem_index: MemoryIndex, - ) { - } - - /// Optional hook for customizing how `trap` is lowered. - fn trap(&mut self, builder: &mut FunctionBuilder, code: ir::TrapCode) { - builder.ins().trap(code); - } - - /// Optional hook for customizing how `trapz` is lowered. - fn trapz(&mut self, builder: &mut FunctionBuilder, value: ir::Value, code: ir::TrapCode) { - builder.ins().trapz(value, code); - } - - /// Optional hook for customizing how `trapnz` is lowered. - fn trapnz(&mut self, builder: &mut FunctionBuilder, value: ir::Value, code: ir::TrapCode) { - builder.ins().trapnz(value, code); - } - - /// Optional hook for customizing how `uadd_overflow_trap` is lowered. - fn uadd_overflow_trap( - &mut self, - builder: &mut FunctionBuilder, - lhs: ir::Value, - rhs: ir::Value, - code: ir::TrapCode, - ) -> ir::Value { - builder.ins().uadd_overflow_trap(lhs, rhs, code) - } - - /// Accesses the ISA that is being compiled for. - fn isa(&self) -> &dyn TargetIsa; - - /// Embedder-defined hook for indicating whether signals can be used to - /// indicate traps. - fn signals_based_traps(&self) -> bool { - true - } - - /// Optional hook for customizing `sdiv` instruction lowering. - fn translate_sdiv( - &mut self, - builder: &mut FunctionBuilder, - lhs: ir::Value, - rhs: ir::Value, - ) -> ir::Value { - builder.ins().sdiv(lhs, rhs) - } - - /// Optional hook for customizing `udiv` instruction lowering. - fn translate_udiv( - &mut self, - builder: &mut FunctionBuilder, - lhs: ir::Value, - rhs: ir::Value, - ) -> ir::Value { - builder.ins().udiv(lhs, rhs) - } - - /// Optional hook for customizing `srem` instruction lowering. - fn translate_srem( - &mut self, - builder: &mut FunctionBuilder, - lhs: ir::Value, - rhs: ir::Value, - ) -> ir::Value { - builder.ins().srem(lhs, rhs) - } - - /// Optional hook for customizing `urem` instruction lowering. - fn translate_urem( - &mut self, - builder: &mut FunctionBuilder, - lhs: ir::Value, - rhs: ir::Value, - ) -> ir::Value { - builder.ins().urem(lhs, rhs) - } - - /// Optional hook for customizing `fcvt_to_sint` instruction lowering. - fn translate_fcvt_to_sint( - &mut self, - builder: &mut FunctionBuilder, - ty: ir::Type, - val: ir::Value, - ) -> ir::Value { - builder.ins().fcvt_to_sint(ty, val) - } - - /// Optional hook for customizing `fcvt_to_uint` instruction lowering. - fn translate_fcvt_to_uint( - &mut self, - builder: &mut FunctionBuilder, - ty: ir::Type, - val: ir::Value, - ) -> ir::Value { - builder.ins().fcvt_to_uint(ty, val) - } -} diff --git a/crates/cranelift/src/translate/func_translator.rs b/crates/cranelift/src/translate/func_translator.rs index 2d3a0a343e46..2f5757c8e398 100644 --- a/crates/cranelift/src/translate/func_translator.rs +++ b/crates/cranelift/src/translate/func_translator.rs @@ -4,16 +4,17 @@ //! function to Cranelift IR guided by a `FuncEnvironment` which provides information about the //! WebAssembly module and the runtime environment. +use crate::func_environ::FuncEnvironment; use crate::translate::code_translator::{bitcast_wasm_returns, translate_operator}; -use crate::translate::environ::FuncEnvironment; use crate::translate::state::FuncTranslationState; use crate::translate::translation_utils::get_vmctx_value_label; +use crate::translate::TargetEnvironment; use cranelift_codegen::entity::EntityRef; use cranelift_codegen::ir::{self, Block, InstBuilder, ValueLabel}; use cranelift_codegen::timing; use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext, Variable}; use wasmparser::{BinaryReader, FuncValidator, FunctionBody, WasmModuleResources}; -use wasmtime_environ::WasmResult; +use wasmtime_environ::{TypeConvert, WasmResult}; /// WebAssembly to Cranelift IR function translator. /// @@ -50,12 +51,12 @@ impl FuncTranslator { /// and `func.name` fields. The signature may contain special-purpose arguments which are not /// regarded as WebAssembly local variables. Any signature arguments marked as /// `ArgumentPurpose::Normal` are made accessible as WebAssembly local variables. - pub fn translate_body( + pub fn translate_body( &mut self, validator: &mut FuncValidator, body: FunctionBody<'_>, func: &mut ir::Function, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { let _tt = timing::wasm_translate_function(); let mut reader = body.get_binary_reader(); @@ -99,10 +100,10 @@ impl FuncTranslator { /// Declare local variables for the signature parameters that correspond to WebAssembly locals. /// /// Return the number of local variables declared. -fn declare_wasm_parameters( +fn declare_wasm_parameters( builder: &mut FunctionBuilder, entry_block: Block, - environ: &FE, + environ: &FuncEnvironment<'_>, ) -> usize { let sig_len = builder.func.signature.params.len(); let mut next_local = 0; @@ -135,11 +136,11 @@ fn declare_wasm_parameters( /// Parse the local variable declarations that precede the function body. /// /// Declare local variables, starting from `num_params`. -fn parse_local_decls( +fn parse_local_decls( reader: &mut BinaryReader, builder: &mut FunctionBuilder, num_params: usize, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, validator: &mut FuncValidator, ) -> WasmResult<()> { let mut next_local = num_params; @@ -162,12 +163,12 @@ fn parse_local_decls( /// Declare `count` local variables of the same type, starting from `next_local`. /// /// Fail if too many locals are declared in the function, or if the type is not valid for a local. -fn declare_locals( +fn declare_locals( builder: &mut FunctionBuilder, count: u32, wasm_type: wasmparser::ValType, next_local: &mut usize, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { // All locals are initialized to 0. use wasmparser::ValType::*; @@ -231,12 +232,12 @@ fn declare_locals( /// /// This assumes that the local variable declarations have already been parsed and function /// arguments and locals are declared in the builder. -fn parse_function_body( +fn parse_function_body( validator: &mut FuncValidator, mut reader: BinaryReader, builder: &mut FunctionBuilder, state: &mut FuncTranslationState, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<()> { // The control stack is initialized with a single block representing the whole function. debug_assert_eq!(state.control_stack.len(), 1, "State not initialized"); @@ -263,7 +264,7 @@ fn parse_function_body( if state.reachable { if !builder.is_unreachable() { environ.handle_before_return(&state.stack, builder); - bitcast_wasm_returns(environ, &mut state.stack, builder); + bitcast_wasm_returns(&mut state.stack, builder); builder.ins().return_(&state.stack); } } diff --git a/crates/cranelift/src/translate/mod.rs b/crates/cranelift/src/translate/mod.rs index 0ef60af091a6..3b9dd8bc6cc9 100644 --- a/crates/cranelift/src/translate/mod.rs +++ b/crates/cranelift/src/translate/mod.rs @@ -18,7 +18,7 @@ mod state; mod table; mod translation_utils; -pub use self::environ::{FuncEnvironment, GlobalVariable, StructFieldsVec, TargetEnvironment}; +pub use self::environ::{GlobalVariable, StructFieldsVec, TargetEnvironment}; pub use self::func_translator::FuncTranslator; pub use self::heap::{Heap, HeapData}; pub use self::state::FuncTranslationState; diff --git a/crates/cranelift/src/translate/state.rs b/crates/cranelift/src/translate/state.rs index 155369e5e635..7420b03882db 100644 --- a/crates/cranelift/src/translate/state.rs +++ b/crates/cranelift/src/translate/state.rs @@ -3,7 +3,8 @@ //! The `FuncTranslationState` struct defined in this module is used to keep track of the WebAssembly //! value and control stacks during the translation of a single function. -use crate::translate::environ::{FuncEnvironment, GlobalVariable}; +use crate::func_environ::FuncEnvironment; +use crate::translate::environ::GlobalVariable; use crate::translate::Heap; use cranelift_codegen::ir::{self, Block, Inst, Value}; use std::collections::hash_map::{Entry::Occupied, Entry::Vacant, HashMap}; @@ -465,11 +466,11 @@ impl FuncTranslationState { /// Get the `GlobalVariable` reference that should be used to access the global variable /// `index`. Create the reference if necessary. /// Also return the WebAssembly type of the global. - pub(crate) fn get_global( + pub(crate) fn get_global( &mut self, func: &mut ir::Function, index: u32, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult { let index = GlobalIndex::from_u32(index); match self.globals.entry(index) { @@ -480,11 +481,11 @@ impl FuncTranslationState { /// Get the `Heap` reference that should be used to access linear memory `index`. /// Create the reference if necessary. - pub(crate) fn get_heap( + pub(crate) fn get_heap( &mut self, func: &mut ir::Function, index: u32, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult { let index = MemoryIndex::from_u32(index); match self.memory_to_heap.entry(index) { @@ -497,11 +498,11 @@ impl FuncTranslationState { /// `index`. Also return the number of WebAssembly arguments in the signature. /// /// Create the signature if necessary. - pub(crate) fn get_indirect_sig( + pub(crate) fn get_indirect_sig( &mut self, func: &mut ir::Function, index: u32, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<(ir::SigRef, usize)> { let index = TypeIndex::from_u32(index); match self.signatures.entry(index) { @@ -517,11 +518,11 @@ impl FuncTranslationState { /// `index`. Also return the number of WebAssembly arguments in the signature. /// /// Create the function reference if necessary. - pub(crate) fn get_direct_func( + pub(crate) fn get_direct_func( &mut self, func: &mut ir::Function, index: u32, - environ: &mut FE, + environ: &mut FuncEnvironment<'_>, ) -> WasmResult<(ir::FuncRef, usize)> { let index = FuncIndex::from_u32(index); match self.functions.entry(index) { @@ -538,10 +539,7 @@ impl FuncTranslationState { } } -fn num_wasm_parameters( - environ: &FE, - signature: &ir::Signature, -) -> usize { +fn num_wasm_parameters(environ: &FuncEnvironment<'_>, signature: &ir::Signature) -> usize { (0..signature.params.len()) .filter(|index| environ.is_wasm_parameter(signature, *index)) .count() diff --git a/crates/cranelift/src/translate/table.rs b/crates/cranelift/src/translate/table.rs index 00645bc0be70..8ffe21624a95 100644 --- a/crates/cranelift/src/translate/table.rs +++ b/crates/cranelift/src/translate/table.rs @@ -1,4 +1,4 @@ -use crate::translate::FuncEnvironment; +use crate::func_environ::FuncEnvironment; use cranelift_codegen::cursor::FuncCursor; use cranelift_codegen::ir::{self, condcodes::IntCC, immediates::Imm64, InstBuilder}; use cranelift_codegen::isa::TargetIsa; @@ -59,7 +59,7 @@ impl TableData { /// given index within this table. pub fn prepare_table_addr( &self, - env: &mut dyn FuncEnvironment, + env: &mut FuncEnvironment<'_>, pos: &mut FunctionBuilder, mut index: ir::Value, ) -> (ir::Value, ir::MemFlags) { diff --git a/crates/cranelift/src/wasmfx/baseline.rs b/crates/cranelift/src/wasmfx/baseline.rs index 423d2331517c..cf1556c74abd 100644 --- a/crates/cranelift/src/wasmfx/baseline.rs +++ b/crates/cranelift/src/wasmfx/baseline.rs @@ -1,6 +1,5 @@ use super::shared; -use crate::translate::{FuncEnvironment, FuncTranslationState}; use crate::wasmfx::shared::call_builtin; use cranelift_codegen::ir; use cranelift_codegen::ir::condcodes::*; @@ -427,7 +426,6 @@ pub(crate) fn translate_cont_bind<'a>( pub(crate) fn translate_cont_new<'a>( env: &mut crate::func_environ::FuncEnvironment<'a>, builder: &mut FunctionBuilder, - _state: &FuncTranslationState, func: ir::Value, arg_types: &[WasmValType], return_types: &[WasmValType], diff --git a/crates/cranelift/src/wasmfx/optimized.rs b/crates/cranelift/src/wasmfx/optimized.rs index 34e30676d9e2..9f8a3b07ef8d 100644 --- a/crates/cranelift/src/wasmfx/optimized.rs +++ b/crates/cranelift/src/wasmfx/optimized.rs @@ -1,7 +1,6 @@ use super::shared; use itertools::{Either, Itertools}; -use crate::translate::{FuncEnvironment, FuncTranslationState}; use crate::wasmfx::shared::call_builtin; use cranelift_codegen::ir::condcodes::*; use cranelift_codegen::ir::types::*; @@ -1794,7 +1793,6 @@ pub(crate) fn translate_cont_bind<'a>( pub(crate) fn translate_cont_new<'a>( env: &mut crate::func_environ::FuncEnvironment<'a>, builder: &mut FunctionBuilder, - _state: &FuncTranslationState, func: ir::Value, arg_types: &[WasmValType], return_types: &[WasmValType], diff --git a/crates/environ/src/builtin.rs b/crates/environ/src/builtin.rs index 675e437b975e..39e192b8b740 100644 --- a/crates/environ/src/builtin.rs +++ b/crates/environ/src/builtin.rs @@ -7,17 +7,17 @@ macro_rules! foreach_builtin_function { memory32_grow(vmctx: vmctx, delta: i64, index: i32) -> pointer; // Returns an index for wasm's `table.copy` when both tables are locally // defined. - table_copy(vmctx: vmctx, dst_index: i32, src_index: i32, dst: i64, src: i64, len: i64); + table_copy(vmctx: vmctx, dst_index: i32, src_index: i32, dst: i64, src: i64, len: i64) -> bool; // Returns an index for wasm's `table.init`. - table_init(vmctx: vmctx, table: i32, elem: i32, dst: i64, src: i64, len: i64); + table_init(vmctx: vmctx, table: i32, elem: i32, dst: i64, src: i64, len: i64) -> bool; // Returns an index for wasm's `elem.drop`. elem_drop(vmctx: vmctx, elem: i32); // Returns an index for wasm's `memory.copy` - memory_copy(vmctx: vmctx, dst_index: i32, dst: i64, src_index: i32, src: i64, len: i64); + memory_copy(vmctx: vmctx, dst_index: i32, dst: i64, src_index: i32, src: i64, len: i64) -> bool; // Returns an index for wasm's `memory.fill` instruction. - memory_fill(vmctx: vmctx, memory: i32, dst: i64, val: i32, len: i64); + memory_fill(vmctx: vmctx, memory: i32, dst: i64, val: i32, len: i64) -> bool; // Returns an index for wasm's `memory.init` instruction. - memory_init(vmctx: vmctx, memory: i32, data: i32, dst: i64, src: i32, len: i32); + memory_init(vmctx: vmctx, memory: i32, data: i32, dst: i64, src: i32, len: i32) -> bool; // Returns a value for wasm's `ref.func` instruction. ref_func(vmctx: vmctx, func: i32) -> pointer; // Returns an index for wasm's `data.drop` instruction. @@ -27,32 +27,32 @@ macro_rules! foreach_builtin_function { // Returns an index for Wasm's `table.grow` instruction for `funcref`s. table_grow_func_ref(vmctx: vmctx, table: i32, delta: i64, init: pointer) -> pointer; // Returns an index for Wasm's `table.fill` instruction for `funcref`s. - table_fill_func_ref(vmctx: vmctx, table: i32, dst: i64, val: pointer, len: i64); + table_fill_func_ref(vmctx: vmctx, table: i32, dst: i64, val: pointer, len: i64) -> bool; // Returns an index for wasm's `memory.atomic.notify` instruction. #[cfg(feature = "threads")] - memory_atomic_notify(vmctx: vmctx, memory: i32, addr: i64, count: i32) -> i32; + memory_atomic_notify(vmctx: vmctx, memory: i32, addr: i64, count: i32) -> i64; // Returns an index for wasm's `memory.atomic.wait32` instruction. #[cfg(feature = "threads")] - memory_atomic_wait32(vmctx: vmctx, memory: i32, addr: i64, expected: i32, timeout: i64) -> i32; + memory_atomic_wait32(vmctx: vmctx, memory: i32, addr: i64, expected: i32, timeout: i64) -> i64; // Returns an index for wasm's `memory.atomic.wait64` instruction. #[cfg(feature = "threads")] - memory_atomic_wait64(vmctx: vmctx, memory: i32, addr: i64, expected: i64, timeout: i64) -> i32; + memory_atomic_wait64(vmctx: vmctx, memory: i32, addr: i64, expected: i64, timeout: i64) -> i64; // Invoked when fuel has run out while executing a function. - out_of_gas(vmctx: vmctx); + out_of_gas(vmctx: vmctx) -> bool; // Invoked when we reach a new epoch. new_epoch(vmctx: vmctx) -> i64; // Invoked before malloc returns. #[cfg(feature = "wmemcheck")] - check_malloc(vmctx: vmctx, addr: i32, len: i32); + check_malloc(vmctx: vmctx, addr: i32, len: i32) -> bool; // Invoked before the free returns. #[cfg(feature = "wmemcheck")] - check_free(vmctx: vmctx, addr: i32); + check_free(vmctx: vmctx, addr: i32) -> bool; // Invoked before a load is executed. #[cfg(feature = "wmemcheck")] - check_load(vmctx: vmctx, num_bytes: i32, addr: i32, offset: i32); + check_load(vmctx: vmctx, num_bytes: i32, addr: i32, offset: i32) -> bool; // Invoked before a store is executed. #[cfg(feature = "wmemcheck")] - check_store(vmctx: vmctx, num_bytes: i32, addr: i32, offset: i32); + check_store(vmctx: vmctx, num_bytes: i32, addr: i32, offset: i32) -> bool; // Invoked after malloc is called. #[cfg(feature = "wmemcheck")] malloc_start(vmctx: vmctx); @@ -77,7 +77,7 @@ macro_rules! foreach_builtin_function { // the updated `root` (so that, in the case of moving collectors, // callers have a valid version of `root` again). #[cfg(feature = "gc-drc")] - gc(vmctx: vmctx, root: reference) -> reference; + gc(vmctx: vmctx, root: i32) -> i64; // Allocate a new, uninitialized GC object and return a reference to // it. @@ -88,7 +88,7 @@ macro_rules! foreach_builtin_function { module_interned_type_index: i32, size: i32, align: i32 - ) -> reference; + ) -> i64; // Intern a `funcref` into the GC heap, returning its // `FuncRefTableId`. @@ -98,7 +98,7 @@ macro_rules! foreach_builtin_function { intern_func_ref_for_gc_heap( vmctx: vmctx, func_ref: pointer - ) -> i32; + ) -> i64; // Get the raw `VMFuncRef` pointer associated with a // `FuncRefTableId` from an earlier `intern_func_ref_for_gc_heap` @@ -132,7 +132,7 @@ macro_rules! foreach_builtin_function { data_index: i32, data_offset: i32, len: i32 - ) -> reference; + ) -> i64; // Builtin implementation of the `array.new_elem` instruction. #[cfg(feature = "gc")] @@ -142,42 +142,42 @@ macro_rules! foreach_builtin_function { elem_index: i32, elem_offset: i32, len: i32 - ) -> reference; + ) -> i64; // Builtin implementation of the `array.copy` instruction. #[cfg(feature = "gc")] array_copy( vmctx: vmctx, - dst_array: reference, + dst_array: i32, dst_index: i32, - src_array: reference, + src_array: i32, src_index: i32, len: i32 - ); + ) -> bool; // Builtin implementation of the `array.init_data` instruction. #[cfg(feature = "gc")] array_init_data( vmctx: vmctx, array_interned_type_index: i32, - array: reference, + array: i32, dst_index: i32, data_index: i32, data_offset: i32, len: i32 - ); + ) -> bool; // Builtin implementation of the `array.init_elem` instruction. #[cfg(feature = "gc")] array_init_elem( vmctx: vmctx, array_interned_type_index: i32, - array: reference, + array: i32, dst: i32, elem_index: i32, src: i32, len: i32 - ); + ) -> bool; // Returns whether `actual_engine_type` is a subtype of // `expected_engine_type`. @@ -190,13 +190,16 @@ macro_rules! foreach_builtin_function { // Returns an index for Wasm's `table.grow` instruction for GC references. #[cfg(feature = "gc")] - table_grow_gc_ref(vmctx: vmctx, table: i32, delta: i64, init: reference) -> pointer; + table_grow_gc_ref(vmctx: vmctx, table: i32, delta: i64, init: i32) -> pointer; // Returns an index for Wasm's `table.fill` instruction for GC references. #[cfg(feature = "gc")] - table_fill_gc_ref(vmctx: vmctx, table: i32, dst: i64, val: reference, len: i64); + table_fill_gc_ref(vmctx: vmctx, table: i32, dst: i64, val: i32, len: i64) -> bool; // Raises an unconditional trap with the specified code. + // + // This is used when signals-based-traps are disabled for backends + // when an illegal instruction can't be executed for example. trap(vmctx: vmctx, code: u8); // Raises an unconditional trap where the trap information must have @@ -214,7 +217,7 @@ macro_rules! foreach_builtin_function { tc_allocate(vmctx: vmctx, size: i64, align: i64) -> pointer; // General-purpose deallocation. Only used by stack-switching // code at the moment. - tc_deallocate(vmctx: vmctx, ptr: pointer, size: i64, align: i64); + tc_deallocate(vmctx: vmctx, ptr: pointer, size: i64, align: i64) -> bool; // General-purpose reallocation without preserving existing data. Concretely, behaves like // deallocate followed by allocate. // The only difference is that if `old_size` is 0, then we assume that ptr does not point to allocated memory @@ -226,9 +229,9 @@ macro_rules! foreach_builtin_function { // Baseline resume tc_baseline_resume(vmctx: vmctx, contref: pointer) -> i32; // Baseline suspend - tc_baseline_suspend(vmctx: vmctx, tag: i32); + tc_baseline_suspend(vmctx: vmctx, tag: i32) -> bool; // Like suspend, but forwards handling. - tc_baseline_forward(vmctx: vmctx, tag: i32, subcont: pointer); + tc_baseline_forward(vmctx: vmctx, tag: i32, subcont: pointer) -> bool; // Baseline cont.new tc_baseline_cont_new(vmctx: vmctx, r: pointer, param_count: i64, result_count: i64) -> pointer; // Baseline continuation drop @@ -242,7 +245,7 @@ macro_rules! foreach_builtin_function { // Baseline suspend buffer pointer. tc_baseline_get_payloads_ptr(vmctx: vmctx, nargs: i64) -> pointer; // Baseline clear suspend buffer. - tc_baseline_clear_payloads(vmctx: vmctx); + tc_baseline_clear_payloads(vmctx: vmctx) -> bool; // Baseline get current continuation. tc_baseline_get_current_continuation(vmctx: vmctx) -> pointer; @@ -264,54 +267,63 @@ macro_rules! foreach_builtin_function { // continuation reference and the revision count. To // denote the continuation being `None`, `init_contref` // may be 0. - table_grow_cont_obj(vmctx: vmctx, table: i32, delta: i64, init_contref: pointer, init_revision : i64) -> pointer; + table_grow_cont_obj(vmctx: vmctx, table: i32, delta: i64, init_contref: pointer, init_revision: i64) -> pointer; // `value_contref` and `value_revision` together encode // the Option, as in previous libcall. - table_fill_cont_obj(vmctx: vmctx, table: i32, dst: i64, value_contref: pointer, value_revision : i64, len: i64); + table_fill_cont_obj(vmctx: vmctx, table: i32, dst: i64, value_contref: pointer, value_revision: i64, len: i64) -> bool; } }; } -/// An index type for builtin functions. -#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct BuiltinFunctionIndex(u32); +/// Helper macro to define a builtin type such as `BuiltinFunctionIndex` and +/// `ComponentBuiltinFunctionIndex` using the iterator macro, e.g. +/// `foreach_builtin_function`, as the way to generate accessor methods. +macro_rules! declare_builtin_index { + ($index_name:ident, $iter:ident) => { + /// An index type for builtin functions. + #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct $index_name(u32); -impl BuiltinFunctionIndex { - /// Create a new `BuiltinFunctionIndex` from its index - pub const fn from_u32(i: u32) -> Self { - Self(i) - } + impl $index_name { + /// Create a new builtin from its raw index + pub const fn from_u32(i: u32) -> Self { + assert!(i < Self::len()); + Self(i) + } - /// Return the index as an u32 number. - pub const fn index(&self) -> u32 { - self.0 - } + /// Return the index as an u32 number. + pub const fn index(&self) -> u32 { + self.0 + } + + $iter!(declare_builtin_index_constructors); + } + }; } -macro_rules! declare_indexes { +/// Helper macro used by the above macro. +macro_rules! declare_builtin_index_constructors { ( $( $( #[$attr:meta] )* $name:ident( $( $pname:ident: $param:ident ),* ) $( -> $result:ident )?; )* ) => { - impl BuiltinFunctionIndex { - declare_indexes!( - @indices; - 0; - $( $( #[$attr] )* $name; )* - ); - - /// Returns a symbol name for this builtin. - pub fn name(&self) -> &'static str { - $( - $( #[$attr] )* - if *self == BuiltinFunctionIndex::$name() { - return stringify!($name); - } - )* - unreachable!() - } + declare_builtin_index_constructors!( + @indices; + 0; + $( $( #[$attr] )* $name; )* + ); + + /// Returns a symbol name for this builtin. + pub fn name(&self) -> &'static str { + $( + $( #[$attr] )* + if *self == Self::$name() { + return stringify!($name); + } + )* + unreachable!() } }; @@ -322,7 +334,7 @@ macro_rules! declare_indexes { $len:expr; ) => { /// Returns the total number of builtin functions. - pub const fn builtin_functions_total_number() -> u32 { + pub const fn len() -> u32 { $len } }; @@ -345,7 +357,7 @@ macro_rules! declare_indexes { Self($index) } - declare_indexes!( + declare_builtin_index_constructors!( @indices; ($index + 1); $( $( #[$rest_attr] )* $rest_name; )* @@ -353,4 +365,98 @@ macro_rules! declare_indexes { } } -foreach_builtin_function!(declare_indexes); +// Define `struct BuiltinFunctionIndex` +declare_builtin_index!(BuiltinFunctionIndex, foreach_builtin_function); + +/// Return value of [`BuiltinFunctionIndex::trap_sentinel`]. +pub enum TrapSentinel { + /// A falsy or zero value indicates a trap. + Falsy, + /// The value `-2` indicates a trap (used for growth-related builtins). + NegativeTwo, + /// The value `-1` indicates a trap . + NegativeOne, + /// Any negative value indicates a trap. + Negative, +} + +impl BuiltinFunctionIndex { + /// Describes the return value of this builtin and what represents a trap. + /// + /// Libcalls don't raise traps themselves and instead delegate to compilers + /// to do so. This means that some return values of libcalls indicate a trap + /// is happening and this is represented with sentinel values. This function + /// returns the description of the sentinel value which indicates a trap, if + /// any. If `None` is returned from this function then this builtin cannot + /// generate a trap. + #[allow(unreachable_code, unused_macro_rules, reason = "macro-generated code")] + pub fn trap_sentinel(&self) -> Option { + macro_rules! trap_sentinel { + ( + $( + $( #[$attr:meta] )* + $name:ident( $( $pname:ident: $param:ident ),* ) $( -> $result:ident )?; + )* + ) => {{ + $( + $(#[$attr])* + if *self == BuiltinFunctionIndex::$name() { + let mut _ret = None; + $(_ret = Some(trap_sentinel!(@get $name $result));)? + return _ret; + } + )* + + None + }}; + + // Growth-related functions return -2 as a sentinel. + (@get memory32_grow pointer) => (TrapSentinel::NegativeTwo); + (@get table_grow_func_ref pointer) => (TrapSentinel::NegativeTwo); + (@get table_grow_gc_ref pointer) => (TrapSentinel::NegativeTwo); + (@get table_grow_cont_obj pointer) => (TrapSentinel::NegativeTwo); + + // Atomics-related functions return a negative value indicating trap + // indicate a trap. + (@get memory_atomic_notify i64) => (TrapSentinel::Negative); + (@get memory_atomic_wait32 i64) => (TrapSentinel::Negative); + (@get memory_atomic_wait64 i64) => (TrapSentinel::Negative); + + // GC-related functions return a 64-bit value which is negative to + // indicate a trap. + (@get gc i64) => (TrapSentinel::Negative); + (@get gc_alloc_raw i64) => (TrapSentinel::Negative); + (@get array_new_data i64) => (TrapSentinel::Negative); + (@get array_new_elem i64) => (TrapSentinel::Negative); + + // The final epoch represents a trap + (@get new_epoch i64) => (TrapSentinel::NegativeOne); + + // These libcalls can't trap + (@get ref_func pointer) => (return None); + (@get table_get_lazy_init_func_ref pointer) => (return None); + (@get get_interned_func_ref pointer) => (return None); + (@get intern_func_ref_for_gc_heap i64) => (return None); + (@get is_subtype i32) => (return None); + + (@get tc_cont_new pointer) => (TrapSentinel::Negative); + (@get tc_allocate pointer) => (TrapSentinel::Negative); + (@get tc_reallocate pointer) => (TrapSentinel::Negative); + (@get tc_baseline_resume i32) => (return None); + (@get tc_baseline_cont_new pointer) => (TrapSentinel::Negative); + (@get tc_baseline_continuation_arguments_ptr pointer) => (TrapSentinel::Negative); + (@get tc_baseline_continuation_values_ptr pointer) => (TrapSentinel::Negative); + (@get tc_baseline_get_payloads_ptr pointer) => (TrapSentinel::Negative); + (@get tc_baseline_get_current_continuation pointer) => (TrapSentinel::Negative); + + // Bool-returning functions use `false` as an indicator of a trap. + (@get $name:ident bool) => (TrapSentinel::Falsy); + + (@get $name:ident $ret:ident) => ( + compile_error!(concat!("no trap sentinel registered for ", stringify!($name))) + ) + } + + foreach_builtin_function!(trap_sentinel) + } +} diff --git a/crates/environ/src/compile/mod.rs b/crates/environ/src/compile/mod.rs index de12ba29f3f0..5832ff9dfca1 100644 --- a/crates/environ/src/compile/mod.rs +++ b/crates/environ/src/compile/mod.rs @@ -5,7 +5,7 @@ use crate::prelude::*; use crate::{obj, Tunables}; use crate::{ BuiltinFunctionIndex, DefinedFuncIndex, FlagValue, FuncIndex, FunctionLoc, ObjectKind, - PrimaryMap, StaticModuleIndex, WasmError, WasmFuncType, WasmFunctionInfo, + PrimaryMap, StaticModuleIndex, TripleExt, WasmError, WasmFuncType, WasmFunctionInfo, }; use anyhow::Result; use object::write::{Object, SymbolId}; @@ -297,7 +297,7 @@ pub trait Compiler: Send + Sync { // XXX: the `object` crate won't successfully build an object // with relocations and such if it doesn't know the // architecture, so just pretend we are riscv64. Yolo! - Pulley32 | Pulley64 => Architecture::Riscv64, + Pulley32 | Pulley64 | Pulley32be | Pulley64be => Architecture::Riscv64, architecture => { anyhow::bail!("target architecture {:?} is unsupported", architecture,); } @@ -326,13 +326,19 @@ pub trait Compiler: Send + Sync { /// alignment is larger than necessary for some platforms since it may /// depend on the platform's runtime configuration. fn page_size_align(&self) -> u64 { + // Conservatively assume the max-of-all-supported-hosts for pulley + // and round up to 64k. + if self.triple().is_pulley() { + return 0x10000; + } + use target_lexicon::*; match (self.triple().operating_system, self.triple().architecture) { ( OperatingSystem::MacOSX { .. } - | OperatingSystem::Darwin - | OperatingSystem::Ios - | OperatingSystem::Tvos, + | OperatingSystem::Darwin(_) + | OperatingSystem::IOS(_) + | OperatingSystem::TvOS(_), Architecture::Aarch64(..), ) => 0x4000, // 64 KB is the maximal page size (i.e. memory translation granule size) diff --git a/crates/environ/src/compile/module_artifacts.rs b/crates/environ/src/compile/module_artifacts.rs index bc1d22634c5b..7d9d132eddd6 100644 --- a/crates/environ/src/compile/module_artifacts.rs +++ b/crates/environ/src/compile/module_artifacts.rs @@ -28,9 +28,6 @@ pub struct ObjectBuilder<'a> { /// will go. data: SectionId, - /// The target triple for this compilation. - triple: target_lexicon::Triple, - /// The section identifier for function name information, or otherwise where /// the `name` custom section of wasm is copied into. /// @@ -46,11 +43,7 @@ pub struct ObjectBuilder<'a> { impl<'a> ObjectBuilder<'a> { /// Creates a new builder for the `obj` specified. - pub fn new( - mut obj: Object<'a>, - tunables: &'a Tunables, - triple: target_lexicon::Triple, - ) -> ObjectBuilder<'a> { + pub fn new(mut obj: Object<'a>, tunables: &'a Tunables) -> ObjectBuilder<'a> { let data = obj.add_section( obj.segment_name(StandardSegment::Data).to_vec(), obj::ELF_WASM_DATA.as_bytes().to_vec(), @@ -60,7 +53,6 @@ impl<'a> ObjectBuilder<'a> { obj, tunables, data, - triple, names: None, dwarf: None, } @@ -225,12 +217,6 @@ impl<'a> ObjectBuilder<'a> { self.push_debuginfo(&mut dwarf, &debuginfo); } - let is_pulley = matches!( - self.triple.architecture, - target_lexicon::Architecture::Pulley32 | target_lexicon::Architecture::Pulley64 - ); - assert!(!is_pulley || wasm_to_array_trampolines.is_empty()); - Ok(CompiledModuleInfo { module, funcs, @@ -240,7 +226,6 @@ impl<'a> ObjectBuilder<'a> { has_unparsed_debuginfo, code_section_offset: debuginfo.wasm_file.code_section_offset, has_wasm_debuginfo: self.tunables.parse_wasm_debuginfo, - is_pulley, dwarf, }, }) diff --git a/crates/environ/src/component.rs b/crates/environ/src/component.rs index 4b72baa71322..b3899b4caa03 100644 --- a/crates/environ/src/component.rs +++ b/crates/environ/src/component.rs @@ -63,36 +63,14 @@ pub use self::translate::*; #[cfg(feature = "compile")] pub use self::types_builder::*; -/// Helper macro to iterate over the transcoders that the host will provide -/// adapter modules through libcalls. -#[macro_export] -macro_rules! foreach_transcoder { - ($mac:ident) => { - $mac! { - utf8_to_utf8(src: ptr_u8, len: size, dst: ptr_u8); - utf16_to_utf16(src: ptr_u16, len: size, dst: ptr_u16); - latin1_to_latin1(src: ptr_u8, len: size, dst: ptr_u8); - latin1_to_utf16(src: ptr_u8, len: size, dst: ptr_u16); - utf8_to_utf16(src: ptr_u8, len: size, dst: ptr_u16) -> size; - utf16_to_utf8(src: ptr_u16, src_len: size, dst: ptr_u8, dst_len: size, ret2: ptr_size) -> size; - latin1_to_utf8(src: ptr_u8, src_len: size, dst: ptr_u8, dst_len: size, ret2: ptr_size) -> size; - utf16_to_compact_probably_utf16(src: ptr_u16, len: size, dst: ptr_u16) -> size; - utf8_to_latin1(src: ptr_u8, len: size, dst: ptr_u8, ret2: ptr_size) -> size; - utf16_to_latin1(src: ptr_u16, len: size, dst: ptr_u8, ret2: ptr_size) -> size; - utf8_to_compact_utf16(src: ptr_u8, src_len: size, dst: ptr_u16, dst_len: size, bytes_so_far: size) -> size; - utf16_to_compact_utf16(src: ptr_u16, src_len: size, dst: ptr_u16, dst_len: size, bytes_so_far: size) -> size; - } - }; -} - /// Helper macro, like `foreach_transcoder`, to iterate over builtins for /// components unrelated to transcoding. #[macro_export] macro_rules! foreach_builtin_component_function { ($mac:ident) => { $mac! { - resource_new32(vmctx: vmctx, resource: u32, rep: u32) -> u32; - resource_rep32(vmctx: vmctx, resource: u32, idx: u32) -> u32; + resource_new32(vmctx: vmctx, resource: u32, rep: u32) -> u64; + resource_rep32(vmctx: vmctx, resource: u32, idx: u32) -> u64; // Returns an `Option` where `None` is "no destructor needed" // and `Some(val)` is "run the destructor on this rep". The option @@ -100,12 +78,31 @@ macro_rules! foreach_builtin_component_function { // and bits 1-33 are the payload. resource_drop(vmctx: vmctx, resource: u32, idx: u32) -> u64; - resource_transfer_own(vmctx: vmctx, src_idx: u32, src_table: u32, dst_table: u32) -> u32; - resource_transfer_borrow(vmctx: vmctx, src_idx: u32, src_table: u32, dst_table: u32) -> u32; + resource_transfer_own(vmctx: vmctx, src_idx: u32, src_table: u32, dst_table: u32) -> u64; + resource_transfer_borrow(vmctx: vmctx, src_idx: u32, src_table: u32, dst_table: u32) -> u64; resource_enter_call(vmctx: vmctx); - resource_exit_call(vmctx: vmctx); + resource_exit_call(vmctx: vmctx) -> bool; trap(vmctx: vmctx, code: u8); + + utf8_to_utf8(src: ptr_u8, len: size, dst: ptr_u8) -> bool; + utf16_to_utf16(src: ptr_u16, len: size, dst: ptr_u16) -> bool; + latin1_to_latin1(src: ptr_u8, len: size, dst: ptr_u8) -> bool; + latin1_to_utf16(src: ptr_u8, len: size, dst: ptr_u16) -> bool; + utf8_to_utf16(src: ptr_u8, len: size, dst: ptr_u16) -> size; + utf16_to_utf8(src: ptr_u16, src_len: size, dst: ptr_u8, dst_len: size, ret2: ptr_size) -> size; + latin1_to_utf8(src: ptr_u8, src_len: size, dst: ptr_u8, dst_len: size, ret2: ptr_size) -> size; + utf16_to_compact_probably_utf16(src: ptr_u16, len: size, dst: ptr_u16) -> size; + utf8_to_latin1(src: ptr_u8, len: size, dst: ptr_u8, ret2: ptr_size) -> size; + utf16_to_latin1(src: ptr_u16, len: size, dst: ptr_u8, ret2: ptr_size) -> size; + utf8_to_compact_utf16(src: ptr_u8, src_len: size, dst: ptr_u16, dst_len: size, bytes_so_far: size) -> size; + utf16_to_compact_utf16(src: ptr_u16, src_len: size, dst: ptr_u16, dst_len: size, bytes_so_far: size) -> size; } }; } + +// Define `struct ComponentBuiltinFunctionIndex` +declare_builtin_index!( + ComponentBuiltinFunctionIndex, + foreach_builtin_component_function +); diff --git a/crates/environ/src/component/info.rs b/crates/environ/src/component/info.rs index e1b6f2edf58b..8c5442a6d243 100644 --- a/crates/environ/src/component/info.rs +++ b/crates/environ/src/component/info.rs @@ -452,19 +452,30 @@ pub struct CanonicalOptions { } /// Possible encodings of strings within the component model. -// -// Note that the `repr(u8)` is load-bearing here since this is used in an -// `extern "C" fn()` function argument which is called from cranelift-compiled -// code so we must know the representation of this. #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] #[allow(missing_docs, reason = "self-describing variants")] -#[repr(u8)] pub enum StringEncoding { Utf8, Utf16, CompactUtf16, } +impl StringEncoding { + /// Decodes the `u8` provided back into a `StringEncoding`, if it's valid. + pub fn from_u8(val: u8) -> Option { + if val == StringEncoding::Utf8 as u8 { + return Some(StringEncoding::Utf8); + } + if val == StringEncoding::Utf16 as u8 { + return Some(StringEncoding::Utf16); + } + if val == StringEncoding::CompactUtf16 as u8 { + return Some(StringEncoding::CompactUtf16); + } + None + } +} + /// Possible transcoding operations that must be provided by the host. /// /// Note that each transcoding operation may have a unique signature depending diff --git a/crates/environ/src/component/vmcomponent_offsets.rs b/crates/environ/src/component/vmcomponent_offsets.rs index a770fb2eeecf..a46b855461da 100644 --- a/crates/environ/src/component/vmcomponent_offsets.rs +++ b/crates/environ/src/component/vmcomponent_offsets.rs @@ -2,7 +2,7 @@ // // struct VMComponentContext { // magic: u32, -// libcalls: &'static VMComponentLibcalls, +// builtins: &'static VMComponentBuiltins, // store: *mut dyn Store, // limits: *const VMRuntimeLimits, // flags: [VMGlobalDefinition; component.num_runtime_component_instances], @@ -59,7 +59,7 @@ pub struct VMComponentOffsets

{ // precalculated offsets of various member fields magic: u32, - libcalls: u32, + builtins: u32, store: u32, limits: u32, flags: u32, @@ -95,7 +95,7 @@ impl VMComponentOffsets

{ num_trampolines: component.trampolines.len().try_into().unwrap(), num_resources: component.num_resources, magic: 0, - libcalls: 0, + builtins: 0, store: 0, limits: 0, flags: 0, @@ -135,7 +135,7 @@ impl VMComponentOffsets

{ fields! { size(magic) = 4u32, align(u32::from(ret.ptr.size())), - size(libcalls) = ret.ptr.size(), + size(builtins) = ret.ptr.size(), size(store) = cmul(2, ret.ptr.size()), size(limits) = ret.ptr.size(), align(16), @@ -171,10 +171,10 @@ impl VMComponentOffsets

{ self.magic } - /// The offset of the `libcalls` field. + /// The offset of the `builtins` field. #[inline] - pub fn libcalls(&self) -> u32 { - self.libcalls + pub fn builtins(&self) -> u32 { + self.builtins } /// The offset of the `flags` field. diff --git a/crates/environ/src/demangling.rs b/crates/environ/src/demangling.rs index b197c6f10e84..d9a88aa44be4 100644 --- a/crates/environ/src/demangling.rs +++ b/crates/environ/src/demangling.rs @@ -7,8 +7,11 @@ pub fn demangle_function_name(writer: &mut impl core::fmt::Write, name: &str) -> #[cfg(feature = "demangle")] if let Ok(demangled) = rustc_demangle::try_demangle(name) { return write!(writer, "{demangled}"); - } else if let Ok(demangled) = cpp_demangle::Symbol::new(name) { - return write!(writer, "{demangled}"); + } else if let Ok(symbol) = cpp_demangle::Symbol::new(name) { + let options = cpp_demangle::DemangleOptions::default(); + if let Ok(demangled) = symbol.demangle(&options) { + return write!(writer, "{demangled}"); + } } write!(writer, "{name}") diff --git a/crates/environ/src/ext.rs b/crates/environ/src/ext.rs new file mode 100644 index 000000000000..de4552e54642 --- /dev/null +++ b/crates/environ/src/ext.rs @@ -0,0 +1,40 @@ +use target_lexicon::{Architecture, Triple}; + +/// Extension methods for `target_lexicon::Triple`. +pub trait TripleExt { + /// Helper for returning whether this target is for pulley, wasmtime's + /// interpreter. + fn is_pulley(&self) -> bool; + + /// Returns the target triple for pulley to run on this host. + fn pulley_host() -> Self; +} + +impl TripleExt for Triple { + fn is_pulley(&self) -> bool { + match self.architecture { + Architecture::Pulley32 | Architecture::Pulley32be => true, + Architecture::Pulley64 | Architecture::Pulley64be => true, + _ => false, + } + } + + fn pulley_host() -> Self { + if cfg!(target_endian = "little") { + if cfg!(target_pointer_width = "32") { + return "pulley32".parse().unwrap(); + } else if cfg!(target_pointer_width = "64") { + return "pulley64".parse().unwrap(); + } + } + if cfg!(target_endian = "big") { + if cfg!(target_pointer_width = "32") { + return "pulley32be".parse().unwrap(); + } else if cfg!(target_pointer_width = "64") { + return "pulley64be".parse().unwrap(); + } + } + + unreachable!() + } +} diff --git a/crates/environ/src/hostcall.rs b/crates/environ/src/hostcall.rs new file mode 100644 index 000000000000..38e2edc992a1 --- /dev/null +++ b/crates/environ/src/hostcall.rs @@ -0,0 +1,59 @@ +#[cfg(feature = "component-model")] +use crate::component::ComponentBuiltinFunctionIndex; +use crate::BuiltinFunctionIndex; + +/// Enumeration of all possible ways that wasm may execute code in the +/// host. +/// +/// This type is intended to be serialized into a 32-bit index (or smaller) and +/// is used by Pulley for example to identify how transitions from the guest to +/// the host are performed. +pub enum HostCall { + /// An "array call" is being done which means that the wasm is calling the + /// host using the array calling convention (e.g. `VMArrayCallNative`). + ArrayCall, + + /// A builtin function, e.g. for `memory.grow`, is being called. Each + /// builtin has its own ABI. + Builtin(BuiltinFunctionIndex), + + /// A lowered component function is being called. This is done by a + /// trampoline generated by Cranelift and is distinct from the array calling + /// convention. + /// + /// This correspond to `VMLoweringCallee`. + #[cfg(feature = "component-model")] + ComponentLowerImport, + + /// A builtin function, but specifically for components. For example string + /// transcoders. + #[cfg(feature = "component-model")] + ComponentBuiltin(ComponentBuiltinFunctionIndex), +} + +impl HostCall { + /// Returns a 32-bit index for this hostcall. + pub const fn index(&self) -> u32 { + match self { + HostCall::ArrayCall => 0, + HostCall::Builtin(i) => 1 + i.index(), + #[cfg(feature = "component-model")] + HostCall::ComponentLowerImport => 1 + BuiltinFunctionIndex::len(), + #[cfg(feature = "component-model")] + HostCall::ComponentBuiltin(i) => 2 + BuiltinFunctionIndex::len() + i.index(), + } + } +} + +impl From for HostCall { + fn from(idx: BuiltinFunctionIndex) -> HostCall { + HostCall::Builtin(idx) + } +} + +#[cfg(feature = "component-model")] +impl From for HostCall { + fn from(idx: ComponentBuiltinFunctionIndex) -> HostCall { + HostCall::ComponentBuiltin(idx) + } +} diff --git a/crates/environ/src/lib.rs b/crates/environ/src/lib.rs index 3555f4e6112e..6e25356ed493 100644 --- a/crates/environ/src/lib.rs +++ b/crates/environ/src/lib.rs @@ -17,10 +17,13 @@ extern crate alloc; pub mod prelude; mod address_map; +#[macro_use] mod builtin; mod demangling; mod error; +mod ext; mod gc; +mod hostcall; mod module; mod module_artifacts; mod module_types; @@ -33,11 +36,13 @@ mod tunables; mod types; mod vmoffsets; +pub use self::ext::*; pub use crate::address_map::*; pub use crate::builtin::*; pub use crate::demangling::*; pub use crate::error::*; pub use crate::gc::*; +pub use crate::hostcall::*; pub use crate::module::*; pub use crate::module_artifacts::*; pub use crate::module_types::*; diff --git a/crates/environ/src/module_artifacts.rs b/crates/environ/src/module_artifacts.rs index 6707da994ebe..1d51f1215cdb 100644 --- a/crates/environ/src/module_artifacts.rs +++ b/crates/environ/src/module_artifacts.rs @@ -107,10 +107,6 @@ pub struct Metadata { /// weren't found in the original wasm module itself. pub has_wasm_debuginfo: bool, - /// Whether this artifact contains Pulley bytecode (instead of machine code) - /// or not. - pub is_pulley: bool, - /// Dwarf sections and the offsets at which they're stored in the /// ELF_WASMTIME_DWARF pub dwarf: Vec<(u8, Range)>, diff --git a/crates/environ/src/tunables.rs b/crates/environ/src/tunables.rs index 038b5f5ee9f2..090c948125ea 100644 --- a/crates/environ/src/tunables.rs +++ b/crates/environ/src/tunables.rs @@ -143,6 +143,9 @@ impl Tunables { /// Returns the default set of tunables for the given target triple. pub fn default_for_target(target: &Triple) -> Result { + if cfg!(miri) { + return Ok(Tunables::default_miri()); + } match target .pointer_width() .map_err(|_| anyhow!("failed to retrieve target pointer width"))? diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs index 0a5c084648a1..0f36e303e2ee 100644 --- a/crates/environ/src/vmoffsets.rs +++ b/crates/environ/src/vmoffsets.rs @@ -171,27 +171,27 @@ pub trait PtrSize { // Offsets within `VMRuntimeLimits` - /// Return the offset of the `stack_limit` field of `VMRuntimeLimits` - #[inline] - fn vmruntime_limits_stack_limit(&self) -> u8 { - 0 - } - /// Return the offset of the `fuel_consumed` field of `VMRuntimeLimits` #[inline] fn vmruntime_limits_fuel_consumed(&self) -> u8 { - self.size() + 0 } /// Return the offset of the `epoch_deadline` field of `VMRuntimeLimits` #[inline] fn vmruntime_limits_epoch_deadline(&self) -> u8 { - self.vmruntime_limits_fuel_consumed() + 8 // `stack_limit` is a pointer; `fuel_consumed` is an `i64` + self.vmruntime_limits_fuel_consumed() + 8 + } + + /// Return the offset of the `stack_limit` field of `VMRuntimeLimits` + #[inline] + fn vmruntime_limits_stack_limit(&self) -> u8 { + self.vmruntime_limits_epoch_deadline() + 8 } /// Return the offset of the `last_wasm_exit_fp` field of `VMRuntimeLimits`. fn vmruntime_limits_last_wasm_exit_fp(&self) -> u8 { - self.vmruntime_limits_epoch_deadline() + 8 + self.vmruntime_limits_stack_limit() + self.size() } /// Return the offset of the `last_wasm_exit_pc` field of `VMRuntimeLimits`. diff --git a/crates/fuzzing/src/generators/config.rs b/crates/fuzzing/src/generators/config.rs index b6fd9e8d7ebd..36d07f498966 100644 --- a/crates/fuzzing/src/generators/config.rs +++ b/crates/fuzzing/src/generators/config.rs @@ -235,7 +235,7 @@ impl Config { InstanceAllocationStrategy::Pooling(_) ), compiler: match self.wasmtime.compiler_strategy { - CompilerStrategy::Cranelift => wasmtime_wast_util::Compiler::Cranelift, + CompilerStrategy::Cranelift => wasmtime_wast_util::Compiler::CraneliftNative, CompilerStrategy::Winch => wasmtime_wast_util::Compiler::Winch, }, } @@ -578,7 +578,6 @@ impl WasmtimeConfig { // by Winch. self.signals_based_traps = true; self.table_lazy_init = true; - self.epoch_interruption = false; self.debug_info = false; } diff --git a/crates/misc/component-test-util/Cargo.toml b/crates/misc/component-test-util/Cargo.toml index 0d7a27bdbf41..b5dfefddcb50 100644 --- a/crates/misc/component-test-util/Cargo.toml +++ b/crates/misc/component-test-util/Cargo.toml @@ -12,4 +12,6 @@ env_logger = { workspace = true } anyhow = { workspace = true } arbitrary = { workspace = true, features = ["derive"] } wasmtime = { workspace = true, features = ["component-model", "async"] } +wasmtime-environ = { workspace = true } wasmtime-wast-util = { path = '../../wast-util' } +target-lexicon = { workspace = true } diff --git a/crates/misc/component-test-util/src/lib.rs b/crates/misc/component-test-util/src/lib.rs index 26eb5fae6b1c..6deaf3ed7316 100644 --- a/crates/misc/component-test-util/src/lib.rs +++ b/crates/misc/component-test-util/src/lib.rs @@ -132,16 +132,22 @@ forward_impls! { /// Helper method to apply `wast_config` to `config`. pub fn apply_wast_config(config: &mut Config, wast_config: &wasmtime_wast_util::WastConfig) { + use wasmtime_environ::TripleExt; + use wasmtime_wast_util::{Collector, Compiler}; + config.strategy(match wast_config.compiler { - wasmtime_wast_util::Compiler::Cranelift => wasmtime::Strategy::Cranelift, - wasmtime_wast_util::Compiler::Winch => wasmtime::Strategy::Winch, + Compiler::CraneliftNative | Compiler::CraneliftPulley => wasmtime::Strategy::Cranelift, + Compiler::Winch => wasmtime::Strategy::Winch, }); + if let Compiler::CraneliftPulley = wast_config.compiler { + config + .target(&target_lexicon::Triple::pulley_host().to_string()) + .unwrap(); + } config.collector(match wast_config.collector { - wasmtime_wast_util::Collector::Auto => wasmtime::Collector::Auto, - wasmtime_wast_util::Collector::Null => wasmtime::Collector::Null, - wasmtime_wast_util::Collector::DeferredReferenceCounting => { - wasmtime::Collector::DeferredReferenceCounting - } + Collector::Auto => wasmtime::Collector::Auto, + Collector::Null => wasmtime::Collector::Null, + Collector::DeferredReferenceCounting => wasmtime::Collector::DeferredReferenceCounting, }); } diff --git a/crates/test-macros/src/lib.rs b/crates/test-macros/src/lib.rs index 7c125bbc653c..5a9c8c89a12c 100644 --- a/crates/test-macros/src/lib.rs +++ b/crates/test-macros/src/lib.rs @@ -55,7 +55,7 @@ impl TestConfig { self.strategies.retain(|s| *s != Compiler::Winch); Ok(()) } else if meta.path.is_ident("Cranelift") { - self.strategies.retain(|s| *s != Compiler::Cranelift); + self.strategies.retain(|s| *s != Compiler::CraneliftNative); Ok(()) } else { Err(meta.error("Unknown strategy")) @@ -97,7 +97,7 @@ impl TestConfig { impl Default for TestConfig { fn default() -> Self { Self { - strategies: vec![Compiler::Cranelift, Compiler::Winch], + strategies: vec![Compiler::CraneliftNative, Compiler::Winch], flags: Default::default(), test_attribute: None, } diff --git a/crates/wasi-nn/Cargo.toml b/crates/wasi-nn/Cargo.toml index f4b6c388eeaa..b05be0bcea88 100644 --- a/crates/wasi-nn/Cargo.toml +++ b/crates/wasi-nn/Cargo.toml @@ -30,9 +30,6 @@ wasmtime = { workspace = true, features = [ # These dependencies are necessary for the wasi-nn implementation: tracing = { workspace = true } thiserror = { workspace = true } -openvino = { version = "0.8.0", features = [ - "runtime-linking", -], optional = true } ort = { version = "2.0.0-rc.2", default-features = false, features = [ "copy-dylibs", @@ -40,6 +37,11 @@ ort = { version = "2.0.0-rc.2", default-features = false, features = [ ], optional = true } tch = { version = "0.17.0", default-features = false, optional = true} +[target.'cfg(target_pointer_width = "64")'.dependencies] +openvino = { version = "0.8.0", features = [ + "runtime-linking", +], optional = true } + [target.'cfg(windows)'.dependencies.windows] version = "0.52" features = [ diff --git a/crates/wasi-nn/src/backend/mod.rs b/crates/wasi-nn/src/backend/mod.rs index 20224be8f540..e657dfef5da7 100644 --- a/crates/wasi-nn/src/backend/mod.rs +++ b/crates/wasi-nn/src/backend/mod.rs @@ -4,7 +4,7 @@ #[cfg(feature = "onnx")] pub mod onnx; -#[cfg(feature = "openvino")] +#[cfg(all(feature = "openvino", target_pointer_width = "64"))] pub mod openvino; #[cfg(feature = "pytorch")] pub mod pytorch; @@ -13,7 +13,7 @@ pub mod winml; #[cfg(feature = "onnx")] use self::onnx::OnnxBackend; -#[cfg(feature = "openvino")] +#[cfg(all(feature = "openvino", target_pointer_width = "64"))] use self::openvino::OpenvinoBackend; #[cfg(feature = "pytorch")] use self::pytorch::PytorchBackend; @@ -31,7 +31,8 @@ use wiggle::GuestError; /// Return a list of all available backend frameworks. pub fn list() -> Vec { let mut backends = vec![]; - #[cfg(feature = "openvino")] + let _ = &mut backends; // silence warnings if none are enabled + #[cfg(all(feature = "openvino", target_pointer_width = "64"))] { backends.push(Backend::from(OpenvinoBackend::default())); } @@ -120,6 +121,7 @@ pub enum BackendError { } /// Read a file into a byte vector. +#[allow(dead_code, reason = "not used on all platforms")] fn read(path: &Path) -> anyhow::Result> { let mut file = File::open(path)?; let mut buffer = vec![]; diff --git a/crates/wasmtime/src/compile.rs b/crates/wasmtime/src/compile.rs index 86339b44dba3..1222fb9607c4 100644 --- a/crates/wasmtime/src/compile.rs +++ b/crates/wasmtime/src/compile.rs @@ -80,8 +80,7 @@ pub(crate) fn build_artifacts( .context("failed to parse WebAssembly module")?; let functions = mem::take(&mut translation.function_body_inputs); - let compile_inputs = - CompileInputs::for_module(engine.compiler().triple(), &types, &translation, functions); + let compile_inputs = CompileInputs::for_module(&types, &translation, functions); let unlinked_compile_outputs = compile_inputs.compile(engine)?; let (compiled_funcs, function_indices) = unlinked_compile_outputs.pre_link(); @@ -324,9 +323,6 @@ struct CompileOutput { /// The collection of things we need to compile for a Wasm module or component. #[derive(Default)] struct CompileInputs<'a> { - // Whether or not we need to compile wasm-to-native trampolines. - need_wasm_to_array_trampolines: bool, - inputs: Vec>, } @@ -337,18 +333,11 @@ impl<'a> CompileInputs<'a> { /// Create the `CompileInputs` for a core Wasm module. fn for_module( - triple: &target_lexicon::Triple, types: &'a ModuleTypesBuilder, translation: &'a ModuleTranslation<'a>, functions: PrimaryMap>, ) -> Self { - let mut ret = CompileInputs { - need_wasm_to_array_trampolines: !matches!( - triple.architecture, - target_lexicon::Architecture::Pulley32 | target_lexicon::Architecture::Pulley64 - ), - inputs: vec![], - }; + let mut ret = CompileInputs { inputs: vec![] }; let module_index = StaticModuleIndex::from_u32(0); ret.collect_inputs_in_translations(types, [(module_index, translation, functions)]); @@ -370,14 +359,7 @@ impl<'a> CompileInputs<'a> { ), >, ) -> Self { - let triple = engine.compiler().triple(); - let mut ret = CompileInputs { - need_wasm_to_array_trampolines: !matches!( - triple.architecture, - target_lexicon::Architecture::Pulley32 | target_lexicon::Architecture::Pulley64 - ), - inputs: vec![], - }; + let mut ret = CompileInputs { inputs: vec![] }; ret.collect_inputs_in_translations(types.module_types_builder(), module_translations); let tunables = engine.tunables(); @@ -518,28 +500,25 @@ impl<'a> CompileInputs<'a> { } } - if self.need_wasm_to_array_trampolines { - let mut trampoline_types_seen = HashSet::new(); - for (_func_type_index, trampoline_type_index) in types.trampoline_types() { - let is_new = trampoline_types_seen.insert(trampoline_type_index); - if !is_new { - continue; - } - let trampoline_func_ty = types[trampoline_type_index].unwrap_func(); - self.push_input(move |compiler| { - let trampoline = - compiler.compile_wasm_to_array_trampoline(trampoline_func_ty)?; - Ok(CompileOutput { - key: CompileKey::wasm_to_array_trampoline(trampoline_type_index), - symbol: format!( - "signatures[{}]::wasm_to_array_trampoline", - trampoline_type_index.as_u32() - ), - function: CompiledFunction::Function(trampoline), - info: None, - }) - }); + let mut trampoline_types_seen = HashSet::new(); + for (_func_type_index, trampoline_type_index) in types.trampoline_types() { + let is_new = trampoline_types_seen.insert(trampoline_type_index); + if !is_new { + continue; } + let trampoline_func_ty = types[trampoline_type_index].unwrap_func(); + self.push_input(move |compiler| { + let trampoline = compiler.compile_wasm_to_array_trampoline(trampoline_func_ty)?; + Ok(CompileOutput { + key: CompileKey::wasm_to_array_trampoline(trampoline_type_index), + symbol: format!( + "signatures[{}]::wasm_to_array_trampoline", + trampoline_type_index.as_u32() + ), + function: CompiledFunction::Function(trampoline), + info: None, + }) + }); } } @@ -738,8 +717,7 @@ impl FunctionIndices { )?; } - let mut obj = - wasmtime_environ::ObjectBuilder::new(obj, tunables, compiler.triple().clone()); + let mut obj = wasmtime_environ::ObjectBuilder::new(obj, tunables); let mut artifacts = Artifacts::default(); // Remove this as it's not needed by anything below and we'll debug @@ -831,29 +809,23 @@ impl FunctionIndices { }) .collect(); - let wasm_to_array_trampolines = match engine.compiler().triple().architecture { - target_lexicon::Architecture::Pulley32 - | target_lexicon::Architecture::Pulley64 => vec![], - _ => { - let unique_and_sorted_trampoline_sigs = translation - .module - .types - .iter() - .map(|(_, ty)| *ty) - .filter(|idx| types[*idx].is_func()) - .map(|idx| types.trampoline_type(idx)) - .collect::>(); - unique_and_sorted_trampoline_sigs - .iter() - .map(|idx| { - let trampoline = types.trampoline_type(*idx); - let key = CompileKey::wasm_to_array_trampoline(trampoline); - let compiled = wasm_to_array_trampolines[&key]; - (*idx, symbol_ids_and_locs[compiled.unwrap_function()].1) - }) - .collect() - } - }; + let unique_and_sorted_trampoline_sigs = translation + .module + .types + .iter() + .map(|(_, ty)| *ty) + .filter(|idx| types[*idx].is_func()) + .map(|idx| types.trampoline_type(idx)) + .collect::>(); + let wasm_to_array_trampolines = unique_and_sorted_trampoline_sigs + .iter() + .map(|idx| { + let trampoline = types.trampoline_type(*idx); + let key = CompileKey::wasm_to_array_trampoline(trampoline); + let compiled = wasm_to_array_trampolines[&key]; + (*idx, symbol_ids_and_locs[compiled.unwrap_function()].1) + }) + .collect(); obj.append(translation, funcs, wasm_to_array_trampolines) }) diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index a2653bc06f19..0caf0ddcbb07 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -12,7 +12,7 @@ use wasmparser::WasmFeatures; #[cfg(feature = "cache")] use wasmtime_cache::CacheConfig; use wasmtime_continuations::WasmFXConfig; -use wasmtime_environ::{ConfigTunables, Tunables}; +use wasmtime_environ::{ConfigTunables, TripleExt, Tunables}; #[cfg(feature = "runtime")] use crate::memory::MemoryCreator; @@ -1977,42 +1977,24 @@ impl Config { fn compiler_panicking_wasm_features(&self) -> WasmFeatures { #[cfg(any(feature = "cranelift", feature = "winch"))] match self.compiler_config.strategy { - None | Some(Strategy::Cranelift) => match self.compiler_target().architecture { - // Pulley doesn't support most of wasm at this time and there's - // lots of panicking bits and pieces within the backend. This - // doesn't fully cover all panicking cases but it's at least a - // starting place to have a ratchet. As the pulley backend is - // developed this'll get filtered down over time. - target_lexicon::Architecture::Pulley32 | target_lexicon::Architecture::Pulley64 => { - WasmFeatures::SATURATING_FLOAT_TO_INT - | WasmFeatures::SIGN_EXTENSION - | WasmFeatures::REFERENCE_TYPES - | WasmFeatures::MULTI_VALUE - | WasmFeatures::BULK_MEMORY - | WasmFeatures::SIMD + None | Some(Strategy::Cranelift) => { + // Pulley is just starting and most errors are because of + // unsupported lowerings which is a first-class error. Some + // errors are panics though due to unimplemented bits in ABI + // code and those causes are listed here. + if self.compiler_target().is_pulley() { + return WasmFeatures::SIMD | WasmFeatures::RELAXED_SIMD - | WasmFeatures::THREADS - | WasmFeatures::SHARED_EVERYTHING_THREADS | WasmFeatures::TAIL_CALL | WasmFeatures::FLOATS - | WasmFeatures::MULTI_MEMORY - | WasmFeatures::EXCEPTIONS | WasmFeatures::MEMORY64 - | WasmFeatures::EXTENDED_CONST - | WasmFeatures::FUNCTION_REFERENCES - | WasmFeatures::MEMORY_CONTROL - | WasmFeatures::GC - | WasmFeatures::CUSTOM_PAGE_SIZES - | WasmFeatures::LEGACY_EXCEPTIONS - | WasmFeatures::GC_TYPES - | WasmFeatures::STACK_SWITCHING - | WasmFeatures::WIDE_ARITHMETIC + | WasmFeatures::GC_TYPES; } // Other Cranelift backends are either 100% missing or complete // at this time, so no need to further filter. - _ => WasmFeatures::empty(), - }, + WasmFeatures::empty() + } Some(Strategy::Winch) => { let mut unsupported = WasmFeatures::GC | WasmFeatures::FUNCTION_REFERENCES @@ -2095,21 +2077,30 @@ impl Config { features } + /// Returns the configured compiler target for this `Config`. fn compiler_target(&self) -> target_lexicon::Triple { + // If a target is explicitly configured, always use that. #[cfg(any(feature = "cranelift", feature = "winch"))] - { - let host = target_lexicon::Triple::host(); - - self.compiler_config - .target - .as_ref() - .unwrap_or(&host) - .clone() + if let Some(target) = self.compiler_config.target.clone() { + return target; } - #[cfg(not(any(feature = "cranelift", feature = "winch")))] - { - target_lexicon::Triple::host() + + // Without an explicitly configured target the goal is then to select + // some default which can reasonably run code on this host. If pulley is + // enabled and the host has no support at all in the cranelift/winch + // backends then pulley becomes the default target. This means, for + // example, that 32-bit platforms will default to running pulley at this + // time. + let any_compiler_support = cfg!(target_arch = "x86_64") + || cfg!(target_arch = "aarch64") + || cfg!(target_arch = "riscv64") + || cfg!(target_arch = "s390x"); + if !any_compiler_support && cfg!(feature = "pulley") { + return target_lexicon::Triple::pulley_host(); } + + // And at this point the target is for sure the host. + target_lexicon::Triple::host() } pub(crate) fn validate(&self) -> Result<(Tunables, WasmFeatures)> { @@ -2146,13 +2137,7 @@ impl Config { bail!("wmemcheck (memory checker) was requested but is not enabled in this build"); } - #[cfg(not(any(feature = "cranelift", feature = "winch")))] - let mut tunables = Tunables::default_host(); - #[cfg(any(feature = "cranelift", feature = "winch"))] - let mut tunables = match &self.compiler_config.target.as_ref() { - Some(target) => Tunables::default_for_target(target)?, - None => Tunables::default_host(), - }; + let mut tunables = Tunables::default_for_target(&self.compiler_target())?; // When signals-based traps are disabled use slightly different defaults // for tunables to be more amenable to `MallocMemory`. Note that these @@ -2287,15 +2272,28 @@ impl Config { tunables: &Tunables, features: WasmFeatures, ) -> Result<(Self, Box)> { - let target = self.compiler_config.target.clone(); + let target = self.compiler_target(); + + // The target passed to the builders below is an `Option` where + // `None` represents the current host with CPU features inferred from + // the host's CPU itself. The `target` above is not an `Option`, so + // switch it to `None` in the case that a target wasn't explicitly + // specified (which indicates no feature inference) and the target + // matches the host. + let target_for_builder = + if self.compiler_config.target.is_none() && target == target_lexicon::Triple::host() { + None + } else { + Some(target.clone()) + }; let mut compiler = match self.compiler_config.strategy { #[cfg(feature = "cranelift")] - Some(Strategy::Cranelift) => wasmtime_cranelift::builder(target)?, + Some(Strategy::Cranelift) => wasmtime_cranelift::builder(target_for_builder)?, #[cfg(not(feature = "cranelift"))] Some(Strategy::Cranelift) => bail!("cranelift support not compiled in"), #[cfg(feature = "winch")] - Some(Strategy::Winch) => wasmtime_winch::builder(target)?, + Some(Strategy::Winch) => wasmtime_winch::builder(target_for_builder)?, #[cfg(not(feature = "winch"))] Some(Strategy::Winch) => bail!("winch support not compiled in"), @@ -2313,8 +2311,6 @@ impl Config { .settings .insert("probestack_strategy".into(), "inline".into()); - let target = self.compiler_target(); - // We enable stack probing by default on all targets. // This is required on Windows because of the way Windows // commits its stacks, but it's also a good idea on other diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs index 048f79573278..627ffe7a5cb6 100644 --- a/crates/wasmtime/src/engine.rs +++ b/crates/wasmtime/src/engine.rs @@ -255,7 +255,8 @@ impl Engine { fn _check_compatible_with_native_host(&self) -> Result<(), String> { #[cfg(any(feature = "cranelift", feature = "winch"))] { - use target_lexicon::{Architecture, PointerWidth, Triple}; + use target_lexicon::Triple; + use wasmtime_environ::TripleExt; let compiler = self.compiler(); @@ -268,16 +269,18 @@ impl Engine { return true; } - // Otherwise if there's a mismatch the only allowed - // configuration at this time is that any target can run Pulley, - // Wasmtime's interpreter. This only works though if the - // pointer-width of pulley matches the pointer-width of the - // host, so check that here. - match host.pointer_width() { - Ok(PointerWidth::U32) => target.architecture == Architecture::Pulley32, - Ok(PointerWidth::U64) => target.architecture == Architecture::Pulley64, - _ => false, + // If there's a mismatch and the target is a compatible pulley + // target, then that's also ok to run. + if cfg!(feature = "pulley") + && target.is_pulley() + && target.pointer_width() == host.pointer_width() + && target.endianness() == host.endianness() + { + return true; } + + // ... otherwise everything else is considered not a match. + false }; if !target_matches_host() { @@ -497,6 +500,12 @@ impl Engine { "has_avx512vbmi" => "avx512vbmi", "has_lzcnt" => "lzcnt", + // pulley features + "big_endian" if cfg!(target_endian = "big") => return Ok(()), + "big_endian" if cfg!(target_endian = "little") => { + return Err("wrong host endianness".to_string()) + } + _ => { // FIXME: should enumerate risc-v features and plumb them // through to the `detect_host_feature` function. diff --git a/crates/wasmtime/src/engine/serialization.rs b/crates/wasmtime/src/engine/serialization.rs index 8f4617ec18d0..d60ffa207a2d 100644 --- a/crates/wasmtime/src/engine/serialization.rs +++ b/crates/wasmtime/src/engine/serialization.rs @@ -649,6 +649,8 @@ mod test { } #[test] + #[cfg(target_arch = "x86_64")] // test on a platform that is known to use + // Cranelift fn test_os_mismatch() -> Result<()> { let engine = Engine::default(); let mut metadata = Metadata::new(&engine); @@ -720,6 +722,7 @@ Caused by: #[test] #[cfg_attr(miri, ignore)] + #[cfg(target_pointer_width = "64")] // different defaults on 32-bit platforms fn test_tunables_int_mismatch() -> Result<()> { let engine = Engine::default(); let mut metadata = Metadata::new(&engine); @@ -770,6 +773,8 @@ Caused by: } #[test] + #[cfg(target_arch = "x86_64")] // test on a platform that is known to + // implement threads fn test_feature_mismatch() -> Result<()> { let mut config = Config::new(); config.wasm_threads(true); diff --git a/crates/wasmtime/src/runtime/component/func/host.rs b/crates/wasmtime/src/runtime/component/func/host.rs index d55ac2ce5237..1461554ad8a9 100644 --- a/crates/wasmtime/src/runtime/component/func/host.rs +++ b/crates/wasmtime/src/runtime/component/func/host.rs @@ -41,11 +41,11 @@ impl HostFunc { extern "C" fn entrypoint( cx: *mut VMOpaqueContext, data: *mut u8, - ty: TypeFuncIndex, - flags: InstanceFlags, + ty: u32, + flags: *mut u8, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, - string_encoding: StringEncoding, + string_encoding: u8, storage: *mut MaybeUninit, storage_len: usize, ) -> bool @@ -61,11 +61,11 @@ impl HostFunc { instance, types, store, - ty, - flags, + TypeFuncIndex::from_u32(ty), + InstanceFlags::from_raw(flags), memory, realloc, - string_encoding, + StringEncoding::from_u8(string_encoding).unwrap(), core::slice::from_raw_parts_mut(storage, storage_len), |store, args| (*data)(store, args), ) @@ -424,11 +424,11 @@ fn validate_inbounds_dynamic(abi: &CanonicalAbiInfo, memory: &[u8], ptr: &ValRaw extern "C" fn dynamic_entrypoint( cx: *mut VMOpaqueContext, data: *mut u8, - ty: TypeFuncIndex, - flags: InstanceFlags, + ty: u32, + flags: *mut u8, memory: *mut VMMemoryDefinition, realloc: *mut VMFuncRef, - string_encoding: StringEncoding, + string_encoding: u8, storage: *mut MaybeUninit, storage_len: usize, ) -> bool @@ -442,11 +442,11 @@ where instance, types, store, - ty, - flags, + TypeFuncIndex::from_u32(ty), + InstanceFlags::from_raw(flags), memory, realloc, - string_encoding, + StringEncoding::from_u8(string_encoding).unwrap(), core::slice::from_raw_parts_mut(storage, storage_len), |store, params, results| (*data)(store, params, results), ) diff --git a/crates/wasmtime/src/runtime/externals/table.rs b/crates/wasmtime/src/runtime/externals/table.rs index 6a38611032c8..1131921c1f7e 100644 --- a/crates/wasmtime/src/runtime/externals/table.rs +++ b/crates/wasmtime/src/runtime/externals/table.rs @@ -443,6 +443,7 @@ impl Table { mod tests { use super::*; use crate::{Instance, Module, Store}; + use wasmtime_environ::TripleExt; #[test] fn hash_key_is_stable_across_duplicate_store_data_entries() -> Result<()> { @@ -454,7 +455,20 @@ mod tests { (table (export "t") 1 1 externref) ) "#, - )?; + ); + // Expect this test to fail on pulley at this time. When pulley supports + // externref this should switch back to using `?` on the constructor + // above for all platforms. + let module = match module { + Ok(module) => { + assert!(!store.engine().target().is_pulley()); + module + } + Err(e) => { + assert!(store.engine().target().is_pulley(), "bad error {e:?}"); + return Ok(()); + } + }; let instance = Instance::new(&mut store, &module, &[])?; // Each time we `get_table`, we call `Table::from_wasmtime` which adds diff --git a/crates/wasmtime/src/runtime/func.rs b/crates/wasmtime/src/runtime/func.rs index 4f25f44d4d66..cce3a2821aeb 100644 --- a/crates/wasmtime/src/runtime/func.rs +++ b/crates/wasmtime/src/runtime/func.rs @@ -1,7 +1,7 @@ use crate::prelude::*; use crate::runtime::vm::{ - ExportFunction, SendSyncPtr, StoreBox, VMArrayCallHostFuncContext, VMContext, VMFuncRef, - VMFunctionImport, VMOpaqueContext, + ExportFunction, InterpreterRef, SendSyncPtr, StoreBox, VMArrayCallHostFuncContext, VMContext, + VMFuncRef, VMFunctionImport, VMOpaqueContext, }; use crate::runtime::Uninhabited; use crate::store::{AutoAssertNoGc, StoreData, StoreOpaque, Stored}; @@ -1070,10 +1070,12 @@ impl Func { ) -> Result<()> { invoke_wasm_and_catch_traps( store, - |caller| { - func_ref - .as_ref() - .array_call(caller.cast::(), params_and_returns) + |caller, vm| { + func_ref.as_ref().array_call( + vm, + VMOpaqueContext::from_vmcontext(caller), + params_and_returns, + ) }, func_ref.as_ref().vmctx, ) @@ -1597,7 +1599,7 @@ impl Func { /// can pass to the called wasm function, if desired. pub(crate) fn invoke_wasm_and_catch_traps( store: &mut StoreContextMut<'_, T>, - closure: impl FnMut(*mut VMContext) -> bool, + closure: impl FnMut(*mut VMContext, Option>) -> bool, callee: *mut VMOpaqueContext, ) -> Result<()> { unsafe { diff --git a/crates/wasmtime/src/runtime/func/typed.rs b/crates/wasmtime/src/runtime/func/typed.rs index 8adeb877ce88..12ae93eada07 100644 --- a/crates/wasmtime/src/runtime/func/typed.rs +++ b/crates/wasmtime/src/runtime/func/typed.rs @@ -214,7 +214,7 @@ where let result = invoke_wasm_and_catch_traps( store, - |caller| { + |caller, vm| { let (func_ref, storage) = &mut captures; let storage_len = mem::size_of_val::>(storage) / mem::size_of::(); @@ -223,7 +223,7 @@ where let storage = core::ptr::slice_from_raw_parts_mut(storage, storage_len); func_ref .as_ref() - .array_call(VMOpaqueContext::from_vmcontext(caller), storage) + .array_call(vm, VMOpaqueContext::from_vmcontext(caller), storage) }, vmctx, ); diff --git a/crates/wasmtime/src/runtime/instance.rs b/crates/wasmtime/src/runtime/instance.rs index 85a5fcc29e89..e48ebc39ead3 100644 --- a/crates/wasmtime/src/runtime/instance.rs +++ b/crates/wasmtime/src/runtime/instance.rs @@ -365,10 +365,12 @@ impl Instance { unsafe { super::func::invoke_wasm_and_catch_traps( store, - |_default_caller| { - f.func_ref - .as_ref() - .array_call(VMOpaqueContext::from_vmcontext(caller_vmctx), &mut []) + |_default_caller, vm| { + f.func_ref.as_ref().array_call( + vm, + VMOpaqueContext::from_vmcontext(caller_vmctx), + &mut [], + ) }, callee_vmctx, )?; diff --git a/crates/wasmtime/src/runtime/module/registry.rs b/crates/wasmtime/src/runtime/module/registry.rs index 194ff9206aa9..c14ff1d9bcc2 100644 --- a/crates/wasmtime/src/runtime/module/registry.rs +++ b/crates/wasmtime/src/runtime/module/registry.rs @@ -256,7 +256,6 @@ type GlobalRegistry = BTreeMap)>; /// Find which registered region of code contains the given program counter, and /// what offset that PC is within that module's code. -#[cfg(all(feature = "signals-based-traps", not(miri)))] pub fn lookup_code(pc: usize) -> Option<(Arc, usize)> { let all_modules = global_code().read(); let (_end, (start, module)) = all_modules.range(pc..).next()?; @@ -300,6 +299,8 @@ pub fn unregister_code(code: &Arc) { #[cfg_attr(miri, ignore)] fn test_frame_info() -> Result<(), anyhow::Error> { use crate::*; + use wasmtime_environ::TripleExt; + let mut store = Store::<()>::default(); let module = Module::new( store.engine(), @@ -314,7 +315,20 @@ fn test_frame_info() -> Result<(), anyhow::Error> { (func (export "rem_u") (param $x i32) (param $y i32) (result i32) (i32.rem_u (local.get $x) (local.get $y))) ) "#, - )?; + ); + // Expect this test to fail on pulley at this time. When pulley supports + // the instructions above this should switch back to using `?` on the + // constructor above for all platforms. + let module = match module { + Ok(module) => { + assert!(!store.engine().target().is_pulley()); + module + } + Err(e) => { + assert!(store.engine().target().is_pulley(), "bad error {e:?}"); + return Ok(()); + } + }; // Create an instance to ensure the frame information is registered. Instance::new(&mut store, &module, &[])?; diff --git a/crates/wasmtime/src/runtime/profiling.rs b/crates/wasmtime/src/runtime/profiling.rs index fded2a481779..eeaa315c6dd8 100644 --- a/crates/wasmtime/src/runtime/profiling.rs +++ b/crates/wasmtime/src/runtime/profiling.rs @@ -137,7 +137,7 @@ impl GuestProfiler { let now = Timestamp::from_nanos_since_reference( self.start.elapsed().as_nanos().try_into().unwrap(), ); - let backtrace = Backtrace::new(store.as_context().0.vmruntime_limits()); + let backtrace = Backtrace::new(store.as_context().0); let frames = lookup_frames(&self.modules, &backtrace); self.profile .add_sample(self.thread, now, frames, delta.into(), 1); @@ -154,7 +154,7 @@ impl GuestProfiler { match kind { CallHook::CallingWasm | CallHook::ReturningFromWasm => {} CallHook::CallingHost => { - let backtrace = Backtrace::new(store.as_context().0.vmruntime_limits()); + let backtrace = Backtrace::new(store.as_context().0); let frames = lookup_frames(&self.modules, &backtrace); self.profile.add_marker_with_stack( self.thread, diff --git a/crates/wasmtime/src/runtime/store.rs b/crates/wasmtime/src/runtime/store.rs index f6a794912e1f..c969a8bc464e 100644 --- a/crates/wasmtime/src/runtime/store.rs +++ b/crates/wasmtime/src/runtime/store.rs @@ -85,8 +85,9 @@ use crate::runtime::vm::continuation::stack_chain::{StackChain, StackChainCell}; use crate::runtime::vm::mpk::{self, ProtectionKey, ProtectionMask}; use crate::runtime::vm::{ Backtrace, ExportGlobal, GcRootsList, GcStore, InstanceAllocationRequest, InstanceAllocator, - InstanceHandle, ModuleRuntimeInfo, OnDemandInstanceAllocator, SignalHandler, StoreBox, - StorePtr, VMContext, VMFuncRef, VMGcRef, VMRuntimeLimits, + InstanceHandle, Interpreter, InterpreterRef, ModuleRuntimeInfo, OnDemandInstanceAllocator, + SignalHandler, StoreBox, StorePtr, Unwind, UnwindHost, UnwindPulley, VMContext, VMFuncRef, + VMGcRef, VMRuntimeLimits, }; use crate::trampoline::VMHostGlobalContext; use crate::type_registry::RegisteredType; @@ -105,6 +106,7 @@ use core::pin::Pin; use core::ptr; use core::task::{Context, Poll}; use wasmtime_continuations::{CommonStackInformation, WasmFXConfig}; +use wasmtime_environ::TripleExt; mod context; pub use self::context::*; @@ -404,6 +406,11 @@ pub struct StoreOpaque { component_calls: crate::runtime::vm::component::CallContexts, #[cfg(feature = "component-model")] host_resource_data: crate::component::HostResourceData, + + /// State related to the Pulley interpreter if that's enabled and configured + /// for this store's `Engine`. This is `None` if pulley was disabled at + /// compile time or if it's not being used by the `Engine`. + interpreter: Option, } #[cfg(feature = "async")] @@ -594,6 +601,11 @@ impl Store { component_calls: Default::default(), #[cfg(feature = "component-model")] host_resource_data: Default::default(), + interpreter: if cfg!(feature = "pulley") && engine.target().is_pulley() { + Some(Interpreter::new()) + } else { + None + }, }, limiter: None, call_hook: None, @@ -1756,7 +1768,7 @@ impl StoreOpaque { log::trace!("Begin trace GC roots :: Wasm stack"); - Backtrace::trace(self.vmruntime_limits().cast_const(), |frame| { + Backtrace::trace(self, |frame| { let pc = frame.pc(); debug_assert!(pc != 0, "we should always get a valid PC for Wasm frames"); @@ -2014,7 +2026,6 @@ impl StoreOpaque { /// with spectre mitigations enabled since the hardware fault address is /// always zero in these situations which means that the trapping context /// doesn't have enough information to report the fault address. - #[cfg(all(feature = "signals-based-traps", not(miri)))] pub(crate) fn wasm_fault( &self, pc: usize, @@ -2175,6 +2186,19 @@ at https://bytecodealliance.org/security. } } } + + pub(crate) fn interpreter(&mut self) -> Option> { + let i = self.interpreter.as_mut()?; + Some(i.as_interpreter_ref()) + } + + pub(crate) fn unwinder(&self) -> &'static dyn Unwind { + if self.interpreter.is_some() { + &UnwindPulley + } else { + &UnwindHost + } + } } impl StoreContextMut<'_, T> { diff --git a/crates/wasmtime/src/runtime/trampoline/memory.rs b/crates/wasmtime/src/runtime/trampoline/memory.rs index 51fc3a9ed5d7..dd2f93f178bb 100644 --- a/crates/wasmtime/src/runtime/trampoline/memory.rs +++ b/crates/wasmtime/src/runtime/trampoline/memory.rs @@ -3,7 +3,7 @@ use crate::prelude::*; use crate::runtime::vm::mpk::ProtectionKey; use crate::runtime::vm::{ CompiledModuleId, GcHeapAllocationIndex, Imports, InstanceAllocationRequest, InstanceAllocator, - InstanceAllocatorImpl, Memory, MemoryAllocationIndex, ModuleRuntimeInfo, + InstanceAllocatorImpl, Memory, MemoryAllocationIndex, MemoryBase, ModuleRuntimeInfo, OnDemandInstanceAllocator, RuntimeLinearMemory, RuntimeMemoryCreator, SharedMemory, StorePtr, Table, TableAllocationIndex, }; @@ -89,8 +89,8 @@ impl RuntimeLinearMemory for LinearMemoryProxy { self.mem.grow_to(new_size) } - fn base_ptr(&self) -> *mut u8 { - self.mem.as_ptr() + fn base(&self) -> MemoryBase { + MemoryBase::new_raw(self.mem.as_ptr()) } } diff --git a/crates/wasmtime/src/runtime/trap.rs b/crates/wasmtime/src/runtime/trap.rs index 358a96519abb..413cb33f8dfc 100644 --- a/crates/wasmtime/src/runtime/trap.rs +++ b/crates/wasmtime/src/runtime/trap.rs @@ -93,7 +93,6 @@ pub(crate) fn from_runtime_box( // otherwise the information about what the wasm was doing when the // error was generated would be lost. crate::runtime::vm::TrapReason::User(error) => (error, None), - #[cfg(all(feature = "signals-based-traps", not(miri)))] crate::runtime::vm::TrapReason::Jit { pc, faulting_addr, @@ -258,11 +257,7 @@ impl WasmBacktrace { /// always captures a backtrace. pub fn force_capture(store: impl AsContext) -> WasmBacktrace { let store = store.as_context(); - Self::from_captured( - store.0, - crate::runtime::vm::Backtrace::new(store.0.runtime_limits()), - None, - ) + Self::from_captured(store.0, crate::runtime::vm::Backtrace::new(store.0), None) } fn from_captured( diff --git a/crates/wasmtime/src/runtime/values.rs b/crates/wasmtime/src/runtime/values.rs index 724a1f7bf4f8..0e766dde1b14 100644 --- a/crates/wasmtime/src/runtime/values.rs +++ b/crates/wasmtime/src/runtime/values.rs @@ -1025,26 +1025,38 @@ mod tests { fn size_of_val() { // Try to keep tabs on the size of `Val` and make sure we don't grow its // size. - assert_eq!( - std::mem::size_of::(), - if cfg!(any( - target_arch = "x86_64", - target_arch = "aarch64", - target_arch = "riscv64", - target_arch = "s390x" - )) { - 24 - } else { - panic!("unsupported architecture") - } - ); + let expected = if cfg!(target_arch = "x86_64") + || cfg!(target_arch = "aarch64") + || cfg!(target_arch = "s390x") + || cfg!(target_arch = "riscv64") + || cfg!(target_arch = "arm") + { + 24 + } else if cfg!(target_arch = "x86") { + 20 + } else { + panic!("unsupported architecture") + }; + assert_eq!(std::mem::size_of::(), expected); } #[test] fn size_of_ref() { // Try to keep tabs on the size of `Ref` and make sure we don't grow its // size. - assert_eq!(std::mem::size_of::(), 24); + let expected = if cfg!(target_arch = "x86_64") + || cfg!(target_arch = "aarch64") + || cfg!(target_arch = "s390x") + || cfg!(target_arch = "riscv64") + || cfg!(target_arch = "arm") + { + 24 + } else if cfg!(target_arch = "x86") { + 20 + } else { + panic!("unsupported architecture") + }; + assert_eq!(std::mem::size_of::(), expected); } #[test] diff --git a/crates/wasmtime/src/runtime/vm.rs b/crates/wasmtime/src/runtime/vm.rs index 67217e4870d7..c68c399a0f35 100644 --- a/crates/wasmtime/src/runtime/vm.rs +++ b/crates/wasmtime/src/runtime/vm.rs @@ -37,6 +37,7 @@ mod store_box; mod sys; mod table; mod traphandlers; +mod unwind; mod vmcontext; pub mod continuation; @@ -49,6 +50,13 @@ pub mod fibre; pub mod libcalls; pub mod mpk; +#[cfg(feature = "pulley")] +pub(crate) mod interpreter; +#[cfg(not(feature = "pulley"))] +pub(crate) mod interpreter_disabled; +#[cfg(not(feature = "pulley"))] +pub(crate) use interpreter_disabled as interpreter; + #[cfg(feature = "debug-builtins")] pub use wasmtime_jit_debug::gdb_jit_int::GdbJitImageRegistration; @@ -67,8 +75,9 @@ pub use crate::runtime::vm::instance::{ InstanceLimits, PoolConcurrencyLimitError, PoolingInstanceAllocator, PoolingInstanceAllocatorConfig, }; +pub use crate::runtime::vm::interpreter::*; pub use crate::runtime::vm::memory::{ - Memory, RuntimeLinearMemory, RuntimeMemoryCreator, SharedMemory, + Memory, MemoryBase, RuntimeLinearMemory, RuntimeMemoryCreator, SharedMemory, }; pub use crate::runtime::vm::mmap_vec::MmapVec; pub use crate::runtime::vm::mpk::MpkEnabled; @@ -78,6 +87,7 @@ pub use crate::runtime::vm::sys::mmap::open_file_for_mmap; pub use crate::runtime::vm::sys::unwind::UnwindRegistration; pub use crate::runtime::vm::table::{Table, TableElement}; pub use crate::runtime::vm::traphandlers::*; +pub use crate::runtime::vm::unwind::*; pub use crate::runtime::vm::vmcontext::{ VMArrayCallFunction, VMArrayCallHostFuncContext, VMContext, VMFuncRef, VMFunctionBody, VMFunctionImport, VMGlobalDefinition, VMGlobalImport, VMMemoryDefinition, VMMemoryImport, @@ -102,7 +112,7 @@ mod mmap; cfg_if::cfg_if! { if #[cfg(feature = "signals-based-traps")] { pub use crate::runtime::vm::byte_count::*; - pub use crate::runtime::vm::mmap::Mmap; + pub use crate::runtime::vm::mmap::{Mmap, MmapOffset}; pub use self::cow::{MemoryImage, MemoryImageSlot, ModuleMemoryImages}; } else { pub use self::cow_disabled::{MemoryImage, MemoryImageSlot, ModuleMemoryImages}; diff --git a/crates/wasmtime/src/runtime/vm/arch/x86_64.rs b/crates/wasmtime/src/runtime/vm/arch/arm.rs similarity index 78% rename from crates/wasmtime/src/runtime/vm/arch/x86_64.rs rename to crates/wasmtime/src/runtime/vm/arch/arm.rs index f8091400bfe9..2d6a90edc3ad 100644 --- a/crates/wasmtime/src/runtime/vm/arch/x86_64.rs +++ b/crates/wasmtime/src/runtime/vm/arch/arm.rs @@ -1,4 +1,4 @@ -//! x86_64-specific definitions of architecture-specific functions in Wasmtime. +//! arm-specific definitions of architecture-specific functions in Wasmtime. #[inline] #[allow(missing_docs)] @@ -6,7 +6,7 @@ pub fn get_stack_pointer() -> usize { let stack_pointer: usize; unsafe { core::arch::asm!( - "mov {}, rsp", + "mov {}, sp", out(reg) stack_pointer, options(nostack,nomem), ); @@ -24,5 +24,5 @@ pub unsafe fn get_next_older_pc_from_fp(fp: usize) -> usize { pub const NEXT_OLDER_FP_FROM_FP_OFFSET: usize = 0; pub fn assert_fp_is_aligned(fp: usize) { - assert_eq!(fp % 16, 0, "stack should always be aligned to 16"); + assert_eq!(fp % 8, 0, "stack should always be aligned to 8"); } diff --git a/crates/wasmtime/src/runtime/vm/arch/mod.rs b/crates/wasmtime/src/runtime/vm/arch/mod.rs index adb346ceffe3..a8d481f45121 100644 --- a/crates/wasmtime/src/runtime/vm/arch/mod.rs +++ b/crates/wasmtime/src/runtime/vm/arch/mod.rs @@ -8,9 +8,9 @@ //! crate. cfg_if::cfg_if! { - if #[cfg(target_arch = "x86_64")] { - mod x86_64; - use x86_64 as imp; + if #[cfg(any(target_arch = "x86_64", target_arch = "x86"))] { + mod x86; + use x86 as imp; } else if #[cfg(target_arch = "aarch64")] { mod aarch64; use aarch64 as imp; @@ -20,6 +20,9 @@ cfg_if::cfg_if! { } else if #[cfg(target_arch = "riscv64")] { mod riscv64; use riscv64 as imp; + } else if #[cfg(target_arch = "arm")] { + mod arm; + use arm as imp; } else { mod unsupported; use unsupported as imp; diff --git a/crates/wasmtime/src/runtime/vm/arch/unsupported.rs b/crates/wasmtime/src/runtime/vm/arch/unsupported.rs index 7f7759fa4a77..19aca0a3761f 100644 --- a/crates/wasmtime/src/runtime/vm/arch/unsupported.rs +++ b/crates/wasmtime/src/runtime/vm/arch/unsupported.rs @@ -1,15 +1,7 @@ compile_error!("Wasmtime's runtime is being compiled for an architecture that it does not support"); cfg_if::cfg_if! { - if #[cfg(target_arch = "x86")] { - compile_error!("\ -the tracking issue for i686 support is https://github.com/bytecodealliance/wasmtime/issues/1980 \ -"); - } else if #[cfg(target_arch = "arm")] { - compile_error!("\ -the tracking issue for arm support is https://github.com/bytecodealliance/wasmtime/issues/1173 \ -"); - } else if #[cfg(target_arch = "riscv32")] { + if #[cfg(target_arch = "riscv32")] { compile_error!("\ the tracking issue for riscv32 support is https://github.com/bytecodealliance/wasmtime/issues/8768 \ "); diff --git a/crates/wasmtime/src/runtime/vm/arch/x86.rs b/crates/wasmtime/src/runtime/vm/arch/x86.rs new file mode 100644 index 000000000000..fff57a539e40 --- /dev/null +++ b/crates/wasmtime/src/runtime/vm/arch/x86.rs @@ -0,0 +1,39 @@ +//! x86-specific (also x86-64) definitions of architecture-specific functions in +//! Wasmtime. + +#[inline] +#[allow(missing_docs)] +pub fn get_stack_pointer() -> usize { + let stack_pointer: usize; + unsafe { + #[cfg(target_pointer_width = "64")] + core::arch::asm!( + "mov {}, rsp", + out(reg) stack_pointer, + options(nostack,nomem), + ); + #[cfg(target_pointer_width = "32")] + core::arch::asm!( + "mov {}, esp", + out(reg) stack_pointer, + options(nostack,nomem), + ); + } + stack_pointer +} + +pub unsafe fn get_next_older_pc_from_fp(fp: usize) -> usize { + // The calling convention always pushes the return pointer (aka the PC of + // the next older frame) just before this frame. + *(fp as *mut usize).offset(1) +} + +// And the current frame pointer points to the next older frame pointer. +pub const NEXT_OLDER_FP_FROM_FP_OFFSET: usize = 0; + +/// Frame pointers are aligned if they're aligned to twice the size of a +/// pointer. +pub fn assert_fp_is_aligned(fp: usize) { + let align = 2 * size_of::(); + assert_eq!(fp % align, 0, "stack should always be aligned to {align}"); +} diff --git a/crates/wasmtime/src/runtime/vm/component.rs b/crates/wasmtime/src/runtime/vm/component.rs index b06296f85802..813416e134b0 100644 --- a/crates/wasmtime/src/runtime/vm/component.rs +++ b/crates/wasmtime/src/runtime/vm/component.rs @@ -109,11 +109,11 @@ pub struct ComponentInstance { pub type VMLoweringCallee = extern "C" fn( vmctx: *mut VMOpaqueContext, data: *mut u8, - ty: TypeFuncIndex, - flags: InstanceFlags, + ty: u32, + flags: *mut u8, opt_memory: *mut VMMemoryDefinition, opt_realloc: *mut VMFuncRef, - string_encoding: StringEncoding, + string_encoding: u8, args_and_results: *mut mem::MaybeUninit, nargs_and_results: usize, ) -> bool; @@ -441,7 +441,7 @@ impl ComponentInstance { unsafe fn initialize_vmctx(&mut self, store: *mut dyn VMStore) { *self.vmctx_plus_offset_mut(self.offsets.magic()) = VMCOMPONENT_MAGIC; - *self.vmctx_plus_offset_mut(self.offsets.libcalls()) = &libcalls::VMComponentLibcalls::INIT; + *self.vmctx_plus_offset_mut(self.offsets.builtins()) = &libcalls::VMComponentBuiltins::INIT; *self.vmctx_plus_offset_mut(self.offsets.store()) = store; *self.vmctx_plus_offset_mut(self.offsets.limits()) = (*store).vmruntime_limits(); @@ -802,6 +802,16 @@ pub struct InstanceFlags(SendSyncPtr); #[allow(missing_docs)] impl InstanceFlags { + /// Wraps the given pointer as an `InstanceFlags` + /// + /// # Unsafety + /// + /// This is a raw pointer argument which needs to be valid for the lifetime + /// that `InstanceFlags` is used. + pub unsafe fn from_raw(ptr: *mut u8) -> InstanceFlags { + InstanceFlags(SendSyncPtr::new(NonNull::new(ptr.cast()).unwrap())) + } + #[inline] pub unsafe fn may_leave(&self) -> bool { *(*self.as_raw()).as_i32() & FLAG_MAY_LEAVE != 0 diff --git a/crates/wasmtime/src/runtime/vm/component/libcalls.rs b/crates/wasmtime/src/runtime/vm/component/libcalls.rs index 31671f5fe6a6..94d83babe75f 100644 --- a/crates/wasmtime/src/runtime/vm/component/libcalls.rs +++ b/crates/wasmtime/src/runtime/vm/component/libcalls.rs @@ -2,25 +2,14 @@ use crate::prelude::*; use crate::runtime::vm::component::{ComponentInstance, VMComponentContext}; +use crate::runtime::vm::HostResultHasUnwindSentinel; use core::cell::Cell; +use core::convert::Infallible; use core::slice; use wasmtime_environ::component::TypeResourceTableIndex; const UTF16_TAG: usize = 1 << 31; -#[repr(C)] // this is read by Cranelift code so it's layout must be as-written -pub struct VMComponentLibcalls { - builtins: VMComponentBuiltins, - transcoders: VMBuiltinTranscodeArray, -} - -impl VMComponentLibcalls { - pub const INIT: VMComponentLibcalls = VMComponentLibcalls { - builtins: VMComponentBuiltins::INIT, - transcoders: VMBuiltinTranscodeArray::INIT, - }; -} - macro_rules! signature { (@ty size) => (usize); (@ty ptr_u8) => (*mut u8); @@ -29,6 +18,7 @@ macro_rules! signature { (@ty u8) => (u8); (@ty u32) => (u32); (@ty u64) => (u64); + (@ty bool) => (bool); (@ty vmctx) => (*mut VMComponentContext); } @@ -44,7 +34,7 @@ macro_rules! define_builtins { /// An array that stores addresses of builtin functions. We translate code /// to use indirect calls. This way, we don't have to patch the code. #[repr(C)] - struct VMComponentBuiltins { + pub struct VMComponentBuiltins { $( $name: unsafe extern "C" fn( $(signature!(@ty $param),)* @@ -53,7 +43,7 @@ macro_rules! define_builtins { } impl VMComponentBuiltins { - const INIT: VMComponentBuiltins = VMComponentBuiltins { + pub const INIT: VMComponentBuiltins = VMComponentBuiltins { $($name: trampolines::$name,)* }; } @@ -62,43 +52,6 @@ macro_rules! define_builtins { wasmtime_environ::foreach_builtin_component_function!(define_builtins); -/// Macro to define the `VMBuiltinTranscodeArray` type which contains all of the -/// function pointers to the actual transcoder functions. This structure is read -/// by Cranelift-generated code, hence the `repr(C)`. -/// -/// Note that this references the `trampolines` module rather than the functions -/// below as the `trampolines` module has the raw ABI. -/// -/// This is modeled after the similar macros and usages in `libcalls.rs` and -/// `vmcontext.rs` -macro_rules! define_transcoders { - ( - $( - $( #[$attr:meta] )* - $name:ident( $( $pname:ident: $param:ident ),* ) $( -> $result:ident )?; - )* - ) => { - /// An array that stores addresses of builtin functions. We translate code - /// to use indirect calls. This way, we don't have to patch the code. - #[repr(C)] - struct VMBuiltinTranscodeArray { - $( - $name: unsafe extern "C" fn( - $(signature!(@ty $param),)* - ) $( -> signature!(@ty $result))?, - )* - } - - impl VMBuiltinTranscodeArray { - const INIT: VMBuiltinTranscodeArray = VMBuiltinTranscodeArray { - $($name: trampolines::$name,)* - }; - } - }; -} - -wasmtime_environ::foreach_transcoder!(define_transcoders); - /// Submodule with macro-generated constants which are the actual libcall /// transcoders that are invoked by Cranelift. These functions have a specific /// ABI defined by the macro itself and will defer to the actual bodies of each @@ -115,27 +68,15 @@ mod trampolines { )* ) => ( $( - #[allow(deprecated)] // FIXME: need to update this pub unsafe extern "C" fn $name( $($pname : signature!(@ty $param),)* ) $( -> signature!(@ty $result))? { $(shims!(@validate_param $pname $param);)* - // Always catch panics to avoid trying to unwind from Rust - // into Cranelift-generated code which would lead to a Bad - // Time. - // - // Additionally assume that every function below returns a - // `Result` where errors turn into traps. - let result = crate::runtime::vm::traphandlers::catch_unwind_and_longjmp(|| { + let ret = crate::runtime::vm::traphandlers::catch_unwind_and_record_trap(|| { shims!(@invoke $name() $($pname)*) }); - match result { - Ok(ret) => shims!(@convert_ret ret $($pname: $param)*), - Err(err) => crate::runtime::vm::traphandlers::raise_trap( - crate::runtime::vm::traphandlers::TrapReason::User(err) - ), - } + shims!(@convert_ret ret $($pname: $param)*) } )* ); @@ -176,7 +117,6 @@ mod trampolines { } wasmtime_environ::foreach_builtin_component_function!(shims); - wasmtime_environ::foreach_transcoder!(shims); } /// This property should already be guaranteed by construction in the component @@ -269,18 +209,28 @@ unsafe fn latin1_to_utf16(src: *mut u8, len: usize, dst: *mut u16) -> Result<()> Ok(()) } +struct CopySizeReturn(usize); + +unsafe impl HostResultHasUnwindSentinel for CopySizeReturn { + type Abi = usize; + const SENTINEL: usize = usize::MAX; + fn into_abi(self) -> usize { + self.0 + } +} + /// Converts utf8 to utf16. /// /// The length provided is the same unit length of both buffers, and the /// returned value from this function is how many u16 units were written. -unsafe fn utf8_to_utf16(src: *mut u8, len: usize, dst: *mut u16) -> Result { +unsafe fn utf8_to_utf16(src: *mut u8, len: usize, dst: *mut u16) -> Result { let src = slice::from_raw_parts(src, len); let dst = slice::from_raw_parts_mut(dst, len); assert_no_overlap(src, dst); let result = run_utf8_to_utf16(src, dst)?; log::trace!("utf8-to-utf16 {len} => {result}"); - Ok(result) + Ok(CopySizeReturn(result)) } fn run_utf8_to_utf16(src: &[u8], dst: &mut [u16]) -> Result { @@ -293,6 +243,19 @@ fn run_utf8_to_utf16(src: &[u8], dst: &mut [u16]) -> Result { Ok(amt) } +struct SizePair { + src_read: usize, + dst_written: usize, +} + +unsafe impl HostResultHasUnwindSentinel for SizePair { + type Abi = (usize, usize); + const SENTINEL: (usize, usize) = (usize::MAX, 0); + fn into_abi(self) -> (usize, usize) { + (self.src_read, self.dst_written) + } +} + /// Converts utf16 to utf8. /// /// Each buffer is specified independently here and the returned value is a pair @@ -304,7 +267,7 @@ unsafe fn utf16_to_utf8( src_len: usize, dst: *mut u8, dst_len: usize, -) -> Result<(usize, usize)> { +) -> Result { let src = slice::from_raw_parts(src, src_len); let mut dst = slice::from_raw_parts_mut(dst, dst_len); assert_no_overlap(src, dst); @@ -340,7 +303,10 @@ unsafe fn utf16_to_utf8( } log::trace!("utf16-to-utf8 {src_len}/{dst_len} => {src_read}/{dst_written}"); - Ok((src_read, dst_written)) + Ok(SizePair { + src_read, + dst_written, + }) } /// Converts latin1 to utf8. @@ -354,13 +320,16 @@ unsafe fn latin1_to_utf8( src_len: usize, dst: *mut u8, dst_len: usize, -) -> Result<(usize, usize)> { +) -> Result { let src = slice::from_raw_parts(src, src_len); let dst = slice::from_raw_parts_mut(dst, dst_len); assert_no_overlap(src, dst); let (read, written) = encoding_rs::mem::convert_latin1_to_utf8_partial(src, dst); log::trace!("latin1-to-utf8 {src_len}/{dst_len} => ({read}, {written})"); - Ok((read, written)) + Ok(SizePair { + src_read: read, + dst_written: written, + }) } /// Converts utf16 to "latin1+utf16", probably using a utf16 encoding. @@ -374,7 +343,7 @@ unsafe fn utf16_to_compact_probably_utf16( src: *mut u16, len: usize, dst: *mut u16, -) -> Result { +) -> Result { let src = slice::from_raw_parts(src, len); let dst = slice::from_raw_parts_mut(dst, len); assert_no_overlap(src, dst); @@ -387,10 +356,10 @@ unsafe fn utf16_to_compact_probably_utf16( dst[i] = dst[2 * i]; } log::trace!("utf16-to-compact-probably-utf16 {len} => latin1 {len}"); - Ok(len) + Ok(CopySizeReturn(len)) } else { log::trace!("utf16-to-compact-probably-utf16 {len} => utf16 {len}"); - Ok(len | UTF16_TAG) + Ok(CopySizeReturn(len | UTF16_TAG)) } } @@ -404,20 +373,23 @@ unsafe fn utf16_to_compact_probably_utf16( /// /// Note that this may not convert the entire source into the destination if the /// original utf8 string has usvs not representable in latin1. -unsafe fn utf8_to_latin1(src: *mut u8, len: usize, dst: *mut u8) -> Result<(usize, usize)> { +unsafe fn utf8_to_latin1(src: *mut u8, len: usize, dst: *mut u8) -> Result { let src = slice::from_raw_parts(src, len); let dst = slice::from_raw_parts_mut(dst, len); assert_no_overlap(src, dst); let read = encoding_rs::mem::utf8_latin1_up_to(src); let written = encoding_rs::mem::convert_utf8_to_latin1_lossy(&src[..read], dst); log::trace!("utf8-to-latin1 {len} => ({read}, {written})"); - Ok((read, written)) + Ok(SizePair { + src_read: read, + dst_written: written, + }) } /// Converts a utf16 string to latin1 /// /// This is the same as `utf8_to_latin1` in terms of parameters/results. -unsafe fn utf16_to_latin1(src: *mut u16, len: usize, dst: *mut u8) -> Result<(usize, usize)> { +unsafe fn utf16_to_latin1(src: *mut u16, len: usize, dst: *mut u8) -> Result { let src = slice::from_raw_parts(src, len); let dst = slice::from_raw_parts_mut(dst, len); assert_no_overlap(src, dst); @@ -432,7 +404,10 @@ unsafe fn utf16_to_latin1(src: *mut u16, len: usize, dst: *mut u8) -> Result<(us size += 1; } log::trace!("utf16-to-latin1 {len} => {size}"); - Ok((size, size)) + Ok(SizePair { + src_read: size, + dst_written: size, + }) } /// Converts a utf8 string to a utf16 string which has been partially converted @@ -456,7 +431,7 @@ unsafe fn utf8_to_compact_utf16( dst: *mut u16, dst_len: usize, latin1_bytes_so_far: usize, -) -> Result { +) -> Result { let src = slice::from_raw_parts(src, src_len); let dst = slice::from_raw_parts_mut(dst, dst_len); assert_no_overlap(src, dst); @@ -464,7 +439,7 @@ unsafe fn utf8_to_compact_utf16( let dst = inflate_latin1_bytes(dst, latin1_bytes_so_far); let result = run_utf8_to_utf16(src, dst)?; log::trace!("utf8-to-compact-utf16 {src_len}/{dst_len}/{latin1_bytes_so_far} => {result}"); - Ok(result + latin1_bytes_so_far) + Ok(CopySizeReturn(result + latin1_bytes_so_far)) } /// Same as `utf8_to_compact_utf16` but for utf16 source strings. @@ -474,7 +449,7 @@ unsafe fn utf16_to_compact_utf16( dst: *mut u16, dst_len: usize, latin1_bytes_so_far: usize, -) -> Result { +) -> Result { let src = slice::from_raw_parts(src, src_len); let dst = slice::from_raw_parts_mut(dst, dst_len); assert_no_overlap(src, dst); @@ -483,7 +458,7 @@ unsafe fn utf16_to_compact_utf16( run_utf16_to_utf16(src, dst)?; let result = src.len(); log::trace!("utf16-to-compact-utf16 {src_len}/{dst_len}/{latin1_bytes_so_far} => {result}"); - Ok(result + latin1_bytes_so_far) + Ok(CopySizeReturn(result + latin1_bytes_so_far)) } /// Inflates the `latin1_bytes_so_far` number of bytes written to the beginning @@ -521,14 +496,28 @@ unsafe fn resource_rep32(vmctx: *mut VMComponentContext, resource: u32, idx: u32 ComponentInstance::from_vmctx(vmctx, |instance| instance.resource_rep32(resource, idx)) } -unsafe fn resource_drop(vmctx: *mut VMComponentContext, resource: u32, idx: u32) -> Result { +unsafe fn resource_drop( + vmctx: *mut VMComponentContext, + resource: u32, + idx: u32, +) -> Result { let resource = TypeResourceTableIndex::from_u32(resource); ComponentInstance::from_vmctx(vmctx, |instance| { - Ok(match instance.resource_drop(resource, idx)? { + Ok(ResourceDropRet(instance.resource_drop(resource, idx)?)) + }) +} + +struct ResourceDropRet(Option); + +unsafe impl HostResultHasUnwindSentinel for ResourceDropRet { + type Abi = u64; + const SENTINEL: u64 = u64::MAX; + fn into_abi(self) -> u64 { + match self.0 { Some(rep) => (u64::from(rep) << 1) | 1, None => 0, - }) - }) + } + } } unsafe fn resource_transfer_own( @@ -557,14 +546,14 @@ unsafe fn resource_transfer_borrow( }) } -unsafe fn resource_enter_call(vmctx: *mut VMComponentContext) -> Result<()> { - ComponentInstance::from_vmctx(vmctx, |instance| Ok(instance.resource_enter_call())) +unsafe fn resource_enter_call(vmctx: *mut VMComponentContext) { + ComponentInstance::from_vmctx(vmctx, |instance| instance.resource_enter_call()) } unsafe fn resource_exit_call(vmctx: *mut VMComponentContext) -> Result<()> { ComponentInstance::from_vmctx(vmctx, |instance| instance.resource_exit_call()) } -unsafe fn trap(_vmctx: *mut VMComponentContext, code: u8) -> Result<()> { +unsafe fn trap(_vmctx: *mut VMComponentContext, code: u8) -> Result { Err(wasmtime_environ::Trap::from_u8(code).unwrap().into()) } diff --git a/crates/wasmtime/src/runtime/vm/continuation.rs b/crates/wasmtime/src/runtime/vm/continuation.rs index 9a16bc157290..68a7ef9411d0 100644 --- a/crates/wasmtime/src/runtime/vm/continuation.rs +++ b/crates/wasmtime/src/runtime/vm/continuation.rs @@ -250,7 +250,7 @@ pub mod optimized { let red_zone_size = wasmfx_config.red_zone_size; let (contref, mut stack) = instance.wasmfx_allocate_continuation().map_err(|_error| { - TrapReason::user(anyhow::anyhow!("Fiber stack allocation failed!")) + TrapReason::User(anyhow::anyhow!("Fiber stack allocation failed!")) })?; let tsp = stack.top().unwrap(); @@ -430,7 +430,7 @@ pub mod baseline { let (contref, fiber) = { let (contref, stack) = instance .wasmfx_allocate_continuation() - .map_err(|error| TrapReason::user(error.into()))?; + .map_err(|error| TrapReason::User(error.into()))?; let fiber = match unsafe { func.cast::().as_ref() } { None => Fiber::new(stack, |_instance: &mut Instance, _suspend: &mut Yield| { @@ -449,6 +449,7 @@ pub mod baseline { // embedded in. (*get_current_continuation()).suspend = suspend as *mut Yield; let _result = func_ref.array_call( + None, caller_ctx, std::slice::from_raw_parts_mut(vals_ptr, capacity), ); @@ -464,7 +465,7 @@ pub mod baseline { ) } }; - let fiber = fiber.map_err(|error| TrapReason::user(error.into()))?; + let fiber = fiber.map_err(|error| TrapReason::User(error.into()))?; (contref, fiber) }; diff --git a/crates/wasmtime/src/runtime/vm/cow.rs b/crates/wasmtime/src/runtime/vm/cow.rs index 37ba1864c140..db9ddc3952c0 100644 --- a/crates/wasmtime/src/runtime/vm/cow.rs +++ b/crates/wasmtime/src/runtime/vm/cow.rs @@ -8,11 +8,10 @@ use super::sys::DecommitBehavior; use crate::prelude::*; use crate::runtime::vm::sys::vm::{self, MemoryImageSource}; -use crate::runtime::vm::{host_page_size, HostAlignedByteCount, MmapVec, SendSyncPtr}; +use crate::runtime::vm::{host_page_size, HostAlignedByteCount, MmapOffset, MmapVec}; use alloc::sync::Arc; -use core::ffi::c_void; use core::ops::Range; -use core::ptr::{self, NonNull}; +use core::ptr; use wasmtime_environ::{DefinedMemoryIndex, MemoryInitialization, Module, PrimaryMap, Tunables}; /// Backing images for memories in a module. @@ -131,13 +130,13 @@ impl MemoryImage { Ok(None) } - unsafe fn map_at(&self, base: *mut u8) -> Result<()> { - self.source.map_at( - base.add(self.linear_memory_offset.byte_count()), - self.len.byte_count(), + unsafe fn map_at(&self, mmap_base: &MmapOffset) -> Result<()> { + mmap_base.map_image_at( + &self.source, self.source_offset, - )?; - Ok(()) + self.linear_memory_offset, + self.len, + ) } unsafe fn remap_as_zeros_at(&self, base: *mut u8) -> Result<()> { @@ -283,10 +282,9 @@ impl ModuleMemoryImages { /// with a fresh zero'd mmap, meaning that reuse is effectively not supported. #[derive(Debug)] pub struct MemoryImageSlot { - /// The base address in virtual memory of the actual heap memory. - /// - /// Bytes at this address are what is seen by the Wasm guest code. - base: SendSyncPtr, + /// The mmap and offset within it that contains the linear memory for this + /// slot. + base: MmapOffset, /// The maximum static memory size which `self.accessible` can grow to. static_size: usize, @@ -337,12 +335,12 @@ impl MemoryImageSlot { /// and all memory from `accessible` from `static_size` should be mapped as /// `PROT_NONE` backed by zero-bytes. pub(crate) fn create( - base_addr: *mut c_void, + base: MmapOffset, accessible: HostAlignedByteCount, static_size: usize, ) -> Self { MemoryImageSlot { - base: NonNull::new(base_addr.cast()).unwrap().into(), + base, static_size, accessible, image: None, @@ -463,7 +461,7 @@ impl MemoryImageSlot { ); if !image.len.is_zero() { unsafe { - image.map_at(self.base.as_ptr())?; + image.map_at(&self.base)?; } } } @@ -480,7 +478,7 @@ impl MemoryImageSlot { pub(crate) fn remove_image(&mut self) -> Result<()> { if let Some(image) = &self.image { unsafe { - image.remap_as_zeros_at(self.base.as_ptr())?; + image.remap_as_zeros_at(self.base.as_mut_ptr())?; } self.image = None; } @@ -589,7 +587,7 @@ impl MemoryImageSlot { // This is memset (1) ptr::write_bytes( - self.base.as_ptr(), + self.base.as_mut_ptr(), 0u8, image.linear_memory_offset.byte_count(), ); @@ -603,7 +601,7 @@ impl MemoryImageSlot { // This is memset (3) ptr::write_bytes( - self.base.as_ptr().add(image_end.byte_count()), + self.base.as_mut_ptr().add(image_end.byte_count()), 0u8, remaining_memset.byte_count(), ); @@ -639,7 +637,7 @@ impl MemoryImageSlot { // Note that the memset may be zero bytes here. // This is memset (1) - ptr::write_bytes(self.base.as_ptr(), 0u8, keep_resident.byte_count()); + ptr::write_bytes(self.base.as_mut_ptr(), 0u8, keep_resident.byte_count()); // This is madvise (2) self.restore_original_mapping( @@ -657,7 +655,7 @@ impl MemoryImageSlot { // the rest. None => { let size_to_memset = keep_resident.min(self.accessible); - ptr::write_bytes(self.base.as_ptr(), 0u8, size_to_memset.byte_count()); + ptr::write_bytes(self.base.as_mut_ptr(), 0u8, size_to_memset.byte_count()); self.restore_original_mapping( size_to_memset, self.accessible @@ -685,7 +683,10 @@ impl MemoryImageSlot { vm::decommit_behavior(), DecommitBehavior::RestoreOriginalMapping ); - decommit(self.base.as_ptr().add(base.byte_count()), len.byte_count()); + decommit( + self.base.as_mut_ptr().add(base.byte_count()), + len.byte_count(), + ); } fn set_protection(&self, range: Range, readwrite: bool) -> Result<()> { @@ -701,7 +702,7 @@ impl MemoryImageSlot { // TODO: use Mmap to change memory permissions instead of these free // functions. unsafe { - let start = self.base.as_ptr().add(range.start.byte_count()); + let start = self.base.as_mut_ptr().add(range.start.byte_count()); if readwrite { vm::expose_existing_mapping(start, len.byte_count())?; } else { @@ -731,7 +732,7 @@ impl MemoryImageSlot { } unsafe { - vm::erase_existing_mapping(self.base.as_ptr(), self.static_size)?; + vm::erase_existing_mapping(self.base.as_mut_ptr(), self.static_size)?; } self.image = None; @@ -852,11 +853,8 @@ mod test { // 4 MiB mmap'd area, not accessible let mmap = mmap_4mib_inaccessible(); // Create a MemoryImageSlot on top of it - let mut memfd = MemoryImageSlot::create( - mmap.as_mut_ptr() as *mut _, - HostAlignedByteCount::ZERO, - 4 << 20, - ); + let mut memfd = + MemoryImageSlot::create(mmap.zero_offset(), HostAlignedByteCount::ZERO, 4 << 20); memfd.no_clear_on_drop(); assert!(!memfd.is_dirty()); // instantiate with 64 KiB initial size @@ -903,11 +901,8 @@ mod test { // 4 MiB mmap'd area, not accessible let mmap = mmap_4mib_inaccessible(); // Create a MemoryImageSlot on top of it - let mut memfd = MemoryImageSlot::create( - mmap.as_mut_ptr() as *mut _, - HostAlignedByteCount::ZERO, - 4 << 20, - ); + let mut memfd = + MemoryImageSlot::create(mmap.zero_offset(), HostAlignedByteCount::ZERO, 4 << 20); memfd.no_clear_on_drop(); // Create an image with some data. let image = Arc::new(create_memfd_with_data(page_size, &[1, 2, 3, 4]).unwrap()); @@ -996,11 +991,8 @@ mod test { ..Tunables::default_miri() }; let mmap = mmap_4mib_inaccessible(); - let mut memfd = MemoryImageSlot::create( - mmap.as_mut_ptr() as *mut _, - HostAlignedByteCount::ZERO, - 4 << 20, - ); + let mut memfd = + MemoryImageSlot::create(mmap.zero_offset(), HostAlignedByteCount::ZERO, 4 << 20); memfd.no_clear_on_drop(); // Test basics with the image @@ -1066,11 +1058,8 @@ mod test { }; let mmap = mmap_4mib_inaccessible(); - let mut memfd = MemoryImageSlot::create( - mmap.as_mut_ptr() as *mut _, - HostAlignedByteCount::ZERO, - 4 << 20, - ); + let mut memfd = + MemoryImageSlot::create(mmap.zero_offset(), HostAlignedByteCount::ZERO, 4 << 20); memfd.no_clear_on_drop(); let image = Arc::new(create_memfd_with_data(page_size, &[1, 2, 3, 4]).unwrap()); let initial = 64 << 10; diff --git a/crates/wasmtime/src/runtime/vm/fibre/unix.rs b/crates/wasmtime/src/runtime/vm/fibre/unix.rs index cd0e73c3acc1..408c7a7c9276 100644 --- a/crates/wasmtime/src/runtime/vm/fibre/unix.rs +++ b/crates/wasmtime/src/runtime/vm/fibre/unix.rs @@ -278,8 +278,8 @@ extern "C" fn fiber_start( // since the caller vmctx is only really used to access stuff in the // underlying `Store`, it's fine to be slightly sloppy about the exact // value we set. - func_ref.array_call(caller_vmxtx, params_and_returns); // TODO(dhil): we are ignoring the boolean return value - // here... we probably shouldn't. + func_ref.array_call(None, caller_vmxtx, params_and_returns); // TODO(dhil): we are ignoring the boolean return value + // here... we probably shouldn't. // Switch back to parent, indicating that the continuation returned. switch_to_parent(top_of_stack); diff --git a/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs b/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs index fa2b0d933c40..8dc3fbb5dc3e 100644 --- a/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs +++ b/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs @@ -985,6 +985,7 @@ impl DerefMut for DebugOnly { #[cfg(test)] mod tests { use super::*; + use wasmtime_environ::HostPtr; #[test] fn vm_drc_header_size_align() { @@ -1019,7 +1020,7 @@ mod tests { let actual_offset = (ref_count_ptr as usize) - (extern_data_ptr as usize); let offsets = wasmtime_environ::VMOffsets::from(wasmtime_environ::VMOffsetsFields { - ptr: 8, + ptr: HostPtr, num_imported_functions: 0, num_imported_tables: 0, num_imported_memories: 0, @@ -1049,7 +1050,7 @@ mod tests { let actual_offset = (next_ptr as usize) - (table_ptr as usize); let offsets = wasmtime_environ::VMOffsets::from(wasmtime_environ::VMOffsetsFields { - ptr: 8, + ptr: HostPtr, num_imported_functions: 0, num_imported_tables: 0, num_imported_memories: 0, @@ -1078,7 +1079,7 @@ mod tests { let actual_offset = (end_ptr as usize) - (table_ptr as usize); let offsets = wasmtime_environ::VMOffsets::from(wasmtime_environ::VMOffsetsFields { - ptr: 8, + ptr: HostPtr, num_imported_functions: 0, num_imported_tables: 0, num_imported_memories: 0, diff --git a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling.rs b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling.rs index 8259d3e27e98..7e54c041a240 100644 --- a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling.rs +++ b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling.rs @@ -699,6 +699,7 @@ unsafe impl InstanceAllocatorImpl for PoolingInstanceAllocator { } #[cfg(test)] +#[cfg(target_pointer_width = "64")] mod test { use super::*; diff --git a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/memory_pool.rs b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/memory_pool.rs index 581d92526583..26f7ef764ad4 100644 --- a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/memory_pool.rs +++ b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/memory_pool.rs @@ -57,13 +57,12 @@ use super::{ use crate::prelude::*; use crate::runtime::vm::{ mmap::AlignedLength, CompiledModuleId, InstanceAllocationRequest, InstanceLimits, Memory, - MemoryImageSlot, Mmap, MpkEnabled, PoolingInstanceAllocatorConfig, + MemoryBase, MemoryImageSlot, Mmap, MmapOffset, MpkEnabled, PoolingInstanceAllocatorConfig, }; use crate::{ runtime::vm::mpk::{self, ProtectionKey, ProtectionMask}, vm::HostAlignedByteCount, }; -use std::ffi::c_void; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Arc, Mutex}; use wasmtime_environ::{DefinedMemoryIndex, Module, Tunables}; @@ -357,7 +356,7 @@ impl MemoryPool { <= u64::try_from(self.layout.bytes_to_next_stripe_slot().byte_count()).unwrap() ); - let base_ptr = self.get_base(allocation_index); + let base = self.get_base(allocation_index); let base_capacity = self.layout.max_memory_bytes; let mut slot = self.take_memory_image_slot(allocation_index); @@ -385,7 +384,7 @@ impl MemoryPool { Memory::new_static( ty, tunables, - base_ptr, + MemoryBase::Mmap(base), base_capacity.byte_count(), slot, unsafe { &mut *request.store.get().unwrap() }, @@ -471,7 +470,7 @@ impl MemoryPool { } } - fn get_base(&self, allocation_index: MemoryAllocationIndex) -> *mut u8 { + fn get_base(&self, allocation_index: MemoryAllocationIndex) -> MmapOffset { assert!(allocation_index.index() < self.layout.num_slots); let offset = self .layout @@ -479,12 +478,7 @@ impl MemoryPool { .checked_mul(allocation_index.index()) .and_then(|c| c.checked_add(self.layout.pre_slab_guard_bytes)) .expect("slot_bytes * index + pre_slab_guard_bytes overflows"); - unsafe { - self.mapping - .as_ptr() - .offset(offset.byte_count() as isize) - .cast_mut() - } + self.mapping.offset(offset).expect("offset is in bounds") } /// Take ownership of the given image slot. Must be returned via @@ -497,7 +491,7 @@ impl MemoryPool { maybe_slot.unwrap_or_else(|| { MemoryImageSlot::create( - self.get_base(allocation_index) as *mut c_void, + self.get_base(allocation_index), HostAlignedByteCount::ZERO, self.layout.max_memory_bytes.byte_count(), ) @@ -822,7 +816,7 @@ mod tests { for i in 0..5 { let index = MemoryAllocationIndex(i); - let ptr = pool.get_base(index); + let ptr = pool.get_base(index).as_mut_ptr(); assert_eq!( ptr as usize - base, i as usize * pool.layout.slot_bytes.byte_count() @@ -887,8 +881,23 @@ mod tests { guard_bytes, guard_before_slots, }; - let layout = calculate(&constraints); - assert_slab_layout_invariants(constraints, layout.unwrap()); + match calculate(&constraints) { + Ok(layout) => { + assert_slab_layout_invariants(constraints, layout) + } + Err(e) => { + // Only allow failure on 32-bit + // platforms where the calculation + // exceeded the size of the addres + // space + assert!( + cfg!(target_pointer_width = "32") + && e.to_string() + .contains("exceeds addressable memory"), + "bad error: {e:?}" + ); + } + } } } } diff --git a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/table_pool.rs b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/table_pool.rs index 197ceb900e13..12c78116e79c 100644 --- a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/table_pool.rs +++ b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/table_pool.rs @@ -223,7 +223,6 @@ mod tests { use super::*; use crate::runtime::vm::InstanceLimits; - #[cfg(target_pointer_width = "64")] #[test] fn test_table_pool() -> Result<()> { let pool = TablePool::new(&PoolingInstanceAllocatorConfig { diff --git a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/unix_stack_pool.rs b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/unix_stack_pool.rs index c4ef3fd91bd1..ef15b03b28ae 100644 --- a/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/unix_stack_pool.rs +++ b/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/unix_stack_pool.rs @@ -239,12 +239,11 @@ impl StackPool { } } -#[cfg(test)] +#[cfg(all(test, unix, feature = "async", not(miri)))] mod tests { use super::*; use crate::runtime::vm::InstanceLimits; - #[cfg(all(unix, target_pointer_width = "64", feature = "async", not(miri)))] #[test] fn test_stack_pool() -> Result<()> { let config = PoolingInstanceAllocatorConfig { diff --git a/crates/wasmtime/src/runtime/vm/interpreter.rs b/crates/wasmtime/src/runtime/vm/interpreter.rs new file mode 100644 index 000000000000..c12c21e74efa --- /dev/null +++ b/crates/wasmtime/src/runtime/vm/interpreter.rs @@ -0,0 +1,324 @@ +use crate::prelude::*; +use crate::runtime::vm::vmcontext::VMArrayCallNative; +use crate::runtime::vm::{tls, TrapRegisters, TrapTest, VMContext, VMOpaqueContext}; +use crate::ValRaw; +use core::ptr::NonNull; +use pulley_interpreter::interp::{DoneReason, RegType, Val, Vm, XRegVal}; +use pulley_interpreter::{Reg, XReg}; +use wasmtime_environ::{BuiltinFunctionIndex, HostCall}; + +/// Interpreter state stored within a `Store`. +#[repr(transparent)] +pub struct Interpreter { + /// Pulley VM state, stored behind a `Box` to make the storage in + /// `Store` only pointer-sized (that way if you enable pulley but don't + /// use it it's low-overhead). + pulley: Box, +} + +impl Interpreter { + /// Creates a new interpreter ready to interpret code. + pub fn new() -> Interpreter { + Interpreter { + pulley: Box::new(Vm::new()), + } + } + + /// Returns the `InterpreterRef` structure which can be used to actually + /// execute interpreted code. + pub fn as_interpreter_ref(&mut self) -> InterpreterRef<'_> { + InterpreterRef(&mut self.pulley) + } +} + +/// Wrapper around `&mut pulley_interpreter::Vm` to enable compiling this to a +/// zero-sized structure when pulley is disabled at compile time. +#[repr(transparent)] +pub struct InterpreterRef<'a>(&'a mut Vm); + +#[derive(Clone, Copy)] +struct Setjmp { + sp: *mut u8, + fp: *mut u8, + lr: *mut u8, +} + +impl InterpreterRef<'_> { + /// Invokes interpreted code. + /// + /// The `bytecode` pointer should previously have been produced by Cranelift + /// and `callee` / `caller` / `args_and_results` are normal array-call + /// arguments being passed around. + pub unsafe fn call( + mut self, + mut bytecode: NonNull, + callee: *mut VMOpaqueContext, + caller: *mut VMOpaqueContext, + args_and_results: *mut [ValRaw], + ) -> bool { + // Initialize argument registers with the ABI arguments. + let args = [ + XRegVal::new_ptr(callee).into(), + XRegVal::new_ptr(caller).into(), + XRegVal::new_ptr(args_and_results.cast::()).into(), + XRegVal::new_u64(args_and_results.len() as u64).into(), + ]; + self.0.call_start(&args); + + // Fake a "poor man's setjmp" for now by saving some critical context to + // get restored when a trap happens. This pseudo-implements the stack + // unwinding necessary for a trap. + // + // See more comments in `trap` below about how this isn't actually + // correct as it's not saving all callee-save state. + let setjmp = Setjmp { + sp: self.0[XReg::sp].get_ptr(), + fp: self.0[XReg::fp].get_ptr(), + lr: self.0[XReg::lr].get_ptr(), + }; + + // Run the interpreter as much as possible until it finishes, and then + // handle each finish condition differently. + let ret = loop { + match self.0.call_run(bytecode) { + // If the VM returned entirely then read the return value and + // return that (it indicates whether a trap happened or not. + DoneReason::ReturnToHost(()) => { + match self.0.call_end([RegType::XReg]).next().unwrap() { + #[allow( + clippy::cast_possible_truncation, + reason = "intentionally reading the lower bits only" + )] + Val::XReg(xreg) => break (xreg.get_u32() as u8) != 0, + _ => unreachable!(), + } + } + // If the VM wants to call out to the host then dispatch that + // here based on `sig`. Once that returns we can resume + // execution at `resume`. + DoneReason::CallIndirectHost { id, resume } => { + self.call_indirect_host(id); + bytecode = resume; + } + // If the VM trapped then process that here and return `false`. + DoneReason::Trap(pc) => { + self.trap(pc, setjmp); + break false; + } + } + }; + + debug_assert!(self.0[XReg::sp].get_ptr() == setjmp.sp); + debug_assert!(self.0[XReg::fp].get_ptr() == setjmp.fp); + debug_assert!(self.0[XReg::lr].get_ptr() == setjmp.lr); + ret + } + + /// Handles an interpreter trap. This will initialize the trap state stored + /// in TLS via the `test_if_trap` helper below by reading the pc/fp of the + /// interpreter and seeing if that's a valid opcode to trap at. + fn trap(&mut self, pc: NonNull, setjmp: Setjmp) { + let result = tls::with(|s| { + let s = s.unwrap(); + s.test_if_trap( + TrapRegisters { + pc: pc.as_ptr() as usize, + fp: self.0[XReg::fp].get_ptr::() as usize, + }, + None, + |_| false, + ) + }); + + match result { + // This shouldn't be possible, so this is a fatal error if it + // happens. + TrapTest::NotWasm => panic!("pulley trap at {pc:?} without trap code registered"), + + // Not possible with our closure above returning `false`. + TrapTest::HandledByEmbedder => unreachable!(), + + // Trap was handled, yay! We don't use `jmp_buf`. + TrapTest::Trap { jmp_buf: _ } => {} + } + + // Perform a "longjmp" by restoring the "setjmp" context saved when this + // started. + // + // FIXME: this is not restoring callee-save state. For example if + // there's more than one Pulley activation on the stack that means that + // the previous one is expecting the callee (the host) to preserve all + // callee-save registers. That's not restored here which means with + // multiple activations we're effectively corrupting callee-save + // registers. + // + // One fix for this is to possibly update the `SystemV` ABI on pulley to + // have no callee-saved registers and make everything caller-saved. That + // would force all trampolines to save all state which is basically + // what we want as they'll naturally restore state if we later return to + // them. + let Setjmp { sp, fp, lr } = setjmp; + self.0[XReg::sp].set_ptr(sp); + self.0[XReg::fp].set_ptr(fp); + self.0[XReg::lr].set_ptr(lr); + } + + /// Handles the `call_indirect_host` instruction, dispatching the `sig` + /// number here which corresponds to `wasmtime_environ::HostCall`. + #[allow( + clippy::cast_possible_truncation, + clippy::cast_sign_loss, + reason = "macro-generated code" + )] + unsafe fn call_indirect_host(&mut self, id: u8) { + let id = u32::from(id); + let fnptr = self.0[XReg::x0].get_ptr::(); + let mut arg_reg = 1; + + /// Helper macro to invoke a builtin. + /// + /// Used as: + /// + /// `call(@builtin(ty1, ty2, ...) -> retty)` - invoke a core or + /// component builtin with the macro-defined signature. + /// + /// `call(@host Ty(ty1, ty2, ...) -> retty)` - invoke a host function + /// with the type `Ty`. The other types in the macro are checked by + /// rustc to match the actual `Ty` definition in Rust. + macro_rules! call { + (@builtin($($param:ident),*) $(-> $result:ident)?) => {{ + type T = unsafe extern "C" fn($(call!(@ty $param)),*) $(-> call!(@ty $result))?; + call!(@host T($($param),*) $(-> $result)?); + }}; + (@host $ty:ident($($param:ident),*) $(-> $result:ident)?) => {{ + // Convert the pointer from pulley to a native function pointer. + union GetNative { + fnptr: *mut u8, + host: $ty, + } + let host = GetNative { fnptr }.host; + + // Decode each argument according to this macro, pulling + // arguments from successive registers. + let ret = host($({ + let reg = XReg::new(arg_reg).unwrap(); + arg_reg += 1; + call!(@get $param reg) + }),*); + let _ = arg_reg; // silence last dead arg_reg increment warning + + // Store the return value, if one is here, in x0. + $( + let dst = XReg::x0; + call!(@set $result dst ret); + )? + let _ = ret; // silence warning if no return value + + // Return from the outer `call_indirect_host` host function as + // it's been processed. + return; + }}; + + // Conversion from macro-defined types to Rust host types. + (@ty bool) => (bool); + (@ty u8) => (u8); + (@ty u32) => (u32); + (@ty i32) => (i32); + (@ty u64) => (u64); + (@ty i64) => (i64); + (@ty vmctx) => (*mut VMContext); + (@ty pointer) => (*mut u8); + (@ty ptr_u8) => (*mut u8); + (@ty ptr_u16) => (*mut u16); + (@ty ptr_size) => (*mut usize); + (@ty size) => (usize); + + // Conversion from a pulley register value to the macro-defined + // type. + (@get u8 $reg:ident) => (self.0[$reg].get_i32() as u8); + (@get u32 $reg:ident) => (self.0[$reg].get_u32()); + (@get i32 $reg:ident) => (self.0[$reg].get_i32()); + (@get i64 $reg:ident) => (self.0[$reg].get_i64()); + (@get vmctx $reg:ident) => (self.0[$reg].get_ptr()); + (@get pointer $reg:ident) => (self.0[$reg].get_ptr()); + (@get ptr $reg:ident) => (self.0[$reg].get_ptr()); + (@get ptr_u8 $reg:ident) => (self.0[$reg].get_ptr()); + (@get ptr_u16 $reg:ident) => (self.0[$reg].get_ptr()); + (@get ptr_size $reg:ident) => (self.0[$reg].get_ptr()); + (@get size $reg:ident) => (self.0[$reg].get_ptr::() as usize); + + // Conversion from a Rust value back into a macro-defined type, + // stored in a pulley register. + (@set bool $reg:ident $val:ident) => (self.0[$reg].set_i32(i32::from($val))); + (@set i32 $reg:ident $val:ident) => (self.0[$reg].set_i32($val)); + (@set u64 $reg:ident $val:ident) => (self.0[$reg].set_u64($val)); + (@set i64 $reg:ident $val:ident) => (self.0[$reg].set_i64($val)); + (@set pointer $reg:ident $val:ident) => (self.0[$reg].set_ptr($val)); + (@set size $reg:ident $val:ident) => (self.0[$reg].set_ptr($val as *mut u8)); + } + + // With the helper macro above structure this into: + // + // foreach [core, component] + // * dispatch the call-the-host function pointer type + // * dispatch all builtins by their index. + // + // The hope is that this is relatively easy for LLVM to optimize since + // it's a bunch of: + // + // if id == 0 { ...; return; } + // if id == 1 { ...; return; } + // if id == 2 { ...; return; } + // ... + // + + if id == const { HostCall::ArrayCall.index() } { + call!(@host VMArrayCallNative(ptr, ptr, ptr, size) -> bool); + } + + macro_rules! core { + ( + $( + $( #[cfg($attr:meta)] )? + $name:ident($($pname:ident: $param:ident ),* ) $(-> $result:ident)?; + )* + ) => { + $( + $( #[cfg($attr)] )? + if id == const { HostCall::Builtin(BuiltinFunctionIndex::$name()).index() } { + call!(@builtin($($param),*) $(-> $result)?); + } + )* + } + } + wasmtime_environ::foreach_builtin_function!(core); + + #[cfg(feature = "component-model")] + { + use crate::runtime::vm::component::VMLoweringCallee; + use wasmtime_environ::component::ComponentBuiltinFunctionIndex; + + if id == const { HostCall::ComponentLowerImport.index() } { + call!(@host VMLoweringCallee(ptr, ptr, u32, ptr, ptr, ptr, u8, ptr, size) -> bool); + } + + macro_rules! component { + ( + $( + $name:ident($($pname:ident: $param:ident ),* ) $(-> $result:ident)?; + )* + ) => { + $( + if id == const { HostCall::ComponentBuiltin(ComponentBuiltinFunctionIndex::$name()).index() } { + call!(@builtin($($param),*) $(-> $result)?); + } + )* + } + } + wasmtime_environ::foreach_builtin_component_function!(component); + } + + // if we got this far then something has gone seriously wrong. + unreachable!() + } +} diff --git a/crates/wasmtime/src/runtime/vm/interpreter_disabled.rs b/crates/wasmtime/src/runtime/vm/interpreter_disabled.rs new file mode 100644 index 000000000000..d410c2cb1bbc --- /dev/null +++ b/crates/wasmtime/src/runtime/vm/interpreter_disabled.rs @@ -0,0 +1,49 @@ +//! Stubs for when pulley is disabled at compile time. +//! +//! Note that this is structured so that these structures are all zero-sized and +//! `Option` is also zero-sized so there should be no runtime cost for +//! having these structures plumbed around. + +use crate::runtime::vm::VMOpaqueContext; +use crate::runtime::Uninhabited; +use crate::ValRaw; +use core::marker; +use core::mem; +use core::ptr::NonNull; + +pub struct Interpreter { + empty: Uninhabited, +} + +const _: () = assert!(mem::size_of::() == 0); +const _: () = assert!(mem::size_of::>() == 0); + +impl Interpreter { + pub fn new() -> Interpreter { + unreachable!() + } + + pub fn as_interpreter_ref(&mut self) -> InterpreterRef<'_> { + match self.empty {} + } +} + +pub struct InterpreterRef<'a> { + empty: Uninhabited, + _marker: marker::PhantomData<&'a mut Interpreter>, +} + +const _: () = assert!(mem::size_of::>() == 0); +const _: () = assert!(mem::size_of::>>() == 0); + +impl InterpreterRef<'_> { + pub unsafe fn call( + self, + _bytecode: NonNull, + _callee: *mut VMOpaqueContext, + _caller: *mut VMOpaqueContext, + _args_and_results: *mut [ValRaw], + ) -> bool { + match self.empty {} + } +} diff --git a/crates/wasmtime/src/runtime/vm/libcalls.rs b/crates/wasmtime/src/runtime/vm/libcalls.rs index 31a1ef633a7a..a2ce4af65e98 100644 --- a/crates/wasmtime/src/runtime/vm/libcalls.rs +++ b/crates/wasmtime/src/runtime/vm/libcalls.rs @@ -59,7 +59,8 @@ use super::continuation::VMContObj; use crate::prelude::*; use crate::runtime::vm::table::{Table, TableElementType}; use crate::runtime::vm::vmcontext::VMFuncRef; -use crate::runtime::vm::{Instance, TrapReason, VMGcRef, VMStore}; +use crate::runtime::vm::{HostResultHasUnwindSentinel, Instance, TrapReason, VMGcRef, VMStore}; +use core::convert::Infallible; use core::ptr::NonNull; #[cfg(feature = "threads")] use core::time::Duration; @@ -83,19 +84,21 @@ use wasmtime_wmemcheck::AccessError::{ /// such. /// * This module delegates to the outer module (this file) which has the actual /// implementation. +/// +/// For more information on converting from host-defined values to Cranelift ABI +/// values see the `catch_unwind_and_record_trap` function. pub mod raw { // Allow these things because of the macro and how we can't differentiate // between doc comments and `cfg`s. #![allow(unused_doc_comments, unused_attributes)] - use crate::runtime::vm::{InstanceAndStore, TrapReason, VMContext}; - use core::ptr::NonNull; + use crate::runtime::vm::{InstanceAndStore, VMContext}; macro_rules! libcall { ( $( $( #[cfg($attr:meta)] )? - $name:ident( vmctx: vmctx $(, $pname:ident: $param:ident )* ) $( -> $result:ident )?; + $name:ident( vmctx: vmctx $(, $pname:ident: $param:ident )* ) $(-> $result:ident)?; )* ) => { $( @@ -109,19 +112,15 @@ pub mod raw { pub unsafe extern "C" fn $name( vmctx: *mut VMContext, $( $pname : libcall!(@ty $param), )* - ) $( -> libcall!(@ty $result))? { + ) $(-> libcall!(@ty $result))? { $(#[cfg($attr)])? { - #[allow(deprecated)] // FIXME: need to update this - let ret = crate::runtime::vm::traphandlers::catch_unwind_and_longjmp(|| { + crate::runtime::vm::traphandlers::catch_unwind_and_record_trap(|| { InstanceAndStore::from_vmctx(vmctx, |pair| { - { - let (instance, store) = pair.unpack_mut(); - super::$name(store, instance, $($pname),*) - } + let (instance, store) = pair.unpack_mut(); + super::$name(store, instance, $($pname),*) }) - }); - LibcallResult::convert(ret) + }) } $( #[cfg(not($attr))] @@ -146,61 +145,11 @@ pub mod raw { (@ty i32) => (u32); (@ty i64) => (u64); (@ty u8) => (u8); - (@ty reference) => (u32); + (@ty bool) => (bool); (@ty pointer) => (*mut u8); } wasmtime_environ::foreach_builtin_function!(libcall); - - // Helper trait to convert results of libcalls below into the ABI of what - // the libcall expects. - // - // This basically entirely exists for the `Result` implementation which - // "unwraps" via a throwing of a trap. - trait LibcallResult { - type Abi; - unsafe fn convert(self) -> Self::Abi; - } - - impl LibcallResult for () { - type Abi = (); - unsafe fn convert(self) {} - } - - impl LibcallResult for Result - where - E: Into, - { - type Abi = T; - unsafe fn convert(self) -> T { - match self { - Ok(t) => t, - #[allow(deprecated)] // FIXME: need to update this - Err(e) => crate::runtime::vm::traphandlers::raise_trap(e.into()), - } - } - } - - impl LibcallResult for *mut u8 { - type Abi = *mut u8; - unsafe fn convert(self) -> *mut u8 { - self - } - } - - impl LibcallResult for NonNull { - type Abi = *mut u8; - unsafe fn convert(self) -> *mut u8 { - self.as_ptr() - } - } - - impl LibcallResult for bool { - type Abi = u32; - unsafe fn convert(self) -> u32 { - self as u32 - } - } } fn memory32_grow( @@ -208,13 +157,52 @@ fn memory32_grow( instance: &mut Instance, delta: u64, memory_index: u32, -) -> Result<*mut u8, TrapReason> { +) -> Result, TrapReason> { let memory_index = MemoryIndex::from_u32(memory_index); - let result = match instance.memory_grow(store, memory_index, delta)? { - Some(size_in_bytes) => size_in_bytes / instance.memory_page_size(memory_index), - None => usize::max_value(), - }; - Ok(result as *mut _) + let result = instance + .memory_grow(store, memory_index, delta)? + .map(|size_in_bytes| { + AllocationSize(size_in_bytes / instance.memory_page_size(memory_index)) + }); + + Ok(result) +} + +/// A helper structure to represent the return value of a memory or table growth +/// call. +/// +/// This represents a byte or element-based count of the size of an item on the +/// host. For example a memory is how many bytes large the memory is, or a table +/// is how many elements large it is. It's assumed that the value here is never +/// -1 or -2 as that would mean the entire host address space is allocated which +/// is not possible. +struct AllocationSize(usize); + +/// Special implementation for growth-related libcalls. +/// +/// Here the optional return value means: +/// +/// * `Some(val)` - the growth succeeded and the previous size of the item was +/// `val`. +/// * `None` - the growth failed. +/// +/// The failure case returns -1 (or `usize::MAX` as an unsigned integer) and the +/// successful case returns the `val` itself. Note that -2 (`usize::MAX - 1` +/// when unsigned) is unwind as a sentinel to indicate an unwind as no valid +/// allocation can be that large. +unsafe impl HostResultHasUnwindSentinel for Option { + type Abi = *mut u8; + const SENTINEL: *mut u8 = (usize::MAX - 1) as *mut u8; + + fn into_abi(self) -> *mut u8 { + match self { + Some(size) => { + debug_assert!(size.0 < (usize::MAX - 1)); + size.0 as *mut u8 + } + None => usize::MAX as *mut u8, + } + } } /// Implementation of `table.grow` for `funcref` tables. @@ -224,7 +212,7 @@ unsafe fn table_grow_func_ref( table_index: u32, delta: u64, init_value: *mut u8, -) -> Result<*mut u8> { +) -> Result> { let table_index = TableIndex::from_u32(table_index); let element = match instance.table_element_type(table_index) { @@ -233,11 +221,10 @@ unsafe fn table_grow_func_ref( TableElementType::Cont => unreachable!(), }; - let result = match instance.table_grow(store, table_index, delta, element)? { - Some(r) => r, - None => usize::MAX, - }; - Ok(result as *mut _) + let result = instance + .table_grow(store, table_index, delta, element)? + .map(AllocationSize); + Ok(result) } /// Implementation of `table.grow` for GC-reference tables. @@ -248,7 +235,7 @@ unsafe fn table_grow_gc_ref( table_index: u32, delta: u64, init_value: u32, -) -> Result<*mut u8> { +) -> Result> { let table_index = TableIndex::from_u32(table_index); let element = match instance.table_element_type(table_index) { @@ -264,11 +251,10 @@ unsafe fn table_grow_gc_ref( TableElementType::Cont => unreachable!(), }; - let result = match instance.table_grow(store, table_index, delta, element)? { - Some(r) => r, - None => usize::MAX, - }; - Ok(result as *mut _) + let result = instance + .table_grow(store, table_index, delta, element)? + .map(AllocationSize); + Ok(result) } unsafe fn table_grow_cont_obj( @@ -280,7 +266,7 @@ unsafe fn table_grow_cont_obj( // A None value is indicated by the pointer being null. init_value_contref: *mut u8, init_value_revision: u64, -) -> Result<*mut u8> { +) -> Result> { use core::ptr::NonNull; let init_value = if init_value_contref.is_null() { None @@ -298,11 +284,10 @@ unsafe fn table_grow_cont_obj( _ => panic!("Wrong table growing function"), }; - let result = match instance.table_grow(store, table_index, delta, element)? { - Some(r) => r, - None => usize::MAX, - }; - Ok(result as *mut _) + let result = instance + .table_grow(store, table_index, delta, element)? + .map(AllocationSize); + Ok(result) } /// Implementation of `table.fill` for `funcref`s. @@ -1087,7 +1072,7 @@ unsafe fn is_subtype( _instance: &mut Instance, actual_engine_type: u32, expected_engine_type: u32, -) -> bool { +) -> u32 { use wasmtime_environ::VMSharedTypeIndex; let actual = VMSharedTypeIndex::from_u32(actual_engine_type); @@ -1100,7 +1085,7 @@ unsafe fn is_subtype( .into(); log::trace!("is_subtype(actual={actual:?}, expected={expected:?}) -> {is_subtype}",); - is_subtype + is_subtype as u32 } // Implementation of `memory.atomic.notify` for locally defined memories. @@ -1158,8 +1143,18 @@ fn out_of_gas(store: &mut dyn VMStore, _instance: &mut Instance) -> Result<()> { } // Hook for when an instance observes that the epoch has changed. -fn new_epoch(store: &mut dyn VMStore, _instance: &mut Instance) -> Result { - store.new_epoch() +fn new_epoch(store: &mut dyn VMStore, _instance: &mut Instance) -> Result { + store.new_epoch().map(NextEpoch) +} + +struct NextEpoch(u64); + +unsafe impl HostResultHasUnwindSentinel for NextEpoch { + type Abi = u64; + const SENTINEL: u64 = u64::MAX; + fn into_abi(self) -> u64 { + self.0 + } } // Hook for validating malloc using wmemcheck_state. @@ -1299,13 +1294,22 @@ fn update_mem_size(_store: &mut dyn VMStore, instance: &mut Instance, num_pages: } } -fn trap(_store: &mut dyn VMStore, _instance: &mut Instance, code: u8) -> Result<(), TrapReason> { +/// This intrinsic is just used to record trap information. +/// +/// The `Infallible` "ok" type here means that this never returns success, it +/// only ever returns an error, and this hooks into the machinery to handle +/// `Result` values to record such trap information. +fn trap( + _store: &mut dyn VMStore, + _instance: &mut Instance, + code: u8, +) -> Result { Err(TrapReason::Wasm( wasmtime_environ::Trap::from_u8(code).unwrap(), )) } -fn raise(_store: &mut dyn VMStore, _instance: &mut Instance) -> Result<(), TrapReason> { +fn raise(_store: &mut dyn VMStore, _instance: &mut Instance) { // SAFETY: this is only called from compiled wasm so we know that wasm has // already been entered. It's a dynamic safety precondition that the trap // information has already been arranged to be present. @@ -1517,7 +1521,7 @@ fn tc_cont_new( func: *mut u8, param_count: u32, result_count: u32, -) -> Result<*mut u8, TrapReason> { +) -> Result, TrapReason> { let ans = crate::vm::continuation::optimized::cont_new( store, instance, @@ -1525,14 +1529,14 @@ fn tc_cont_new( param_count, result_count, )?; - Ok(ans.cast::()) + Ok(Some(AllocationSize(ans.cast::() as usize))) } fn tc_drop_cont_ref(_store: &mut dyn VMStore, instance: &mut Instance, contref: *mut u8) { crate::vm::continuation::optimized::drop_cont_ref( instance, contref.cast::(), - ) + ); } fn tc_allocate( @@ -1540,24 +1544,24 @@ fn tc_allocate( _instance: &mut Instance, size: u64, align: u64, -) -> Result<*mut u8, TrapReason> { +) -> Result, TrapReason> { debug_assert!(size > 0); let size = usize::try_from(size) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("size too large!")))?; + .map_err(|_error| TrapReason::User(anyhow::anyhow!("size too large!")))?; let align = usize::try_from(align) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("align too large!")))?; + .map_err(|_error| TrapReason::User(anyhow::anyhow!("align too large!")))?; let layout = std::alloc::Layout::from_size_align(size, align).map_err(|_error| { - TrapReason::user(anyhow::anyhow!("Continuation layout construction failed!")) + TrapReason::User(anyhow::anyhow!("Continuation layout construction failed!")) })?; let ptr = unsafe { alloc::alloc::alloc(layout) }; // TODO(dhil): We can consider making this a debug-build only // check. if ptr.is_null() { - Err(TrapReason::user(anyhow::anyhow!( + Err(TrapReason::User(anyhow::anyhow!( "Memory allocation failed!" ))) } else { - Ok(ptr) + Ok(Some(AllocationSize(ptr as usize))) } } @@ -1567,15 +1571,11 @@ fn tc_deallocate( ptr: *mut u8, size: u64, align: u64, -) -> Result<(), TrapReason> { +) -> Result<()> { debug_assert!(size > 0); - let size = usize::try_from(size) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("size too large!")))?; - let align = usize::try_from(align) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("align too large!")))?; - let layout = std::alloc::Layout::from_size_align(size, align).map_err(|_error| { - TrapReason::user(anyhow::anyhow!("Continuation layout construction failed!")) - })?; + let size = usize::try_from(size)?; + let align = usize::try_from(align)?; + let layout = std::alloc::Layout::from_size_align(size, align)?; Ok(unsafe { std::alloc::dealloc(ptr, layout) }) } @@ -1586,7 +1586,7 @@ fn tc_reallocate( old_size: u64, new_size: u64, align: u64, -) -> Result<*mut u8, TrapReason> { +) -> Result, TrapReason> { debug_assert!(old_size < new_size); if old_size > 0 { @@ -1598,18 +1598,18 @@ fn tc_reallocate( fn tc_print_str(_store: &mut dyn VMStore, _instance: &mut Instance, s: *const u8, len: u64) { let len = - usize::try_from(len).map_err(|_error| TrapReason::user(anyhow::anyhow!("len too large!"))); + usize::try_from(len).map_err(|_error| TrapReason::User(anyhow::anyhow!("len too large!"))); let str = unsafe { std::slice::from_raw_parts(s, len.unwrap()) }; let s = std::str::from_utf8(str).unwrap(); - print!("{s}"); + print!("{s}") } fn tc_print_int(_store: &mut dyn VMStore, _instance: &mut Instance, arg: u64) { - print!("{arg}"); + print!("{arg}") } fn tc_print_pointer(_store: &mut dyn VMStore, _instance: &mut Instance, arg: *const u8) { - print!("{arg:p}"); + print!("{arg:p}") } // @@ -1621,11 +1621,11 @@ fn tc_baseline_cont_new( func: *mut u8, param_count: u64, result_count: u64, -) -> Result<*mut u8, TrapReason> { +) -> Result, TrapReason> { let param_count = usize::try_from(param_count) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("param_count too large!")))?; + .map_err(|_error| TrapReason::User(anyhow::anyhow!("param_count too large!")))?; let result_count = usize::try_from(result_count) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("result_count too large!")))?; + .map_err(|_error| TrapReason::User(anyhow::anyhow!("result_count too large!")))?; let ans = crate::runtime::vm::continuation::baseline::cont_new( store, instance, @@ -1635,19 +1635,18 @@ fn tc_baseline_cont_new( )?; let ans_ptr = ans.cast::(); assert!(ans as usize == ans_ptr as usize); - Ok(ans_ptr) + Ok(Some(AllocationSize(ans_ptr as usize))) } -fn tc_baseline_resume( - store: &mut dyn VMStore, - instance: &mut Instance, - contref: *mut u8, -) -> Result { +fn tc_baseline_resume(store: &mut dyn VMStore, instance: &mut Instance, contref: *mut u8) -> u32 { let contref_ptr = contref.cast::(); assert!(contref_ptr as usize == contref as usize); - crate::runtime::vm::continuation::baseline::resume(store, instance, unsafe { + match crate::runtime::vm::continuation::baseline::resume(store, instance, unsafe { &mut *(contref_ptr) - }) + }) { + Err(_) => panic!("resume failed"), + Ok(x) => x, + } } fn tc_baseline_suspend( @@ -1685,9 +1684,9 @@ fn tc_baseline_continuation_arguments_ptr( instance: &mut Instance, contref: *mut u8, nargs: u64, -) -> *mut u8 { +) -> Result> { let nargs = usize::try_from(nargs) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("nargs too large!"))); + .map_err(|_error| TrapReason::User(anyhow::anyhow!("nargs too large!"))); let contref_ptr = contref.cast::(); assert!(contref_ptr as usize == contref as usize); let ans = crate::runtime::vm::continuation::baseline::get_arguments_ptr( @@ -1695,14 +1694,14 @@ fn tc_baseline_continuation_arguments_ptr( unsafe { &mut *(contref_ptr) }, nargs.unwrap(), ); - return ans.cast::(); + Ok(Some(AllocationSize(ans.cast::() as usize))) } fn tc_baseline_continuation_values_ptr( _store: &mut dyn VMStore, instance: &mut Instance, contref: *mut u8, -) -> *mut u8 { +) -> Result> { let contref_ptr = contref.cast::(); assert!(contref_ptr as usize == contref as usize); let ans = crate::runtime::vm::continuation::baseline::get_values_ptr(instance, unsafe { @@ -1710,7 +1709,7 @@ fn tc_baseline_continuation_values_ptr( }); let ans_ptr = ans.cast::(); assert!(ans as usize == ans_ptr as usize); - return ans_ptr; + Ok(Some(AllocationSize(ans_ptr as usize))) } fn tc_baseline_clear_arguments( @@ -1729,23 +1728,26 @@ fn tc_baseline_get_payloads_ptr( _store: &mut dyn VMStore, instance: &mut Instance, nargs: u64, -) -> *mut u8 { +) -> Result> { let nargs = usize::try_from(nargs) - .map_err(|_error| TrapReason::user(anyhow::anyhow!("nargs too large!"))); + .map_err(|_error| TrapReason::User(anyhow::anyhow!("nargs too large!"))); let ans = crate::runtime::vm::continuation::baseline::get_payloads_ptr(instance, nargs.unwrap()); let ans_ptr = ans.cast::(); assert!(ans as usize == ans_ptr as usize); - return ans_ptr; + Ok(Some(AllocationSize(ans_ptr as usize))) } -fn tc_baseline_clear_payloads(_store: &mut dyn VMStore, instance: &mut Instance) { +fn tc_baseline_clear_payloads(_store: &mut dyn VMStore, instance: &mut Instance) -> Result<()> { crate::runtime::vm::continuation::baseline::clear_payloads(instance); + Ok(()) } fn tc_baseline_get_current_continuation( _store: &mut dyn VMStore, _instance: &mut Instance, -) -> *mut u8 { - crate::runtime::vm::continuation::baseline::get_current_continuation().cast::() +) -> Result> { + let ans_ptr = + crate::runtime::vm::continuation::baseline::get_current_continuation().cast::(); + Ok(Some(AllocationSize(ans_ptr as usize))) } diff --git a/crates/wasmtime/src/runtime/vm/memory.rs b/crates/wasmtime/src/runtime/vm/memory.rs index 8d3b488ecf37..116830f41ed0 100644 --- a/crates/wasmtime/src/runtime/vm/memory.rs +++ b/crates/wasmtime/src/runtime/vm/memory.rs @@ -77,11 +77,11 @@ use crate::prelude::*; use crate::runtime::vm::vmcontext::VMMemoryDefinition; #[cfg(feature = "signals-based-traps")] -use crate::runtime::vm::HostAlignedByteCount; -use crate::runtime::vm::{MemoryImage, MemoryImageSlot, VMStore, WaitResult}; +use crate::runtime::vm::{HostAlignedByteCount, MmapOffset}; +use crate::runtime::vm::{MemoryImage, MemoryImageSlot, SendSyncPtr, VMStore, WaitResult}; use alloc::sync::Arc; -use core::ops::Range; use core::time::Duration; +use core::{ops::Range, ptr::NonNull}; use wasmtime_environ::{Trap, Tunables}; #[cfg(feature = "signals-based-traps")] @@ -160,7 +160,10 @@ pub trait RuntimeLinearMemory: Send + Sync { fn grow_to(&mut self, size: usize) -> Result<()>; /// Returns a pointer to the base of this linear memory allocation. - fn base_ptr(&self) -> *mut u8; + /// + /// This is either a raw pointer, or a reference to an mmap along with an + /// offset within it. + fn base(&self) -> MemoryBase; /// Internal method for Wasmtime when used in conjunction with CoW images. /// This is used to inform the underlying memory that the size of memory has @@ -175,6 +178,37 @@ pub trait RuntimeLinearMemory: Send + Sync { } } +/// The base pointer of a memory allocation. +#[derive(Clone, Debug)] +pub enum MemoryBase { + /// A raw pointer into memory. + /// + /// This may or may not be host-page-aligned. + Raw(SendSyncPtr), + + /// An mmap along with an offset into it. + #[cfg(feature = "signals-based-traps")] + Mmap(MmapOffset), +} + +impl MemoryBase { + /// Creates a new `MemoryBase` from a raw pointer. + /// + /// The pointer must be non-null, and it must be logically `Send + Sync`. + pub fn new_raw(ptr: *mut u8) -> Self { + Self::Raw(NonNull::new(ptr).expect("pointer is non-null").into()) + } + + /// Returns the actual memory address in memory that is represented by this base. + pub fn as_mut_ptr(&self) -> *mut u8 { + match self { + Self::Raw(ptr) => ptr.as_ptr(), + #[cfg(feature = "signals-based-traps")] + Self::Mmap(mmap_offset) => mmap_offset.as_mut_ptr(), + } + } +} + /// Representation of a runtime wasm linear memory. pub enum Memory { Local(LocalMemory), @@ -205,13 +239,13 @@ impl Memory { pub fn new_static( ty: &wasmtime_environ::Memory, tunables: &Tunables, - base_ptr: *mut u8, + base: MemoryBase, base_capacity: usize, memory_image: MemoryImageSlot, store: &mut dyn VMStore, ) -> Result { let (minimum, maximum) = Self::limit_new(ty, Some(store))?; - let pooled_memory = StaticMemory::new(base_ptr, base_capacity, minimum, maximum)?; + let pooled_memory = StaticMemory::new(base, base_capacity, minimum, maximum)?; let allocation = Box::new(pooled_memory); // Configure some defaults a bit differently for this memory within the @@ -257,11 +291,19 @@ impl Memory { let absolute_max = 0usize.wrapping_sub(page_size); // Sanity-check what should already be true from wasm module validation. + // Note that for 32-bit targets the absolute maximum is `1<<32` during + // compilation, not one-page-less-than-u32::MAX, so need to handle that + // specially here. + let absolute_max64 = if cfg!(target_pointer_width = "32") { + 1 << 32 + } else { + u64::try_from(absolute_max).unwrap() + }; if let Ok(size) = ty.minimum_byte_size() { - assert!(size <= u64::try_from(absolute_max).unwrap()); + assert!(size <= absolute_max64); } if let Ok(max) = ty.maximum_byte_size() { - assert!(max <= u64::try_from(absolute_max).unwrap()); + assert!(max <= absolute_max64); } // If the minimum memory size overflows the size of our own address @@ -488,14 +530,39 @@ impl LocalMemory { // `RuntimeLinearMemory::byte_size` is not a multiple of the host page // size. See https://github.com/bytecodealliance/wasmtime/issues/9660. if let Ok(byte_size) = HostAlignedByteCount::new(alloc.byte_size()) { - let mut slot = MemoryImageSlot::create( - alloc.base_ptr().cast(), - byte_size, - alloc.byte_capacity(), - ); - // On drop, we will unmap our mmap'd range that this slot was - // mapped on top of, so there is no need for the slot to wipe - // it with an anonymous mapping first. + // memory_image is CoW-based so it is expected to be backed + // by an mmap. + let mmap_base = match alloc.base() { + MemoryBase::Mmap(offset) => offset, + MemoryBase::Raw { .. } => { + unreachable!("memory_image is Some only for mmap-based memories") + } + }; + + let mut slot = + MemoryImageSlot::create(mmap_base, byte_size, alloc.byte_capacity()); + // On drop, we will unmap our mmap'd range that this slot + // was mapped on top of, so there is no need for the slot to + // wipe it with an anonymous mapping first. + // + // Note that this code would be incorrect if clear-on-drop + // were enabled. That's because: + // + // * In the struct definition, `memory_image` above is listed + // after `alloc`. + // * Rust drops fields in the order they're defined, so + // `memory_image` would be dropped after `alloc`. + // * `alloc` can represent either owned memory (i.e. the mmap is + // freed on drop) or logically borrowed memory (something else + // manages the mmap). + // * If `alloc` is borrowed memory, then this isn't an issue. + // * But if `alloc` is owned memory, then it would first drop + // the mmap, and then `memory_image` would try to remap + // part of that same memory as part of clear-on-drop. + // + // A lot of this really suggests representing the ownership + // via Rust lifetimes -- that would be a major refactor, + // though. slot.no_clear_on_drop(); slot.instantiate(alloc.byte_size(), Some(image), ty, tunables)?; Some(slot) @@ -569,7 +636,7 @@ impl LocalMemory { // Save the original base pointer to assert the invariant that growth up // to the byte capacity never relocates the base pointer. - let base_ptr_before = self.alloc.base_ptr(); + let base_ptr_before = self.alloc.base().as_mut_ptr(); let required_to_not_move_memory = new_byte_size <= self.alloc.byte_capacity(); let result = (|| -> Result<()> { @@ -618,7 +685,7 @@ impl LocalMemory { // On successful growth double-check that the base pointer // didn't move if it shouldn't have. if required_to_not_move_memory { - assert_eq!(base_ptr_before, self.alloc.base_ptr()); + assert_eq!(base_ptr_before, self.alloc.base().as_mut_ptr()); } Ok(Some((old_byte_size, new_byte_size))) @@ -638,7 +705,7 @@ impl LocalMemory { pub fn vmmemory(&mut self) -> VMMemoryDefinition { VMMemoryDefinition { - base: self.alloc.base_ptr(), + base: self.alloc.base().as_mut_ptr(), current_length: self.alloc.byte_size().into(), } } @@ -655,7 +722,7 @@ impl LocalMemory { } pub fn wasm_accessible(&self) -> Range { - let base = self.alloc.base_ptr() as usize; + let base = self.alloc.base().as_mut_ptr() as usize; // From the base add: // // * max(capacity, reservation) -- all memory is guaranteed to have at diff --git a/crates/wasmtime/src/runtime/vm/memory/malloc.rs b/crates/wasmtime/src/runtime/vm/memory/malloc.rs index b822a376acc3..13c83bd859c3 100644 --- a/crates/wasmtime/src/runtime/vm/memory/malloc.rs +++ b/crates/wasmtime/src/runtime/vm/memory/malloc.rs @@ -5,7 +5,7 @@ //! handle memory allocation failures. use crate::prelude::*; -use crate::runtime::vm::memory::RuntimeLinearMemory; +use crate::runtime::vm::memory::{MemoryBase, RuntimeLinearMemory}; use crate::runtime::vm::SendSyncPtr; use core::mem; use core::ptr::NonNull; @@ -80,8 +80,8 @@ impl RuntimeLinearMemory for MallocMemory { Ok(()) } - fn base_ptr(&self) -> *mut u8 { - self.base_ptr.as_ptr() + fn base(&self) -> MemoryBase { + MemoryBase::Raw(self.base_ptr) } } diff --git a/crates/wasmtime/src/runtime/vm/memory/mmap.rs b/crates/wasmtime/src/runtime/vm/memory/mmap.rs index 0d536d1d2737..e82f159c2f51 100644 --- a/crates/wasmtime/src/runtime/vm/memory/mmap.rs +++ b/crates/wasmtime/src/runtime/vm/memory/mmap.rs @@ -7,6 +7,8 @@ use crate::runtime::vm::{mmap::AlignedLength, HostAlignedByteCount, Mmap}; use alloc::sync::Arc; use wasmtime_environ::Tunables; +use super::MemoryBase; + /// A linear memory instance. #[derive(Debug)] pub struct MmapMemory { @@ -223,7 +225,11 @@ impl RuntimeLinearMemory for MmapMemory { self.len = len; } - fn base_ptr(&self) -> *mut u8 { - unsafe { self.mmap.as_mut_ptr().add(self.pre_guard_size.byte_count()) } + fn base(&self) -> MemoryBase { + MemoryBase::Mmap( + self.mmap + .offset(self.pre_guard_size) + .expect("pre_guard_size is in bounds"), + ) } } diff --git a/crates/wasmtime/src/runtime/vm/memory/static_.rs b/crates/wasmtime/src/runtime/vm/memory/static_.rs index ba2f432e46d4..ed62d114652e 100644 --- a/crates/wasmtime/src/runtime/vm/memory/static_.rs +++ b/crates/wasmtime/src/runtime/vm/memory/static_.rs @@ -3,15 +3,14 @@ use crate::prelude::*; use crate::runtime::vm::memory::RuntimeLinearMemory; -use crate::runtime::vm::SendSyncPtr; -use core::ptr::NonNull; +use crate::runtime::vm::MemoryBase; /// A "static" memory where the lifetime of the backing memory is managed /// elsewhere. Currently used with the pooling allocator. pub struct StaticMemory { /// The base pointer of this static memory, wrapped up in a send/sync /// wrapper. - base: SendSyncPtr, + base: MemoryBase, /// The byte capacity of the `base` pointer. capacity: usize, @@ -22,7 +21,7 @@ pub struct StaticMemory { impl StaticMemory { pub fn new( - base_ptr: *mut u8, + base: MemoryBase, base_capacity: usize, initial_size: usize, maximum_size: Option, @@ -43,7 +42,7 @@ impl StaticMemory { }; Ok(Self { - base: SendSyncPtr::new(NonNull::new(base_ptr).unwrap()), + base, capacity: base_capacity, size: initial_size, }) @@ -73,7 +72,7 @@ impl RuntimeLinearMemory for StaticMemory { self.size = len; } - fn base_ptr(&self) -> *mut u8 { - self.base.as_ptr() + fn base(&self) -> MemoryBase { + self.base.clone() } } diff --git a/crates/wasmtime/src/runtime/vm/mmap.rs b/crates/wasmtime/src/runtime/vm/mmap.rs index c16ec11e812f..f06bb0a8d436 100644 --- a/crates/wasmtime/src/runtime/vm/mmap.rs +++ b/crates/wasmtime/src/runtime/vm/mmap.rs @@ -3,10 +3,11 @@ use super::HostAlignedByteCount; use crate::prelude::*; -use crate::runtime::vm::sys::mmap; +use crate::runtime::vm::sys::{mmap, vm::MemoryImageSource}; +use alloc::sync::Arc; use core::ops::Range; #[cfg(feature = "std")] -use std::{fs::File, sync::Arc}; +use std::fs::File; /// A marker type for an [`Mmap`] where both the start address and length are a /// multiple of the host page size. @@ -132,6 +133,26 @@ impl Mmap { unsafe { HostAlignedByteCount::new_unchecked(self.sys.len()) } } + /// Return a struct representing a page-aligned offset into the mmap. + /// + /// Returns an error if `offset >= self.len_aligned()`. + pub fn offset(self: &Arc, offset: HostAlignedByteCount) -> Result { + if offset >= self.len_aligned() { + bail!( + "offset {} is not in bounds for mmap: {}", + offset, + self.len_aligned() + ); + } + + Ok(MmapOffset::new(self.clone(), offset)) + } + + /// Return an `MmapOffset` corresponding to zero bytes into the mmap. + pub fn zero_offset(self: &Arc) -> MmapOffset { + MmapOffset::new(self.clone(), HostAlignedByteCount::ZERO) + } + /// Make the memory starting at `start` and extending for `len` bytes /// accessible. `start` and `len` must be native page-size multiples and /// describe a range within `self`'s reserved memory. @@ -231,13 +252,13 @@ impl Mmap { /// Return the allocated memory as a pointer to u8. #[inline] pub fn as_ptr(&self) -> *const u8 { - self.sys.as_ptr() + self.sys.as_send_sync_ptr().as_ptr() as *const u8 } /// Return the allocated memory as a mutable pointer to u8. #[inline] pub fn as_mut_ptr(&self) -> *mut u8 { - self.sys.as_mut_ptr() + self.sys.as_send_sync_ptr().as_ptr() } /// Return the length of the allocated memory. @@ -324,6 +345,76 @@ impl From> for Mmap { } } +/// A reference to an [`Mmap`], along with a host-page-aligned index within it. +/// +/// The main invariant this type asserts is that the index is in bounds within +/// the `Mmap` (i.e. `self.mmap[self.offset]` is valid). In the future, this +/// type may also assert other invariants. +#[derive(Clone, Debug)] +pub struct MmapOffset { + mmap: Arc>, + offset: HostAlignedByteCount, +} + +impl MmapOffset { + #[inline] + fn new(mmap: Arc>, offset: HostAlignedByteCount) -> Self { + // Note < rather than <=. This currently cannot represent the logical + // end of the mmap. We may need to change this if that becomes + // necessary. + assert!( + offset < mmap.len_aligned(), + "offset {} is in bounds (< {})", + offset, + mmap.len_aligned(), + ); + Self { mmap, offset } + } + + /// Returns the mmap this offset is within. + #[inline] + pub fn mmap(&self) -> &Arc> { + &self.mmap + } + + /// Returns the host-page-aligned offset within the mmap. + #[inline] + pub fn offset(&self) -> HostAlignedByteCount { + self.offset + } + + /// Returns the raw pointer in memory represented by this offset. + #[inline] + pub fn as_mut_ptr(&self) -> *mut u8 { + // SAFETY: constructor checks that offset is within this allocation. + unsafe { self.mmap().as_mut_ptr().byte_add(self.offset.byte_count()) } + } + + /// Maps an image into the mmap with read/write permissions. + /// + /// The image is mapped at `self.mmap.as_ptr() + self.offset + + /// memory_offset`. + /// + /// ## Safety + /// + /// The caller must ensure that noone else has a reference to this memory. + pub unsafe fn map_image_at( + &self, + image_source: &MemoryImageSource, + source_offset: u64, + memory_offset: HostAlignedByteCount, + memory_len: HostAlignedByteCount, + ) -> Result<()> { + let total_offset = self + .offset + .checked_add(memory_offset) + .expect("self.offset + memory_offset is in bounds"); + self.mmap + .sys + .map_image_at(image_source, source_offset, total_offset, memory_len) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/wasmtime/src/runtime/vm/sys/custom/mmap.rs b/crates/wasmtime/src/runtime/vm/sys/custom/mmap.rs index 650bc070d444..7548f301d80b 100644 --- a/crates/wasmtime/src/runtime/vm/sys/custom/mmap.rs +++ b/crates/wasmtime/src/runtime/vm/sys/custom/mmap.rs @@ -1,6 +1,6 @@ use super::cvt; use crate::prelude::*; -use crate::runtime::vm::sys::capi; +use crate::runtime::vm::sys::{capi, vm::MemoryImageSource}; use crate::runtime::vm::{HostAlignedByteCount, SendSyncPtr}; use core::ops::Range; use core::ptr::{self, NonNull}; @@ -69,13 +69,8 @@ impl Mmap { } #[inline] - pub fn as_ptr(&self) -> *const u8 { - self.memory.as_ptr() as *const u8 - } - - #[inline] - pub fn as_mut_ptr(&self) -> *mut u8 { - self.memory.as_ptr().cast() + pub fn as_send_sync_ptr(&self) -> SendSyncPtr { + self.memory.cast() } #[inline] @@ -109,6 +104,26 @@ impl Mmap { cvt(capi::wasmtime_mprotect(base, len, capi::PROT_READ))?; Ok(()) } + + pub unsafe fn map_image_at( + &self, + image_source: &MemoryImageSource, + source_offset: u64, + memory_offset: HostAlignedByteCount, + memory_len: HostAlignedByteCount, + ) -> Result<()> { + assert_eq!(source_offset, 0); + let base = self + .memory + .as_ptr() + .byte_add(memory_offset.byte_count()) + .cast(); + cvt(capi::wasmtime_memory_image_map_at( + image_source.image_ptr().as_ptr(), + base, + memory_len.byte_count(), + )) + } } impl Drop for Mmap { diff --git a/crates/wasmtime/src/runtime/vm/sys/custom/vm.rs b/crates/wasmtime/src/runtime/vm/sys/custom/vm.rs index 1a1f1e015c97..414341c73e93 100644 --- a/crates/wasmtime/src/runtime/vm/sys/custom/vm.rs +++ b/crates/wasmtime/src/runtime/vm/sys/custom/vm.rs @@ -79,13 +79,9 @@ impl MemoryImageSource { } } - pub unsafe fn map_at(&self, base: *mut u8, len: usize, offset: u64) -> Result<()> { - assert_eq!(offset, 0); - cvt(capi::wasmtime_memory_image_map_at( - self.data.as_ptr(), - base, - len, - )) + #[inline] + pub(super) fn image_ptr(&self) -> SendSyncPtr { + self.data } pub unsafe fn remap_as_zeros_at(&self, base: *mut u8, len: usize) -> Result<()> { diff --git a/crates/wasmtime/src/runtime/vm/sys/miri/mmap.rs b/crates/wasmtime/src/runtime/vm/sys/miri/mmap.rs index eae0ed29fc9f..bcce7108b22a 100644 --- a/crates/wasmtime/src/runtime/vm/sys/miri/mmap.rs +++ b/crates/wasmtime/src/runtime/vm/sys/miri/mmap.rs @@ -6,6 +6,7 @@ //! but it's enough to get various tests running relying on memories and such. use crate::prelude::*; +use crate::runtime::vm::sys::vm::MemoryImageSource; use crate::runtime::vm::{HostAlignedByteCount, SendSyncPtr}; use std::alloc::{self, Layout}; use std::fs::File; @@ -66,7 +67,7 @@ impl Mmap { // initialized for miri-level checking. unsafe { std::ptr::write_bytes( - self.as_mut_ptr().add(start.byte_count()), + self.as_send_sync_ptr().as_ptr().add(start.byte_count()), 0u8, len.byte_count(), ); @@ -74,12 +75,9 @@ impl Mmap { Ok(()) } - pub fn as_ptr(&self) -> *const u8 { - self.memory.as_ptr() as *const u8 - } - - pub fn as_mut_ptr(&self) -> *mut u8 { - self.memory.as_ptr().cast() + #[inline] + pub fn as_send_sync_ptr(&self) -> SendSyncPtr { + self.memory.cast() } pub fn len(&self) -> usize { @@ -97,6 +95,16 @@ impl Mmap { pub unsafe fn make_readonly(&self, _range: Range) -> Result<()> { Ok(()) } + + pub unsafe fn map_image_at( + &self, + image_source: &MemoryImageSource, + _source_offset: u64, + _memory_offset: HostAlignedByteCount, + _memory_len: HostAlignedByteCount, + ) -> Result<()> { + match *image_source {} + } } impl Drop for Mmap { @@ -106,7 +114,7 @@ impl Drop for Mmap { } unsafe { let layout = make_layout(self.len()); - alloc::dealloc(self.as_mut_ptr(), layout); + alloc::dealloc(self.as_send_sync_ptr().as_ptr(), layout); } } } diff --git a/crates/wasmtime/src/runtime/vm/sys/miri/vm.rs b/crates/wasmtime/src/runtime/vm/sys/miri/vm.rs index 321e8cf2f1c3..ccdb6529aa4c 100644 --- a/crates/wasmtime/src/runtime/vm/sys/miri/vm.rs +++ b/crates/wasmtime/src/runtime/vm/sys/miri/vm.rs @@ -49,10 +49,6 @@ impl MemoryImageSource { Ok(None) } - pub unsafe fn map_at(&self, _base: *mut u8, _len: usize, _offset: u64) -> io::Result<()> { - match *self {} - } - pub unsafe fn remap_as_zeros_at(&self, _base: *mut u8, _len: usize) -> io::Result<()> { match *self {} } diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/mmap.rs b/crates/wasmtime/src/runtime/vm/sys/unix/mmap.rs index 50512070d7b5..68ec224f8ee1 100644 --- a/crates/wasmtime/src/runtime/vm/sys/unix/mmap.rs +++ b/crates/wasmtime/src/runtime/vm/sys/unix/mmap.rs @@ -1,4 +1,5 @@ use crate::prelude::*; +use crate::runtime::vm::sys::vm::MemoryImageSource; use crate::runtime::vm::{HostAlignedByteCount, SendSyncPtr}; use rustix::mm::{mprotect, MprotectFlags}; use std::ops::Range; @@ -123,13 +124,8 @@ impl Mmap { } #[inline] - pub fn as_ptr(&self) -> *const u8 { - self.memory.as_ptr() as *const u8 - } - - #[inline] - pub fn as_mut_ptr(&self) -> *mut u8 { - self.memory.as_ptr().cast() + pub fn as_send_sync_ptr(&self) -> SendSyncPtr { + self.memory.cast() } #[inline] @@ -176,6 +172,28 @@ impl Mmap { Ok(()) } + + pub unsafe fn map_image_at( + &self, + image_source: &MemoryImageSource, + source_offset: u64, + memory_offset: HostAlignedByteCount, + memory_len: HostAlignedByteCount, + ) -> Result<()> { + unsafe { + let map_base = self.memory.as_ptr().byte_add(memory_offset.byte_count()); + let ptr = rustix::mm::mmap( + map_base.cast(), + memory_len.byte_count(), + rustix::mm::ProtFlags::READ | rustix::mm::ProtFlags::WRITE, + rustix::mm::MapFlags::PRIVATE | rustix::mm::MapFlags::FIXED, + image_source.as_file(), + source_offset, + )?; + assert_eq!(map_base.cast(), ptr); + }; + Ok(()) + } } impl Drop for Mmap { diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs b/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs index e02570a04592..a4a50003aaa5 100644 --- a/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs +++ b/crates/wasmtime/src/runtime/vm/sys/unix/signals.rs @@ -271,6 +271,12 @@ unsafe fn get_trap_registers(cx: *mut libc::c_void, _signum: libc::c_int) -> Tra pc: cx.uc_mcontext.gregs[libc::REG_RIP as usize] as usize, fp: cx.uc_mcontext.gregs[libc::REG_RBP as usize] as usize, } + } else if #[cfg(all(target_os = "linux", target_arch = "x86"))] { + let cx = &*(cx as *const libc::ucontext_t); + TrapRegisters { + pc: cx.uc_mcontext.gregs[libc::REG_EIP as usize] as usize, + fp: cx.uc_mcontext.gregs[libc::REG_EBP as usize] as usize, + } } else if #[cfg(all(any(target_os = "linux", target_os = "android"), target_arch = "aarch64"))] { let cx = &*(cx as *const libc::ucontext_t); TrapRegisters { @@ -333,6 +339,12 @@ unsafe fn get_trap_registers(cx: *mut libc::c_void, _signum: libc::c_int) -> Tra pc: cx.sc_rip as usize, fp: cx.sc_rbp as usize, } + } else if #[cfg(all(target_os = "linux", target_arch = "arm"))] { + let cx = &*(cx as *const libc::ucontext_t); + TrapRegisters { + pc: cx.uc_mcontext.arm_pc as usize, + fp: cx.uc_mcontext.arm_fp as usize, + } } else { compile_error!("unsupported platform"); panic!(); diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/unwind.rs b/crates/wasmtime/src/runtime/vm/sys/unix/unwind.rs index cf7a1d65203e..8745e19ab6c9 100644 --- a/crates/wasmtime/src/runtime/vm/sys/unix/unwind.rs +++ b/crates/wasmtime/src/runtime/vm/sys/unix/unwind.rs @@ -9,12 +9,29 @@ pub struct UnwindRegistration { registrations: Vec>, } -extern "C" { - // libunwind import - fn __register_frame(fde: *const u8); - fn __deregister_frame(fde: *const u8); - #[wasmtime_versioned_export_macros::versioned_link] - fn wasmtime_using_libunwind() -> bool; +cfg_if::cfg_if! { + // FIXME: at least on the `gcc-arm-linux-gnueabihf` toolchain on Ubuntu + // these symbols are not provided by default like they are on other targets. + // I'm not ARM expert so I don't know why. For now though consider this an + // optional integration feature with the platform and stub out the functions + // to do nothing which won't break any tests it just means that + // runtime-generated backtraces won't have the same level of fidelity they + // do on other targets. + if #[cfg(target_arch = "arm")] { + unsafe extern "C" fn __register_frame(_: *const u8) {} + unsafe extern "C" fn __deregister_frame(_: *const u8) {} + unsafe extern "C" fn wasmtime_using_libunwind() -> bool { + false + } + } else { + extern "C" { + // libunwind import + fn __register_frame(fde: *const u8); + fn __deregister_frame(fde: *const u8); + #[wasmtime_versioned_export_macros::versioned_link] + fn wasmtime_using_libunwind() -> bool; + } + } } /// There are two primary unwinders on Unix platforms: libunwind and libgcc. diff --git a/crates/wasmtime/src/runtime/vm/sys/unix/vm.rs b/crates/wasmtime/src/runtime/vm/sys/unix/vm.rs index 6d457ba5f191..2ad2a577bb41 100644 --- a/crates/wasmtime/src/runtime/vm/sys/unix/vm.rs +++ b/crates/wasmtime/src/runtime/vm/sys/unix/vm.rs @@ -1,6 +1,6 @@ use crate::runtime::vm::sys::DecommitBehavior; use rustix::fd::AsRawFd; -use rustix::mm::{mmap, mmap_anonymous, mprotect, MapFlags, MprotectFlags, ProtFlags}; +use rustix::mm::{mmap_anonymous, mprotect, MapFlags, MprotectFlags, ProtFlags}; use std::fs::File; use std::io; #[cfg(feature = "std")] @@ -146,7 +146,7 @@ impl MemoryImageSource { Ok(Some(MemoryImageSource::Memfd(memfd))) } - fn as_file(&self) -> &File { + pub(super) fn as_file(&self) -> &File { match *self { #[cfg(feature = "std")] MemoryImageSource::Mmap(ref file) => file, @@ -155,19 +155,6 @@ impl MemoryImageSource { } } - pub unsafe fn map_at(&self, base: *mut u8, len: usize, offset: u64) -> io::Result<()> { - let ptr = mmap( - base.cast(), - len, - ProtFlags::READ | ProtFlags::WRITE, - MapFlags::PRIVATE | MapFlags::FIXED, - self.as_file(), - offset, - )?; - assert_eq!(base, ptr.cast()); - Ok(()) - } - pub unsafe fn remap_as_zeros_at(&self, base: *mut u8, len: usize) -> io::Result<()> { let ptr = mmap_anonymous( base.cast(), diff --git a/crates/wasmtime/src/runtime/vm/sys/windows/mmap.rs b/crates/wasmtime/src/runtime/vm/sys/windows/mmap.rs index 9f23e0f2066d..defb8052a8da 100644 --- a/crates/wasmtime/src/runtime/vm/sys/windows/mmap.rs +++ b/crates/wasmtime/src/runtime/vm/sys/windows/mmap.rs @@ -1,4 +1,5 @@ use crate::prelude::*; +use crate::runtime::vm::sys::vm::MemoryImageSource; use crate::runtime::vm::{HostAlignedByteCount, SendSyncPtr}; use std::fs::{File, OpenOptions}; use std::io; @@ -133,7 +134,13 @@ impl Mmap { // Protect the entire file as PAGE_WRITECOPY to start (i.e. // remove the execute bit) let mut old = 0; - if VirtualProtect(ret.as_mut_ptr().cast(), ret.len(), PAGE_WRITECOPY, &mut old) == 0 { + if VirtualProtect( + ret.as_send_sync_ptr().as_ptr().cast(), + ret.len(), + PAGE_WRITECOPY, + &mut old, + ) == 0 + { return Err(io::Error::last_os_error()) .context("failed change pages to `PAGE_READONLY`"); } @@ -149,7 +156,10 @@ impl Mmap { ) -> Result<()> { if unsafe { VirtualAlloc( - self.as_ptr().add(start.byte_count()) as _, + self.as_send_sync_ptr() + .as_ptr() + .add(start.byte_count()) + .cast(), len.byte_count(), MEM_COMMIT, PAGE_READWRITE, @@ -164,13 +174,8 @@ impl Mmap { } #[inline] - pub fn as_ptr(&self) -> *const u8 { - self.memory.as_ptr() as *const u8 - } - - #[inline] - pub fn as_mut_ptr(&self) -> *mut u8 { - self.memory.as_ptr().cast() + pub fn as_send_sync_ptr(&self) -> SendSyncPtr { + self.memory.cast() } #[inline] @@ -191,8 +196,8 @@ impl Mmap { PAGE_EXECUTE_READ }; let mut old = 0; - let base = self.as_ptr().add(range.start); - let result = VirtualProtect(base as _, range.end - range.start, flags, &mut old); + let base = self.as_send_sync_ptr().as_ptr().add(range.start).cast(); + let result = VirtualProtect(base, range.end - range.start, flags, &mut old); if result == 0 { bail!(io::Error::last_os_error()); } @@ -201,13 +206,23 @@ impl Mmap { pub unsafe fn make_readonly(&self, range: Range) -> Result<()> { let mut old = 0; - let base = self.as_ptr().add(range.start); - let result = VirtualProtect(base as _, range.end - range.start, PAGE_READONLY, &mut old); + let base = self.as_send_sync_ptr().as_ptr().add(range.start).cast(); + let result = VirtualProtect(base, range.end - range.start, PAGE_READONLY, &mut old); if result == 0 { bail!(io::Error::last_os_error()); } Ok(()) } + + pub unsafe fn map_image_at( + &self, + image_source: &MemoryImageSource, + _source_offset: u64, + _memory_offset: HostAlignedByteCount, + _memory_len: HostAlignedByteCount, + ) -> Result<()> { + match *image_source {} + } } impl Drop for Mmap { @@ -219,12 +234,12 @@ impl Drop for Mmap { if self.is_file { let r = unsafe { UnmapViewOfFile(MEMORY_MAPPED_VIEW_ADDRESS { - Value: self.as_mut_ptr().cast(), + Value: self.memory.as_ptr().cast(), }) }; assert_ne!(r, 0); } else { - let r = unsafe { VirtualFree(self.as_mut_ptr().cast(), 0, MEM_RELEASE) }; + let r = unsafe { VirtualFree(self.memory.as_ptr().cast(), 0, MEM_RELEASE) }; assert_ne!(r, 0); } } diff --git a/crates/wasmtime/src/runtime/vm/sys/windows/vm.rs b/crates/wasmtime/src/runtime/vm/sys/windows/vm.rs index c4a3dd9f0634..29c735df3512 100644 --- a/crates/wasmtime/src/runtime/vm/sys/windows/vm.rs +++ b/crates/wasmtime/src/runtime/vm/sys/windows/vm.rs @@ -65,10 +65,6 @@ impl MemoryImageSource { Ok(None) } - pub unsafe fn map_at(&self, _base: *mut u8, _len: usize, _offset: u64) -> io::Result<()> { - match *self {} - } - pub unsafe fn remap_as_zeros_at(&self, _base: *mut u8, _len: usize) -> io::Result<()> { match *self {} } diff --git a/crates/wasmtime/src/runtime/vm/traphandlers.rs b/crates/wasmtime/src/runtime/vm/traphandlers.rs index eb224b854585..4759b45c8944 100644 --- a/crates/wasmtime/src/runtime/vm/traphandlers.rs +++ b/crates/wasmtime/src/runtime/vm/traphandlers.rs @@ -16,14 +16,15 @@ mod signals; pub use self::signals::*; use crate::prelude::*; +use crate::runtime::module::lookup_code; use crate::runtime::store::StoreOpaque; use crate::runtime::vm::continuation::stack_chain::StackChainCell; use crate::runtime::vm::sys::traphandlers; -use crate::runtime::vm::{Instance, VMContext, VMOpaqueContext, VMRuntimeLimits}; +use crate::runtime::vm::{Instance, InterpreterRef, VMContext, VMOpaqueContext, VMRuntimeLimits}; use crate::{StoreContextMut, WasmBacktrace}; use core::cell::Cell; use core::ops::Range; -use core::ptr; +use core::ptr::{self, NonNull}; pub use self::backtrace::Backtrace; pub use self::coredump::CoreDumpStack; @@ -31,27 +32,28 @@ pub use self::tls::{tls_eager_initialize, AsyncWasmCallState, PreviousAsyncWasmC pub use traphandlers::SignalHandler; -fn lazy_per_thread_init() { - traphandlers::lazy_per_thread_init(); +pub(crate) struct TrapRegisters { + pub pc: usize, + pub fp: usize, } -/// Raises a trap immediately. -/// -/// This function performs as-if a wasm trap was just executed. This trap -/// payload is then returned from `catch_traps` below. -/// -/// FIXME: this function should get removed in favor of explicitly calling the -/// `raise` libcall from wasm. -/// -/// # Safety -/// -/// Only safe to call when wasm code is on the stack, aka `catch_traps` must -/// have been previously called. Additionally no Rust destructors can be on the -/// stack. They will be skipped and not executed. -#[deprecated(note = "move to `raise_preexisting_trap` or `catch_unwind_and_record_trap` instead")] -#[allow(deprecated)] -pub unsafe fn raise_trap(reason: TrapReason) -> ! { - tls::with(|info| info.unwrap().unwind_with(UnwindReason::Trap(reason))) +/// Return value from `test_if_trap`. +pub(crate) enum TrapTest { + /// Not a wasm trap, need to delegate to whatever process handler is next. + NotWasm, + /// This trap was handled by the embedder via custom embedding APIs. + #[cfg_attr(miri, expect(dead_code, reason = "using #[cfg] too unergonomic"))] + HandledByEmbedder, + /// This is a wasm trap, it needs to be handled. + #[cfg_attr(miri, expect(dead_code, reason = "using #[cfg] too unergonomic"))] + Trap { + /// How to longjmp back to the original wasm frame. + jmp_buf: *const u8, + }, +} + +fn lazy_per_thread_init() { + traphandlers::lazy_per_thread_init(); } /// Raises a preexisting trap and unwinds. @@ -78,91 +80,210 @@ pub(super) unsafe fn raise_preexisting_trap() -> ! { tls::with(|info| info.unwrap().unwind()) } -/// Invokes the closure `f` and returns the result. +/// Invokes the closure `f` and returns a `bool` if it succeeded. /// -/// If `f` panics and this crate is compiled with `panic=unwind` this will -/// catch the panic and capture it to "throw" with `longjmp` to be caught by -/// the nearest `setjmp`. The panic will then be resumed from where it is -/// caught. +/// This will invoke the closure `f` which returns a value that implements +/// `HostResult`. This trait abstracts over how host values are translated to +/// ABI values when going back into wasm. Some examples are: /// -/// FIXME: this function should get removed in favor of -/// `catch_unwind_and_record_trap` or a variant thereof. +/// * `T` - bare return types (not results) are simply returned as-is. No +/// `catch_unwind` happens as if a trap can't happen then the host shouldn't +/// be panicking or invoking user code. /// -/// # Safety +/// * `Result<(), E>` - this represents an ABI return value of `bool` which +/// indicates whether the call succeeded. This return value will catch panics +/// and record trap information as `E`. /// -/// Only safe to call when wasm code is on the stack, aka `catch_traps` must -/// have been previously called. Additionally no Rust destructors can be on the -/// stack. They will be skipped and not executed in the case that `f` panics. -#[deprecated(note = "move to `catch_unwind_and_record_trap` instead")] -#[allow(deprecated)] -pub unsafe fn catch_unwind_and_longjmp(f: impl FnOnce() -> R) -> R { - // With `panic=unwind` use `std::panic::catch_unwind` to catch possible - // panics to rethrow. - #[cfg(all(feature = "std", panic = "unwind"))] - { - match std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)) { - Ok(ret) => ret, - Err(err) => tls::with(|info| info.unwrap().unwind_with(UnwindReason::Panic(err))), - } +/// * `Result` - the ABI return value here is `u64` where on success +/// the 32-bit result is zero-extended and `u64::MAX` as a return value +/// indicates that a trap or panic happened. +/// +/// This is primarily used in conjunction with the Cranelift-and-host boundary. +/// This function acts as a bridge between the two to appropriately handle +/// encoding host values to Cranelift-understood ABIs via the `HostResult` +/// trait. +pub fn catch_unwind_and_record_trap(f: impl FnOnce() -> R) -> R::Abi +where + R: HostResult, +{ + // Invoke the closure `f`, optionally catching unwinds depending on `R`. The + // return value is always provided and if unwind information is provided + // (e.g. `ret` is a "false"-y value) then it's recorded in TLS for the + // unwind operation that's about to happen from Cranelift-generated code. + let (ret, unwind) = R::maybe_catch_unwind(f); + if let Some(unwind) = unwind { + tls::with(|info| info.unwrap().record_unwind(unwind)); + } + ret +} + +/// A trait used in conjunction with `catch_unwind_and_record_trap` to convert a +/// Rust-based type to a specific ABI while handling traps/unwinds. +/// +/// This type is implemented for return values from host function calls and +/// libcalls. The `Abi` value of this trait represents either a successful +/// execution with some payload state or that a failed execution happened. In +/// the event of a failed execution the state of the failure itself is stored +/// within `CallThreadState::unwind`. Cranelift-compiled code is expected to +/// test for this failure sentinel and process it accordingly. +/// +/// See `catch_unwind_and_record_trap` for some more information as well. +pub trait HostResult { + /// The type of the value that's returned to Cranelift-compiled code. Needs + /// to be ABI-safe to pass through an `extern "C"` return value. + type Abi: Copy; + + /// Executes `f` and returns the ABI/unwind information as a result. + /// + /// This may optionally catch unwinds during execution depending on this + /// implementation. The ABI return value is unconditionally provided. If an + /// unwind was detected (e.g. a host panic or a wasm trap) then that's + /// additionally returned as well. + /// + /// If an unwind is returned then it's expected that when the host returns + /// back to wasm (which should be soon after calling this through + /// `catch_unwind_and_record_trap`) then wasm will very quickly turn around + /// and initiate an unwind (currently through `raise_preexisting_trap`). + fn maybe_catch_unwind(f: impl FnOnce() -> Self) -> (Self::Abi, Option); +} + +// Base case implementations that do not catch unwinds. These are for libcalls +// that neither trap nor execute user code. The raw value is the ABI itself. +// +// Panics in these libcalls will result in a process abort as unwinding is not +// allowed via Rust through `extern "C"` function boundaries. +macro_rules! host_result_no_catch { + ($($t:ty,)*) => { + $( + impl HostResult for $t { + type Abi = $t; + fn maybe_catch_unwind(f: impl FnOnce() -> $t) -> ($t, Option) { + (f(), None) + } + } + )* } +} - // With `panic=abort` there's no use in using `std::panic::catch_unwind` - // since it won't actually catch anything. Note that - // `std::panic::catch_unwind` will technically optimize to this but having - // this branch avoids using the `std::panic` module entirely. - #[cfg(not(all(feature = "std", panic = "unwind")))] - { - f() +host_result_no_catch! { + (), + bool, + u32, + *mut u8, + u64, +} + +impl HostResult for NonNull { + type Abi = *mut u8; + fn maybe_catch_unwind(f: impl FnOnce() -> Self) -> (*mut u8, Option) { + (f().as_ptr(), None) } } -/// Invokes the closure `f` and returns a `bool` if it succeeded. -/// -/// This will invoke the closure `f` which returns a `Result<()>`. The results -/// of executing this function are handled as: +/// Implementation of `HostResult` for `Result`. /// -/// * Returns `Ok(())` - this means that this function returns `true` with no -/// other action taken. -/// * Returns `Err(e)` - this records trap information in the current -/// `CallThreadState` and returns `false`. -/// * Panics - this records unwind information in the current `CallThreadState` -/// and returns `false`. +/// This is where things get interesting for `HostResult`. This is generically +/// defined to allow many shapes of the `Result` type to be returned from host +/// calls or libcalls. To do this an extra trait requirement is placed on the +/// successful result `T`: `HostResultHasUnwindSentinel`. /// -/// The purpose of this helper is to be used at the wasm->host boundary. This -/// is used to implement the "array call" ABI of the host where wasm itself -/// will initiate the unwind when it sees a `false` return value from the host. +/// The general requirement is that `T` says what ABI it has, and the ABI must +/// have a sentinel value which indicates that an unwind in wasm should happen. +/// For example if `T = ()` then `true` means that the call succeeded and +/// `false` means that an unwind happened. Here the sentinel is `false` and the +/// ABI is `bool`. /// -/// The return value of this function is typically directly returned back to -/// wasm to get handled. -pub fn catch_unwind_and_record_trap(f: impl FnOnce() -> Result<()>) -> bool { - let f = move || match f() { - Ok(()) => true, - Err(error) => { - let reason = UnwindReason::Trap(TrapReason::User(error)); - tls::with(|info| info.unwrap().record_unwind(reason)); - false - } - }; - // With `panic=unwind` use `std::panic::catch_unwind` to catch possible - // panics to rethrow. - #[cfg(all(feature = "std", panic = "unwind"))] - { - match std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)) { - Ok(result) => result, - Err(err) => { - tls::with(|info| info.unwrap().record_unwind(UnwindReason::Panic(err))); - false +/// This is the only implementation of `HostResult` which actually catches +/// unwinds as there's a sentinel to encode. +impl HostResult for Result +where + T: HostResultHasUnwindSentinel, + E: Into, +{ + type Abi = T::Abi; + + fn maybe_catch_unwind(f: impl FnOnce() -> Result) -> (T::Abi, Option) { + // First prepare the closure `f` as something that'll be invoked to + // generate the return value of this function. This is the + // conditionally, below, passed to `catch_unwind`. + let f = move || match f() { + Ok(ret) => (ret.into_abi(), None), + Err(reason) => (T::SENTINEL, Some(UnwindReason::Trap(reason.into()))), + }; + + // With `panic=unwind` use `std::panic::catch_unwind` to catch possible + // panics to rethrow. + #[cfg(all(feature = "std", panic = "unwind"))] + { + match std::panic::catch_unwind(std::panic::AssertUnwindSafe(f)) { + Ok(result) => result, + Err(err) => (T::SENTINEL, Some(UnwindReason::Panic(err))), } } + + // With `panic=abort` there's no use in using `std::panic::catch_unwind` + // since it won't actually catch anything. Note that + // `std::panic::catch_unwind` will technically optimize to this but having + // this branch avoids using the `std::panic` module entirely. + #[cfg(not(all(feature = "std", panic = "unwind")))] + { + f() + } } +} - // With `panic=abort` there's no use in using `std::panic::catch_unwind` - // since it won't actually catch anything. Note that - // `std::panic::catch_unwind` will technically optimize to this but having - // this branch avoids using the `std::panic` module entirely. - #[cfg(not(all(feature = "std", panic = "unwind")))] - { - f() +/// Trait used in conjunction with `HostResult for Result` where this is +/// the trait bound on `T`. +/// +/// This is for values in the "ok" position of a `Result` return value. Each +/// value can have a separate ABI from itself (e.g. `type Abi`) and must be +/// convertible to the ABI. Additionally all implementations of this trait have +/// a "sentinel value" which indicates that an unwind happened. This means that +/// no valid instance of `Self` should generate the `SENTINEL` via the +/// `into_abi` function. +pub unsafe trait HostResultHasUnwindSentinel { + /// The Cranelift-understood ABI of this value (should not be `Self`). + type Abi: Copy; + + /// A value that indicates that an unwind should happen and is tested for in + /// Cranelift-generated code. + const SENTINEL: Self::Abi; + + /// Converts this value into the ABI representation. Should never returned + /// the `SENTINEL` value. + fn into_abi(self) -> Self::Abi; +} + +/// No return value from the host is represented as a `bool` in the ABI. Here +/// `true` means that execution succeeded while `false` is the sentinel used to +/// indicate an unwind. +unsafe impl HostResultHasUnwindSentinel for () { + type Abi = bool; + const SENTINEL: bool = false; + fn into_abi(self) -> bool { + true + } +} + +/// A 32-bit return value can be inflated to a 64-bit return value in the ABI. +/// In this manner a successful result is a zero-extended 32-bit value and the +/// failure sentinel is `u64::MAX` or -1 as a signed integer. +unsafe impl HostResultHasUnwindSentinel for u32 { + type Abi = u64; + const SENTINEL: u64 = u64::MAX; + fn into_abi(self) -> u64 { + self.into() + } +} + +/// If there is not actual successful result (e.g. an empty enum) then the ABI +/// can be `()`, or nothing, because there's no successful result and it's +/// always a failure. +unsafe impl HostResultHasUnwindSentinel for core::convert::Infallible { + type Abi = (); + const SENTINEL: () = (); + fn into_abi(self) { + match self {} } } @@ -184,7 +305,6 @@ pub enum TrapReason { User(Error), /// A trap raised from Cranelift-generated code. - #[cfg(all(feature = "signals-based-traps", not(miri)))] Jit { /// The program counter where this trap originated. /// @@ -211,16 +331,9 @@ pub enum TrapReason { Wasm(wasmtime_environ::Trap), } -impl TrapReason { - /// Create a new `TrapReason::User` that does not have a backtrace yet. - pub fn user(error: Error) -> Self { - TrapReason::User(error) - } -} - impl From for TrapReason { fn from(err: Error) -> Self { - TrapReason::user(err) + TrapReason::User(err) } } @@ -243,20 +356,46 @@ pub unsafe fn catch_traps( mut closure: F, ) -> Result<(), Box> where - F: FnMut(*mut VMContext) -> bool, + F: FnMut(*mut VMContext, Option>) -> bool, { let callee_stack_chain = VMContext::try_from_opaque(callee) .map(|vmctx| Instance::from_vmctx(vmctx, |i| *i.stack_chain() as *const StackChainCell)); let caller = store.0.default_caller(); - let result = CallThreadState::new(store.0, caller, callee_stack_chain).with(|cx| { - traphandlers::wasmtime_setjmp( - cx.jmp_buf.as_ptr(), - call_closure::, - &mut closure as *mut F as *mut u8, - caller, - ) + match store.0.interpreter() { + // In interpreted mode directly invoke the host closure since we won't + // be using host-based `setjmp`/`longjmp` as that's not going to save + // the context we want. + Some(r) => { + cx.jmp_buf + .set(CallThreadState::JMP_BUF_INTERPRETER_SENTINEL); + closure(caller, Some(r)) + } + + // In native mode, however, defer to C to do the `setjmp` since Rust + // doesn't understand `setjmp`. + // + // Note that here we pass a function pointer to C to catch longjmp + // within, here it's `call_closure`, and that passes `None` for the + // interpreter since this branch is only ever taken if the interpreter + // isn't present. + None => traphandlers::wasmtime_setjmp( + cx.jmp_buf.as_ptr(), + { + extern "C" fn call_closure(payload: *mut u8, caller: *mut VMContext) -> bool + where + F: FnMut(*mut VMContext, Option>) -> bool, + { + unsafe { (*(payload as *mut F))(caller, None) } + } + + call_closure:: + }, + &mut closure as *mut F as *mut u8, + caller, + ), + } }); return match result { @@ -269,13 +408,6 @@ where #[cfg(all(feature = "std", panic = "unwind"))] Err((UnwindReason::Panic(panic), _, _)) => std::panic::resume_unwind(panic), }; - - extern "C" fn call_closure(payload: *mut u8, caller: *mut VMContext) -> bool - where - F: FnMut(*mut VMContext) -> bool, - { - unsafe { (*(payload as *mut F))(caller) } - } } /// Returns true if the first `CallThreadState` in this thread's chain that @@ -307,6 +439,7 @@ pub fn first_wasm_state_on_fiber_stack() -> bool { // usage of its accessor methods. mod call_thread_state { use super::*; + use crate::runtime::vm::Unwind; /// Temporary state stored on the stack which is registered in the `tls` module /// below for calls into wasm. @@ -320,6 +453,7 @@ mod call_thread_state { pub(super) capture_coredump: bool, pub(crate) limits: *const VMRuntimeLimits, + pub(crate) unwinder: &'static dyn Unwind, /// `Some(ptr)` iff this CallThreadState is for the execution of wasm. /// In that case, `ptr` is the executing `Store`'s stack chain. @@ -357,6 +491,8 @@ mod call_thread_state { } impl CallThreadState { + pub const JMP_BUF_INTERPRETER_SENTINEL: *mut u8 = 1 as *mut u8; + #[inline] pub(super) fn new( store: &mut StoreOpaque, @@ -371,6 +507,7 @@ mod call_thread_state { CallThreadState { unwind: Cell::new(None), + unwinder: store.unwinder(), jmp_buf: Cell::new(ptr::null()), #[cfg(all(feature = "signals-based-traps", not(miri)))] signal_handler: store.signal_handler(), @@ -424,7 +561,7 @@ mod call_thread_state { } pub use call_thread_state::*; -enum UnwindReason { +pub enum UnwindReason { #[cfg(all(feature = "std", panic = "unwind"))] Panic(Box), Trap(TrapReason), @@ -506,12 +643,6 @@ impl CallThreadState { traphandlers::wasmtime_longjmp(self.jmp_buf.get()); } - #[deprecated(note = "move to `record_unwind` or `unwind` instead")] - fn unwind_with(&self, reason: UnwindReason) -> ! { - self.record_unwind(reason); - unsafe { self.unwind() } - } - fn capture_backtrace( &self, limits: *const VMRuntimeLimits, @@ -521,7 +652,7 @@ impl CallThreadState { return None; } - Some(unsafe { Backtrace::new_with_trap_state(limits, self, trap_pc_and_fp) }) + Some(unsafe { Backtrace::new_with_trap_state(limits, self.unwinder, self, trap_pc_and_fp) }) } pub(crate) fn iter<'a>(&'a self) -> impl Iterator + 'a { @@ -532,6 +663,91 @@ impl CallThreadState { Some(this) }) } + + /// Trap handler using our thread-local state. + /// + /// * `regs` - some special program registers at the time that the trap + /// happened, for example `pc`. + /// * `faulting_addr` - the system-provided address that the a fault, if + /// any, happened at. This is used when debug-asserting that all segfaults + /// are known to live within a `Store` in a valid range. + /// * `call_handler` - a closure used to invoke the platform-specific + /// signal handler for each instance, if available. + /// + /// Attempts to handle the trap if it's a wasm trap. Returns a `TrapTest` + /// which indicates what this could be, such as: + /// + /// * `TrapTest::NotWasm` - not a wasm fault, this should get forwarded to + /// the next platform-specific fault handler. + /// * `TrapTest::HandledByEmbedder` - the embedder `call_handler` handled + /// this signal, nothing else to do. + /// * `TrapTest::Trap` - this is a wasm trap an the stack needs to be + /// unwound now. + pub(crate) fn test_if_trap( + &self, + regs: TrapRegisters, + faulting_addr: Option, + call_handler: impl Fn(&SignalHandler) -> bool, + ) -> TrapTest { + // If we haven't even started to handle traps yet, bail out. + if self.jmp_buf.get().is_null() { + return TrapTest::NotWasm; + } + + // First up see if any instance registered has a custom trap handler, + // in which case run them all. If anything handles the trap then we + // return that the trap was handled. + let _ = &call_handler; + #[cfg(all(feature = "signals-based-traps", not(miri)))] + if let Some(handler) = self.signal_handler { + if unsafe { call_handler(&*handler) } { + return TrapTest::HandledByEmbedder; + } + } + + // If this fault wasn't in wasm code, then it's not our problem + let Some((code, text_offset)) = lookup_code(regs.pc) else { + return TrapTest::NotWasm; + }; + + // If the fault was at a location that was not marked as potentially + // trapping, then that's a bug in Cranelift/Winch/etc. Don't try to + // catch the trap and pretend this isn't wasm so the program likely + // aborts. + let Some(trap) = code.lookup_trap_code(text_offset) else { + return TrapTest::NotWasm; + }; + + // If all that passed then this is indeed a wasm trap, so return the + // `jmp_buf` passed to `wasmtime_longjmp` to resume. + self.set_jit_trap(regs, faulting_addr, trap); + TrapTest::Trap { + jmp_buf: self.take_jmp_buf(), + } + } + + pub(crate) fn take_jmp_buf(&self) -> *const u8 { + self.jmp_buf.replace(ptr::null()) + } + + pub(crate) fn set_jit_trap( + &self, + TrapRegisters { pc, fp, .. }: TrapRegisters, + faulting_addr: Option, + trap: wasmtime_environ::Trap, + ) { + let backtrace = self.capture_backtrace(self.limits, Some((pc, fp))); + let coredump = self.capture_coredump(self.limits, Some((pc, fp))); + self.unwind.set(Some(( + UnwindReason::Trap(TrapReason::Jit { + pc, + faulting_addr, + trap, + }), + backtrace, + coredump, + ))) + } } // A private inner module for managing the TLS state that we require across diff --git a/crates/wasmtime/src/runtime/vm/traphandlers/backtrace.rs b/crates/wasmtime/src/runtime/vm/traphandlers/backtrace.rs index b947daeb4e00..8f81cdd993df 100644 --- a/crates/wasmtime/src/runtime/vm/traphandlers/backtrace.rs +++ b/crates/wasmtime/src/runtime/vm/traphandlers/backtrace.rs @@ -22,11 +22,11 @@ //! frame is a host frame). use crate::prelude::*; -use crate::runtime::vm::arch; +use crate::runtime::store::StoreOpaque; use crate::runtime::vm::continuation::stack_chain::StackChain; use crate::runtime::vm::{ traphandlers::{tls, CallThreadState}, - VMRuntimeLimits, + Unwind, VMRuntimeLimits, }; use core::ops::ControlFlow; @@ -60,9 +60,11 @@ impl Backtrace { } /// Capture the current Wasm stack in a backtrace. - pub fn new(limits: *const VMRuntimeLimits) -> Backtrace { + pub fn new(store: &StoreOpaque) -> Backtrace { + let limits = store.runtime_limits(); + let unwind = store.unwinder(); tls::with(|state| match state { - Some(state) => unsafe { Self::new_with_trap_state(limits, state, None) }, + Some(state) => unsafe { Self::new_with_trap_state(limits, unwind, state, None) }, None => Backtrace(vec![]), }) } @@ -74,11 +76,12 @@ impl Backtrace { /// instead of looking them up in `VMRuntimeLimits`. pub(crate) unsafe fn new_with_trap_state( limits: *const VMRuntimeLimits, + unwind: &dyn Unwind, state: &CallThreadState, trap_pc_and_fp: Option<(usize, usize)>, ) -> Backtrace { let mut frames = vec![]; - Self::trace_with_trap_state(limits, state, trap_pc_and_fp, |frame| { + Self::trace_with_trap_state(limits, unwind, state, trap_pc_and_fp, |frame| { frames.push(frame); ControlFlow::Continue(()) }); @@ -86,9 +89,11 @@ impl Backtrace { } /// Walk the current Wasm stack, calling `f` for each frame we walk. - pub fn trace(limits: *const VMRuntimeLimits, f: impl FnMut(Frame) -> ControlFlow<()>) { + pub fn trace(store: &StoreOpaque, f: impl FnMut(Frame) -> ControlFlow<()>) { + let limits = store.runtime_limits(); + let unwind = store.unwinder(); tls::with(|state| match state { - Some(state) => unsafe { Self::trace_with_trap_state(limits, state, None, f) }, + Some(state) => unsafe { Self::trace_with_trap_state(limits, unwind, state, None, f) }, None => {} }); } @@ -100,6 +105,7 @@ impl Backtrace { /// instead of looking them up in `VMRuntimeLimits`. pub(crate) unsafe fn trace_with_trap_state( limits: *const VMRuntimeLimits, + unwind: &dyn Unwind, state: &CallThreadState, trap_pc_and_fp: Option<(usize, usize)>, mut f: impl FnMut(Frame) -> ControlFlow<()>, @@ -187,13 +193,14 @@ impl Backtrace { for (_chain, pc, fp, sp) in activations { if cfg!(feature = "wasmfx_baseline") && cfg!(not(feature = "wasmfx_no_baseline")) { - if let ControlFlow::Break(()) = Self::trace_through_wasm(pc, fp, sp, &mut f) { + if let ControlFlow::Break(()) = Self::trace_through_wasm(unwind, pc, fp, sp, &mut f) + { log::trace!("====== Done Capturing Backtrace (closure break) ======"); return; } } else { if let ControlFlow::Break(()) = - Self::trace_through_continuations(_chain, pc, fp, sp, &mut f) + Self::trace_through_continuations(unwind, _chain, pc, fp, sp, &mut f) { log::trace!("====== Done Capturing Backtrace (closure break) ======"); return; @@ -205,6 +212,7 @@ impl Backtrace { } unsafe fn trace_through_continuations( + unwind: &dyn Unwind, chain: Option<&StackChain>, pc: usize, fp: usize, @@ -213,7 +221,7 @@ impl Backtrace { ) -> ControlFlow<()> { // Handle the stack that is currently running (which may be a // continuation or the main stack). - Self::trace_through_wasm(pc, fp, trampoline_sp, &mut f)?; + Self::trace_through_wasm(unwind, pc, fp, trampoline_sp, &mut f)?; chain.map_or(ControlFlow::Continue(()), |chain| { debug_assert_ne!(*chain, StackChain::Absent); @@ -247,6 +255,7 @@ impl Backtrace { } Self::trace_through_wasm( + unwind, limits.last_wasm_exit_pc, limits.last_wasm_exit_fp, limits.last_wasm_entry_fp, @@ -261,6 +270,7 @@ impl Backtrace { /// frame at the given PC and FP and ending at `trampoline_sp`. // TODO(frank-emrich) Implement tracing across continuations. unsafe fn trace_through_wasm( + unwind: &dyn Unwind, mut pc: usize, mut fp: usize, trampoline_fp: usize, @@ -329,7 +339,7 @@ impl Backtrace { // Wasm. Finally also assert that it's aligned correctly as an // additional sanity check. assert!(trampoline_fp > fp, "{trampoline_fp:#x} > {fp:#x}"); - arch::assert_fp_is_aligned(fp); + unwind.assert_fp_is_aligned(fp); log::trace!("--- Tracing through one Wasm frame ---"); log::trace!("pc = {:p}", pc as *const ()); @@ -337,17 +347,17 @@ impl Backtrace { f(Frame { pc, fp })?; - pc = arch::get_next_older_pc_from_fp(fp); + pc = unwind.get_next_older_pc_from_fp(fp); // We rely on this offset being zero for all supported architectures // in `crates/cranelift/src/component/compiler.rs` when we set the // Wasm exit FP. If this ever changes, we will need to update that // code as well! - assert_eq!(arch::NEXT_OLDER_FP_FROM_FP_OFFSET, 0); + assert_eq!(unwind.next_older_fp_from_fp_offset(), 0); // Get the next older frame pointer from the current Wasm frame // pointer. - let next_older_fp = *(fp as *mut usize).add(arch::NEXT_OLDER_FP_FROM_FP_OFFSET); + let next_older_fp = *(fp as *mut usize).add(unwind.next_older_fp_from_fp_offset()); // Because the stack always grows down, the older FP must be greater // than the current FP. diff --git a/crates/wasmtime/src/runtime/vm/traphandlers/coredump_enabled.rs b/crates/wasmtime/src/runtime/vm/traphandlers/coredump_enabled.rs index 6d269af67f1c..ee598e1d0ca2 100644 --- a/crates/wasmtime/src/runtime/vm/traphandlers/coredump_enabled.rs +++ b/crates/wasmtime/src/runtime/vm/traphandlers/coredump_enabled.rs @@ -31,7 +31,8 @@ impl CallThreadState { if !self.capture_coredump { return None; } - let bt = unsafe { Backtrace::new_with_trap_state(limits, self, trap_pc_and_fp) }; + let bt = + unsafe { Backtrace::new_with_trap_state(limits, self.unwinder, self, trap_pc_and_fp) }; Some(CoreDumpStack { bt, diff --git a/crates/wasmtime/src/runtime/vm/traphandlers/signals.rs b/crates/wasmtime/src/runtime/vm/traphandlers/signals.rs index 1a9e8da94d0e..ac5d6a3409a7 100644 --- a/crates/wasmtime/src/runtime/vm/traphandlers/signals.rs +++ b/crates/wasmtime/src/runtime/vm/traphandlers/signals.rs @@ -6,30 +6,8 @@ //! thise module serves as a shared entrypoint for initialization entrypoints //! (`init_traps`) and testing if a trapping opcode is wasm (`test_if_trap`). -use crate::runtime::module::lookup_code; use crate::sync::RwLock; use crate::vm::sys::traphandlers::TrapHandler; -use crate::vm::traphandlers::{CallThreadState, SignalHandler, TrapReason, UnwindReason}; -use core::ptr; - -pub(crate) struct TrapRegisters { - pub pc: usize, - pub fp: usize, -} - -/// Return value from `test_if_trap`. -pub(crate) enum TrapTest { - /// Not a wasm trap, need to delegate to whatever process handler is next. - NotWasm, - /// This trap was handled by the embedder via custom embedding APIs. - HandledByEmbedder, - /// This is a wasm trap, it needs to be handled. - #[cfg_attr(miri, allow(dead_code))] - Trap { - /// How to longjmp back to the original wasm frame. - jmp_buf: *const u8, - }, -} /// Platform-specific trap-handler state. /// @@ -84,81 +62,3 @@ pub unsafe fn deinit_traps() { let mut lock = TRAP_HANDLER.write(); let _ = lock.take(); } - -impl CallThreadState { - /// Trap handler using our thread-local state. - /// - /// * `pc` - the program counter the trap happened at - /// * `call_handler` - a closure used to invoke the platform-specific - /// signal handler for each instance, if available. - /// - /// Attempts to handle the trap if it's a wasm trap. Returns a few - /// different things: - /// - /// * null - the trap didn't look like a wasm trap and should continue as a - /// trap - /// * 1 as a pointer - the trap was handled by a custom trap handler on an - /// instance, and the trap handler should quickly return. - /// * a different pointer - a jmp_buf buffer to longjmp to, meaning that - /// the wasm trap was successfully handled. - pub(crate) fn test_if_trap( - &self, - regs: TrapRegisters, - faulting_addr: Option, - call_handler: impl Fn(&SignalHandler) -> bool, - ) -> TrapTest { - // If we haven't even started to handle traps yet, bail out. - if self.jmp_buf.get().is_null() { - return TrapTest::NotWasm; - } - - // First up see if any instance registered has a custom trap handler, - // in which case run them all. If anything handles the trap then we - // return that the trap was handled. - if let Some(handler) = self.signal_handler { - if unsafe { call_handler(&*handler) } { - return TrapTest::HandledByEmbedder; - } - } - - // If this fault wasn't in wasm code, then it's not our problem - let Some((code, text_offset)) = lookup_code(regs.pc) else { - return TrapTest::NotWasm; - }; - - let Some(trap) = code.lookup_trap_code(text_offset) else { - return TrapTest::NotWasm; - }; - - self.set_jit_trap(regs, faulting_addr, trap); - - // If all that passed then this is indeed a wasm trap, so return the - // `jmp_buf` passed to `wasmtime_longjmp` to resume. - TrapTest::Trap { - jmp_buf: self.take_jmp_buf(), - } - } - - pub(crate) fn take_jmp_buf(&self) -> *const u8 { - self.jmp_buf.replace(ptr::null()) - } - - pub(crate) fn set_jit_trap( - &self, - TrapRegisters { pc, fp, .. }: TrapRegisters, - faulting_addr: Option, - trap: wasmtime_environ::Trap, - ) { - let backtrace = self.capture_backtrace(self.limits, Some((pc, fp))); - let coredump = self.capture_coredump(self.limits, Some((pc, fp))); - self.unwind.set(Some(( - UnwindReason::Trap(TrapReason::Jit { - pc, - faulting_addr, - trap, - }), - backtrace, - coredump, - ))) - } -} diff --git a/crates/wasmtime/src/runtime/vm/unwind.rs b/crates/wasmtime/src/runtime/vm/unwind.rs new file mode 100644 index 000000000000..5da3ca3cf464 --- /dev/null +++ b/crates/wasmtime/src/runtime/vm/unwind.rs @@ -0,0 +1,56 @@ +//! Support for low-level primitives of unwinding the stack. + +use crate::runtime::vm::arch; + +/// Implementation necessary to unwind the stack, used by `Backtrace`. +pub unsafe trait Unwind { + /// Returns the offset, from the current frame pointer, of where to get to + /// the previous frame pointer on the stack. + fn next_older_fp_from_fp_offset(&self) -> usize; + + /// Load the return address of a frame given the frame pointer for that + /// frame. + unsafe fn get_next_older_pc_from_fp(&self, fp: usize) -> usize; + + /// Debug assertion that the frame pointer is aligned. + fn assert_fp_is_aligned(&self, fp: usize); +} + +/// A host-backed implementation of unwinding, using the native platform ABI +/// that Cranelift has. +pub struct UnwindHost; + +unsafe impl Unwind for UnwindHost { + fn next_older_fp_from_fp_offset(&self) -> usize { + arch::NEXT_OLDER_FP_FROM_FP_OFFSET + } + unsafe fn get_next_older_pc_from_fp(&self, fp: usize) -> usize { + arch::get_next_older_pc_from_fp(fp) + } + fn assert_fp_is_aligned(&self, fp: usize) { + arch::assert_fp_is_aligned(fp) + } +} + +/// An implementation specifically designed for unwinding Pulley's runtime stack +/// (which might not match the native host). +pub struct UnwindPulley; + +unsafe impl Unwind for UnwindPulley { + fn next_older_fp_from_fp_offset(&self) -> usize { + 0 + } + unsafe fn get_next_older_pc_from_fp(&self, fp: usize) -> usize { + // The calling convention always pushes the return pointer (aka the PC + // of the next older frame) just before this frame. + *(fp as *mut usize).offset(1) + } + fn assert_fp_is_aligned(&self, fp: usize) { + let expected = if cfg!(target_pointer_width = "32") { + 8 + } else { + 16 + }; + assert_eq!(fp % expected, 0, "stack should always be aligned"); + } +} diff --git a/crates/wasmtime/src/runtime/vm/vmcontext.rs b/crates/wasmtime/src/runtime/vm/vmcontext.rs index 30ca7dcd8daa..18265eabe5b3 100644 --- a/crates/wasmtime/src/runtime/vm/vmcontext.rs +++ b/crates/wasmtime/src/runtime/vm/vmcontext.rs @@ -5,7 +5,7 @@ mod vm_host_func_context; pub use self::vm_host_func_context::VMArrayCallHostFuncContext; use crate::prelude::*; -use crate::runtime::vm::{GcStore, VMGcRef}; +use crate::runtime::vm::{GcStore, InterpreterRef, VMGcRef}; use crate::store::StoreOpaque; use core::cell::UnsafeCell; use core::ffi::c_void; @@ -798,8 +798,35 @@ impl VMFuncRef { /// # Unsafety /// /// This method is unsafe because it can be called with any pointers. They - /// must all be valid for this wasm function call to proceed. + /// must all be valid for this wasm function call to proceed. For example + /// the `caller` must be valid machine code if `pulley` is `None` or it must + /// be valid bytecode if `pulley` is `Some`. Additionally `args_and_results` + /// must be large enough to handle all the arguments/results for this call. + /// + /// Note that the unsafety invariants to maintain here are not currently + /// exhaustively documented. pub unsafe fn array_call( + &self, + pulley: Option>, + caller: *mut VMOpaqueContext, + args_and_results: *mut [ValRaw], + ) -> bool { + match pulley { + Some(vm) => self.array_call_interpreted(vm, caller, args_and_results), + None => self.array_call_native(caller, args_and_results), + } + } + + unsafe fn array_call_interpreted( + &self, + vm: InterpreterRef<'_>, + caller: *mut VMOpaqueContext, + args_and_results: *mut [ValRaw], + ) -> bool { + vm.call(self.array_call.cast(), self.vmctx, caller, args_and_results) + } + + unsafe fn array_call_native( &self, caller: *mut VMOpaqueContext, args_and_results: *mut [ValRaw], @@ -886,7 +913,7 @@ macro_rules! define_builtin_array { (@ty i32) => (u32); (@ty i64) => (u64); (@ty u8) => (u8); - (@ty reference) => (u32); + (@ty bool) => (bool); (@ty pointer) => (*mut u8); (@ty vmctx) => (*mut VMContext); } @@ -896,8 +923,7 @@ wasmtime_environ::foreach_builtin_function!(define_builtin_array); const _: () = { assert!( mem::size_of::() - == mem::size_of::() - * (BuiltinFunctionIndex::builtin_functions_total_number() as usize) + == mem::size_of::() * (BuiltinFunctionIndex::len() as usize) ) }; @@ -905,11 +931,11 @@ const _: () = { #[derive(Debug)] #[repr(C)] pub struct VMRuntimeLimits { - /// Current stack limit of the wasm module. - /// - /// For more information see `crates/cranelift/src/lib.rs`. - pub stack_limit: UnsafeCell, - + // NB: 64-bit integer fields are located first with pointer-sized fields + // trailing afterwards. That makes the offsets in this structure easier to + // calculate on 32-bit platforms as we don't have to worry about the + // alignment of 64-bit integers. + // /// Indicator of how much fuel has been consumed and is remaining to /// WebAssembly. /// @@ -924,6 +950,11 @@ pub struct VMRuntimeLimits { /// yield if running asynchronously. pub epoch_deadline: UnsafeCell, + /// Current stack limit of the wasm module. + /// + /// For more information see `crates/cranelift/src/lib.rs`. + pub stack_limit: UnsafeCell, + /// The value of the frame pointer register when we last called from Wasm to /// the host. /// diff --git a/crates/wast-util/src/lib.rs b/crates/wast-util/src/lib.rs index d54af2de732c..c18e03d15556 100644 --- a/crates/wast-util/src/lib.rs +++ b/crates/wast-util/src/lib.rs @@ -202,6 +202,15 @@ macro_rules! define_test_config { pub struct TestConfig { $(pub $option: Option,)* } + + impl TestConfig { + $( + pub fn $option(&self) -> bool { + self.$option.unwrap_or(false) + } + )* + } + } } @@ -222,6 +231,7 @@ impl TestConfig { } /// Configuration that spec tests can run under. +#[derive(Debug)] pub struct WastConfig { /// Compiler chosen to run this test. pub compiler: Compiler, @@ -231,27 +241,85 @@ pub struct WastConfig { pub collector: Collector, } +/// Different compilers that can be tested in Wasmtime. #[derive(PartialEq, Debug, Copy, Clone)] pub enum Compiler { - Cranelift, + /// Cranelift backend. + /// + /// This tests the Cranelift code generator for native platforms. This + /// notably excludes Pulley since that's listed separately below even though + /// Pulley is a backend of Cranelift. This is only used for native code + /// generation such as x86_64. + CraneliftNative, + + /// Winch backend. + /// + /// This tests the Winch backend for native platforms. Currently Winch + /// primarily supports x86_64. Winch, + + /// Pulley interpreter. + /// + /// This tests the Cranelift pulley backend plus the pulley execution + /// environment of the output bytecode. Note that this is separate from + /// `Cranelift` above to be able to test both on platforms where Cranelift + /// has native codegen support. + CraneliftPulley, } impl Compiler { + /// Returns whether this compiler is known to fail for the provided + /// `TestConfig`. + /// + /// This function will determine if the configuration of the test provided + /// is known to guarantee fail. This effectively tracks the proposal support + /// for each compiler backend/runtime and tests whether `config` enables or + /// disables features that aren't supported. + /// + /// Note that this is closely aligned with + /// `Config::compiler_panicking_wasm_features`. pub fn should_fail(&self, config: &TestConfig) -> bool { match self { - Compiler::Cranelift => {} + // Currently Cranelift supports all wasm proposals that wasmtime + // tests. + Compiler::CraneliftNative => {} + + // Winch doesn't have quite the full breadth of support that + // Cranelift has quite yet. Compiler::Winch => { - // A few proposals that winch has no support for. - if config.gc == Some(true) - || config.threads == Some(true) - || config.tail_call == Some(true) - || config.function_references == Some(true) - || config.gc == Some(true) - || config.relaxed_simd == Some(true) - || config.gc_types == Some(true) - || config.exceptions == Some(true) - || config.stack_switching == Some(true) + if config.gc() + || config.threads() + || config.tail_call() + || config.function_references() + || config.gc() + || config.relaxed_simd() + || config.gc_types() + || config.exceptions() + || config.stack_switching() + { + return true; + } + } + + // Pulley is just getting started, it implements almost no proposals + // yet. + Compiler::CraneliftPulley => { + // Unsupported proposals + if config.memory64() + || config.custom_page_sizes() + || config.multi_memory() + || config.threads() + || config.gc() + || config.function_references() + || config.relaxed_simd() + || config.reference_types() + || config.tail_call() + || config.extended_const() + || config.wide_arithmetic() + || config.simd() + || config.gc_types() + || config.exceptions() + || config.stack_switching() { return true; } @@ -260,6 +328,23 @@ impl Compiler { false } + + /// Returns whether this complier configuration supports the current host + /// architecture. + pub fn supports_host(&self) -> bool { + match self { + Compiler::CraneliftNative => { + cfg!(target_arch = "x86_64") + || cfg!(target_arch = "aarch64") + || cfg!(target_arch = "riscv64") + || cfg!(target_arch = "s390x") + } + Compiler::Winch => { + cfg!(target_arch = "x86_64") + } + Compiler::CraneliftPulley => true, + } + } } #[derive(PartialEq, Debug, Copy, Clone)] @@ -273,10 +358,7 @@ impl WastTest { /// Returns whether this test exercises the GC types and might want to use /// multiple different garbage collectors. pub fn test_uses_gc_types(&self) -> bool { - self.config - .gc - .or(self.config.function_references) - .unwrap_or(false) + self.config.gc() || self.config.function_references() } /// Returns the optional spec proposal that this test is associated with. @@ -308,8 +390,88 @@ impl WastTest { } } - // Winch only supports x86_64 at this time. - if config.compiler == Compiler::Winch && !cfg!(target_arch = "x86_64") { + if !config.compiler.supports_host() { + return true; + } + + // Some tests are known to fail with the pooling allocator + if config.pooling { + let unsupported = [ + // allocates too much memory for the pooling configuration here + "misc_testsuite/memory64/more-than-4gb.wast", + // shared memories + pooling allocator aren't supported yet + "misc_testsuite/memory-combos.wast", + "misc_testsuite/threads/LB.wast", + "misc_testsuite/threads/LB_atomic.wast", + "misc_testsuite/threads/MP.wast", + "misc_testsuite/threads/MP_atomic.wast", + "misc_testsuite/threads/MP_wait.wast", + "misc_testsuite/threads/SB.wast", + "misc_testsuite/threads/SB_atomic.wast", + "misc_testsuite/threads/atomics_notify.wast", + "misc_testsuite/threads/atomics_wait_address.wast", + "misc_testsuite/threads/wait_notify.wast", + "spec_testsuite/proposals/threads/atomic.wast", + "spec_testsuite/proposals/threads/exports.wast", + "spec_testsuite/proposals/threads/memory.wast", + ]; + + if unsupported.iter().any(|part| self.path.ends_with(part)) { + return true; + } + } + + // Pulley is in a bit of a special state at this time where it supports + // only a subset of the initial MVP of WebAssembly. That means that no + // test technically passes by default but a few do happen to use just + // the right subset of wasm that we can pass it. For now maintain an + // allow-list of tests that are known to pass in Pulley. As tests are + // fixed they should get added to this list. Over time this list will + // instead get inverted to "these tests are known to fail" once Pulley + // implements more proposals. + if config.compiler == Compiler::CraneliftPulley { + let supported = [ + "custom-page-sizes/custom-page-sizes-invalid.wast", + "exception-handling/exports.wast", + "extended-const/data.wast", + "misc_testsuite/component-model/adapter.wast", + "misc_testsuite/component-model/aliasing.wast", + "misc_testsuite/component-model/import.wast", + "misc_testsuite/component-model/instance.wast", + "misc_testsuite/component-model/linking.wast", + "misc_testsuite/component-model/nested.wast", + "misc_testsuite/component-model/types.wast", + "misc_testsuite/elem-ref-null.wast", + "misc_testsuite/elem_drop.wast", + "misc_testsuite/empty.wast", + "misc_testsuite/fib.wast", + "misc_testsuite/func-400-params.wast", + "misc_testsuite/gc/more-rec-groups-than-types.wast", + "misc_testsuite/gc/rec-group-funcs.wast", + "misc_testsuite/rs2wasm-add-func.wast", + "misc_testsuite/stack_overflow.wast", + "misc_testsuite/winch/misc.wast", + "threads/exports.wast", + ]; + + if supported.iter().any(|part| self.path.ends_with(part)) { + return false; + } + + // FIXME: once the backend has enough instruction support move these + // into the above tests since they should pass on 64-bit platforms + // as well. + let supported32bit = [ + "misc_testsuite/winch/table_grow.wast", + "misc_testsuite/table_grow_with_funcref.wast", + // ... + ]; + if cfg!(target_pointer_width = "32") { + if supported32bit.iter().any(|part| self.path.ends_with(part)) { + return false; + } + } + return true; } @@ -452,33 +614,6 @@ impl WastTest { } } - // Some tests are known to fail with the pooling allocator - if config.pooling { - let unsupported = [ - // allocates too much memory for the pooling configuration here - "misc_testsuite/memory64/more-than-4gb.wast", - // shared memories + pooling allocator aren't supported yet - "misc_testsuite/memory-combos.wast", - "misc_testsuite/threads/LB.wast", - "misc_testsuite/threads/LB_atomic.wast", - "misc_testsuite/threads/MP.wast", - "misc_testsuite/threads/MP_atomic.wast", - "misc_testsuite/threads/MP_wait.wast", - "misc_testsuite/threads/SB.wast", - "misc_testsuite/threads/SB_atomic.wast", - "misc_testsuite/threads/atomics_notify.wast", - "misc_testsuite/threads/atomics_wait_address.wast", - "misc_testsuite/threads/wait_notify.wast", - "spec_testsuite/proposals/threads/atomic.wast", - "spec_testsuite/proposals/threads/exports.wast", - "spec_testsuite/proposals/threads/memory.wast", - ]; - - if unsupported.iter().any(|part| self.path.ends_with(part)) { - return true; - } - } - false } } diff --git a/crates/winch/src/builder.rs b/crates/winch/src/builder.rs index 3e342a8b3c91..16cdb4142fcd 100644 --- a/crates/winch/src/builder.rs +++ b/crates/winch/src/builder.rs @@ -65,10 +65,6 @@ impl CompilerBuilder for Builder { bail!("Winch requires the signals-based-traps option to be enabled"); } - if tunables.epoch_interruption { - bail!("Winch does not currently support epoch based interruption"); - } - if tunables.generate_native_debuginfo { bail!("Winch does not currently support generating native debug information"); } diff --git a/pulley/examples/objdump.rs b/pulley/examples/objdump.rs index 7e9c7f8ed154..ad7b57b0dd51 100644 --- a/pulley/examples/objdump.rs +++ b/pulley/examples/objdump.rs @@ -5,7 +5,7 @@ //! cargo run --example objdump -F disas -p pulley-interpreter foo.cwasm use anyhow::{bail, Result}; -use object::{File, Object as _, ObjectSection, ObjectSymbol, SectionKind, SymbolKind}; +use object::{File, Object as _, ObjectSection, ObjectSymbol, SymbolKind}; use pulley_interpreter::decode::Decoder; use pulley_interpreter::disas::Disassembler; @@ -14,7 +14,7 @@ fn main() -> Result<()> { let image = File::parse(&cwasm[..])?; - let text = match image.sections().find(|s| s.kind() == SectionKind::Text) { + let text = match image.sections().find(|s| s.name().ok() == Some(".text")) { Some(section) => section.data()?, None => bail!("no text section"), }; diff --git a/pulley/fuzz/src/interp.rs b/pulley/fuzz/src/interp.rs index 82f29ffe0c88..be968d4ceeca 100644 --- a/pulley/fuzz/src/interp.rs +++ b/pulley/fuzz/src/interp.rs @@ -1,5 +1,5 @@ use pulley_interpreter::{ - interp::Vm, + interp::{DoneReason, Vm}, op::{self, ExtendedOp, Op}, *, }; @@ -30,8 +30,8 @@ pub fn interp(ops: Vec) { let args = &[]; let rets = &[]; match vm.call(NonNull::from(&encoded[0]), args, rets.into_iter().copied()) { - Ok(rets) => assert_eq!(rets.count(), 0), - Err(pc) => { + DoneReason::ReturnToHost(rets) => assert_eq!(rets.count(), 0), + DoneReason::Trap(pc) => { let pc = pc.as_ptr() as usize; let start = &encoded[0] as *const u8 as usize; @@ -47,6 +47,7 @@ pub fn interp(ops: Vec) { assert_eq!(encoded[index + 1], a); assert_eq!(encoded[index + 2], b); } + DoneReason::CallIndirectHost { .. } => unreachable!(), }; } } @@ -120,6 +121,12 @@ fn op_is_safe_for_fuzzing(op: &Op) -> bool { Op::BrTable32(_) => false, Op::StackAlloc32(_) => false, Op::StackFree32(_) => false, + Op::Zext8(Zext8 { dst, .. }) + | Op::Zext16(Zext16 { dst, .. }) + | Op::Zext32(Zext32 { dst, .. }) + | Op::Sext8(Sext8 { dst, .. }) + | Op::Sext32(Sext32 { dst, .. }) + | Op::Sext16(Sext16 { dst, .. }) => !dst.is_special(), } } @@ -128,5 +135,8 @@ fn extended_op_is_safe_for_fuzzing(op: &ExtendedOp) -> bool { ExtendedOp::Trap(_) => true, ExtendedOp::Nop(_) => true, ExtendedOp::CallIndirectHost(_) => false, + ExtendedOp::Bswap32(Bswap32 { dst, .. }) | ExtendedOp::Bswap64(Bswap64 { dst, .. }) => { + !dst.is_special() + } } } diff --git a/pulley/fuzz/src/roundtrip.rs b/pulley/fuzz/src/roundtrip.rs index 3f88db1b7dd8..b46f124ff696 100644 --- a/pulley/fuzz/src/roundtrip.rs +++ b/pulley/fuzz/src/roundtrip.rs @@ -10,7 +10,10 @@ pub fn roundtrip(ops: Vec) { let mut encoded = vec![]; for op in &ops { + let before = encoded.len(); op.encode(&mut encoded); + let size = encoded.len() - before; + assert_eq!(size, op.width().into()); } log::trace!("encoded: {encoded:?}"); diff --git a/pulley/src/encode.rs b/pulley/src/encode.rs index dcc5894c50ef..1891b158a7af 100644 --- a/pulley/src/encode.rs +++ b/pulley/src/encode.rs @@ -4,13 +4,20 @@ use crate::imms::*; use crate::opcode::{ExtendedOpcode, Opcode}; use crate::regs::*; -trait Encode { +/// Helper trait to encode instructions into a "sink". +pub trait Encode { + /// The encoded width of this instruction. + const WIDTH: u8; + + /// Encodes this operand or instruction into the provided `sink`. fn encode(&self, sink: &mut E) where E: Extend; } impl Encode for u8 { + const WIDTH: u8 = 1; + fn encode(&self, sink: &mut E) where E: Extend, @@ -20,6 +27,8 @@ impl Encode for u8 { } impl Encode for u16 { + const WIDTH: u8 = 2; + fn encode(&self, sink: &mut E) where E: Extend, @@ -29,6 +38,8 @@ impl Encode for u16 { } impl Encode for u32 { + const WIDTH: u8 = 4; + fn encode(&self, sink: &mut E) where E: Extend, @@ -38,6 +49,8 @@ impl Encode for u32 { } impl Encode for u64 { + const WIDTH: u8 = 8; + fn encode(&self, sink: &mut E) where E: Extend, @@ -47,6 +60,8 @@ impl Encode for u64 { } impl Encode for i8 { + const WIDTH: u8 = 1; + fn encode(&self, sink: &mut E) where E: Extend, @@ -56,6 +71,8 @@ impl Encode for i8 { } impl Encode for i16 { + const WIDTH: u8 = 2; + fn encode(&self, sink: &mut E) where E: Extend, @@ -65,6 +82,8 @@ impl Encode for i16 { } impl Encode for i32 { + const WIDTH: u8 = 4; + fn encode(&self, sink: &mut E) where E: Extend, @@ -74,6 +93,8 @@ impl Encode for i32 { } impl Encode for i64 { + const WIDTH: u8 = 8; + fn encode(&self, sink: &mut E) where E: Extend, @@ -83,6 +104,8 @@ impl Encode for i64 { } impl Encode for XReg { + const WIDTH: u8 = 1; + fn encode(&self, sink: &mut E) where E: Extend, @@ -92,6 +115,8 @@ impl Encode for XReg { } impl Encode for FReg { + const WIDTH: u8 = 1; + fn encode(&self, sink: &mut E) where E: Extend, @@ -101,6 +126,8 @@ impl Encode for FReg { } impl Encode for VReg { + const WIDTH: u8 = 1; + fn encode(&self, sink: &mut E) where E: Extend, @@ -110,6 +137,8 @@ impl Encode for VReg { } impl Encode for PcRelOffset { + const WIDTH: u8 = 4; + fn encode(&self, sink: &mut E) where E: Extend, @@ -119,6 +148,8 @@ impl Encode for PcRelOffset { } impl Encode for BinaryOperands { + const WIDTH: u8 = 2; + fn encode(&self, sink: &mut E) where E: Extend, @@ -128,6 +159,8 @@ impl Encode for BinaryOperands { } impl Encode for RegSet { + const WIDTH: u8 = 4; + fn encode(&self, sink: &mut E) where E: Extend, @@ -161,6 +194,18 @@ macro_rules! impl_encoders { )* )? } + + impl Encode for crate::op::$name { + const WIDTH: u8 = 1 $($( + <$field_ty as Encode>::WIDTH)*)?; + + fn encode(&self, sink: &mut E) + where + E: Extend, + { + let Self { $( $( $field ),* )? } = *self; + $snake_name(sink $( $(, $field)* )?) + } + } )* }; } @@ -192,6 +237,18 @@ macro_rules! impl_extended_encoders { )* )? } + + impl Encode for crate::op::$name { + const WIDTH: u8 = 3 $($( + <$field_ty as Encode>::WIDTH)*)?; + + fn encode(&self, sink: &mut E) + where + E: Extend, + { + let Self { $( $( $field ),* )? } = *self; + $snake_name(sink $( $(, $field)* )?) + } + } )* }; } diff --git a/pulley/src/interp.rs b/pulley/src/interp.rs index 4e13d385ef24..1783ec78b102 100644 --- a/pulley/src/interp.rs +++ b/pulley/src/interp.rs @@ -1,9 +1,9 @@ //! Interpretation of pulley bytecode. use crate::decode::*; +use crate::encode::Encode; use crate::imms::*; use crate::regs::*; -use crate::ExtendedOpcode; use alloc::string::ToString; use alloc::{vec, vec::Vec}; use core::fmt; @@ -76,7 +76,28 @@ impl Vm { func: NonNull, args: &[Val], rets: impl IntoIterator + 'a, - ) -> Result + 'a, NonNull> { + ) -> DoneReason + 'a> { + self.call_start(args); + + match self.call_run(func) { + DoneReason::ReturnToHost(()) => DoneReason::ReturnToHost(self.call_end(rets)), + DoneReason::Trap(pc) => DoneReason::Trap(pc), + DoneReason::CallIndirectHost { id, resume } => { + DoneReason::CallIndirectHost { id, resume } + } + } + } + + /// Peforms the initial part of [`Vm::call`] in setting up the `args` + /// provided in registers according to Pulley's ABI. + /// + /// # Unsafety + /// + /// All the same unsafety as `call` and additiionally, you must + /// invoke `call_run` and then `call_end` after calling `call_start`. + /// If you don't want to wrangle these invocations, use `call` instead + /// of `call_{start,run,end}`. + pub unsafe fn call_start<'a>(&'a mut self, args: &[Val]) { // NB: make sure this method stays in sync with // `PulleyMachineDeps::compute_arg_locs`! @@ -100,14 +121,45 @@ impl Vm { }, } } + } - self.run(func)?; + /// Peforms the internal part of [`Vm::call`] where bytecode is actually + /// executed. + /// + /// # Unsafety + /// + /// In addition to all the invariants documented for `call`, you + /// may only invoke `call_run` after invoking `call_start` to + /// initialize this call's arguments. + pub unsafe fn call_run(&mut self, pc: NonNull) -> DoneReason<()> { + self.state.debug_assert_done_reason_none(); + let interpreter = Interpreter { + state: &mut self.state, + pc: UnsafeBytecodeStream::new(pc), + }; + let done = interpreter.run(); + self.state.done_decode(done) + } + + /// Peforms the tail end of [`Vm::call`] by returning the values as + /// determined by `rets` according to Pulley's ABI. + /// + /// # Unsafety + /// + /// In addition to the invariants documented for `call`, this may + /// only be called after `call_run`. + pub unsafe fn call_end<'a>( + &'a mut self, + rets: impl IntoIterator + 'a, + ) -> impl Iterator + 'a { + // NB: make sure this method stays in sync with + // `PulleyMachineDeps::compute_arg_locs`! let mut x_rets = (0..16).map(|x| XReg::new_unchecked(x)); let mut f_rets = (0..16).map(|f| FReg::new_unchecked(f)); let mut v_rets = (0..16).map(|v| VReg::new_unchecked(v)); - Ok(rets.into_iter().map(move |ty| match ty { + rets.into_iter().map(move |ty| match ty { RegType::XReg => match x_rets.next() { Some(reg) => Val::XReg(self.state[reg]), None => todo!("stack slots"), @@ -120,43 +172,7 @@ impl Vm { Some(reg) => Val::VReg(self.state[reg]), None => todo!("stack slots"), }, - })) - } - - unsafe fn run(&mut self, pc: NonNull) -> Result<(), NonNull> { - let interpreter = Interpreter { - state: &mut self.state, - pc: UnsafeBytecodeStream::new(pc), - }; - match interpreter.run() { - Done::ReturnToHost => self.return_to_host(), - Done::Trap(pc) => self.trap(pc), - Done::HostCall => self.host_call(), - } - } - - #[cold] - #[inline(never)] - fn return_to_host(&self) -> Result<(), NonNull> { - Ok(()) - } - - #[cold] - #[inline(never)] - fn trap(&self, pc: NonNull) -> Result<(), NonNull> { - // We are given the VM's PC upon having executed a trap instruction, - // which is actually pointing to the next instruction after the - // trap. Back the PC up to point exactly at the trap. - let trap_pc = unsafe { - NonNull::new_unchecked(pc.as_ptr().byte_sub(ExtendedOpcode::ENCODED_SIZE_OF_TRAP)) - }; - Err(trap_pc) - } - - #[cold] - #[inline(never)] - fn host_call(&self) -> Result<(), NonNull> { - todo!() + }) } } @@ -282,8 +298,49 @@ impl fmt::LowerHex for XRegVal { } } -// NB: we always store these in little endian, so we have to `from_le_bytes` -// whenever we read and `to_le_bytes` whenever we store. +/// Contents of an "x" register, or a general-purpose register. +/// +/// This is represented as a Rust `union` to make it easier to access typed +/// views of this, notably the `ptr` field which enables preserving a bit of +/// provenance for Rust for values stored as a pointer and read as a pointer. +/// +/// Note that the actual in-memory representation of this value is handled +/// carefully at this time. Pulley bytecode exposes the ability to store a +/// 32-bit result into a register and then read the 64-bit contents of the +/// register. This leaves us with the question of what to do with the upper bits +/// of the register when the 32-bit result is generated. Possibilities for +/// handling this are: +/// +/// 1. Do nothing, just store the 32-bit value. The problem with this approach +/// means that the "upper bits" are now endianness-dependent. That means that +/// the state of the register is now platform-dependent. +/// 2. Sign or zero-extend. This restores platform-independent behavior but +/// requires an extra store on 32-bit platforms because they can probably +/// only store 32-bits at a time. +/// 3. Always store the values in this union as little-endian. This means that +/// big-endian platforms have to do a byte-swap but otherwise it has +/// platform-independent behavior. +/// +/// This union chooses route (3) at this time where the values here are always +/// stored in little-endian form (even the `ptr` field). That guarantees +/// cross-platform behavior while also minimizing the amount of data stored on +/// writes. +/// +/// In the future we may wish to benchmark this and possibly change this. +/// Technically Cranelift-generated bytecode should never rely on the upper bits +/// of a register if it didn't previously write them so this in theory doesn't +/// actually matter for Cranelift or wasm semantics. The only cost right now is +/// to big-endian platforms though and it's not certain how crucial performance +/// will be there. +/// +/// One final note is that this notably contrasts with native CPUs where +/// native ISAs like RISC-V specifically define the entire register on every +/// instruction, even if only the low half contains a significant result. Pulley +/// is unlikely to become out-of-order within the CPU itself as it's interpreted +/// meaning that severing data-dependencies with previous operations is +/// hypothesized to not be too important. If this is ever a problem though it +/// could increase the likelihood we go for route (2) above instead (or maybe +/// even (1)). #[derive(Copy, Clone)] union XRegUnion { i32: i32, @@ -399,8 +456,8 @@ impl fmt::LowerHex for FRegVal { } } -// NB: we always store these in little endian, so we have to `from_le_bytes` -// whenever we read and `to_le_bytes` whenever we store. +// NB: like `XRegUnion` values here are always little-endian, see the +// documentation above for more details. #[derive(Copy, Clone)] union FRegUnion { f32: u32, @@ -484,6 +541,7 @@ pub struct MachineState { f_regs: [FRegVal; FReg::RANGE.end as usize], v_regs: [VRegVal; VReg::RANGE.end as usize], stack: Vec, + done_reason: Option>, } unsafe impl Send for MachineState {} @@ -496,6 +554,7 @@ impl fmt::Debug for MachineState { f_regs, v_regs, stack: _, + done_reason: _, } = self; struct RegMap<'a, R>(&'a [R], fn(u8) -> alloc::string::String); @@ -529,6 +588,20 @@ impl fmt::Debug for MachineState { macro_rules! index_reg { ($reg_ty:ty,$value_ty:ty,$field:ident) => { + impl Index<$reg_ty> for Vm { + type Output = $value_ty; + + fn index(&self, reg: $reg_ty) -> &Self::Output { + &self.state[reg] + } + } + + impl IndexMut<$reg_ty> for Vm { + fn index_mut(&mut self, reg: $reg_ty) -> &mut Self::Output { + &mut self.state[reg] + } + } + impl Index<$reg_ty> for MachineState { type Output = $value_ty; @@ -557,6 +630,7 @@ impl MachineState { f_regs: Default::default(), v_regs: Default::default(), stack, + done_reason: None, }; // Take care to construct SP such that we preserve pointer provenance @@ -573,20 +647,72 @@ impl MachineState { } } -/// The reason the interpreter loop terminated. -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -enum Done { - /// A `ret` instruction was executed and the call stack was empty. This is - /// how the loop normally ends. - ReturnToHost, +/// Inner private module to prevent creation of the `Done` structure outside of +/// this module. +mod done { + use super::{Interpreter, MachineState}; + use core::ptr::NonNull; - /// A `trap` instruction was executed at the given PC. - Trap(NonNull), + /// Zero-sized sentinel indicating that pulley execution has halted. + /// + /// The reason for halting is stored in `MachineState`. + #[derive(Copy, Clone, Debug, PartialEq, Eq)] + pub struct Done { + _priv: (), + } + + /// Reason that the pulley interpreter has ceased execution. + pub enum DoneReason { + /// A trap happened at this bytecode instruction. + Trap(NonNull), + /// The `call_indirect_host` instruction was executed. + CallIndirectHost { + /// The payload of `call_indirect_host`. + id: u8, + /// Where to resume execution after the host has finished. + resume: NonNull, + }, + /// Pulley has finished and the provided value is being returned. + ReturnToHost(T), + } + + impl MachineState { + pub(super) fn debug_assert_done_reason_none(&mut self) { + debug_assert!(self.done_reason.is_none()); + } - #[allow(dead_code)] - HostCall, + pub(super) fn done_decode(&mut self, Done { _priv }: Done) -> DoneReason<()> { + self.done_reason.take().unwrap() + } + } + + impl Interpreter<'_> { + /// Finishes execution by recording `DoneReason::Trap`. + pub fn done_trap(&mut self, pc: NonNull) -> Done { + self.state.done_reason = Some(DoneReason::Trap(pc)); + Done { _priv: () } + } + + /// Finishes execution by recording `DoneReason::CallIndirectHost`. + pub fn done_call_indirect_host(&mut self, id: u8) -> Done { + self.state.done_reason = Some(DoneReason::CallIndirectHost { + id, + resume: self.pc.as_ptr(), + }); + Done { _priv: () } + } + + /// Finishes execution by recording `DoneReason::ReturnToHost`. + pub fn done_return_to_host(&mut self) -> Done { + self.state.done_reason = Some(DoneReason::ReturnToHost(())); + Done { _priv: () } + } + } } +use done::Done; +pub use done::DoneReason; + struct Interpreter<'a> { state: &'a mut MachineState, pc: UnsafeBytecodeStream, @@ -600,11 +726,17 @@ impl Interpreter<'_> { ControlFlow::Continue(()) } + /// Returns the PC of the current instruction where `I` is the static type + /// representing the current instruction. + fn current_pc(&self) -> NonNull { + unsafe { self.pc.offset(-isize::from(I::WIDTH)).as_ptr() } + } + /// `sp -= size_of::(); *sp = val;` #[must_use] - fn push(&mut self, val: T) -> ControlFlow { + fn push(&mut self, val: T, pc: NonNull) -> ControlFlow { let new_sp = self.state[XReg::sp].get_ptr::().wrapping_sub(1); - self.set_sp(new_sp)?; + self.set_sp(new_sp, pc)?; unsafe { new_sp.write_unaligned(val); } @@ -624,11 +756,11 @@ impl Interpreter<'_> { /// Returns a trap if this would result in stack overflow, or if `sp` is /// beneath the base pointer of `self.state.stack`. #[must_use] - fn set_sp(&mut self, sp: *mut T) -> ControlFlow { + fn set_sp(&mut self, sp: *mut T, pc: NonNull) -> ControlFlow { let sp_raw = sp as usize; let base_raw = self.state.stack.as_ptr() as usize; if sp_raw < base_raw { - return ControlFlow::Break(Done::Trap(self.pc.as_ptr())); + return ControlFlow::Break(self.done_trap(pc)); } self.set_sp_unchecked(sp); ControlFlow::Continue(()) @@ -656,14 +788,15 @@ fn simple_push_pop() { // this isn't actually read so just manufacture a dummy one pc: UnsafeBytecodeStream::new((&mut 0).into()), }; - assert!(i.push(0_i32).is_continue()); + let pc = NonNull::from(&0); + assert!(i.push(0_i32, pc).is_continue()); assert_eq!(i.pop::(), 0_i32); - assert!(i.push(1_i32).is_continue()); - assert!(i.push(2_i32).is_continue()); - assert!(i.push(3_i32).is_continue()); - assert!(i.push(4_i32).is_continue()); - assert!(i.push(5_i32).is_break()); - assert!(i.push(6_i32).is_break()); + assert!(i.push(1_i32, pc).is_continue()); + assert!(i.push(2_i32, pc).is_continue()); + assert!(i.push(3_i32, pc).is_continue()); + assert!(i.push(4_i32, pc).is_continue()); + assert!(i.push(5_i32, pc).is_break()); + assert!(i.push(6_i32, pc).is_break()); assert_eq!(i.pop::(), 4_i32); assert_eq!(i.pop::(), 3_i32); assert_eq!(i.pop::(), 2_i32); @@ -682,7 +815,7 @@ impl OpVisitor for Interpreter<'_> { fn ret(&mut self) -> ControlFlow { let lr = self.state[XReg::lr]; if lr == XRegVal::HOST_RETURN_ADDR { - ControlFlow::Break(Done::ReturnToHost) + ControlFlow::Break(self.done_return_to_host()) } else { let return_addr = lr.get_ptr(); self.pc = unsafe { UnsafeBytecodeStream::new(NonNull::new_unchecked(return_addr)) }; @@ -990,31 +1123,33 @@ impl OpVisitor for Interpreter<'_> { fn load32_u(&mut self, dst: XReg, ptr: XReg) -> ControlFlow { let ptr = self.state[ptr].get_ptr::(); - let val = unsafe { ptr::read_unaligned(ptr) }; + let val = unsafe { u32::from_le(ptr::read_unaligned(ptr)) }; self.state[dst].set_u64(u64::from(val)); ControlFlow::Continue(()) } fn load32_s(&mut self, dst: XReg, ptr: XReg) -> ControlFlow { let ptr = self.state[ptr].get_ptr::(); - let val = unsafe { ptr::read_unaligned(ptr) }; + let val = unsafe { i32::from_le(ptr::read_unaligned(ptr)) }; self.state[dst].set_i64(i64::from(val)); ControlFlow::Continue(()) } fn load64(&mut self, dst: XReg, ptr: XReg) -> ControlFlow { let ptr = self.state[ptr].get_ptr::(); - let val = unsafe { ptr::read_unaligned(ptr) }; + let val = unsafe { u64::from_le(ptr::read_unaligned(ptr)) }; self.state[dst].set_u64(val); ControlFlow::Continue(()) } fn load32_u_offset8(&mut self, dst: XReg, ptr: XReg, offset: i8) -> ControlFlow { let val = unsafe { - self.state[ptr] - .get_ptr::() - .byte_offset(offset.into()) - .read_unaligned() + u32::from_le( + self.state[ptr] + .get_ptr::() + .byte_offset(offset.into()) + .read_unaligned(), + ) }; self.state[dst].set_u64(u64::from(val)); ControlFlow::Continue(()) @@ -1022,10 +1157,12 @@ impl OpVisitor for Interpreter<'_> { fn load32_s_offset8(&mut self, dst: XReg, ptr: XReg, offset: i8) -> ControlFlow { let val = unsafe { - self.state[ptr] - .get_ptr::() - .byte_offset(offset.into()) - .read_unaligned() + i32::from_le( + self.state[ptr] + .get_ptr::() + .byte_offset(offset.into()) + .read_unaligned(), + ) }; self.state[dst].set_i64(i64::from(val)); ControlFlow::Continue(()) @@ -1033,10 +1170,12 @@ impl OpVisitor for Interpreter<'_> { fn load32_u_offset64(&mut self, dst: XReg, ptr: XReg, offset: i64) -> ControlFlow { let val = unsafe { - self.state[ptr] - .get_ptr::() - .byte_offset(offset as isize) - .read_unaligned() + u32::from_le( + self.state[ptr] + .get_ptr::() + .byte_offset(offset as isize) + .read_unaligned(), + ) }; self.state[dst].set_u64(u64::from(val)); ControlFlow::Continue(()) @@ -1044,10 +1183,12 @@ impl OpVisitor for Interpreter<'_> { fn load32_s_offset64(&mut self, dst: XReg, ptr: XReg, offset: i64) -> ControlFlow { let val = unsafe { - self.state[ptr] - .get_ptr::() - .byte_offset(offset as isize) - .read_unaligned() + i32::from_le( + self.state[ptr] + .get_ptr::() + .byte_offset(offset as isize) + .read_unaligned(), + ) }; self.state[dst].set_i64(i64::from(val)); ControlFlow::Continue(()) @@ -1055,10 +1196,12 @@ impl OpVisitor for Interpreter<'_> { fn load64_offset8(&mut self, dst: XReg, ptr: XReg, offset: i8) -> ControlFlow { let val = unsafe { - self.state[ptr] - .get_ptr::() - .byte_offset(offset.into()) - .read_unaligned() + u64::from_le( + self.state[ptr] + .get_ptr::() + .byte_offset(offset.into()) + .read_unaligned(), + ) }; self.state[dst].set_u64(val); ControlFlow::Continue(()) @@ -1066,10 +1209,12 @@ impl OpVisitor for Interpreter<'_> { fn load64_offset64(&mut self, dst: XReg, ptr: XReg, offset: i64) -> ControlFlow { let val = unsafe { - self.state[ptr] - .get_ptr::() - .byte_offset(offset as isize) - .read_unaligned() + u64::from_le( + self.state[ptr] + .get_ptr::() + .byte_offset(offset as isize) + .read_unaligned(), + ) }; self.state[dst].set_u64(val); ControlFlow::Continue(()) @@ -1079,7 +1224,7 @@ impl OpVisitor for Interpreter<'_> { let ptr = self.state[ptr].get_ptr::(); let val = self.state[src].get_u32(); unsafe { - ptr::write_unaligned(ptr, val); + ptr::write_unaligned(ptr, val.to_le()); } ControlFlow::Continue(()) } @@ -1088,7 +1233,7 @@ impl OpVisitor for Interpreter<'_> { let ptr = self.state[ptr].get_ptr::(); let val = self.state[src].get_u64(); unsafe { - ptr::write_unaligned(ptr, val); + ptr::write_unaligned(ptr, val.to_le()); } ControlFlow::Continue(()) } @@ -1099,7 +1244,7 @@ impl OpVisitor for Interpreter<'_> { self.state[ptr] .get_ptr::() .byte_offset(offset.into()) - .write_unaligned(val); + .write_unaligned(val.to_le()); } ControlFlow::Continue(()) } @@ -1110,7 +1255,7 @@ impl OpVisitor for Interpreter<'_> { self.state[ptr] .get_ptr::() .byte_offset(offset.into()) - .write_unaligned(val); + .write_unaligned(val.to_le()); } ControlFlow::Continue(()) } @@ -1121,7 +1266,7 @@ impl OpVisitor for Interpreter<'_> { self.state[ptr] .get_ptr::() .byte_offset(offset as isize) - .write_unaligned(val); + .write_unaligned(val.to_le()); } ControlFlow::Continue(()) } @@ -1132,31 +1277,35 @@ impl OpVisitor for Interpreter<'_> { self.state[ptr] .get_ptr::() .byte_offset(offset as isize) - .write_unaligned(val); + .write_unaligned(val.to_le()); } ControlFlow::Continue(()) } fn xpush32(&mut self, src: XReg) -> ControlFlow { - self.push(self.state[src].get_u32())?; + let me = self.current_pc::(); + self.push(self.state[src].get_u32(), me)?; ControlFlow::Continue(()) } fn xpush32_many(&mut self, srcs: RegSet) -> ControlFlow { + let me = self.current_pc::(); for src in srcs { - self.xpush32(src)?; + self.push(self.state[src].get_u32(), me)?; } ControlFlow::Continue(()) } fn xpush64(&mut self, src: XReg) -> ControlFlow { - self.push(self.state[src].get_u64())?; + let me = self.current_pc::(); + self.push(self.state[src].get_u64(), me)?; ControlFlow::Continue(()) } fn xpush64_many(&mut self, srcs: RegSet) -> ControlFlow { + let me = self.current_pc::(); for src in srcs { - self.xpush64(src)?; + self.push(self.state[src].get_u64(), me)?; } ControlFlow::Continue(()) } @@ -1190,8 +1339,9 @@ impl OpVisitor for Interpreter<'_> { } fn push_frame(&mut self) -> ControlFlow { - self.push(self.state[XReg::lr].get_ptr::())?; - self.push(self.state[XReg::fp].get_ptr::())?; + let me = self.current_pc::(); + self.push(self.state[XReg::lr].get_ptr::(), me)?; + self.push(self.state[XReg::fp].get_ptr::(), me)?; self.state[XReg::fp] = self.state[XReg::sp]; ControlFlow::Continue(()) } @@ -1234,14 +1384,16 @@ impl OpVisitor for Interpreter<'_> { // SAFETY: part of the contract of the interpreter is only dealing with // valid bytecode, so this offset should be safe. self.pc = unsafe { self.pc.offset(idx * 4) }; - let rel = unwrap_uninhabited(PcRelOffset::decode(&mut self.pc)); + let mut tmp = self.pc; + let rel = unwrap_uninhabited(PcRelOffset::decode(&mut tmp)); self.pc_rel_jump(rel, 0) } fn stack_alloc32(&mut self, amt: u32) -> ControlFlow { + let me = self.current_pc::(); let amt = usize::try_from(amt).unwrap(); let new_sp = self.state[XReg::sp].get_ptr::().wrapping_sub(amt); - self.set_sp(new_sp)?; + self.set_sp(new_sp, me)?; ControlFlow::Continue(()) } @@ -1251,6 +1403,42 @@ impl OpVisitor for Interpreter<'_> { self.set_sp_unchecked(new_sp); ControlFlow::Continue(()) } + + fn zext8(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_u64() as u8; + self.state[dst].set_u64(src.into()); + ControlFlow::Continue(()) + } + + fn zext16(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_u64() as u16; + self.state[dst].set_u64(src.into()); + ControlFlow::Continue(()) + } + + fn zext32(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_u64() as u32; + self.state[dst].set_u64(src.into()); + ControlFlow::Continue(()) + } + + fn sext8(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_i64() as i8; + self.state[dst].set_i64(src.into()); + ControlFlow::Continue(()) + } + + fn sext16(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_i64() as i16; + self.state[dst].set_i64(src.into()); + ControlFlow::Continue(()) + } + + fn sext32(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_i64() as i32; + self.state[dst].set_i64(src.into()); + ControlFlow::Continue(()) + } } impl ExtendedOpVisitor for Interpreter<'_> { @@ -1259,11 +1447,23 @@ impl ExtendedOpVisitor for Interpreter<'_> { } fn trap(&mut self) -> ControlFlow { - ControlFlow::Break(Done::Trap(self.pc.as_ptr())) + let trap_pc = self.current_pc::(); + ControlFlow::Break(self.done_trap(trap_pc)) } - fn call_indirect_host(&mut self, sig: u8) -> ControlFlow { - let _ = sig; // TODO: should stash this somewhere - ControlFlow::Break(Done::ReturnToHost) + fn call_indirect_host(&mut self, id: u8) -> ControlFlow { + ControlFlow::Break(self.done_call_indirect_host(id)) + } + + fn bswap32(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_u32(); + self.state[dst].set_u32(src.swap_bytes()); + ControlFlow::Continue(()) + } + + fn bswap64(&mut self, dst: XReg, src: XReg) -> ControlFlow { + let src = self.state[src].get_u64(); + self.state[dst].set_u64(src.swap_bytes()); + ControlFlow::Continue(()) } } diff --git a/pulley/src/lib.rs b/pulley/src/lib.rs index 30a9da64c0e5..5a63e7067234 100644 --- a/pulley/src/lib.rs +++ b/pulley/src/lib.rs @@ -122,40 +122,40 @@ macro_rules! for_each_op { /// 32-bit unsigned less-than-equal. xulteq32 = Xulteq32 { operands: BinaryOperands }; - /// `dst = zero_extend(load32(ptr))` + /// `dst = zero_extend(load32_le(ptr))` load32_u = Load32U { dst: XReg, ptr: XReg }; - /// `dst = sign_extend(load32(ptr))` + /// `dst = sign_extend(load32_le(ptr))` load32_s = Load32S { dst: XReg, ptr: XReg }; - /// `dst = load64(ptr)` + /// `dst = load64_le(ptr)` load64 = Load64 { dst: XReg, ptr: XReg }; - /// `dst = zero_extend(load32(ptr + offset8))` + /// `dst = zero_extend(load32_le(ptr + offset8))` load32_u_offset8 = Load32UOffset8 { dst: XReg, ptr: XReg, offset: i8 }; - /// `dst = sign_extend(load32(ptr + offset8))` + /// `dst = sign_extend(load32_le(ptr + offset8))` load32_s_offset8 = Load32SOffset8 { dst: XReg, ptr: XReg, offset: i8 }; - /// `dst = load64(ptr + offset8)` + /// `dst = load64_le(ptr + offset8)` load64_offset8 = Load64Offset8 { dst: XReg, ptr: XReg, offset: i8 }; - /// `dst = zero_extend(load32(ptr + offset64))` + /// `dst = zero_extend(load32_le(ptr + offset64))` load32_u_offset64 = Load32UOffset64 { dst: XReg, ptr: XReg, offset: i64 }; - /// `dst = sign_extend(load32(ptr + offset64))` + /// `dst = sign_extend(load32_le(ptr + offset64))` load32_s_offset64 = Load32SOffset64 { dst: XReg, ptr: XReg, offset: i64 }; - /// `dst = load64(ptr + offset64)` + /// `dst = load64_le(ptr + offset64)` load64_offset64 = Load64Offset64 { dst: XReg, ptr: XReg, offset: i64 }; - /// `*ptr = low32(src)` + /// `*ptr = low32(src.to_le())` store32 = Store32 { ptr: XReg, src: XReg }; - /// `*ptr = src` + /// `*ptr = src.to_le()` store64 = Store64 { ptr: XReg, src: XReg }; - /// `*(ptr + sign_extend(offset8)) = low32(src)` + /// `*(ptr + sign_extend(offset8)) = low32(src).to_le()` store32_offset8 = Store32SOffset8 { ptr: XReg, offset: i8, src: XReg }; - /// `*(ptr + sign_extend(offset8)) = src` + /// `*(ptr + sign_extend(offset8)) = src.to_le()` store64_offset8 = Store64Offset8 { ptr: XReg, offset: i8, src: XReg }; - /// `*(ptr + sign_extend(offset64)) = low32(src)` + /// `*(ptr + sign_extend(offset64)) = low32(src).to_le()` store32_offset64 = Store32SOffset64 { ptr: XReg, offset: i64, src: XReg }; - /// `*(ptr + sign_extend(offset64)) = src` + /// `*(ptr + sign_extend(offset64)) = src.to_le()` store64_offset64 = Store64Offset64 { ptr: XReg, offset: i64, src: XReg }; /// `push lr; push fp; fp = sp` @@ -195,6 +195,19 @@ macro_rules! for_each_op { /// `sp = sp + amt` stack_free32 = StackFree32 { amt: u32 }; + + /// `dst = zext(low8(src))` + zext8 = Zext8 { dst: XReg, src: XReg }; + /// `dst = zext(low16(src))` + zext16 = Zext16 { dst: XReg, src: XReg }; + /// `dst = zext(low32(src))` + zext32 = Zext32 { dst: XReg, src: XReg }; + /// `dst = sext(low8(src))` + sext8 = Sext8 { dst: XReg, src: XReg }; + /// `dst = sext(low16(src))` + sext16 = Sext16 { dst: XReg, src: XReg }; + /// `dst = sext(low32(src))` + sext32 = Sext32 { dst: XReg, src: XReg }; } }; } @@ -209,18 +222,30 @@ macro_rules! for_each_extended_op { /// Do nothing. nop = Nop; - /// A special opcode to use an indirect function call to reenter the - /// host from the interpreter. + /// A special opcode to halt interpreter execution and yield control + /// back to the host. + /// + /// This opcode results in `DoneReason::CallIndirectHost` where the + /// `id` here is shepherded along to the embedder. It's up to the + /// embedder to determine what to do with the `id` and the current + /// state of registers and the stack. /// - /// This is used to implement host intrinsics such as `memory.grow` - /// for example where that needs to reenter the host from the - /// interpreter. + /// In Wasmtime this is used to implement interpreter-to-host calls. + /// This is modeled as a `call` instruction where the first + /// parameter is the native function pointer to invoke and all + /// remaining parameters for the native function are in following + /// parameter positions (e.g. `x1`, `x2`, ...). The results of the + /// host call are then store in `x0`. /// - /// The `sig` immediate here is the Nth signature in the - /// `for_each_host_signature!` macro below. The 0th "argument", in - /// register x0, is the function pointer that's being called and all - /// further arguments follow after that in registers. - call_indirect_host = CallIndirectHost { sig: u8 }; + /// Handling this in Wasmtime is done through a "relocation" which + /// is resolved at link-time when raw bytecode from Cranelift is + /// assembled into the final object that Wasmtime will interpret. + call_indirect_host = CallIndirectHost { id: u8 }; + + /// `dst = byteswap(low32(src))` + bswap32 = Bswap32 { dst: XReg, src: XReg }; + /// `dst = byteswap(src)` + bswap64 = Bswap64 { dst: XReg, src: XReg }; } }; } diff --git a/pulley/src/op.rs b/pulley/src/op.rs index 9caa63fffa16..3306bdafaeb6 100644 --- a/pulley/src/op.rs +++ b/pulley/src/op.rs @@ -1,5 +1,7 @@ //! Pulley bytecode operations with their operands. +#[cfg(feature = "encode")] +use crate::encode::Encode; use crate::imms::*; use crate::regs::*; @@ -128,6 +130,17 @@ macro_rules! define_op_encode { Self::ExtendedOp(op) => op.encode(into), } } + + /// Returns the encoded size of this op. + #[cfg(feature = "encode")] + pub fn width(&self) -> u8 { + match self { + $( + Self::$name(_) => <$name as Encode>::WIDTH, + )* + Self::ExtendedOp(op) => op.width(), + } + } } $( @@ -168,6 +181,16 @@ macro_rules! define_extended_op_encode { )* } } + + /// Returns the encoded size of this op. + #[cfg(feature = "encode")] + pub fn width(&self) -> u8 { + match self { + $( + Self::$name(_) => <$name as Encode>::WIDTH, + )* + } + } } $( diff --git a/pulley/src/opcode.rs b/pulley/src/opcode.rs index de1d8420eb04..0ff21217e316 100644 --- a/pulley/src/opcode.rs +++ b/pulley/src/opcode.rs @@ -84,9 +84,6 @@ macro_rules! define_extended_opcode { for_each_extended_op!(define_extended_opcode); impl ExtendedOpcode { - #[cfg_attr(not(feature = "interp"), allow(unused))] - pub(crate) const ENCODED_SIZE_OF_TRAP: usize = 3; - /// Create a new `ExtendedOpcode` from the given bytes. /// /// Returns `None` if `bytes` is not a valid extended opcode. @@ -108,16 +105,3 @@ impl ExtendedOpcode { core::mem::transmute(byte) } } - -#[cfg(all(test, feature = "encode"))] -mod tests { - use super::*; - use alloc::vec::Vec; - - #[test] - fn encoded_size_of_trap() { - let mut buf = Vec::new(); - crate::encode::trap(&mut buf); - assert_eq!(ExtendedOpcode::ENCODED_SIZE_OF_TRAP, buf.len()); - } -} diff --git a/pulley/tests/all/interp.rs b/pulley/tests/all/interp.rs index 8015cfed1412..2dc6deb50173 100644 --- a/pulley/tests/all/interp.rs +++ b/pulley/tests/all/interp.rs @@ -1,7 +1,10 @@ //! Interpreter tests. use interp::Val; -use pulley_interpreter::{interp::Vm, *}; +use pulley_interpreter::{ + interp::{DoneReason, Vm}, + *, +}; use std::{cell::UnsafeCell, fmt::Debug, ptr::NonNull}; fn encoded(ops: &[Op]) -> Vec { @@ -16,8 +19,11 @@ fn encoded(ops: &[Op]) -> Vec { unsafe fn run(vm: &mut Vm, ops: &[Op]) -> Result<(), NonNull> { let _ = env_logger::try_init(); let ops = encoded(ops); - let _ = vm.call(NonNull::from(&ops[..]).cast(), &[], [])?; - Ok(()) + match vm.call(NonNull::from(&ops[..]).cast(), &[], []) { + DoneReason::ReturnToHost(_) => Ok(()), + DoneReason::Trap(pc) => Err(pc), + DoneReason::CallIndirectHost { .. } => unimplemented!(), + } } unsafe fn assert_one( @@ -520,10 +526,10 @@ fn xulteq32() { #[test] fn load32_u() { - let a = UnsafeCell::new(11u32); - let b = UnsafeCell::new(22u32); - let c = UnsafeCell::new(33u32); - let d = UnsafeCell::new(i32::MIN as u32); + let a = UnsafeCell::new(11u32.to_le()); + let b = UnsafeCell::new(22u32.to_le()); + let c = UnsafeCell::new(33u32.to_le()); + let d = UnsafeCell::new((i32::MIN as u32).to_le()); for (expected, addr) in [ (11, a.get()), @@ -550,10 +556,10 @@ fn load32_u() { #[test] fn load32_s() { - let a = UnsafeCell::new(11u32); - let b = UnsafeCell::new(22u32); - let c = UnsafeCell::new(33u32); - let d = UnsafeCell::new(-1i32 as u32); + let a = UnsafeCell::new(11u32.to_le()); + let b = UnsafeCell::new(22u32.to_le()); + let c = UnsafeCell::new(33u32.to_le()); + let d = UnsafeCell::new((-1i32 as u32).to_le()); for (expected, addr) in [ (11, a.get()), @@ -580,10 +586,10 @@ fn load32_s() { #[test] fn load64() { - let a = UnsafeCell::new(11u64); - let b = UnsafeCell::new(22u64); - let c = UnsafeCell::new(33u64); - let d = UnsafeCell::new(-1i64 as u64); + let a = UnsafeCell::new(11u64.to_le()); + let b = UnsafeCell::new(22u64.to_le()); + let c = UnsafeCell::new(33u64.to_le()); + let d = UnsafeCell::new((-1i64 as u64).to_le()); for (expected, addr) in [ (11, a.get()), @@ -610,10 +616,10 @@ fn load64() { #[test] fn load32_u_offset8() { - let a = UnsafeCell::new([11u32, 22]); - let b = UnsafeCell::new([33u32, 44]); - let c = UnsafeCell::new([55u32, 66]); - let d = UnsafeCell::new([i32::MIN as u32, i32::MAX as u32]); + let a = UnsafeCell::new([11u32.to_le(), 22u32.to_le()]); + let b = UnsafeCell::new([33u32.to_le(), 44u32.to_le()]); + let c = UnsafeCell::new([55u32.to_le(), 66u32.to_le()]); + let d = UnsafeCell::new([(i32::MIN as u32).to_le(), (i32::MAX as u32).to_le()]); for (expected, addr, offset) in [ (11, a.get(), 0), @@ -645,10 +651,10 @@ fn load32_u_offset8() { #[test] fn load32_s_offset8() { - let a = UnsafeCell::new([11u32, 22]); - let b = UnsafeCell::new([33u32, 44]); - let c = UnsafeCell::new([55u32, 66]); - let d = UnsafeCell::new([-1i32 as u32, i32::MAX as u32]); + let a = UnsafeCell::new([11u32.to_le(), 22u32.to_le()]); + let b = UnsafeCell::new([33u32.to_le(), 44u32.to_le()]); + let c = UnsafeCell::new([55u32.to_le(), 66u32.to_le()]); + let d = UnsafeCell::new([(-1i32 as u32).to_le(), (i32::MAX as u32).to_le()]); for (expected, addr, offset) in [ (11, a.get(), 0), @@ -681,10 +687,10 @@ fn load32_s_offset8() { #[test] fn load64_offset8() { - let a = UnsafeCell::new([11u64, 22]); - let b = UnsafeCell::new([33u64, 44]); - let c = UnsafeCell::new([55u64, 66]); - let d = UnsafeCell::new([-1i64 as u64, i64::MAX as u64]); + let a = UnsafeCell::new([11u64.to_le(), 22u64.to_le()]); + let b = UnsafeCell::new([33u64.to_le(), 44u64.to_le()]); + let c = UnsafeCell::new([55u64.to_le(), 66u64.to_le()]); + let d = UnsafeCell::new([(-1i64 as u64).to_le(), (i64::MAX as u64).to_le()]); for (expected, addr, offset) in [ (11, a.get(), 0), @@ -716,10 +722,10 @@ fn load64_offset8() { #[test] fn load32_u_offset64() { - let a = UnsafeCell::new([11u32, 22]); - let b = UnsafeCell::new([33u32, 44]); - let c = UnsafeCell::new([55u32, 66]); - let d = UnsafeCell::new([i32::MIN as u32, i32::MAX as u32]); + let a = UnsafeCell::new([11u32.to_le(), 22u32.to_le()]); + let b = UnsafeCell::new([33u32.to_le(), 44u32.to_le()]); + let c = UnsafeCell::new([55u32.to_le(), 66u32.to_le()]); + let d = UnsafeCell::new([(i32::MIN as u32).to_le(), (i32::MAX as u32).to_le()]); for (expected, addr, offset) in [ (11, a.get(), 0), @@ -751,10 +757,10 @@ fn load32_u_offset64() { #[test] fn load32_s_offset64() { - let a = UnsafeCell::new([11u32, 22]); - let b = UnsafeCell::new([33u32, 44]); - let c = UnsafeCell::new([55u32, 66]); - let d = UnsafeCell::new([-1i32 as u32, i32::MAX as u32]); + let a = UnsafeCell::new([11u32.to_le(), 22u32.to_le()]); + let b = UnsafeCell::new([33u32.to_le(), 44u32.to_le()]); + let c = UnsafeCell::new([55u32.to_le(), 66u32.to_le()]); + let d = UnsafeCell::new([(-1i32 as u32).to_le(), (i32::MAX as u32).to_le()]); for (expected, addr, offset) in [ (11, a.get(), 0), @@ -787,10 +793,10 @@ fn load32_s_offset64() { #[test] fn load64_offset64() { - let a = UnsafeCell::new([11u64, 22]); - let b = UnsafeCell::new([33u64, 44]); - let c = UnsafeCell::new([55u64, 66]); - let d = UnsafeCell::new([-1i64 as u64, i64::MAX as u64]); + let a = UnsafeCell::new([11u64.to_le(), 22u64.to_le()]); + let b = UnsafeCell::new([33u64.to_le(), 44u64.to_le()]); + let c = UnsafeCell::new([55u64.to_le(), 66u64.to_le()]); + let d = UnsafeCell::new([(-1i64 as u64).to_le(), (i64::MAX as u64).to_le()]); for (expected, addr, offset) in [ (11, a.get(), 0), diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml index 0235a67f4f16..f945e03aa8a9 100644 --- a/supply-chain/audits.toml +++ b/supply-chain/audits.toml @@ -1747,6 +1747,11 @@ criteria = "safe-to-deploy" version = "0.3.27" notes = "Unsafe used to implement a concurrency primitive AtomicWaker. Well-commented and not obviously incorrect. Like my other audits of these concurrency primitives inside the futures family, I couldn't certify that it is correct without formal methods, but that is out of scope for this vetting." +[[audits.futures-core]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +delta = "0.3.28 -> 0.3.31" + [[audits.futures-executor]] who = "Pat Hickey " criteria = "safe-to-deploy" @@ -1763,6 +1768,22 @@ who = "Pat Hickey " criteria = "safe-to-deploy" version = "0.3.27" +[[audits.futures-sink]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +delta = "0.3.28 -> 0.3.31" + +[[audits.futures-task]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +delta = "0.3.27 -> 0.3.31" + +[[audits.futures-util]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +delta = "0.3.27 -> 0.3.31" +notes = "New waker_ref module contains \"FIXME: panics on Arc::clone / refcount changes could wreak havoc...\" comment, but this corner case feels low risk." + [[audits.fxprof-processed-profile]] who = "Jamey Sharp " criteria = "safe-to-deploy" @@ -1921,6 +1942,11 @@ I also manually ran windows-bindgen and confirmed that the output matches the bindings checked into the repo. """ +[[audits.iana-time-zone]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +delta = "0.1.59 -> 0.1.61" + [[audits.iana-time-zone-haiku]] who = "Dan Gohman " criteria = "safe-to-deploy" @@ -2839,6 +2865,11 @@ and does what it says on the tin, providing spin-based synchronization primitives. """ +[[audits.spin]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +delta = "0.9.4 -> 0.9.8" + [[audits.sptr]] who = "Alex Crichton " criteria = "safe-to-deploy" @@ -3983,6 +4014,18 @@ user-id = 6741 # Alice Ryhl (Darksonn) start = "2021-01-11" end = "2025-02-15" +[[trusted.bzip2]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2020-07-06" +end = "2025-12-05" + +[[trusted.bzip2-sys]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2020-02-24" +end = "2025-12-05" + [[trusted.cap-fs-ext]] criteria = "safe-to-deploy" user-id = 6825 # Dan Gohman (sunfishcode) @@ -4169,6 +4212,18 @@ user-id = 3618 # David Tolnay (dtolnay) start = "2019-05-02" end = "2024-07-06" +[[trusted.jobserver]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2019-03-15" +end = "2025-12-05" + +[[trusted.js-sys]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2019-03-04" +end = "2025-12-05" + [[trusted.libc]] criteria = "safe-to-deploy" user-id = 2915 # Amanieu d'Antras (Amanieu) @@ -4307,6 +4362,12 @@ user-id = 6743 # Ed Page (epage) start = "2023-01-20" end = "2025-02-12" +[[trusted.socket2]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2019-05-06" +end = "2025-12-05" + [[trusted.syn]] criteria = "safe-to-deploy" user-id = 3618 # David Tolnay (dtolnay) @@ -4335,7 +4396,7 @@ end = "2025-07-30" criteria = "safe-to-deploy" user-id = 6825 # Dan Gohman (sunfishcode) start = "2019-03-06" -end = "2024-07-14" +end = "2025-12-06" [[trusted.termcolor]] criteria = "safe-to-deploy" @@ -4385,35 +4446,41 @@ user-id = 189 # Andrew Gallant (BurntSushi) start = "2019-06-09" end = "2024-07-15" +[[trusted.wasi]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2020-06-03" +end = "2025-12-05" + [[trusted.wasm-bindgen]] criteria = "safe-to-deploy" user-id = 1 # Alex Crichton (alexcrichton) start = "2019-03-04" -end = "2024-07-14" +end = "2025-12-05" [[trusted.wasm-bindgen-backend]] criteria = "safe-to-deploy" user-id = 1 # Alex Crichton (alexcrichton) start = "2019-03-04" -end = "2024-07-14" +end = "2025-12-05" [[trusted.wasm-bindgen-macro]] criteria = "safe-to-deploy" user-id = 1 # Alex Crichton (alexcrichton) start = "2019-03-04" -end = "2024-07-14" +end = "2025-12-05" [[trusted.wasm-bindgen-macro-support]] criteria = "safe-to-deploy" user-id = 1 # Alex Crichton (alexcrichton) start = "2019-03-04" -end = "2024-07-14" +end = "2025-12-05" [[trusted.wasm-bindgen-shared]] criteria = "safe-to-deploy" user-id = 1 # Alex Crichton (alexcrichton) start = "2019-03-04" -end = "2024-07-14" +end = "2025-12-05" [[trusted.wasm-wave]] criteria = "safe-to-deploy" @@ -4421,6 +4488,12 @@ user-id = 73222 # wasmtime-publish start = "2024-06-19" end = "2025-11-13" +[[trusted.web-sys]] +criteria = "safe-to-deploy" +user-id = 1 # Alex Crichton (alexcrichton) +start = "2019-03-04" +end = "2025-12-05" + [[trusted.winapi-util]] criteria = "safe-to-deploy" user-id = 189 # Andrew Gallant (BurntSushi) diff --git a/supply-chain/config.toml b/supply-chain/config.toml index b82929e9d2d4..38745c06b73a 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -213,14 +213,6 @@ criteria = "safe-to-deploy" version = "1.3.2" criteria = "safe-to-deploy" -[[exemptions.bzip2]] -version = "0.4.4" -criteria = "safe-to-deploy" - -[[exemptions.bzip2-sys]] -version = "0.1.11+1.0.8" -criteria = "safe-to-deploy" - [[exemptions.capstone]] version = "0.12.0" criteria = "safe-to-deploy" @@ -323,6 +315,10 @@ criteria = "safe-to-deploy" version = "0.2.0" criteria = "safe-to-deploy" +[[exemptions.hermit-abi]] +version = "0.3.9" +criteria = "safe-to-deploy" + [[exemptions.http]] version = "0.2.9" criteria = "safe-to-deploy" @@ -354,15 +350,6 @@ criteria = "safe-to-deploy" version = "0.10.3" criteria = "safe-to-deploy" -[[exemptions.jobserver]] -version = "0.1.24" -criteria = "safe-to-deploy" - -[[exemptions.js-sys]] -version = "0.3.57" -criteria = "safe-to-deploy" -notes = "dependency of ring for wasm32 browser platform, which our project does not target" - [[exemptions.libloading]] version = "0.7.3" criteria = "safe-to-deploy" @@ -619,15 +606,6 @@ criteria = "safe-to-deploy" version = "0.2.0" criteria = "safe-to-deploy" -[[exemptions.wasi]] -version = "0.11.0+wasi-snapshot-preview1" -criteria = "safe-to-deploy" - -[[exemptions.web-sys]] -version = "0.3.57" -criteria = "safe-to-deploy" -notes = "dependency of ring for wasm32 browser platform, which our project does not target" - [[exemptions.webpki-roots]] version = "0.26.1" criteria = "safe-to-deploy" diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index d54501a21130..a45a8f645c89 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -479,6 +479,20 @@ user-id = 6741 user-login = "Darksonn" user-name = "Alice Ryhl" +[[publisher.bzip2]] +version = "0.4.4" +when = "2023-01-05" +user-id = 1 +user-login = "alexcrichton" +user-name = "Alex Crichton" + +[[publisher.bzip2-sys]] +version = "0.1.11+1.0.8" +when = "2021-06-09" +user-id = 1 +user-login = "alexcrichton" +user-name = "Alex Crichton" + [[publisher.cap-fs-ext]] version = "3.2.0" when = "2024-07-08" @@ -805,6 +819,20 @@ user-id = 3618 user-login = "dtolnay" user-name = "David Tolnay" +[[publisher.jobserver]] +version = "0.1.25" +when = "2022-09-23" +user-id = 1 +user-login = "alexcrichton" +user-name = "Alex Crichton" + +[[publisher.js-sys]] +version = "0.3.74" +when = "2024-11-30" +user-id = 1 +user-login = "alexcrichton" +user-name = "Alex Crichton" + [[publisher.libc]] version = "0.2.146" when = "2023-06-06" @@ -1000,11 +1028,11 @@ user-login = "alexcrichton" user-name = "Alex Crichton" [[publisher.target-lexicon]] -version = "0.12.16" -when = "2024-07-30" -user-id = 696 -user-login = "fitzgen" -user-name = "Nick Fitzgerald" +version = "0.13.0" +when = "2024-12-05" +user-id = 6825 +user-login = "sunfishcode" +user-name = "Dan Gohman" [[publisher.termcolor]] version = "1.4.1" @@ -1083,6 +1111,13 @@ user-id = 189 user-login = "BurntSushi" user-name = "Andrew Gallant" +[[publisher.wasi]] +version = "0.11.0+wasi-snapshot-preview1" +when = "2022-01-19" +user-id = 1 +user-login = "alexcrichton" +user-name = "Alex Crichton" + [[publisher.wasi-common]] version = "27.0.0" when = "2024-11-20" @@ -1090,36 +1125,36 @@ user-id = 73222 user-login = "wasmtime-publish" [[publisher.wasm-bindgen]] -version = "0.2.87" -when = "2023-06-12" +version = "0.2.97" +when = "2024-11-30" user-id = 1 user-login = "alexcrichton" user-name = "Alex Crichton" [[publisher.wasm-bindgen-backend]] -version = "0.2.87" -when = "2023-06-12" +version = "0.2.97" +when = "2024-11-30" user-id = 1 user-login = "alexcrichton" user-name = "Alex Crichton" [[publisher.wasm-bindgen-macro]] -version = "0.2.87" -when = "2023-06-12" +version = "0.2.97" +when = "2024-11-30" user-id = 1 user-login = "alexcrichton" user-name = "Alex Crichton" [[publisher.wasm-bindgen-macro-support]] -version = "0.2.87" -when = "2023-06-12" +version = "0.2.97" +when = "2024-11-30" user-id = 1 user-login = "alexcrichton" user-name = "Alex Crichton" [[publisher.wasm-bindgen-shared]] -version = "0.2.87" -when = "2023-06-12" +version = "0.2.97" +when = "2024-11-30" user-id = 1 user-login = "alexcrichton" user-name = "Alex Crichton" @@ -1328,6 +1363,13 @@ when = "2024-12-02" user-id = 73222 user-login = "wasmtime-publish" +[[publisher.web-sys]] +version = "0.3.57" +when = "2022-04-07" +user-id = 1 +user-login = "alexcrichton" +user-name = "Alex Crichton" + [[publisher.wiggle]] version = "27.0.0" when = "2024-11-20" @@ -2055,12 +2097,24 @@ version = "1.0.7" notes = "Simple hasher implementation with no unsafe code." aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" +[[audits.mozilla.audits.futures-core]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.3.27 -> 0.3.28" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + [[audits.mozilla.audits.futures-io]] who = "Mike Hommey " criteria = "safe-to-deploy" delta = "0.3.27 -> 0.3.28" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" +[[audits.mozilla.audits.futures-sink]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.3.27 -> 0.3.28" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + [[audits.mozilla.audits.fxhash]] who = "Bobby Holley " criteria = "safe-to-deploy" @@ -2109,12 +2163,6 @@ criteria = "safe-to-deploy" delta = "0.10.3 -> 0.10.5" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" -[[audits.mozilla.audits.jobserver]] -who = "Mike Hommey " -criteria = "safe-to-deploy" -delta = "0.1.24 -> 0.1.25" -aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" - [[audits.mozilla.audits.lazy_static]] who = "Nika Layzell " criteria = "safe-to-deploy" diff --git a/tests/all/epoch_interruption.rs b/tests/all/epoch_interruption.rs index 3fc8333f0a8d..7cc03c18c17d 100644 --- a/tests/all/epoch_interruption.rs +++ b/tests/all/epoch_interruption.rs @@ -80,7 +80,7 @@ async fn run_and_count_yields_or_trap)>( return result.ok().map(|_| (yields, *store)); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_yield_at_func_entry(config: &mut Config) { // Should yield at start of call to func $subfunc. assert_eq!( @@ -103,7 +103,7 @@ async fn epoch_yield_at_func_entry(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_yield_at_loop_header(config: &mut Config) { // Should yield at top of loop, once per five iters. assert_eq!( @@ -128,7 +128,7 @@ async fn epoch_yield_at_loop_header(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_yield_immediate(config: &mut Config) { // We should see one yield immediately when the initial deadline // is zero. @@ -149,7 +149,7 @@ async fn epoch_yield_immediate(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_yield_only_once(config: &mut Config) { // We should yield from the subfunction, and then when we return // to the outer function and hit another loop header, we should @@ -180,7 +180,7 @@ async fn epoch_yield_only_once(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_interrupt_infinite_loop(config: &mut Config) { assert_eq!( None, @@ -206,7 +206,7 @@ async fn epoch_interrupt_infinite_loop(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_interrupt_function_entries(config: &mut Config) { assert_eq!( None, @@ -329,7 +329,7 @@ async fn epoch_interrupt_function_entries(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_callback_continue(config: &mut Config) { assert_eq!( Some((0, 1)), @@ -355,7 +355,7 @@ async fn epoch_callback_continue(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_callback_yield(config: &mut Config) { assert_eq!( Some((1, 1)), @@ -381,7 +381,7 @@ async fn epoch_callback_yield(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn epoch_callback_trap(config: &mut Config) { assert_eq!( None, @@ -403,7 +403,7 @@ async fn epoch_callback_trap(config: &mut Config) { ); } -#[wasmtime_test(with = "#[tokio::test]", strategies(not(Winch)))] +#[wasmtime_test(with = "#[tokio::test]")] async fn drop_future_on_epoch_yield(config: &mut Config) { let wasm = " (module @@ -458,21 +458,3 @@ async fn drop_future_on_epoch_yield(config: &mut Config) { assert_eq!(true, alive_flag.load(Ordering::Acquire)); } - -#[wasmtime_test(strategies(not(Cranelift)))] -#[cfg_attr(miri, ignore)] -fn ensure_compatibility_between_winch_and_epoch(config: &mut Config) -> Result<()> { - config.epoch_interruption(true); - let result = Engine::new(&config); - match result { - Ok(_) => anyhow::bail!("Expected incompatibility between epoch interruption and Winch"), - Err(e) => { - assert_eq!( - e.to_string(), - "Winch does not currently support epoch based interruption" - ); - } - } - - Ok(()) -} diff --git a/tests/all/instance.rs b/tests/all/instance.rs index 57aab2ce563b..d969afb526c9 100644 --- a/tests/all/instance.rs +++ b/tests/all/instance.rs @@ -34,6 +34,7 @@ fn initializes_linear_memory() -> Result<()> { #[test] #[cfg_attr(miri, ignore)] +#[cfg(target_pointer_width = "64")] fn linear_memory_limits() -> Result<()> { // this test will allocate 4GB of virtual memory space, and may not work in // situations like CI QEMU emulation where it triggers SIGKILL. diff --git a/tests/all/pulley.rs b/tests/all/pulley.rs index f3695283c2d9..3783d95d73e7 100644 --- a/tests/all/pulley.rs +++ b/tests/all/pulley.rs @@ -1,17 +1,14 @@ use anyhow::Result; use wasmtime::{Config, Engine, Module}; +use wasmtime_environ::TripleExt; -fn pulley_target() -> &'static str { - if cfg!(target_pointer_width = "64") { - "pulley64" - } else { - "pulley32" - } +fn pulley_target() -> String { + target_lexicon::Triple::pulley_host().to_string() } fn pulley_config() -> Config { let mut config = Config::new(); - config.target(pulley_target()).unwrap(); + config.target(&pulley_target()).unwrap(); config } @@ -19,6 +16,7 @@ fn pulley_config() -> Config { fn can_compile_pulley_module() -> Result<()> { let engine = Engine::new(&pulley_config())?; Module::new(&engine, "(module)")?; + Ok(()) } @@ -63,13 +61,13 @@ fn can_run_on_cli() -> Result<()> { use crate::cli_tests::run_wasmtime; run_wasmtime(&[ "--target", - pulley_target(), + &pulley_target(), "tests/all/cli_tests/empty-module.wat", ])?; run_wasmtime(&[ "run", "--target", - pulley_target(), + &pulley_target(), "tests/all/cli_tests/empty-module.wat", ])?; Ok(()) diff --git a/tests/disas.rs b/tests/disas.rs index 7f1268d7ef81..c602adcb558b 100644 --- a/tests/disas.rs +++ b/tests/disas.rs @@ -54,6 +54,7 @@ use std::sync::Arc; use tempfile::TempDir; use wasmtime::{Engine, OptLevel, Strategy}; use wasmtime_cli_flags::CommonOptions; +use wasmtime_environ::TripleExt; fn main() -> Result<()> { if cfg!(miri) { @@ -347,10 +348,7 @@ fn assert_output( .collect::>()) })?, Err(_) => { - assert!(matches!( - isa.triple().architecture, - target_lexicon::Architecture::Pulley32 | target_lexicon::Architecture::Pulley64 - )); + assert!(isa.triple().is_pulley()); disas_insts(&mut actual, &bytes, |bytes, _addr| { let mut result = vec![]; diff --git a/tests/disas/arith.wat b/tests/disas/arith.wat index b1d0473f6716..11a3ed35e6af 100644 --- a/tests/disas/arith.wat +++ b/tests/disas/arith.wat @@ -17,7 +17,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/basic-wat-test.wat b/tests/disas/basic-wat-test.wat index 2c6cef13b7f8..a9aa9b96ef46 100644 --- a/tests/disas/basic-wat-test.wat +++ b/tests/disas/basic-wat-test.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/br_table.wat b/tests/disas/br_table.wat index 3f83a93ed602..32166f2644a8 100644 --- a/tests/disas/br_table.wat +++ b/tests/disas/br_table.wat @@ -34,7 +34,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -70,7 +70,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -106,7 +106,7 @@ ;; function u0:2(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -130,7 +130,7 @@ ;; function u0:3(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/byteswap.wat b/tests/disas/byteswap.wat index 0a837e088b17..29a4de12c006 100644 --- a/tests/disas/byteswap.wat +++ b/tests/disas/byteswap.wat @@ -74,7 +74,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -88,7 +88,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64): diff --git a/tests/disas/call-simd.wat b/tests/disas/call-simd.wat index 1631291581c2..119654ff4bcb 100644 --- a/tests/disas/call-simd.wat +++ b/tests/disas/call-simd.wat @@ -18,7 +18,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; sig0 = (i64 vmctx, i64, i8x16, i8x16) -> i8x16 tail ;; fn0 = colocated u0:1 sig0 ;; const0 = 0x00000004000000030000000200000001 @@ -37,7 +37,7 @@ ;; function u0:1(i64 vmctx, i64, i8x16, i8x16) -> i8x16 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i8x16, v3: i8x16): diff --git a/tests/disas/call.wat b/tests/disas/call.wat index cf62b7a7a6ae..ea72a8232fd7 100644 --- a/tests/disas/call.wat +++ b/tests/disas/call.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; sig0 = (i64 vmctx, i64) -> i32 tail ;; fn0 = colocated u0:1 sig0 ;; stack_limit = gv2 @@ -32,7 +32,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/dead-code.wat b/tests/disas/dead-code.wat index 64f468204941..0ecbd02f893d 100644 --- a/tests/disas/dead-code.wat +++ b/tests/disas/dead-code.wat @@ -24,7 +24,7 @@ ;; function u0:0(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -62,7 +62,7 @@ ;; function u0:2(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -75,7 +75,7 @@ ;; function u0:3(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/duplicate-loads-dynamic-memory.wat b/tests/disas/duplicate-loads-dynamic-memory.wat index ed1bd8e3c010..d3188313d149 100644 --- a/tests/disas/duplicate-loads-dynamic-memory.wat +++ b/tests/disas/duplicate-loads-dynamic-memory.wat @@ -25,7 +25,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/duplicate-loads-static-memory.wat b/tests/disas/duplicate-loads-static-memory.wat index 4bcba7c80795..3c9c4bcd2af1 100644 --- a/tests/disas/duplicate-loads-static-memory.wat +++ b/tests/disas/duplicate-loads-static-memory.wat @@ -20,7 +20,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -40,7 +40,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/dynamic-memory-no-spectre-access-same-index-different-offsets.wat b/tests/disas/dynamic-memory-no-spectre-access-same-index-different-offsets.wat index 2097a0522332..edcf4bea58fa 100644 --- a/tests/disas/dynamic-memory-no-spectre-access-same-index-different-offsets.wat +++ b/tests/disas/dynamic-memory-no-spectre-access-same-index-different-offsets.wat @@ -38,7 +38,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32, i32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -79,7 +79,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/dynamic-memory-yes-spectre-access-same-index-different-offsets.wat b/tests/disas/dynamic-memory-yes-spectre-access-same-index-different-offsets.wat index 4763eaf3dfe5..e2825b1b8058 100644 --- a/tests/disas/dynamic-memory-yes-spectre-access-same-index-different-offsets.wat +++ b/tests/disas/dynamic-memory-yes-spectre-access-same-index-different-offsets.wat @@ -34,7 +34,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32, i32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -69,7 +69,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/epoch-interruption-x86.wat b/tests/disas/epoch-interruption-x86.wat index dcb5e2307d9a..d46a068b0139 100644 --- a/tests/disas/epoch-interruption-x86.wat +++ b/tests/disas/epoch-interruption-x86.wat @@ -8,11 +8,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r10 -;; movq (%r10), %r10 +;; movq 0x10(%r10), %r10 ;; addq $0x30, %r10 ;; cmpq %rsp, %r10 -;; ja 0x7f -;; 18: subq $0x20, %rsp +;; ja 0x80 +;; 19: subq $0x20, %rsp ;; movq %rbx, (%rsp) ;; movq %r12, 8(%rsp) ;; movq %r13, 0x10(%rsp) @@ -20,20 +20,20 @@ ;; movq 0x20(%rdi), %rbx ;; movq %rdi, %r13 ;; movq (%rbx), %r9 -;; movq 0x10(%r12), %rax +;; movq 8(%r12), %rax ;; cmpq %rax, %r9 -;; jae 0x57 -;; 46: movq (%rbx), %rdi +;; jae 0x58 +;; 47: movq (%rbx), %rdi ;; cmpq %rax, %rdi -;; jae 0x64 -;; jmp 0x46 -;; 57: movq %r13, %rdi -;; callq 0x117 -;; jmp 0x46 -;; 64: movq 0x10(%r12), %rax +;; jae 0x65 +;; jmp 0x47 +;; 58: movq %r13, %rdi +;; callq 0x118 +;; jmp 0x47 +;; 65: movq 8(%r12), %rax ;; cmpq %rax, %rdi -;; jb 0x46 -;; 72: movq %r13, %rdi -;; callq 0x117 -;; jmp 0x46 -;; 7f: ud2 +;; jb 0x47 +;; 73: movq %r13, %rdi +;; callq 0x118 +;; jmp 0x47 +;; 80: ud2 diff --git a/tests/disas/epoch-interruption.wat b/tests/disas/epoch-interruption.wat index 5762970aab35..527526b356cc 100644 --- a/tests/disas/epoch-interruption.wat +++ b/tests/disas/epoch-interruption.wat @@ -7,7 +7,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx) -> i64 tail ;; fn0 = colocated u1:16 sig0 @@ -17,7 +17,7 @@ ;; @0016 v3 = load.i64 notrap aligned v0+8 ;; @0016 v5 = load.i64 notrap aligned v0+32 ;; @0016 v6 = load.i64 notrap aligned v5 -;; @0016 v7 = load.i64 notrap aligned v3+16 +;; @0016 v7 = load.i64 notrap aligned v3+8 ;; @0016 v8 = icmp uge v6, v7 ;; @0016 brif v8, block3, block2(v7) ;; @@ -34,7 +34,7 @@ ;; @0017 brif v14, block7, block6(v13) ;; ;; block7 cold: -;; @0017 v15 = load.i64 notrap aligned v3+16 +;; @0017 v15 = load.i64 notrap aligned v3+8 ;; @0017 v16 = icmp.i64 uge v12, v15 ;; @0017 brif v16, block8, block6(v15) ;; diff --git a/tests/disas/f32-load.wat b/tests/disas/f32-load.wat index d4ca4a6f4f68..e3cffe627e83 100644 --- a/tests/disas/f32-load.wat +++ b/tests/disas/f32-load.wat @@ -9,7 +9,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> f32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/f32-store.wat b/tests/disas/f32-store.wat index d34922e5d6a6..25a418c6dd28 100644 --- a/tests/disas/f32-store.wat +++ b/tests/disas/f32-store.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, f32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/f64-load.wat b/tests/disas/f64-load.wat index 905d461733fa..1d20be52b9ac 100644 --- a/tests/disas/f64-load.wat +++ b/tests/disas/f64-load.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> f64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/f64-store.wat b/tests/disas/f64-store.wat index 0366a05d4ce1..c96f4a0163a2 100644 --- a/tests/disas/f64-store.wat +++ b/tests/disas/f64-store.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, f64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/fac-multi-value.wat b/tests/disas/fac-multi-value.wat index d39353d8fae1..a02dabca1d37 100644 --- a/tests/disas/fac-multi-value.wat +++ b/tests/disas/fac-multi-value.wat @@ -23,7 +23,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64): @@ -36,7 +36,7 @@ ;; function u0:1(i64 vmctx, i64, i64, i64) -> i64, i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64): @@ -49,7 +49,7 @@ ;; function u0:2(i64 vmctx, i64, i64) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; sig0 = (i64 vmctx, i64, i64, i64) -> i64, i64, i64 tail ;; sig1 = (i64 vmctx, i64, i64) -> i64, i64 tail ;; fn0 = colocated u0:1 sig0 diff --git a/tests/disas/fibonacci.wat b/tests/disas/fibonacci.wat index a06733d24aed..0888eb8448bf 100644 --- a/tests/disas/fibonacci.wat +++ b/tests/disas/fibonacci.wat @@ -26,7 +26,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/fixed-size-memory.wat b/tests/disas/fixed-size-memory.wat index 64f0c8802a41..95d337bed417 100644 --- a/tests/disas/fixed-size-memory.wat +++ b/tests/disas/fixed-size-memory.wat @@ -23,7 +23,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/gc/drc/array-fill.wat b/tests/disas/gc/drc/array-fill.wat index 1e62d57c0a67..919ebdc39faf 100644 --- a/tests/disas/gc/drc/array-fill.wat +++ b/tests/disas/gc/drc/array-fill.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/array-get-s.wat b/tests/disas/gc/drc/array-get-s.wat index c7e64a636222..6b3469728734 100644 --- a/tests/disas/gc/drc/array-get-s.wat +++ b/tests/disas/gc/drc/array-get-s.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/array-get-u.wat b/tests/disas/gc/drc/array-get-u.wat index 4be81c2c874d..3d704f47fefd 100644 --- a/tests/disas/gc/drc/array-get-u.wat +++ b/tests/disas/gc/drc/array-get-u.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/array-get.wat b/tests/disas/gc/drc/array-get.wat index a31063a34a44..2691a838593e 100644 --- a/tests/disas/gc/drc/array-get.wat +++ b/tests/disas/gc/drc/array-get.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/array-len.wat b/tests/disas/gc/drc/array-len.wat index 6f18a0e2f4b2..bcfe4d4b3f68 100644 --- a/tests/disas/gc/drc/array-len.wat +++ b/tests/disas/gc/drc/array-len.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/array-new-fixed.wat b/tests/disas/gc/drc/array-new-fixed.wat index 49b6dfb3677b..a6d9645b54d6 100644 --- a/tests/disas/gc/drc/array-new-fixed.wat +++ b/tests/disas/gc/drc/array-new-fixed.wat @@ -12,15 +12,15 @@ ;; function u0:0(i64 vmctx, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64): -;; v42 = iconst.i64 0 -;; @0025 trapnz v42, user18 ; v42 = 0 +;; v43 = iconst.i64 0 +;; @0025 trapnz v43, user18 ; v43 = 0 ;; @0025 v6 = iconst.i32 24 ;; @0025 v12 = uadd_overflow_trap v6, v6, user18 ; v6 = 24, v6 = 24 ;; @0025 v14 = iconst.i32 -1476395008 @@ -28,23 +28,24 @@ ;; @0025 v16 = iconst.i32 8 ;; @0025 v17 = call fn0(v0, v14, v15, v12, v16) ; v14 = -1476395008, v15 = 0, v16 = 8 ;; @0025 v7 = iconst.i32 3 -;; @0025 v19 = load.i64 notrap aligned readonly v0+40 -;; @0025 v20 = uextend.i64 v17 -;; @0025 v21 = iadd v19, v20 -;; v32 = iconst.i64 16 -;; @0025 v22 = iadd v21, v32 ; v32 = 16 -;; @0025 store notrap aligned v7, v22 ; v7 = 3 -;; v34 = iconst.i64 24 -;; v49 = iadd v21, v34 ; v34 = 24 -;; @0025 store notrap aligned little v2, v49 -;; v31 = iconst.i64 32 -;; v56 = iadd v21, v31 ; v31 = 32 -;; @0025 store notrap aligned little v3, v56 -;; v58 = iconst.i64 40 -;; v64 = iadd v21, v58 ; v58 = 40 -;; @0025 store notrap aligned little v4, v64 +;; @0025 v20 = load.i64 notrap aligned readonly v0+40 +;; @0025 v18 = ireduce.i32 v17 +;; @0025 v21 = uextend.i64 v18 +;; @0025 v22 = iadd v20, v21 +;; v33 = iconst.i64 16 +;; @0025 v23 = iadd v22, v33 ; v33 = 16 +;; @0025 store notrap aligned v7, v23 ; v7 = 3 +;; v35 = iconst.i64 24 +;; v50 = iadd v22, v35 ; v35 = 24 +;; @0025 store notrap aligned little v2, v50 +;; v32 = iconst.i64 32 +;; v57 = iadd v22, v32 ; v32 = 32 +;; @0025 store notrap aligned little v3, v57 +;; v59 = iconst.i64 40 +;; v65 = iadd v22, v59 ; v59 = 40 +;; @0025 store notrap aligned little v4, v65 ;; @0029 jump block1 ;; ;; block1: -;; @0029 return v17 +;; @0029 return v18 ;; } diff --git a/tests/disas/gc/drc/array-new.wat b/tests/disas/gc/drc/array-new.wat index 49722b0f2afc..df958f64a946 100644 --- a/tests/disas/gc/drc/array-new.wat +++ b/tests/disas/gc/drc/array-new.wat @@ -12,53 +12,54 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i32): ;; @0022 v6 = uextend.i64 v3 -;; v34 = iconst.i64 3 -;; v35 = ishl v6, v34 ; v34 = 3 -;; v32 = iconst.i64 32 -;; @0022 v8 = ushr v35, v32 ; v32 = 32 +;; v35 = iconst.i64 3 +;; v36 = ishl v6, v35 ; v35 = 3 +;; v33 = iconst.i64 32 +;; @0022 v8 = ushr v36, v33 ; v33 = 32 ;; @0022 trapnz v8, user18 ;; @0022 v5 = iconst.i32 24 -;; v41 = iconst.i32 3 -;; v42 = ishl v3, v41 ; v41 = 3 -;; @0022 v10 = uadd_overflow_trap v5, v42, user18 ; v5 = 24 +;; v42 = iconst.i32 3 +;; v43 = ishl v3, v42 ; v42 = 3 +;; @0022 v10 = uadd_overflow_trap v5, v43, user18 ; v5 = 24 ;; @0022 v12 = iconst.i32 -1476395008 ;; @0022 v13 = iconst.i32 0 -;; v39 = iconst.i32 8 -;; @0022 v15 = call fn0(v0, v12, v13, v10, v39) ; v12 = -1476395008, v13 = 0, v39 = 8 -;; @0022 v17 = load.i64 notrap aligned readonly v0+40 -;; @0022 v18 = uextend.i64 v15 -;; @0022 v19 = iadd v17, v18 -;; v33 = iconst.i64 16 -;; @0022 v20 = iadd v19, v33 ; v33 = 16 -;; @0022 store notrap aligned v3, v20 -;; v46 = iconst.i64 24 -;; v52 = iadd v19, v46 ; v46 = 24 -;; @0022 v26 = uextend.i64 v10 -;; @0022 v27 = iadd v19, v26 -;; v31 = iconst.i64 8 -;; @0022 jump block2(v52) +;; v40 = iconst.i32 8 +;; @0022 v15 = call fn0(v0, v12, v13, v10, v40) ; v12 = -1476395008, v13 = 0, v40 = 8 +;; @0022 v18 = load.i64 notrap aligned readonly v0+40 +;; @0022 v16 = ireduce.i32 v15 +;; @0022 v19 = uextend.i64 v16 +;; @0022 v20 = iadd v18, v19 +;; v34 = iconst.i64 16 +;; @0022 v21 = iadd v20, v34 ; v34 = 16 +;; @0022 store notrap aligned v3, v21 +;; v47 = iconst.i64 24 +;; v53 = iadd v20, v47 ; v47 = 24 +;; @0022 v27 = uextend.i64 v10 +;; @0022 v28 = iadd v20, v27 +;; v32 = iconst.i64 8 +;; @0022 jump block2(v53) ;; -;; block2(v28: i64): -;; @0022 v29 = icmp eq v28, v27 -;; @0022 brif v29, block4, block3 +;; block2(v29: i64): +;; @0022 v30 = icmp eq v29, v28 +;; @0022 brif v30, block4, block3 ;; ;; block3: -;; @0022 store.i64 notrap aligned little v2, v28 -;; v64 = iconst.i64 8 -;; v65 = iadd.i64 v28, v64 ; v64 = 8 -;; @0022 jump block2(v65) +;; @0022 store.i64 notrap aligned little v2, v29 +;; v65 = iconst.i64 8 +;; v66 = iadd.i64 v29, v65 ; v65 = 8 +;; @0022 jump block2(v66) ;; ;; block4: ;; @0025 jump block1 ;; ;; block1: -;; @0025 return v15 +;; @0025 return v16 ;; } diff --git a/tests/disas/gc/drc/array-set.wat b/tests/disas/gc/drc/array-set.wat index b0923f9ca440..c6c95b7c12c4 100644 --- a/tests/disas/gc/drc/array-set.wat +++ b/tests/disas/gc/drc/array-set.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/br-on-cast-fail.wat b/tests/disas/gc/drc/br-on-cast-fail.wat index 6aa8ec717cea..8b53a5015109 100644 --- a/tests/disas/gc/drc/br-on-cast-fail.wat +++ b/tests/disas/gc/drc/br-on-cast-fail.wat @@ -20,7 +20,7 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; sig1 = (i64 vmctx, i64) tail diff --git a/tests/disas/gc/drc/br-on-cast.wat b/tests/disas/gc/drc/br-on-cast.wat index c59bb47226f2..24c17fe19b95 100644 --- a/tests/disas/gc/drc/br-on-cast.wat +++ b/tests/disas/gc/drc/br-on-cast.wat @@ -20,7 +20,7 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; sig1 = (i64 vmctx, i64) tail diff --git a/tests/disas/gc/drc/call-indirect-and-subtyping.wat b/tests/disas/gc/drc/call-indirect-and-subtyping.wat index 53cbf0ecfb50..f55445627482 100644 --- a/tests/disas/gc/drc/call-indirect-and-subtyping.wat +++ b/tests/disas/gc/drc/call-indirect-and-subtyping.wat @@ -19,7 +19,7 @@ ;; function u0:2(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+136 ;; sig0 = (i64 vmctx, i64) tail diff --git a/tests/disas/gc/drc/externref-globals.wat b/tests/disas/gc/drc/externref-globals.wat index 643bb82b7e66..b97942d3bcff 100644 --- a/tests/disas/gc/drc/externref-globals.wat +++ b/tests/disas/gc/drc/externref-globals.wat @@ -16,9 +16,9 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; @@ -82,7 +82,7 @@ ;; function u0:1(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext) tail ;; fn0 = colocated u1:25 sig0 diff --git a/tests/disas/gc/drc/funcref-in-gc-heap-get.wat b/tests/disas/gc/drc/funcref-in-gc-heap-get.wat index 81b4dbd4a3e7..632b9829854a 100644 --- a/tests/disas/gc/drc/funcref-in-gc-heap-get.wat +++ b/tests/disas/gc/drc/funcref-in-gc-heap-get.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:29 sig0 diff --git a/tests/disas/gc/drc/funcref-in-gc-heap-new.wat b/tests/disas/gc/drc/funcref-in-gc-heap-new.wat index f84ad4421e2f..42a4b4c29900 100644 --- a/tests/disas/gc/drc/funcref-in-gc-heap-new.wat +++ b/tests/disas/gc/drc/funcref-in-gc-heap-new.wat @@ -13,10 +13,10 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail -;; sig1 = (i64 vmctx, i64) -> i32 uext tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail +;; sig1 = (i64 vmctx, i64) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; fn1 = colocated u1:28 sig1 ;; stack_limit = gv2 @@ -27,18 +27,20 @@ ;; @0020 v4 = iconst.i32 24 ;; @0020 v8 = iconst.i32 8 ;; @0020 v9 = call fn0(v0, v6, v7, v4, v8) ; v6 = -1342177280, v7 = 0, v4 = 24, v8 = 8 -;; v19 = stack_addr.i64 ss0 -;; store notrap v9, v19 -;; @0020 v16 = call fn1(v0, v2), stack_map=[i32 @ ss0+0] -;; @0020 v11 = load.i64 notrap aligned readonly v0+40 -;; @0020 v12 = uextend.i64 v9 -;; @0020 v13 = iadd v11, v12 -;; v21 = iconst.i64 16 -;; @0020 v14 = iadd v13, v21 ; v21 = 16 -;; @0020 store notrap aligned little v16, v14 -;; v17 = load.i32 notrap v19 +;; @0020 v10 = ireduce.i32 v9 +;; v21 = stack_addr.i64 ss0 +;; store notrap v10, v21 +;; @0020 v17 = call fn1(v0, v2), stack_map=[i32 @ ss0+0] +;; @0020 v18 = ireduce.i32 v17 +;; @0020 v12 = load.i64 notrap aligned readonly v0+40 +;; @0020 v13 = uextend.i64 v10 +;; @0020 v14 = iadd v12, v13 +;; v23 = iconst.i64 16 +;; @0020 v15 = iadd v14, v23 ; v23 = 16 +;; @0020 store notrap aligned little v18, v15 +;; v19 = load.i32 notrap v21 ;; @0023 jump block1 ;; ;; block1: -;; @0023 return v17 +;; @0023 return v19 ;; } diff --git a/tests/disas/gc/drc/funcref-in-gc-heap-set.wat b/tests/disas/gc/drc/funcref-in-gc-heap-set.wat index 9dc54d474b99..fae6efb76e39 100644 --- a/tests/disas/gc/drc/funcref-in-gc-heap-set.wat +++ b/tests/disas/gc/drc/funcref-in-gc-heap-set.wat @@ -12,9 +12,9 @@ ;; function u0:0(i64 vmctx, i64, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i64) -> i32 uext tail +;; sig0 = (i64 vmctx, i64) -> i64 tail ;; fn0 = colocated u1:28 sig0 ;; stack_limit = gv2 ;; @@ -23,15 +23,16 @@ ;; @0022 v9 = uextend.i64 v2 ;; @0022 v10 = iconst.i64 16 ;; @0022 v11 = uadd_overflow_trap v9, v10, user1 ; v10 = 16 -;; v18 = iconst.i64 24 -;; @0022 v13 = uadd_overflow_trap v9, v18, user1 ; v18 = 24 +;; v19 = iconst.i64 24 +;; @0022 v13 = uadd_overflow_trap v9, v19, user1 ; v19 = 24 ;; @0022 v8 = load.i64 notrap aligned readonly v0+48 ;; @0022 v14 = icmp ule v13, v8 ;; @0022 trapz v14, user1 ;; @0022 v17 = call fn0(v0, v3) +;; @0022 v18 = ireduce.i32 v17 ;; @0022 v6 = load.i64 notrap aligned readonly v0+40 ;; @0022 v15 = iadd v6, v11 -;; @0022 store notrap aligned little v17, v15 +;; @0022 store notrap aligned little v18, v15 ;; @0026 jump block1 ;; ;; block1: diff --git a/tests/disas/gc/drc/i31ref-globals.wat b/tests/disas/gc/drc/i31ref-globals.wat index 90c751b52a28..cd3d9e703e7a 100644 --- a/tests/disas/gc/drc/i31ref-globals.wat +++ b/tests/disas/gc/drc/i31ref-globals.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -32,7 +32,7 @@ ;; function u0:1(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/multiple-array-get.wat b/tests/disas/gc/drc/multiple-array-get.wat index ed2458df4745..1b4b0ff1fcc2 100644 --- a/tests/disas/gc/drc/multiple-array-get.wat +++ b/tests/disas/gc/drc/multiple-array-get.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/multiple-struct-get.wat b/tests/disas/gc/drc/multiple-struct-get.wat index d9b970f260e8..be8aadbcbaec 100644 --- a/tests/disas/gc/drc/multiple-struct-get.wat +++ b/tests/disas/gc/drc/multiple-struct-get.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> f32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/ref-cast.wat b/tests/disas/gc/drc/ref-cast.wat index 885803c0697e..aeb108e09c58 100644 --- a/tests/disas/gc/drc/ref-cast.wat +++ b/tests/disas/gc/drc/ref-cast.wat @@ -12,7 +12,7 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; fn0 = colocated u1:35 sig0 diff --git a/tests/disas/gc/drc/ref-test-any.wat b/tests/disas/gc/drc/ref-test-any.wat index 251a36614eed..1d935bf15d29 100644 --- a/tests/disas/gc/drc/ref-test-any.wat +++ b/tests/disas/gc/drc/ref-test-any.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -29,7 +29,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/gc/drc/ref-test-array.wat b/tests/disas/gc/drc/ref-test-array.wat index a52088f287ed..353f61398d58 100644 --- a/tests/disas/gc/drc/ref-test-array.wat +++ b/tests/disas/gc/drc/ref-test-array.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/ref-test-concrete-func-type.wat b/tests/disas/gc/drc/ref-test-concrete-func-type.wat index 1c59f5f951d0..cda7ebf4e088 100644 --- a/tests/disas/gc/drc/ref-test-concrete-func-type.wat +++ b/tests/disas/gc/drc/ref-test-concrete-func-type.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; fn0 = colocated u1:35 sig0 diff --git a/tests/disas/gc/drc/ref-test-concrete-type.wat b/tests/disas/gc/drc/ref-test-concrete-type.wat index 2201952f0851..d27da353a380 100644 --- a/tests/disas/gc/drc/ref-test-concrete-type.wat +++ b/tests/disas/gc/drc/ref-test-concrete-type.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; fn0 = colocated u1:35 sig0 diff --git a/tests/disas/gc/drc/ref-test-eq.wat b/tests/disas/gc/drc/ref-test-eq.wat index e3b074f89ea0..b9134d823977 100644 --- a/tests/disas/gc/drc/ref-test-eq.wat +++ b/tests/disas/gc/drc/ref-test-eq.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/ref-test-i31.wat b/tests/disas/gc/drc/ref-test-i31.wat index 6d8fc63eb7ee..a150ed6a2440 100644 --- a/tests/disas/gc/drc/ref-test-i31.wat +++ b/tests/disas/gc/drc/ref-test-i31.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/gc/drc/ref-test-none.wat b/tests/disas/gc/drc/ref-test-none.wat index 86a657b7bfa7..e3ca30dbbf23 100644 --- a/tests/disas/gc/drc/ref-test-none.wat +++ b/tests/disas/gc/drc/ref-test-none.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -27,7 +27,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/gc/drc/ref-test-struct.wat b/tests/disas/gc/drc/ref-test-struct.wat index 583c605fa803..648abfe07244 100644 --- a/tests/disas/gc/drc/ref-test-struct.wat +++ b/tests/disas/gc/drc/ref-test-struct.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/struct-get.wat b/tests/disas/gc/drc/struct-get.wat index c3934640e00c..3bfd790eeee5 100644 --- a/tests/disas/gc/drc/struct-get.wat +++ b/tests/disas/gc/drc/struct-get.wat @@ -26,7 +26,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> f32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -52,7 +52,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -79,7 +79,7 @@ ;; function u0:2(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -107,9 +107,9 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/drc/struct-new-default.wat b/tests/disas/gc/drc/struct-new-default.wat index 3eba762324b2..f019365afa87 100644 --- a/tests/disas/gc/drc/struct-new-default.wat +++ b/tests/disas/gc/drc/struct-new-default.wat @@ -14,9 +14,9 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; stack_limit = gv2 ;; @@ -27,41 +27,42 @@ ;; @0021 v10 = iconst.i32 8 ;; @0021 v11 = call fn0(v0, v8, v4, v6, v10) ; v8 = -1342177280, v4 = 0, v6 = 32, v10 = 8 ;; @0021 v3 = f32const 0.0 -;; @0021 v13 = load.i64 notrap aligned readonly v0+40 -;; @0021 v14 = uextend.i64 v11 -;; @0021 v15 = iadd v13, v14 -;; v46 = iconst.i64 16 -;; @0021 v16 = iadd v15, v46 ; v46 = 16 -;; @0021 store notrap aligned little v3, v16 ; v3 = 0.0 -;; v47 = iconst.i64 20 -;; @0021 v17 = iadd v15, v47 ; v47 = 20 -;; @0021 istore8 notrap aligned little v4, v17 ; v4 = 0 -;; v57 = iconst.i8 1 -;; @0021 brif v57, block3, block2 ; v57 = 1 +;; @0021 v14 = load.i64 notrap aligned readonly v0+40 +;; @0021 v12 = ireduce.i32 v11 +;; @0021 v15 = uextend.i64 v12 +;; @0021 v16 = iadd v14, v15 +;; v47 = iconst.i64 16 +;; @0021 v17 = iadd v16, v47 ; v47 = 16 +;; @0021 store notrap aligned little v3, v17 ; v3 = 0.0 +;; v48 = iconst.i64 20 +;; @0021 v18 = iadd v16, v48 ; v48 = 20 +;; @0021 istore8 notrap aligned little v4, v18 ; v4 = 0 +;; v58 = iconst.i8 1 +;; @0021 brif v58, block3, block2 ; v58 = 1 ;; ;; block2: -;; v64 = iconst.i64 0 -;; @0021 v27 = iconst.i64 8 -;; @0021 v28 = uadd_overflow_trap v64, v27, user1 ; v64 = 0, v27 = 8 -;; @0021 v30 = uadd_overflow_trap v28, v27, user1 ; v27 = 8 -;; @0021 v25 = load.i64 notrap aligned readonly v0+48 -;; @0021 v31 = icmp ule v30, v25 -;; @0021 trapz v31, user1 -;; @0021 v32 = iadd.i64 v13, v28 -;; @0021 v33 = load.i64 notrap aligned v32 -;; @0021 trapz v31, user1 -;; v50 = iconst.i64 1 -;; @0021 v34 = iadd v33, v50 ; v50 = 1 -;; @0021 store notrap aligned v34, v32 +;; v65 = iconst.i64 0 +;; @0021 v28 = iconst.i64 8 +;; @0021 v29 = uadd_overflow_trap v65, v28, user1 ; v65 = 0, v28 = 8 +;; @0021 v31 = uadd_overflow_trap v29, v28, user1 ; v28 = 8 +;; @0021 v26 = load.i64 notrap aligned readonly v0+48 +;; @0021 v32 = icmp ule v31, v26 +;; @0021 trapz v32, user1 +;; @0021 v33 = iadd.i64 v14, v29 +;; @0021 v34 = load.i64 notrap aligned v33 +;; @0021 trapz v32, user1 +;; v51 = iconst.i64 1 +;; @0021 v35 = iadd v34, v51 ; v51 = 1 +;; @0021 store notrap aligned v35, v33 ;; @0021 jump block3 ;; ;; block3: -;; v65 = iconst.i32 0 -;; v48 = iconst.i64 24 -;; @0021 v18 = iadd.i64 v15, v48 ; v48 = 24 -;; @0021 store notrap aligned little v65, v18 ; v65 = 0 +;; v66 = iconst.i32 0 +;; v49 = iconst.i64 24 +;; @0021 v19 = iadd.i64 v16, v49 ; v49 = 24 +;; @0021 store notrap aligned little v66, v19 ; v66 = 0 ;; @0024 jump block1 ;; ;; block1: -;; @0024 return v11 +;; @0024 return v12 ;; } diff --git a/tests/disas/gc/drc/struct-new.wat b/tests/disas/gc/drc/struct-new.wat index 69c60bec0a8b..b3d13cbe1bb6 100644 --- a/tests/disas/gc/drc/struct-new.wat +++ b/tests/disas/gc/drc/struct-new.wat @@ -15,64 +15,65 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: f32, v3: i32, v4: i32): -;; v50 = stack_addr.i64 ss0 -;; store notrap v4, v50 +;; v51 = stack_addr.i64 ss0 +;; store notrap v4, v51 ;; @002a v8 = iconst.i32 -1342177280 ;; @002a v9 = iconst.i32 0 ;; @002a v6 = iconst.i32 32 ;; @002a v10 = iconst.i32 8 ;; @002a v11 = call fn0(v0, v8, v9, v6, v10), stack_map=[i32 @ ss0+0] ; v8 = -1342177280, v9 = 0, v6 = 32, v10 = 8 -;; @002a v13 = load.i64 notrap aligned readonly v0+40 -;; @002a v14 = uextend.i64 v11 -;; @002a v15 = iadd v13, v14 -;; v51 = iconst.i64 16 -;; @002a v16 = iadd v15, v51 ; v51 = 16 -;; @002a store notrap aligned little v2, v16 -;; v52 = iconst.i64 20 -;; @002a v17 = iadd v15, v52 ; v52 = 20 -;; @002a istore8 notrap aligned little v3, v17 -;; v49 = load.i32 notrap v50 -;; @002a v19 = iconst.i32 -2 -;; @002a v20 = band v49, v19 ; v19 = -2 -;; @002a v21 = icmp eq v20, v9 ; v9 = 0 -;; @002a brif v21, block3, block2 +;; @002a v14 = load.i64 notrap aligned readonly v0+40 +;; @002a v12 = ireduce.i32 v11 +;; @002a v15 = uextend.i64 v12 +;; @002a v16 = iadd v14, v15 +;; v52 = iconst.i64 16 +;; @002a v17 = iadd v16, v52 ; v52 = 16 +;; @002a store notrap aligned little v2, v17 +;; v53 = iconst.i64 20 +;; @002a v18 = iadd v16, v53 ; v53 = 20 +;; @002a istore8 notrap aligned little v3, v18 +;; v50 = load.i32 notrap v51 +;; @002a v20 = iconst.i32 -2 +;; @002a v21 = band v50, v20 ; v20 = -2 +;; @002a v22 = icmp eq v21, v9 ; v9 = 0 +;; @002a brif v22, block3, block2 ;; ;; block2: -;; @002a v26 = uextend.i64 v49 -;; @002a v27 = iconst.i64 8 -;; @002a v28 = uadd_overflow_trap v26, v27, user1 ; v27 = 8 -;; @002a v30 = uadd_overflow_trap v28, v27, user1 ; v27 = 8 -;; @002a v25 = load.i64 notrap aligned readonly v0+48 -;; @002a v31 = icmp ule v30, v25 -;; @002a trapz v31, user1 -;; @002a v32 = iadd.i64 v13, v28 -;; @002a v33 = load.i64 notrap aligned v32 -;; v47 = load.i32 notrap v50 -;; @002a v39 = uextend.i64 v47 -;; @002a v41 = uadd_overflow_trap v39, v27, user1 ; v27 = 8 -;; @002a v43 = uadd_overflow_trap v41, v27, user1 ; v27 = 8 -;; @002a v44 = icmp ule v43, v25 -;; @002a trapz v44, user1 -;; v57 = iconst.i64 1 -;; @002a v34 = iadd v33, v57 ; v57 = 1 -;; @002a v45 = iadd.i64 v13, v41 -;; @002a store notrap aligned v34, v45 +;; @002a v27 = uextend.i64 v50 +;; @002a v28 = iconst.i64 8 +;; @002a v29 = uadd_overflow_trap v27, v28, user1 ; v28 = 8 +;; @002a v31 = uadd_overflow_trap v29, v28, user1 ; v28 = 8 +;; @002a v26 = load.i64 notrap aligned readonly v0+48 +;; @002a v32 = icmp ule v31, v26 +;; @002a trapz v32, user1 +;; @002a v33 = iadd.i64 v14, v29 +;; @002a v34 = load.i64 notrap aligned v33 +;; v48 = load.i32 notrap v51 +;; @002a v40 = uextend.i64 v48 +;; @002a v42 = uadd_overflow_trap v40, v28, user1 ; v28 = 8 +;; @002a v44 = uadd_overflow_trap v42, v28, user1 ; v28 = 8 +;; @002a v45 = icmp ule v44, v26 +;; @002a trapz v45, user1 +;; v58 = iconst.i64 1 +;; @002a v35 = iadd v34, v58 ; v58 = 1 +;; @002a v46 = iadd.i64 v14, v42 +;; @002a store notrap aligned v35, v46 ;; @002a jump block3 ;; ;; block3: -;; v46 = load.i32 notrap v50 -;; v53 = iconst.i64 24 -;; @002a v18 = iadd.i64 v15, v53 ; v53 = 24 -;; @002a store notrap aligned little v46, v18 +;; v47 = load.i32 notrap v51 +;; v54 = iconst.i64 24 +;; @002a v19 = iadd.i64 v16, v54 ; v54 = 24 +;; @002a store notrap aligned little v47, v19 ;; @002d jump block1 ;; ;; block1: -;; @002d return v11 +;; @002d return v12 ;; } diff --git a/tests/disas/gc/drc/struct-set.wat b/tests/disas/gc/drc/struct-set.wat index bb53aa9e65ec..40053b87dd03 100644 --- a/tests/disas/gc/drc/struct-set.wat +++ b/tests/disas/gc/drc/struct-set.wat @@ -22,7 +22,7 @@ ;; function u0:0(i64 vmctx, i64, i32, f32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -74,7 +74,7 @@ ;; function u0:2(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext) tail ;; fn0 = colocated u1:25 sig0 diff --git a/tests/disas/gc/null/array-fill.wat b/tests/disas/gc/null/array-fill.wat index 21bfeb3d60cc..a083d41c3472 100644 --- a/tests/disas/gc/null/array-fill.wat +++ b/tests/disas/gc/null/array-fill.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-get-s.wat b/tests/disas/gc/null/array-get-s.wat index c1e56cf798f0..4ff79af0c66f 100644 --- a/tests/disas/gc/null/array-get-s.wat +++ b/tests/disas/gc/null/array-get-s.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-get-u.wat b/tests/disas/gc/null/array-get-u.wat index 16e03a2e986d..4c6eef63cf92 100644 --- a/tests/disas/gc/null/array-get-u.wat +++ b/tests/disas/gc/null/array-get-u.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-get.wat b/tests/disas/gc/null/array-get.wat index e10db21fbbb7..0ea2b978aaea 100644 --- a/tests/disas/gc/null/array-get.wat +++ b/tests/disas/gc/null/array-get.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-len.wat b/tests/disas/gc/null/array-len.wat index 6a2f8e739a8c..695dae2af6ac 100644 --- a/tests/disas/gc/null/array-len.wat +++ b/tests/disas/gc/null/array-len.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-new-fixed.wat b/tests/disas/gc/null/array-new-fixed.wat index fd2250a698de..a1facbd38c46 100644 --- a/tests/disas/gc/null/array-new-fixed.wat +++ b/tests/disas/gc/null/array-new-fixed.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-new.wat b/tests/disas/gc/null/array-new.wat index 34ca5d014a35..36e5a5e2bef3 100644 --- a/tests/disas/gc/null/array-new.wat +++ b/tests/disas/gc/null/array-new.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/array-set.wat b/tests/disas/gc/null/array-set.wat index c189a13e00a9..127f5f880551 100644 --- a/tests/disas/gc/null/array-set.wat +++ b/tests/disas/gc/null/array-set.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/br-on-cast-fail.wat b/tests/disas/gc/null/br-on-cast-fail.wat index 40010fbd1646..ad6d65aed67b 100644 --- a/tests/disas/gc/null/br-on-cast-fail.wat +++ b/tests/disas/gc/null/br-on-cast-fail.wat @@ -20,7 +20,7 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; sig1 = (i64 vmctx, i64) tail diff --git a/tests/disas/gc/null/br-on-cast.wat b/tests/disas/gc/null/br-on-cast.wat index 3c29861aff9e..4dfb45d9645b 100644 --- a/tests/disas/gc/null/br-on-cast.wat +++ b/tests/disas/gc/null/br-on-cast.wat @@ -20,7 +20,7 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; sig1 = (i64 vmctx, i64) tail diff --git a/tests/disas/gc/null/call-indirect-and-subtyping.wat b/tests/disas/gc/null/call-indirect-and-subtyping.wat index 8234a2ecdf90..473af283c126 100644 --- a/tests/disas/gc/null/call-indirect-and-subtyping.wat +++ b/tests/disas/gc/null/call-indirect-and-subtyping.wat @@ -19,7 +19,7 @@ ;; function u0:2(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+136 ;; sig0 = (i64 vmctx, i64) tail diff --git a/tests/disas/gc/null/externref-globals.wat b/tests/disas/gc/null/externref-globals.wat index 53e73876f736..36ab6a7ae8d8 100644 --- a/tests/disas/gc/null/externref-globals.wat +++ b/tests/disas/gc/null/externref-globals.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -32,7 +32,7 @@ ;; function u0:1(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/funcref-in-gc-heap-get.wat b/tests/disas/gc/null/funcref-in-gc-heap-get.wat index 2f3cb19ec646..1e7d7acaa0a0 100644 --- a/tests/disas/gc/null/funcref-in-gc-heap-get.wat +++ b/tests/disas/gc/null/funcref-in-gc-heap-get.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:29 sig0 diff --git a/tests/disas/gc/null/funcref-in-gc-heap-new.wat b/tests/disas/gc/null/funcref-in-gc-heap-new.wat index 6679997d505d..ae551c8ee075 100644 --- a/tests/disas/gc/null/funcref-in-gc-heap-new.wat +++ b/tests/disas/gc/null/funcref-in-gc-heap-new.wat @@ -12,43 +12,44 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i64) -> i32 uext tail +;; sig0 = (i64 vmctx, i64) -> i64 tail ;; fn0 = colocated u1:28 sig0 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64): -;; v34 = iconst.i32 0 -;; @0020 trapnz v34, user18 ; v34 = 0 +;; v35 = iconst.i32 0 +;; @0020 trapnz v35, user18 ; v35 = 0 ;; @0020 v9 = load.i64 notrap aligned readonly v0+56 ;; @0020 v10 = load.i32 notrap aligned v9 -;; v41 = iconst.i32 7 -;; @0020 v13 = uadd_overflow_trap v10, v41, user18 ; v41 = 7 -;; v48 = iconst.i32 -8 -;; @0020 v15 = band v13, v48 ; v48 = -8 +;; v42 = iconst.i32 7 +;; @0020 v13 = uadd_overflow_trap v10, v42, user18 ; v42 = 7 +;; v49 = iconst.i32 -8 +;; @0020 v15 = band v13, v49 ; v49 = -8 ;; @0020 v4 = iconst.i32 16 ;; @0020 v16 = uadd_overflow_trap v15, v4, user18 ; v4 = 16 ;; @0020 v17 = uextend.i64 v16 ;; @0020 v21 = load.i64 notrap aligned readonly v0+48 ;; @0020 v22 = icmp ule v17, v21 ;; @0020 trapz v22, user18 -;; v49 = iconst.i32 -1342177264 +;; v50 = iconst.i32 -1342177264 ;; @0020 v19 = load.i64 notrap aligned readonly v0+40 ;; @0020 v23 = uextend.i64 v15 ;; @0020 v24 = iadd v19, v23 -;; @0020 store notrap aligned v49, v24 ; v49 = -1342177264 +;; @0020 store notrap aligned v50, v24 ; v50 = -1342177264 ;; @0020 v28 = load.i64 notrap aligned readonly v0+80 ;; @0020 v29 = load.i32 notrap aligned readonly v28 ;; @0020 store notrap aligned v29, v24+4 ;; @0020 store notrap aligned v16, v9 ;; @0020 v32 = call fn0(v0, v2) -;; v33 = iconst.i64 8 -;; @0020 v30 = iadd v24, v33 ; v33 = 8 -;; @0020 store notrap aligned little v32, v30 +;; @0020 v33 = ireduce.i32 v32 +;; v34 = iconst.i64 8 +;; @0020 v30 = iadd v24, v34 ; v34 = 8 +;; @0020 store notrap aligned little v33, v30 ;; @0023 jump block1 ;; ;; block1: -;; v56 = band.i32 v13, v48 ; v48 = -8 -;; @0023 return v56 +;; v57 = band.i32 v13, v49 ; v49 = -8 +;; @0023 return v57 ;; } diff --git a/tests/disas/gc/null/funcref-in-gc-heap-set.wat b/tests/disas/gc/null/funcref-in-gc-heap-set.wat index 4a02a1d1ee05..82487b51120b 100644 --- a/tests/disas/gc/null/funcref-in-gc-heap-set.wat +++ b/tests/disas/gc/null/funcref-in-gc-heap-set.wat @@ -12,9 +12,9 @@ ;; function u0:0(i64 vmctx, i64, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i64) -> i32 uext tail +;; sig0 = (i64 vmctx, i64) -> i64 tail ;; fn0 = colocated u1:28 sig0 ;; stack_limit = gv2 ;; @@ -23,15 +23,16 @@ ;; @0022 v9 = uextend.i64 v2 ;; @0022 v10 = iconst.i64 8 ;; @0022 v11 = uadd_overflow_trap v9, v10, user1 ; v10 = 8 -;; v18 = iconst.i64 16 -;; @0022 v13 = uadd_overflow_trap v9, v18, user1 ; v18 = 16 +;; v19 = iconst.i64 16 +;; @0022 v13 = uadd_overflow_trap v9, v19, user1 ; v19 = 16 ;; @0022 v8 = load.i64 notrap aligned readonly v0+48 ;; @0022 v14 = icmp ule v13, v8 ;; @0022 trapz v14, user1 ;; @0022 v17 = call fn0(v0, v3) +;; @0022 v18 = ireduce.i32 v17 ;; @0022 v6 = load.i64 notrap aligned readonly v0+40 ;; @0022 v15 = iadd v6, v11 -;; @0022 store notrap aligned little v17, v15 +;; @0022 store notrap aligned little v18, v15 ;; @0026 jump block1 ;; ;; block1: diff --git a/tests/disas/gc/null/i31ref-globals.wat b/tests/disas/gc/null/i31ref-globals.wat index e528d7c84802..28e9751928db 100644 --- a/tests/disas/gc/null/i31ref-globals.wat +++ b/tests/disas/gc/null/i31ref-globals.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -32,7 +32,7 @@ ;; function u0:1(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/multiple-array-get.wat b/tests/disas/gc/null/multiple-array-get.wat index 9252b42df277..f8b127dce071 100644 --- a/tests/disas/gc/null/multiple-array-get.wat +++ b/tests/disas/gc/null/multiple-array-get.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/multiple-struct-get.wat b/tests/disas/gc/null/multiple-struct-get.wat index c26e4c6f9a6e..1b1d5e04612f 100644 --- a/tests/disas/gc/null/multiple-struct-get.wat +++ b/tests/disas/gc/null/multiple-struct-get.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> f32, i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/ref-cast.wat b/tests/disas/gc/null/ref-cast.wat index 78a01eca341c..a6608f1d8c8e 100644 --- a/tests/disas/gc/null/ref-cast.wat +++ b/tests/disas/gc/null/ref-cast.wat @@ -12,7 +12,7 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; fn0 = colocated u1:35 sig0 diff --git a/tests/disas/gc/null/ref-test-any.wat b/tests/disas/gc/null/ref-test-any.wat index 48e2fd93e603..e02df05c5b85 100644 --- a/tests/disas/gc/null/ref-test-any.wat +++ b/tests/disas/gc/null/ref-test-any.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -29,7 +29,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/gc/null/ref-test-array.wat b/tests/disas/gc/null/ref-test-array.wat index f0c6d6005f3a..eaca00910a80 100644 --- a/tests/disas/gc/null/ref-test-array.wat +++ b/tests/disas/gc/null/ref-test-array.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/ref-test-concrete-func-type.wat b/tests/disas/gc/null/ref-test-concrete-func-type.wat index f19d7a735ed7..c70f59b1fa61 100644 --- a/tests/disas/gc/null/ref-test-concrete-func-type.wat +++ b/tests/disas/gc/null/ref-test-concrete-func-type.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; fn0 = colocated u1:35 sig0 diff --git a/tests/disas/gc/null/ref-test-concrete-type.wat b/tests/disas/gc/null/ref-test-concrete-type.wat index bcd5ba2d2b1e..700c89ab7a6d 100644 --- a/tests/disas/gc/null/ref-test-concrete-type.wat +++ b/tests/disas/gc/null/ref-test-concrete-type.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext, i32 uext) -> i32 uext tail ;; fn0 = colocated u1:35 sig0 diff --git a/tests/disas/gc/null/ref-test-eq.wat b/tests/disas/gc/null/ref-test-eq.wat index f8f615bf6ec0..c05ed5aac568 100644 --- a/tests/disas/gc/null/ref-test-eq.wat +++ b/tests/disas/gc/null/ref-test-eq.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/ref-test-i31.wat b/tests/disas/gc/null/ref-test-i31.wat index 4ea0d6e231c2..69e0d3861224 100644 --- a/tests/disas/gc/null/ref-test-i31.wat +++ b/tests/disas/gc/null/ref-test-i31.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/gc/null/ref-test-none.wat b/tests/disas/gc/null/ref-test-none.wat index a7dc747d8577..46857fc95f43 100644 --- a/tests/disas/gc/null/ref-test-none.wat +++ b/tests/disas/gc/null/ref-test-none.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -27,7 +27,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/gc/null/ref-test-struct.wat b/tests/disas/gc/null/ref-test-struct.wat index 5f4d6fb27adc..933c1b7af1e4 100644 --- a/tests/disas/gc/null/ref-test-struct.wat +++ b/tests/disas/gc/null/ref-test-struct.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/struct-get.wat b/tests/disas/gc/null/struct-get.wat index af763f049185..3241f2f5e9c3 100644 --- a/tests/disas/gc/null/struct-get.wat +++ b/tests/disas/gc/null/struct-get.wat @@ -26,7 +26,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> f32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -52,7 +52,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -79,7 +79,7 @@ ;; function u0:2(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -106,7 +106,7 @@ ;; function u0:3(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/struct-new-default.wat b/tests/disas/gc/null/struct-new-default.wat index b5756fd2fb8d..7eeea63ceb79 100644 --- a/tests/disas/gc/null/struct-new-default.wat +++ b/tests/disas/gc/null/struct-new-default.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/struct-new.wat b/tests/disas/gc/null/struct-new.wat index 922a79df3ddd..9da11aebff0d 100644 --- a/tests/disas/gc/null/struct-new.wat +++ b/tests/disas/gc/null/struct-new.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64, f32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/null/struct-set.wat b/tests/disas/gc/null/struct-set.wat index e3a43423c1da..9cd22459bddb 100644 --- a/tests/disas/gc/null/struct-set.wat +++ b/tests/disas/gc/null/struct-set.wat @@ -22,7 +22,7 @@ ;; function u0:0(i64 vmctx, i64, i32, f32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; @@ -74,7 +74,7 @@ ;; function u0:2(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; stack_limit = gv2 ;; diff --git a/tests/disas/gc/struct-new-default.wat b/tests/disas/gc/struct-new-default.wat index d9054c184277..b1e2996f84d8 100644 --- a/tests/disas/gc/struct-new-default.wat +++ b/tests/disas/gc/struct-new-default.wat @@ -14,9 +14,9 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; stack_limit = gv2 ;; @@ -27,41 +27,42 @@ ;; @0021 v10 = iconst.i32 8 ;; @0021 v11 = call fn0(v0, v8, v4, v6, v10) ; v8 = -1342177280, v4 = 0, v6 = 32, v10 = 8 ;; @0021 v3 = f32const 0.0 -;; @0021 v13 = load.i64 notrap aligned readonly v0+40 -;; @0021 v14 = uextend.i64 v11 -;; @0021 v15 = iadd v13, v14 -;; v46 = iconst.i64 16 -;; @0021 v16 = iadd v15, v46 ; v46 = 16 -;; @0021 store notrap aligned little v3, v16 ; v3 = 0.0 -;; v47 = iconst.i64 20 -;; @0021 v17 = iadd v15, v47 ; v47 = 20 -;; @0021 istore8 notrap aligned little v4, v17 ; v4 = 0 -;; v57 = iconst.i8 1 -;; @0021 brif v57, block3, block2 ; v57 = 1 +;; @0021 v14 = load.i64 notrap aligned readonly v0+40 +;; @0021 v12 = ireduce.i32 v11 +;; @0021 v15 = uextend.i64 v12 +;; @0021 v16 = iadd v14, v15 +;; v47 = iconst.i64 16 +;; @0021 v17 = iadd v16, v47 ; v47 = 16 +;; @0021 store notrap aligned little v3, v17 ; v3 = 0.0 +;; v48 = iconst.i64 20 +;; @0021 v18 = iadd v16, v48 ; v48 = 20 +;; @0021 istore8 notrap aligned little v4, v18 ; v4 = 0 +;; v58 = iconst.i8 1 +;; @0021 brif v58, block3, block2 ; v58 = 1 ;; ;; block2: -;; v64 = iconst.i64 0 -;; @0021 v27 = iconst.i64 8 -;; @0021 v28 = uadd_overflow_trap v64, v27, user1 ; v64 = 0, v27 = 8 -;; @0021 v30 = uadd_overflow_trap v28, v27, user1 ; v27 = 8 -;; @0021 v25 = load.i64 notrap aligned readonly v0+48 -;; @0021 v31 = icmp ule v30, v25 -;; @0021 trapz v31, user1 -;; @0021 v32 = iadd.i64 v13, v28 -;; @0021 v33 = load.i64 notrap aligned v32 -;; @0021 trapz v31, user1 -;; v50 = iconst.i64 1 -;; @0021 v34 = iadd v33, v50 ; v50 = 1 -;; @0021 store notrap aligned v34, v32 +;; v65 = iconst.i64 0 +;; @0021 v28 = iconst.i64 8 +;; @0021 v29 = uadd_overflow_trap v65, v28, user1 ; v65 = 0, v28 = 8 +;; @0021 v31 = uadd_overflow_trap v29, v28, user1 ; v28 = 8 +;; @0021 v26 = load.i64 notrap aligned readonly v0+48 +;; @0021 v32 = icmp ule v31, v26 +;; @0021 trapz v32, user1 +;; @0021 v33 = iadd.i64 v14, v29 +;; @0021 v34 = load.i64 notrap aligned v33 +;; @0021 trapz v32, user1 +;; v51 = iconst.i64 1 +;; @0021 v35 = iadd v34, v51 ; v51 = 1 +;; @0021 store notrap aligned v35, v33 ;; @0021 jump block3 ;; ;; block3: -;; v65 = iconst.i32 0 -;; v48 = iconst.i64 24 -;; @0021 v18 = iadd.i64 v15, v48 ; v48 = 24 -;; @0021 store notrap aligned little v65, v18 ; v65 = 0 +;; v66 = iconst.i32 0 +;; v49 = iconst.i64 24 +;; @0021 v19 = iadd.i64 v16, v49 ; v49 = 24 +;; @0021 store notrap aligned little v66, v19 ; v66 = 0 ;; @0024 jump block1 ;; ;; block1: -;; @0024 return v11 +;; @0024 return v12 ;; } diff --git a/tests/disas/gc/struct-new.wat b/tests/disas/gc/struct-new.wat index b5822a7f5200..d01ba049a91a 100644 --- a/tests/disas/gc/struct-new.wat +++ b/tests/disas/gc/struct-new.wat @@ -15,64 +15,65 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i32 uext, i32 uext) -> i64 tail ;; fn0 = colocated u1:27 sig0 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: f32, v3: i32, v4: i32): -;; v50 = stack_addr.i64 ss0 -;; store notrap v4, v50 +;; v51 = stack_addr.i64 ss0 +;; store notrap v4, v51 ;; @002a v8 = iconst.i32 -1342177280 ;; @002a v9 = iconst.i32 0 ;; @002a v6 = iconst.i32 32 ;; @002a v10 = iconst.i32 8 ;; @002a v11 = call fn0(v0, v8, v9, v6, v10), stack_map=[i32 @ ss0+0] ; v8 = -1342177280, v9 = 0, v6 = 32, v10 = 8 -;; @002a v13 = load.i64 notrap aligned readonly v0+40 -;; @002a v14 = uextend.i64 v11 -;; @002a v15 = iadd v13, v14 -;; v51 = iconst.i64 16 -;; @002a v16 = iadd v15, v51 ; v51 = 16 -;; @002a store notrap aligned little v2, v16 -;; v52 = iconst.i64 20 -;; @002a v17 = iadd v15, v52 ; v52 = 20 -;; @002a istore8 notrap aligned little v3, v17 -;; v49 = load.i32 notrap v50 -;; @002a v19 = iconst.i32 -2 -;; @002a v20 = band v49, v19 ; v19 = -2 -;; @002a v21 = icmp eq v20, v9 ; v9 = 0 -;; @002a brif v21, block3, block2 +;; @002a v14 = load.i64 notrap aligned readonly v0+40 +;; @002a v12 = ireduce.i32 v11 +;; @002a v15 = uextend.i64 v12 +;; @002a v16 = iadd v14, v15 +;; v52 = iconst.i64 16 +;; @002a v17 = iadd v16, v52 ; v52 = 16 +;; @002a store notrap aligned little v2, v17 +;; v53 = iconst.i64 20 +;; @002a v18 = iadd v16, v53 ; v53 = 20 +;; @002a istore8 notrap aligned little v3, v18 +;; v50 = load.i32 notrap v51 +;; @002a v20 = iconst.i32 -2 +;; @002a v21 = band v50, v20 ; v20 = -2 +;; @002a v22 = icmp eq v21, v9 ; v9 = 0 +;; @002a brif v22, block3, block2 ;; ;; block2: -;; @002a v26 = uextend.i64 v49 -;; @002a v27 = iconst.i64 8 -;; @002a v28 = uadd_overflow_trap v26, v27, user1 ; v27 = 8 -;; @002a v30 = uadd_overflow_trap v28, v27, user1 ; v27 = 8 -;; @002a v25 = load.i64 notrap aligned readonly v0+48 -;; @002a v31 = icmp ule v30, v25 -;; @002a trapz v31, user1 -;; @002a v32 = iadd.i64 v13, v28 -;; @002a v33 = load.i64 notrap aligned v32 -;; v47 = load.i32 notrap v50 -;; @002a v39 = uextend.i64 v47 -;; @002a v41 = uadd_overflow_trap v39, v27, user1 ; v27 = 8 -;; @002a v43 = uadd_overflow_trap v41, v27, user1 ; v27 = 8 -;; @002a v44 = icmp ule v43, v25 -;; @002a trapz v44, user1 -;; v57 = iconst.i64 1 -;; @002a v34 = iadd v33, v57 ; v57 = 1 -;; @002a v45 = iadd.i64 v13, v41 -;; @002a store notrap aligned v34, v45 +;; @002a v27 = uextend.i64 v50 +;; @002a v28 = iconst.i64 8 +;; @002a v29 = uadd_overflow_trap v27, v28, user1 ; v28 = 8 +;; @002a v31 = uadd_overflow_trap v29, v28, user1 ; v28 = 8 +;; @002a v26 = load.i64 notrap aligned readonly v0+48 +;; @002a v32 = icmp ule v31, v26 +;; @002a trapz v32, user1 +;; @002a v33 = iadd.i64 v14, v29 +;; @002a v34 = load.i64 notrap aligned v33 +;; v48 = load.i32 notrap v51 +;; @002a v40 = uextend.i64 v48 +;; @002a v42 = uadd_overflow_trap v40, v28, user1 ; v28 = 8 +;; @002a v44 = uadd_overflow_trap v42, v28, user1 ; v28 = 8 +;; @002a v45 = icmp ule v44, v26 +;; @002a trapz v45, user1 +;; v58 = iconst.i64 1 +;; @002a v35 = iadd v34, v58 ; v58 = 1 +;; @002a v46 = iadd.i64 v14, v42 +;; @002a store notrap aligned v35, v46 ;; @002a jump block3 ;; ;; block3: -;; v46 = load.i32 notrap v50 -;; v53 = iconst.i64 24 -;; @002a v18 = iadd.i64 v15, v53 ; v53 = 24 -;; @002a store notrap aligned little v46, v18 +;; v47 = load.i32 notrap v51 +;; v54 = iconst.i64 24 +;; @002a v19 = iadd.i64 v16, v54 ; v54 = 24 +;; @002a store notrap aligned little v47, v19 ;; @002d jump block1 ;; ;; block1: -;; @002d return v11 +;; @002d return v12 ;; } diff --git a/tests/disas/globals.wat b/tests/disas/globals.wat index 5eacd99c832a..9ccde55c1ea5 100644 --- a/tests/disas/globals.wat +++ b/tests/disas/globals.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i128-cmp.wat b/tests/disas/i128-cmp.wat index 4bfafc56e3a3..35a753d724f2 100644 --- a/tests/disas/i128-cmp.wat +++ b/tests/disas/i128-cmp.wat @@ -102,7 +102,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -119,7 +119,7 @@ ;; function u0:1(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -136,7 +136,7 @@ ;; function u0:2(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -153,7 +153,7 @@ ;; function u0:3(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -170,7 +170,7 @@ ;; function u0:4(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -187,7 +187,7 @@ ;; function u0:5(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -204,7 +204,7 @@ ;; function u0:6(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): @@ -221,7 +221,7 @@ ;; function u0:7(i64 vmctx, i64, i64, i64, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64, v5: i64): diff --git a/tests/disas/i32-load.wat b/tests/disas/i32-load.wat index 8d6bbb26e003..054f7e17717b 100644 --- a/tests/disas/i32-load.wat +++ b/tests/disas/i32-load.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-load16-s.wat b/tests/disas/i32-load16-s.wat index b54aa04123b6..0d933dbda374 100644 --- a/tests/disas/i32-load16-s.wat +++ b/tests/disas/i32-load16-s.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-load16-u.wat b/tests/disas/i32-load16-u.wat index 896cc61216f1..bf40fa6ec295 100644 --- a/tests/disas/i32-load16-u.wat +++ b/tests/disas/i32-load16-u.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-load8-s.wat b/tests/disas/i32-load8-s.wat index 46424e5f5c1a..032c035859f0 100644 --- a/tests/disas/i32-load8-s.wat +++ b/tests/disas/i32-load8-s.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-load8-u.wat b/tests/disas/i32-load8-u.wat index 54acec336413..e33ce82a358c 100644 --- a/tests/disas/i32-load8-u.wat +++ b/tests/disas/i32-load8-u.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-store.wat b/tests/disas/i32-store.wat index 7d5ca8df0ba6..5d2a0fa0b475 100644 --- a/tests/disas/i32-store.wat +++ b/tests/disas/i32-store.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-store16.wat b/tests/disas/i32-store16.wat index e8623e32045a..85309bfec155 100644 --- a/tests/disas/i32-store16.wat +++ b/tests/disas/i32-store16.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i32-store8.wat b/tests/disas/i32-store8.wat index cdbab2aacca8..42c727f18a8e 100644 --- a/tests/disas/i32-store8.wat +++ b/tests/disas/i32-store8.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-load.wat b/tests/disas/i64-load.wat index 7e7e801ac9c6..53f986aacd1c 100644 --- a/tests/disas/i64-load.wat +++ b/tests/disas/i64-load.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-load16-s.wat b/tests/disas/i64-load16-s.wat index d6c1f9c32fd5..c2d022873aab 100644 --- a/tests/disas/i64-load16-s.wat +++ b/tests/disas/i64-load16-s.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-load16-u.wat b/tests/disas/i64-load16-u.wat index 5ee05dcaef36..004daf0e71c9 100644 --- a/tests/disas/i64-load16-u.wat +++ b/tests/disas/i64-load16-u.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-load8-s.wat b/tests/disas/i64-load8-s.wat index 4479ba8f315b..3656d6839baa 100644 --- a/tests/disas/i64-load8-s.wat +++ b/tests/disas/i64-load8-s.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-load8-u.wat b/tests/disas/i64-load8-u.wat index de2a75008b57..c1c7a21ecc26 100644 --- a/tests/disas/i64-load8-u.wat +++ b/tests/disas/i64-load8-u.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-store.wat b/tests/disas/i64-store.wat index 7ef7aa7d1197..4044c8dffc81 100644 --- a/tests/disas/i64-store.wat +++ b/tests/disas/i64-store.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-store16.wat b/tests/disas/i64-store16.wat index ef45a6a50372..a9a039c8baef 100644 --- a/tests/disas/i64-store16.wat +++ b/tests/disas/i64-store16.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-store32.wat b/tests/disas/i64-store32.wat index d5b94aa6b2e2..9d6e07812040 100644 --- a/tests/disas/i64-store32.wat +++ b/tests/disas/i64-store32.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/i64-store8.wat b/tests/disas/i64-store8.wat index 31a8daca773a..5a0a0eace384 100644 --- a/tests/disas/i64-store8.wat +++ b/tests/disas/i64-store8.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/icall-loop.wat b/tests/disas/icall-loop.wat index e8e2bd0dcbc9..8db24c776fef 100644 --- a/tests/disas/icall-loop.wat +++ b/tests/disas/icall-loop.wat @@ -25,7 +25,7 @@ ;; function u0:0(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64) -> i32 tail @@ -73,7 +73,7 @@ ;; function u0:1(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64) -> i32 tail diff --git a/tests/disas/icall-simd.wat b/tests/disas/icall-simd.wat index 1dda6dba21ca..77c5957b2fec 100644 --- a/tests/disas/icall-simd.wat +++ b/tests/disas/icall-simd.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i8x16) -> i8x16 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64, i8x16) -> i8x16 tail diff --git a/tests/disas/icall.wat b/tests/disas/icall.wat index b6ed820c898d..350486676757 100644 --- a/tests/disas/icall.wat +++ b/tests/disas/icall.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i32, f32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64, f32) -> i32 tail diff --git a/tests/disas/if-reachability-translation-0.wat b/tests/disas/if-reachability-translation-0.wat index a2c8784aca23..a19d8c858113 100644 --- a/tests/disas/if-reachability-translation-0.wat +++ b/tests/disas/if-reachability-translation-0.wat @@ -16,7 +16,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/if-reachability-translation-1.wat b/tests/disas/if-reachability-translation-1.wat index db3093f01f90..72b859236acb 100644 --- a/tests/disas/if-reachability-translation-1.wat +++ b/tests/disas/if-reachability-translation-1.wat @@ -16,7 +16,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/if-reachability-translation-2.wat b/tests/disas/if-reachability-translation-2.wat index e3dcb249e529..b77b74e989ba 100644 --- a/tests/disas/if-reachability-translation-2.wat +++ b/tests/disas/if-reachability-translation-2.wat @@ -16,7 +16,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/if-reachability-translation-3.wat b/tests/disas/if-reachability-translation-3.wat index 858b5e4e334a..252244159152 100644 --- a/tests/disas/if-reachability-translation-3.wat +++ b/tests/disas/if-reachability-translation-3.wat @@ -16,7 +16,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/if-reachability-translation-4.wat b/tests/disas/if-reachability-translation-4.wat index 37320c309e24..fb2fae347074 100644 --- a/tests/disas/if-reachability-translation-4.wat +++ b/tests/disas/if-reachability-translation-4.wat @@ -16,7 +16,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/if-reachability-translation-5.wat b/tests/disas/if-reachability-translation-5.wat index 4d15fccd454c..f403aca001cd 100644 --- a/tests/disas/if-reachability-translation-5.wat +++ b/tests/disas/if-reachability-translation-5.wat @@ -18,7 +18,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32): diff --git a/tests/disas/if-reachability-translation-6.wat b/tests/disas/if-reachability-translation-6.wat index 7f6d5f7a5c22..8a365f72c105 100644 --- a/tests/disas/if-reachability-translation-6.wat +++ b/tests/disas/if-reachability-translation-6.wat @@ -18,7 +18,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32): diff --git a/tests/disas/if-unreachable-else-params-2.wat b/tests/disas/if-unreachable-else-params-2.wat index 23e2f63efd5b..f34b2ae403dc 100644 --- a/tests/disas/if-unreachable-else-params-2.wat +++ b/tests/disas/if-unreachable-else-params-2.wat @@ -22,7 +22,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> f64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+120 ;; gv5 = load.i64 notrap aligned readonly checked gv3+112 diff --git a/tests/disas/if-unreachable-else-params.wat b/tests/disas/if-unreachable-else-params.wat index 7b138e9790a9..5d7ee9bf66b7 100644 --- a/tests/disas/if-unreachable-else-params.wat +++ b/tests/disas/if-unreachable-else-params.wat @@ -45,7 +45,7 @@ ;; function u0:0(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+120 ;; gv5 = load.i64 notrap aligned readonly checked gv3+112 diff --git a/tests/disas/indirect-call-no-caching.wat b/tests/disas/indirect-call-no-caching.wat index 38c10401cdfd..f371af22c155 100644 --- a/tests/disas/indirect-call-no-caching.wat +++ b/tests/disas/indirect-call-no-caching.wat @@ -23,7 +23,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -37,7 +37,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -51,7 +51,7 @@ ;; function u0:2(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -65,7 +65,7 @@ ;; function u0:3(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64) -> i32 tail diff --git a/tests/disas/issue-5696.wat b/tests/disas/issue-5696.wat index 862715376a0d..f803d80b96b9 100644 --- a/tests/disas/issue-5696.wat +++ b/tests/disas/issue-5696.wat @@ -12,7 +12,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64): diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat index 9110f19d688d..40ab23a3eac8 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index 541493266d2f..2ad7dcbc4e2f 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index 13825e06b8e2..eda34eb0035c 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat index 3fdabff3fbde..20c026bbacfb 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index ad10e3c9d395..8661263099f9 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index 7a44c8c0c043..4685e1ace24d 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat index 4cc1826dff96..67f40c2de4b0 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index 43ce1df45bea..6cc88f3374a8 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index f3c592fef8fa..9b7b24ae0a95 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat index 007d6ac4a6eb..1b899deec121 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index 0ad86c625ec1..ebd52ff8be5d 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index a7fb24691d96..80f0fc23567f 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index c9c519d65ae3..86ad0df08c01 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index da269c999092..313f590a6fef 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index 55fa529ec02a..9c2f8e50542b 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index 4cd1d590c714..1ac91e411574 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index e895e2282613..a06760a8db1b 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index 4c39cd866194..db21b140974b 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index f176d795af19..35b6bfaee470 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index 3ec0847ea518..eb2d06a0c986 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index d45203ee56ea..89ea80e3f4f8 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index 0450ac481545..9f423a59e7a4 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 41d5b4fabb1c..18d1325e357d 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 808e8e59456c..d230b469c3fb 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat index 1242b79e7314..92bbc93e5849 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index 537444f8028d..6212571bdae8 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index 93fb7439c3e1..44a6a4bc8e49 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat index 4b5f8327a982..562a144fecce 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index 6aefd36e5d84..a88aa3a270b8 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index de1dd94f3782..9c4390e46797 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat index 6fe0aece2e7a..6da36da8de3e 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index cbc70bddc465..202ec6d626af 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 8e99878a9789..c9c4e67bb693 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat index d6e77e794266..83a2f4c2c35e 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index 64283d11c4b4..2f94eac631ef 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 15bfd29c54d4..efd4e1506d1d 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -48,7 +48,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index 52a70ec44bda..2cbbfedf283d 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index 4ea819504969..08c2bcd7dc95 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index 97f801b8fd55..fcf5deb53dfd 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index 6c72aac6eae0..ab0c3f9f6808 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index 57e3dcab4806..adab05275034 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index 167bd6449e2f..6960476d5f17 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index f48bb4d18026..bedb8ed0fed0 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index d037e93d4f84..2f0fcc7e1fb3 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 59d05d9e0346..3c3c051114cc 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index d9be2cebfcd5..52c5ddd3b13c 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 47bb18061d32..4add5b98f16e 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 4967bb39f4ea..31f4b1a3d373 100644 --- a/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat index afebe4926d51..1936dd1018e9 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index a3511efd3137..fb0c12fa6f6e 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index 8a235410ca67..0c758aeaaa1b 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat index 3c81aa6c4c35..8f2dac499032 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -41,7 +41,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index 3ac2bde4030e..2738ca3353d9 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index b4e3bcc8658d..019b6d9c4967 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat index 0b6a6a9ca482..422109f77901 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index ce4925897f6e..a0a0a14c61f7 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index a2c452f24e34..8b3104d3067e 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat index 16d4290c0b39..02fbe89fa216 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -41,7 +41,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index 42bcca312425..1e0ce891ae0e 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index cd55e9b24251..2d5c3569685f 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -47,7 +47,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index df7b8fbfb10a..9be2cc4f75c2 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -41,7 +41,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index a735b7c42b46..d6a59e81b74e 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index e152b5096e7d..a85383635773 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index 0a71651939a3..2e519db95549 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -41,7 +41,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index e9068242837f..5ce19e7dfaac 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index 28390fbd6551..8e57febb862b 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index 9cf7b43b7fd4..821a97f851fb 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -41,7 +41,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index 99e736391aa1..dcd7ba4793e9 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 004485b08110..6734aa90b969 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index 25f54cdcfbc8..a58411290244 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -41,7 +41,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 061181460c62..561db49f90fa 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 8a051c8d8819..9233a1d0bfc1 100644 --- a/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat index 6246f08ec5d1..0270ea3e78ec 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index a67ba6893a0b..ec602c3e6f26 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index 6227dc1e9722..8f660d5f29d3 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat index f71bb8c5e4a6..3dda61410399 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index 7ac601a4da99..9b38904287bd 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index 5eefcd78f5bb..ea1daaf415a5 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat index 879ab013b2b3..97a9dd7fcd5f 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index f78795d8ea04..374a685e1212 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 5b5dcfb64a52..3ce3404aa557 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat index 892e5245258e..2f44de4fa9d9 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index 9093abe26687..cca9b1b64013 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 48b85454ee65..76d86e310249 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index 16e3e7b0e647..0896e0766016 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index a4a2272d332a..6ff39c1ec5a8 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index 4bbc9440ba1e..57c4ca8714af 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index cd8c40bd94a5..0f2e839b73db 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -43,7 +43,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index e520dfade816..d609aaec6734 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index d31cbd6e4340..6d768dae61e3 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -45,7 +45,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index 343a0826826f..2c7f98776e68 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index 35a5a2501c6b..b2cc647a94d3 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index cb7db236e423..0c9d82f3db03 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index ca5e50e12bbf..d5c9e036907b 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -44,7 +44,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index ffab6e055fce..679b2b62897c 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index ab26e746d948..b345f1cf2db3 100644 --- a/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat index 6f08412003cd..0e12c57813b6 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index c4efa5d72102..7cff0ac0f2ae 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index 527974217626..0224d0f3f954 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -43,7 +43,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat index 05600f5d6d0a..b5f7bbd5af6d 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index bfcca1bc0d55..83dc48e25d03 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index 13e3cea61acd..c07a545f5f9e 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -43,7 +43,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat index f1dfbbf17166..f0d040dfde27 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index 2a48fa145b9f..8c858b3d698c 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -42,7 +42,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 1109f7cc9a99..85c62b191fbd 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -44,7 +44,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat index 6b8f885f15fb..dbf42917402e 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r9, %r15, 0x48(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index 0996d8af6f1f..996ffb499715 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -42,7 +42,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 9b581e0fe87e..04809b5ed8a1 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -44,7 +44,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index 8eba65894cae..8fd68607b8f0 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index 293cef8fbf67..a54e14de4204 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index 4d20cf24ca2e..01f446e69df1 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index bf51f7559cac..0a630756fefc 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index 17e1162efcaa..32ff69c7e3e8 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index b8ef906323af..558a88b316c7 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index 7b27381b85c5..e8839076aefc 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r9, %r15, 0x48(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index 39782629a3d2..7585e4a892ab 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 2523a8a49959..111846ed91cc 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -44,7 +44,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index 30d87dab2b83..1f9b34db26b0 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r9, %r15, 0x48(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 7ccb3ad0cd58..0690012d0a7e 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index b699f46183e8..2b0e20d249fa 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -44,7 +44,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat index 2a7826a34e9d..68ac1b9ec94b 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index 19f18a1c4953..afd35408de5f 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index 2d14e5586200..1d0ba33b2aa9 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat index b94939a30737..75a2aef7d030 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index fc7befe42c67..c824c4d726c3 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index 639f913f0509..23e287172d96 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat index ed8cc3dc207a..5eb708cb6d4a 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index 9fc733daef7f..3d4938edf148 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 3e3f68ec3f55..0e1ceb12cd8c 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -43,7 +43,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat index 422e6546653f..498997078320 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index ab5eea784168..7eee2d8d27d5 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 59a97b2f898a..b1d8f837bb45 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -43,7 +43,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index de3268836af4..b3d1503f46f0 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index c654064b6d29..fa54fdfb3891 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index 6d66fbccb291..9d09f7a2e12e 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index 9de947813278..cb73bd6ade9f 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index 6d0bd6185137..183e9362f204 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index fd3f997fbac3..4679f6b697df 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index 3d1ab482a302..4513f003da1d 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index ce0a5c387941..109c049aa225 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 55b9b7b99619..1906123bf4d2 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index af6bea4e52b6..a959d4bb997f 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 718633e01cb0..f7c8483cd532 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index a13d6c0847a0..2c50d7ce4c7a 100644 --- a/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_dynamic_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat index 581d83771fd8..fe05505482d0 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index df1a19cd22a5..db8ff0a1f56d 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index e749b1fc240c..6bd5a860febc 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat index bb49fc48d0c1..aadad6431564 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -35,7 +35,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index 9ce2c7dfc826..05be43f0776a 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index 9617d9ac27a8..1db78522596f 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat index a7ba8979d938..85b46393bd7f 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index 64eca648e498..9a8c7948d2e8 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index aa2fb70a46f3..a23188269f9a 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat index 39a7accf5de2..48fff73b889e 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -35,7 +35,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index cef7fc44ed54..0d68da9b5030 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 1ce45cc36510..d1a523ca8dcc 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -41,7 +41,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index 8b2797c08e76..676fce36588c 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -35,7 +35,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index 6ed1831ef97b..b7eccc555667 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index e129bb79f3e9..273f8552a9eb 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index 0231db83877f..5e2ad936ef6f 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -35,7 +35,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index 4a063981f5bf..4edd6c212ac5 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index 7d384d06a4b4..805ee374b6fe 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index bae40c3459ce..bb72f7668719 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -35,7 +35,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index f77f65369dba..79f596eaae69 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index fae2571ae9b7..3fefa54fddcd 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index cdf1255906c0..7b7d8796f91b 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -35,7 +35,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 6d6b51783f8d..4eb7ffcb539e 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 26ba9d297a41..67bffa489c59 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i32_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat index b55ea3f08e16..248cbb65b8b2 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat index e33491bd8f55..56ea32e142b7 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat index b6efba452724..7f82f03940e4 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat index b030fca62913..d95fd0ddcbb8 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat index 6a8a88f2d8ec..e294d49d4f4f 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat index 7d2f101779d8..efe1cedd9f2f 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat index 3639f39c0207..5f338c2e5efc 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat index cb1cbbccf4ce..5b4b80d27b1b 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 736e0ebf333b..52c062cf01a5 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat index 950088c0fffa..477c0b45f311 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat index 17e5ca856140..d4d691bf54d1 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat index eb4b5c7c97cd..f5260d5da330 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat index e607c2072890..d55b9b7c9384 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat index 0e63a86bd9ca..a926a46f33f2 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat index 202de4f7b40e..d38199abe469 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat index 1af8ece094a3..7981b069d090 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -36,7 +36,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat index 65d4d1b8e492..a17045dd8fcb 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat index 80c4d27a0ea7..f95df00ed247 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_no_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -37,7 +37,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat index e467498e6fbc..7221f2120662 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat index 9b1fa374fbc6..78bbc495f578 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat index 3d66b13075af..d9b6e0275eda 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i32_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat index f4c268626b39..cdea48f73e0b 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -38,7 +38,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat index 4a2608ac1120..86681452915c 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0x1000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -39,7 +39,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat index 5b7dbda410f7..150c4c538231 100644 --- a/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat +++ b/tests/disas/load-store/s390x/load_store_static_kind_i64_index_0xffffffff_guard_yes_spectre_i8_access_0xffff0000_offset.wat @@ -20,7 +20,7 @@ ;; wasm[0]::function[0]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -40,7 +40,7 @@ ;; ;; wasm[0]::function[1]: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/memory.wat b/tests/disas/memory.wat index e40dc66be408..7e6484e64e36 100644 --- a/tests/disas/memory.wat +++ b/tests/disas/memory.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/multi-0.wat b/tests/disas/multi-0.wat index 3376be1886e3..d760e9c88aea 100644 --- a/tests/disas/multi-0.wat +++ b/tests/disas/multi-0.wat @@ -7,7 +7,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64): diff --git a/tests/disas/multi-1.wat b/tests/disas/multi-1.wat index 7fc7a96411b9..14e26d389ec7 100644 --- a/tests/disas/multi-1.wat +++ b/tests/disas/multi-1.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i32, i64, f64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i32): diff --git a/tests/disas/multi-10.wat b/tests/disas/multi-10.wat index eca150ddc50f..d805c5855a96 100644 --- a/tests/disas/multi-10.wat +++ b/tests/disas/multi-10.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i32): diff --git a/tests/disas/multi-11.wat b/tests/disas/multi-11.wat index 053e745d27b0..4985c19f9439 100644 --- a/tests/disas/multi-11.wat +++ b/tests/disas/multi-11.wat @@ -11,7 +11,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64): diff --git a/tests/disas/multi-12.wat b/tests/disas/multi-12.wat index f0cf66d68ecf..3e226839e804 100644 --- a/tests/disas/multi-12.wat +++ b/tests/disas/multi-12.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64, v4: i64): diff --git a/tests/disas/multi-13.wat b/tests/disas/multi-13.wat index 35755f77d8f6..494752fbdcb6 100644 --- a/tests/disas/multi-13.wat +++ b/tests/disas/multi-13.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32): diff --git a/tests/disas/multi-14.wat b/tests/disas/multi-14.wat index 0de1f71e81d5..b556efe059e7 100644 --- a/tests/disas/multi-14.wat +++ b/tests/disas/multi-14.wat @@ -14,7 +14,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32): diff --git a/tests/disas/multi-15.wat b/tests/disas/multi-15.wat index 760121683584..d609687977d4 100644 --- a/tests/disas/multi-15.wat +++ b/tests/disas/multi-15.wat @@ -26,7 +26,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64, f32, f32, i32, f64, f32, i32, i32, i32, f32, f64, f64, f64, i32, i32, f32) -> f64, f32, i32, i32, i32, i64, f32, i32, i32, f32, f64, f64, i32, f32, i32, f64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i64, v4: f32, v5: f32, v6: i32, v7: f64, v8: f32, v9: i32, v10: i32, v11: i32, v12: f32, v13: f64, v14: f64, v15: f64, v16: i32, v17: i32, v18: f32): diff --git a/tests/disas/multi-16.wat b/tests/disas/multi-16.wat index a18bf3f4a8fb..75e4901e87ed 100644 --- a/tests/disas/multi-16.wat +++ b/tests/disas/multi-16.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/multi-17.wat b/tests/disas/multi-17.wat index 9613d5fae832..705e52654d2e 100644 --- a/tests/disas/multi-17.wat +++ b/tests/disas/multi-17.wat @@ -30,7 +30,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; sig0 = (i64 vmctx, i64, i32, i32, i32) -> i32 tail ;; fn0 = colocated u0:0 sig0 ;; stack_limit = gv2 diff --git a/tests/disas/multi-2.wat b/tests/disas/multi-2.wat index 085cfdabb686..aca35ae02577 100644 --- a/tests/disas/multi-2.wat +++ b/tests/disas/multi-2.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i64): diff --git a/tests/disas/multi-3.wat b/tests/disas/multi-3.wat index 8db7aea0b61f..41b159b33579 100644 --- a/tests/disas/multi-3.wat +++ b/tests/disas/multi-3.wat @@ -17,7 +17,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i64, v4: i64): diff --git a/tests/disas/multi-4.wat b/tests/disas/multi-4.wat index 1cb514b85ff7..85fcef18d2ed 100644 --- a/tests/disas/multi-4.wat +++ b/tests/disas/multi-4.wat @@ -17,7 +17,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i64, i64) -> i64, i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i64, v4: i64): diff --git a/tests/disas/multi-5.wat b/tests/disas/multi-5.wat index 0c4e99ad2567..17070962b108 100644 --- a/tests/disas/multi-5.wat +++ b/tests/disas/multi-5.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/multi-6.wat b/tests/disas/multi-6.wat index 573fbea893cb..20fc4bdbbe1f 100644 --- a/tests/disas/multi-6.wat +++ b/tests/disas/multi-6.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/multi-7.wat b/tests/disas/multi-7.wat index a4f591c330a1..ee691fa7c69d 100644 --- a/tests/disas/multi-7.wat +++ b/tests/disas/multi-7.wat @@ -13,7 +13,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i32): diff --git a/tests/disas/multi-8.wat b/tests/disas/multi-8.wat index d20d71e26ec8..f08525a84682 100644 --- a/tests/disas/multi-8.wat +++ b/tests/disas/multi-8.wat @@ -16,7 +16,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i32): diff --git a/tests/disas/multi-9.wat b/tests/disas/multi-9.wat index 1ac0593af685..a55e5397f2bf 100644 --- a/tests/disas/multi-9.wat +++ b/tests/disas/multi-9.wat @@ -19,7 +19,7 @@ ;; function u0:0(i64 vmctx, i64, i64, i32) -> i64 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i64, v3: i32): diff --git a/tests/disas/non-fixed-size-memory.wat b/tests/disas/non-fixed-size-memory.wat index 9df90fe3b851..70f4ce209975 100644 --- a/tests/disas/non-fixed-size-memory.wat +++ b/tests/disas/non-fixed-size-memory.wat @@ -23,7 +23,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 @@ -46,7 +46,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned checked gv3+96 diff --git a/tests/disas/nullref.wat b/tests/disas/nullref.wat index b298809d8745..9ff5fb219fda 100644 --- a/tests/disas/nullref.wat +++ b/tests/disas/nullref.wat @@ -15,7 +15,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -29,7 +29,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/passive-data.wat b/tests/disas/passive-data.wat index edd458bc236b..e75b198c3f44 100644 --- a/tests/disas/passive-data.wat +++ b/tests/disas/passive-data.wat @@ -16,11 +16,11 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i64, i32 uext, i32 uext) tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i64, i32 uext, i32 uext) -> i8 tail ;; fn0 = colocated u1:6 sig0 ;; stack_limit = gv2 ;; @@ -29,7 +29,7 @@ ;; @003d v6 = iconst.i32 0 ;; @003d v7 = global_value.i64 gv3 ;; @003d v8 = uextend.i64 v2 -;; @003d call fn0(v7, v5, v6, v8, v3, v4) ; v5 = 0, v6 = 0 +;; @003d v9 = call fn0(v7, v5, v6, v8, v3, v4) ; v5 = 0, v6 = 0 ;; @0041 jump block1 ;; ;; block1: @@ -39,7 +39,7 @@ ;; function u0:1(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i32 uext) tail ;; fn0 = colocated u1:8 sig0 diff --git a/tests/disas/pr2303.wat b/tests/disas/pr2303.wat index c3dccb070960..9cef896de2be 100644 --- a/tests/disas/pr2303.wat +++ b/tests/disas/pr2303.wat @@ -19,7 +19,7 @@ ;; function u0:0(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/pr2559.wat b/tests/disas/pr2559.wat index 1d531f257982..c829ac38f346 100644 --- a/tests/disas/pr2559.wat +++ b/tests/disas/pr2559.wat @@ -55,7 +55,7 @@ ;; function u0:0(i64 vmctx, i64) -> i8x16, i8x16, i8x16 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; sig0 = (i64 vmctx, i64) -> i8x16, i8x16, i8x16 tail ;; fn0 = colocated u0:0 sig0 ;; stack_limit = gv2 @@ -95,7 +95,7 @@ ;; function u0:1(i64 vmctx, i64) -> i8x16, i8x16, i8x16 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; sig0 = (i64 vmctx, i64) -> i8x16, i8x16, i8x16 tail ;; fn0 = colocated u0:1 sig0 ;; stack_limit = gv2 diff --git a/tests/disas/pulley/epoch-simple.wat b/tests/disas/pulley/epoch-simple.wat new file mode 100644 index 000000000000..1f503e82902e --- /dev/null +++ b/tests/disas/pulley/epoch-simple.wat @@ -0,0 +1,19 @@ +;;! target = "pulley64" +;;! test = "compile" +;;! flags = '-Wepoch-interruption' + +(module + (func) +) +;; wasm[0]::function[0]: +;; push_frame +;; load64_offset8 x7, x0, 8 +;; load64_offset8 x8, x0, 32 +;; load64 x8, x8 +;; load64_offset8 x7, x7, 8 +;; xulteq64 x7, x7, x8 +;; br_if x7, 0x8 // target = 0x1b +;; 19: pop_frame +;; ret +;; 1b: call 0x83 // target = 0x9e +;; 20: jump 0xfffffffffffffff9 // target = 0x19 diff --git a/tests/disas/pulley/loads.wat b/tests/disas/pulley/loads.wat deleted file mode 100644 index dbf9a380ab02..000000000000 --- a/tests/disas/pulley/loads.wat +++ /dev/null @@ -1,38 +0,0 @@ -;;! target = "pulley32" -;;! test = "compile" -;;! flags = "-Ccranelift-enable-heap-access-spectre-mitigation=no" - -(module - (memory 0) - (func $i32 (param i32) (result i32) - local.get 0 - i32.load - ) - - (func $i64 (param i32) (result i64) - local.get 0 - i64.load - ) -) - -;; wasm[0]::function[0]::i32: -;; push_frame -;; load32_u_offset8 x6, x0, 52 -;; br_if_xult32 x6, x2, 0x13 // target = 0x18 -;; c: load32_u_offset8 x7, x0, 48 -;; xadd32 x7, x7, x2 -;; load32_u x0, x7 -;; pop_frame -;; ret -;; 18: trap -;; -;; wasm[0]::function[1]::i64: -;; push_frame -;; load32_u_offset8 x6, x0, 52 -;; br_if_xult32 x6, x2, 0x13 // target = 0x18 -;; c: load32_u_offset8 x7, x0, 48 -;; xadd32 x7, x7, x2 -;; load64 x0, x7 -;; pop_frame -;; ret -;; 18: trap diff --git a/tests/disas/readonly-funcrefs.wat b/tests/disas/readonly-funcrefs.wat index f8c0004a33cf..fc756585c432 100644 --- a/tests/disas/readonly-funcrefs.wat +++ b/tests/disas/readonly-funcrefs.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -34,7 +34,7 @@ ;; function u0:1(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64) tail diff --git a/tests/disas/readonly-heap-base-pointer1.wat b/tests/disas/readonly-heap-base-pointer1.wat index 7ac2dbe43512..a08c51b8621e 100644 --- a/tests/disas/readonly-heap-base-pointer1.wat +++ b/tests/disas/readonly-heap-base-pointer1.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/readonly-heap-base-pointer2.wat b/tests/disas/readonly-heap-base-pointer2.wat index 247b7e8e3cd5..382de8db6b17 100644 --- a/tests/disas/readonly-heap-base-pointer2.wat +++ b/tests/disas/readonly-heap-base-pointer2.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; gv5 = load.i64 notrap aligned gv4+8 diff --git a/tests/disas/readonly-heap-base-pointer3.wat b/tests/disas/readonly-heap-base-pointer3.wat index 801f6e31a839..090e48ebdca0 100644 --- a/tests/disas/readonly-heap-base-pointer3.wat +++ b/tests/disas/readonly-heap-base-pointer3.wat @@ -10,7 +10,7 @@ ;; function u0:0(i64 vmctx, i64, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/ref-func-0.wat b/tests/disas/ref-func-0.wat index f43dcc9a9da8..c15e00c59a10 100644 --- a/tests/disas/ref-func-0.wat +++ b/tests/disas/ref-func-0.wat @@ -18,9 +18,9 @@ ;; ss1 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; diff --git a/tests/disas/s390x-wide-arithmetic.wat b/tests/disas/s390x-wide-arithmetic.wat index dfaf6ed8380d..817a2302e371 100644 --- a/tests/disas/s390x-wide-arithmetic.wat +++ b/tests/disas/s390x-wide-arithmetic.wat @@ -46,7 +46,7 @@ ;; wasm[0]::function[0]::add128: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -63,7 +63,7 @@ ;; ;; wasm[0]::function[1]::sub128: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -80,7 +80,7 @@ ;; ;; wasm[0]::function[2]::signed: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -96,7 +96,7 @@ ;; ;; wasm[0]::function[3]::unsigned: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -113,7 +113,7 @@ ;; ;; wasm[0]::function[4]::signed_only_high: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) @@ -129,7 +129,7 @@ ;; ;; wasm[0]::function[5]::unsigned_only_high: ;; lg %r1, 8(%r2) -;; lg %r1, 0(%r1) +;; lg %r1, 0x10(%r1) ;; la %r1, 0xa0(%r1) ;; clgrtle %r15, %r1 ;; stmg %r14, %r15, 0x70(%r15) diff --git a/tests/disas/select.wat b/tests/disas/select.wat index f618353adfad..080b47546db6 100644 --- a/tests/disas/select.wat +++ b/tests/disas/select.wat @@ -23,7 +23,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -40,7 +40,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -57,7 +57,7 @@ ;; function u0:2(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): diff --git a/tests/disas/simd-store.wat b/tests/disas/simd-store.wat index 3343e227970d..992b58eb2280 100644 --- a/tests/disas/simd-store.wat +++ b/tests/disas/simd-store.wat @@ -87,7 +87,7 @@ ;; function u0:0(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -109,7 +109,7 @@ ;; function u0:1(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -133,7 +133,7 @@ ;; function u0:2(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -157,7 +157,7 @@ ;; function u0:3(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -181,7 +181,7 @@ ;; function u0:4(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -203,7 +203,7 @@ ;; function u0:5(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -227,7 +227,7 @@ ;; function u0:6(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -251,7 +251,7 @@ ;; function u0:7(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -275,7 +275,7 @@ ;; function u0:8(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -297,7 +297,7 @@ ;; function u0:9(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -321,7 +321,7 @@ ;; function u0:10(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -345,7 +345,7 @@ ;; function u0:11(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -369,7 +369,7 @@ ;; function u0:12(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -391,7 +391,7 @@ ;; function u0:13(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -415,7 +415,7 @@ ;; function u0:14(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -439,7 +439,7 @@ ;; function u0:15(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -461,7 +461,7 @@ ;; function u0:16(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -485,7 +485,7 @@ ;; function u0:17(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -509,7 +509,7 @@ ;; function u0:18(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -533,7 +533,7 @@ ;; function u0:19(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -555,7 +555,7 @@ ;; function u0:20(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -579,7 +579,7 @@ ;; function u0:21(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -603,7 +603,7 @@ ;; function u0:22(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -627,7 +627,7 @@ ;; function u0:23(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -651,7 +651,7 @@ ;; function u0:24(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -675,7 +675,7 @@ ;; function u0:25(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -699,7 +699,7 @@ ;; function u0:26(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -723,7 +723,7 @@ ;; function u0:27(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -747,7 +747,7 @@ ;; function u0:28(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -771,7 +771,7 @@ ;; function u0:29(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -795,7 +795,7 @@ ;; function u0:30(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -819,7 +819,7 @@ ;; function u0:31(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -843,7 +843,7 @@ ;; function u0:32(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 @@ -867,7 +867,7 @@ ;; function u0:33(i64 vmctx, i64, i8x16) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+104 ;; gv5 = load.i64 notrap aligned readonly checked gv3+96 diff --git a/tests/disas/simd.wat b/tests/disas/simd.wat index 1e8cb36c068a..6e9842866983 100644 --- a/tests/disas/simd.wat +++ b/tests/disas/simd.wat @@ -33,7 +33,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -49,7 +49,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; const0 = 0x00000000000000000000000000000000 ;; stack_limit = gv2 ;; @@ -68,7 +68,7 @@ ;; function u0:2(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; const0 = 0x00000004000000030000000200000001 ;; stack_limit = gv2 ;; @@ -85,7 +85,7 @@ ;; function u0:3(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; const0 = 0x00000000000000000000000000000000 ;; stack_limit = gv2 ;; diff --git a/tests/disas/simple.wat b/tests/disas/simple.wat index 5eea958467ba..554ee17943e2 100644 --- a/tests/disas/simple.wat +++ b/tests/disas/simple.wat @@ -21,7 +21,7 @@ ;; function u0:0(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -36,7 +36,7 @@ ;; function u0:1(i64 vmctx, i64, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32): @@ -48,7 +48,7 @@ ;; function u0:2(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/table-copy.wat b/tests/disas/table-copy.wat index dcace08bdc3b..656074bbb4db 100644 --- a/tests/disas/table-copy.wat +++ b/tests/disas/table-copy.wat @@ -26,7 +26,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32, v7: i32): @@ -39,7 +39,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32, v7: i32): @@ -52,7 +52,7 @@ ;; function u0:2(i64 vmctx, i64, i32, i32, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32, v7: i32): @@ -65,9 +65,9 @@ ;; function u0:3(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i64, i64, i64) tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i64, i64, i64) -> i8 tail ;; fn0 = colocated u1:1 sig0 ;; stack_limit = gv2 ;; @@ -78,7 +78,7 @@ ;; @0090 v10 = iconst.i32 0 ;; @0090 v11 = iconst.i32 1 ;; @0090 v12 = global_value.i64 gv3 -;; @0090 call fn0(v12, v10, v11, v7, v8, v9) ; v10 = 0, v11 = 1 +;; @0090 v13 = call fn0(v12, v10, v11, v7, v8, v9) ; v10 = 0, v11 = 1 ;; @0094 jump block1(v2) ;; ;; block1(v6: i32): @@ -88,9 +88,9 @@ ;; function u0:4(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx -;; sig0 = (i64 vmctx, i32 uext, i32 uext, i64, i64, i64) tail +;; sig0 = (i64 vmctx, i32 uext, i32 uext, i64, i64, i64) -> i8 tail ;; fn0 = colocated u1:1 sig0 ;; stack_limit = gv2 ;; @@ -101,7 +101,7 @@ ;; @009f v10 = iconst.i32 1 ;; @009f v11 = iconst.i32 0 ;; @009f v12 = global_value.i64 gv3 -;; @009f call fn0(v12, v10, v11, v7, v8, v9) ; v10 = 1, v11 = 0 +;; @009f v13 = call fn0(v12, v10, v11, v7, v8, v9) ; v10 = 1, v11 = 0 ;; @00a3 jump block1(v2) ;; ;; block1(v6: i32): diff --git a/tests/disas/table-get-fixed-size.wat b/tests/disas/table-get-fixed-size.wat index 9026c8a33fcd..643d17eb2240 100644 --- a/tests/disas/table-get-fixed-size.wat +++ b/tests/disas/table-get-fixed-size.wat @@ -19,10 +19,10 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; @@ -109,10 +109,10 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; diff --git a/tests/disas/table-get.wat b/tests/disas/table-get.wat index e6d5b96d86d5..ddde4ddb2db3 100644 --- a/tests/disas/table-get.wat +++ b/tests/disas/table-get.wat @@ -18,11 +18,11 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+88 ;; gv5 = load.i64 notrap aligned gv3+96 -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; @@ -110,11 +110,11 @@ ;; ss0 = explicit_slot 4, align = 4 ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+88 ;; gv5 = load.i64 notrap aligned gv3+96 -;; sig0 = (i64 vmctx, i32) -> i32 tail +;; sig0 = (i64 vmctx, i32 uext) -> i64 tail ;; fn0 = colocated u1:26 sig0 ;; stack_limit = gv2 ;; diff --git a/tests/disas/table-set-fixed-size.wat b/tests/disas/table-set-fixed-size.wat index ac9aa91511d2..f3457f38c8a9 100644 --- a/tests/disas/table-set-fixed-size.wat +++ b/tests/disas/table-set-fixed-size.wat @@ -19,7 +19,7 @@ ;; function u0:0(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i32 uext) tail @@ -121,7 +121,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i32 uext) tail diff --git a/tests/disas/table-set.wat b/tests/disas/table-set.wat index 0b1c57cb3a35..19797829da09 100644 --- a/tests/disas/table-set.wat +++ b/tests/disas/table-set.wat @@ -19,7 +19,7 @@ ;; function u0:0(i64 vmctx, i64, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+88 ;; gv5 = load.i64 notrap aligned gv3+96 @@ -123,7 +123,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned gv3+88 ;; gv5 = load.i64 notrap aligned gv3+96 diff --git a/tests/disas/typed-funcrefs-eager-init.wat b/tests/disas/typed-funcrefs-eager-init.wat index f184e87d14a7..db0707d0ebca 100644 --- a/tests/disas/typed-funcrefs-eager-init.wat +++ b/tests/disas/typed-funcrefs-eager-init.wat @@ -116,7 +116,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32): @@ -129,7 +129,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail @@ -159,7 +159,7 @@ ;; function u0:2(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail @@ -189,7 +189,7 @@ ;; function u0:3(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail ;; stack_limit = gv2 diff --git a/tests/disas/typed-funcrefs.wat b/tests/disas/typed-funcrefs.wat index af5302e12aa7..2d662bc2ad78 100644 --- a/tests/disas/typed-funcrefs.wat +++ b/tests/disas/typed-funcrefs.wat @@ -116,7 +116,7 @@ ;; function u0:0(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64, v2: i32, v3: i32, v4: i32, v5: i32): @@ -129,7 +129,7 @@ ;; function u0:1(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i32 uext, i64) -> i64 tail @@ -183,7 +183,7 @@ ;; function u0:2(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; gv4 = load.i64 notrap aligned readonly gv3+88 ;; sig0 = (i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail @@ -237,7 +237,7 @@ ;; function u0:3(i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; gv3 = vmctx ;; sig0 = (i64 vmctx, i64, i32, i32, i32, i32) -> i32 tail ;; stack_limit = gv2 diff --git a/tests/disas/unreachable_code.wat b/tests/disas/unreachable_code.wat index 4be07a4c39ba..74a0bca608d7 100644 --- a/tests/disas/unreachable_code.wat +++ b/tests/disas/unreachable_code.wat @@ -81,7 +81,7 @@ ;; function u0:0(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -91,7 +91,7 @@ ;; function u0:1(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -104,7 +104,7 @@ ;; function u0:2(i64 vmctx, i64) -> i32 tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): @@ -136,7 +136,7 @@ ;; function u0:3(i64 vmctx, i64) tail { ;; gv0 = vmctx ;; gv1 = load.i64 notrap aligned readonly gv0+8 -;; gv2 = load.i64 notrap aligned gv1 +;; gv2 = load.i64 notrap aligned gv1+16 ;; stack_limit = gv2 ;; ;; block0(v0: i64, v1: i64): diff --git a/tests/disas/winch/x64/block/as_if_cond.wat b/tests/disas/winch/x64/block/as_if_cond.wat index 7c1d774ee38d..442fb67df4c4 100644 --- a/tests/disas/winch/x64/block/as_if_cond.wat +++ b/tests/disas/winch/x64/block/as_if_cond.wat @@ -12,39 +12,39 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8e -;; 5b: movq %rdi, %r14 +;; ja 0x8f +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; je 0x88 -;; 78: movq %r14, %rdi +;; je 0x89 +;; 79: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 8(%rsp), %r14 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 8e: ud2 +;; 8f: ud2 diff --git a/tests/disas/winch/x64/block/as_if_else.wat b/tests/disas/winch/x64/block/as_if_else.wat index de087f10898b..7e4415aad7d0 100644 --- a/tests/disas/winch/x64/block/as_if_else.wat +++ b/tests/disas/winch/x64/block/as_if_else.wat @@ -9,21 +9,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; je 0x42 -;; 38: movl $2, %eax -;; jmp 0x47 -;; 42: movl $1, %eax +;; je 0x43 +;; 39: movl $2, %eax +;; jmp 0x48 +;; 43: movl $1, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/block/as_if_then.wat b/tests/disas/winch/x64/block/as_if_then.wat index 1bb6dd7a5626..2ed22b165989 100644 --- a/tests/disas/winch/x64/block/as_if_then.wat +++ b/tests/disas/winch/x64/block/as_if_then.wat @@ -9,21 +9,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; je 0x42 -;; 38: movl $1, %eax -;; jmp 0x47 -;; 42: movl $2, %eax +;; je 0x43 +;; 39: movl $1, %eax +;; jmp 0x48 +;; 43: movl $2, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/block/deep.wat b/tests/disas/winch/x64/block/deep.wat index e578060aad6e..bc19d2ec8358 100644 --- a/tests/disas/winch/x64/block/deep.wat +++ b/tests/disas/winch/x64/block/deep.wat @@ -49,28 +49,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -82,4 +82,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/block/empty.wat b/tests/disas/winch/x64/block/empty.wat index 7730095b1681..653d0ced4586 100644 --- a/tests/disas/winch/x64/block/empty.wat +++ b/tests/disas/winch/x64/block/empty.wat @@ -13,32 +13,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 5b: movq %rdi, %r14 +;; ja 0x72 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 71: ud2 +;; 72: ud2 diff --git a/tests/disas/winch/x64/block/get_and_set.wat b/tests/disas/winch/x64/block/get_and_set.wat index 1f10e66a28c7..df39236c27c5 100644 --- a/tests/disas/winch/x64/block/get_and_set.wat +++ b/tests/disas/winch/x64/block/get_and_set.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 +;; 4f: ud2 diff --git a/tests/disas/winch/x64/block/get_and_tee.wat b/tests/disas/winch/x64/block/get_and_tee.wat index e5916c5c6d24..9ffac3688a05 100644 --- a/tests/disas/winch/x64/block/get_and_tee.wat +++ b/tests/disas/winch/x64/block/get_and_tee.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 +;; 4f: ud2 diff --git a/tests/disas/winch/x64/block/nested.wat b/tests/disas/winch/x64/block/nested.wat index 4d97a9da5d40..371a087736ff 100644 --- a/tests/disas/winch/x64/block/nested.wat +++ b/tests/disas/winch/x64/block/nested.wat @@ -14,28 +14,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x96 -;; 5b: movq %rdi, %r14 +;; ja 0x97 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -51,4 +51,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 96: ud2 +;; 97: ud2 diff --git a/tests/disas/winch/x64/block/singular.wat b/tests/disas/winch/x64/block/singular.wat index 79187041b7c8..967b368b0fe7 100644 --- a/tests/disas/winch/x64/block/singular.wat +++ b/tests/disas/winch/x64/block/singular.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -23,4 +23,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/block/with_local_float.wat b/tests/disas/winch/x64/block/with_local_float.wat index 756e2a071ccf..fcfda84de369 100644 --- a/tests/disas/winch/x64/block/with_local_float.wat +++ b/tests/disas/winch/x64/block/with_local_float.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/br/as_block_first.wat b/tests/disas/winch/x64/br/as_block_first.wat index ac9667ee1ccf..4c794c636b69 100644 --- a/tests/disas/winch/x64/br/as_block_first.wat +++ b/tests/disas/winch/x64/br/as_block_first.wat @@ -11,32 +11,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 5b: movq %rdi, %r14 +;; ja 0x72 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 71: ud2 +;; 72: ud2 diff --git a/tests/disas/winch/x64/br/as_block_last.wat b/tests/disas/winch/x64/br/as_block_last.wat index 85c7aa243ced..6814e534abe2 100644 --- a/tests/disas/winch/x64/br/as_block_last.wat +++ b/tests/disas/winch/x64/br/as_block_last.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x81 -;; 5b: movq %rdi, %r14 +;; ja 0x82 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 81: ud2 +;; 82: ud2 diff --git a/tests/disas/winch/x64/br/as_block_mid.wat b/tests/disas/winch/x64/br/as_block_mid.wat index 8341c4852770..349a22428ec7 100644 --- a/tests/disas/winch/x64/br/as_block_mid.wat +++ b/tests/disas/winch/x64/br/as_block_mid.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x81 -;; 5b: movq %rdi, %r14 +;; ja 0x82 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 81: ud2 +;; 82: ud2 diff --git a/tests/disas/winch/x64/br/as_block_value.wat b/tests/disas/winch/x64/br/as_block_value.wat index 6ae4818513e9..2ece39383306 100644 --- a/tests/disas/winch/x64/br/as_block_value.wat +++ b/tests/disas/winch/x64/br/as_block_value.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/as_br_if_cond.wat b/tests/disas/winch/x64/br/as_br_if_cond.wat index 7958e38d998a..6afa26e4ab7c 100644 --- a/tests/disas/winch/x64/br/as_br_if_cond.wat +++ b/tests/disas/winch/x64/br/as_br_if_cond.wat @@ -9,15 +9,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 diff --git a/tests/disas/winch/x64/br/as_br_value.wat b/tests/disas/winch/x64/br/as_br_value.wat index 1f5ac0bdd693..1e40c4283af8 100644 --- a/tests/disas/winch/x64/br/as_br_value.wat +++ b/tests/disas/winch/x64/br/as_br_value.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -21,4 +21,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/br/as_call_all.wat b/tests/disas/winch/x64/br/as_call_all.wat index b2305f66cf53..f9d03a498bf0 100644 --- a/tests/disas/winch/x64/br/as_call_all.wat +++ b/tests/disas/winch/x64/br/as_call_all.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,17 +25,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/as_call_first.wat b/tests/disas/winch/x64/br/as_call_first.wat index ea2035e8f93d..6776f48dc9b9 100644 --- a/tests/disas/winch/x64/br/as_call_first.wat +++ b/tests/disas/winch/x64/br/as_call_first.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,17 +28,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -46,4 +46,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/as_call_last.wat b/tests/disas/winch/x64/br/as_call_last.wat index 445f65c6db50..43100597f1e4 100644 --- a/tests/disas/winch/x64/br/as_call_last.wat +++ b/tests/disas/winch/x64/br/as_call_last.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,17 +27,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -45,4 +45,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/as_call_mid.wat b/tests/disas/winch/x64/br/as_call_mid.wat index fdc019aa0e70..4aa6004a794f 100644 --- a/tests/disas/winch/x64/br/as_call_mid.wat +++ b/tests/disas/winch/x64/br/as_call_mid.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,17 +28,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -46,4 +46,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/as_if_cond.wat b/tests/disas/winch/x64/br/as_if_cond.wat index 949479faab1e..3ce87843284c 100644 --- a/tests/disas/winch/x64/br/as_if_cond.wat +++ b/tests/disas/winch/x64/br/as_if_cond.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/br/as_if_else.wat b/tests/disas/winch/x64/br/as_if_else.wat index 0e7fa3f48118..966800c51cdb 100644 --- a/tests/disas/winch/x64/br/as_if_else.wat +++ b/tests/disas/winch/x64/br/as_if_else.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x54 -;; 1b: movq %rdi, %r14 +;; ja 0x55 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,11 +26,11 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x49 -;; 40: movl 8(%rsp), %eax -;; jmp 0x4e -;; 49: movl $4, %eax +;; je 0x4a +;; 41: movl 8(%rsp), %eax +;; jmp 0x4f +;; 4a: movl $4, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 54: ud2 +;; 55: ud2 diff --git a/tests/disas/winch/x64/br/as_if_then.wat b/tests/disas/winch/x64/br/as_if_then.wat index f560640d68df..ab26451b44b8 100644 --- a/tests/disas/winch/x64/br/as_if_then.wat +++ b/tests/disas/winch/x64/br/as_if_then.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x54 -;; 1b: movq %rdi, %r14 +;; ja 0x55 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,11 +26,11 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x4a -;; 40: movl $3, %eax -;; jmp 0x4e -;; 4a: movl 8(%rsp), %eax +;; je 0x4b +;; 41: movl $3, %eax +;; jmp 0x4f +;; 4b: movl 8(%rsp), %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 54: ud2 +;; 55: ud2 diff --git a/tests/disas/winch/x64/br/as_loop_first.wat b/tests/disas/winch/x64/br/as_loop_first.wat index 42f8813941c5..dfd138421eeb 100644 --- a/tests/disas/winch/x64/br/as_loop_first.wat +++ b/tests/disas/winch/x64/br/as_loop_first.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -22,4 +22,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/br/as_loop_last.wat b/tests/disas/winch/x64/br/as_loop_last.wat index d8c08c3ee2f0..3b61585f71fe 100644 --- a/tests/disas/winch/x64/br/as_loop_last.wat +++ b/tests/disas/winch/x64/br/as_loop_last.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -45,4 +45,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/as_loop_mid.wat b/tests/disas/winch/x64/br/as_loop_mid.wat index 12b0297c1e6f..03e7cfb46241 100644 --- a/tests/disas/winch/x64/br/as_loop_mid.wat +++ b/tests/disas/winch/x64/br/as_loop_mid.wat @@ -13,28 +13,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -46,4 +46,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/br/br_jump.wat b/tests/disas/winch/x64/br/br_jump.wat index 7f0d65f81712..1c1ac692946e 100644 --- a/tests/disas/winch/x64/br/br_jump.wat +++ b/tests/disas/winch/x64/br/br_jump.wat @@ -17,11 +17,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x28, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5e -;; 1b: movq %rdi, %r14 +;; ja 0x5f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,8 +33,8 @@ ;; subq $4, %rsp ;; movl %r11d, (%rsp) ;; addq $4, %rsp -;; jmp 0x42 -;; 58: addq $0x20, %rsp +;; jmp 0x43 +;; 59: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5e: ud2 +;; 5f: ud2 diff --git a/tests/disas/winch/x64/br_if/as_block_last.wat b/tests/disas/winch/x64/br_if/as_block_last.wat index 5d303a48895c..dea78c9f0e9a 100644 --- a/tests/disas/winch/x64/br_if/as_block_last.wat +++ b/tests/disas/winch/x64/br_if/as_block_last.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xa2 -;; 5b: movq %rdi, %r14 +;; ja 0xa3 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -46,8 +46,8 @@ ;; movq 0x18(%rsp), %r14 ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; jne 0x9c -;; 9c: addq $0x20, %rsp +;; jne 0x9d +;; 9d: addq $0x20, %rsp ;; popq %rbp ;; retq -;; a2: ud2 +;; a3: ud2 diff --git a/tests/disas/winch/x64/br_if/as_block_last_value.wat b/tests/disas/winch/x64/br_if/as_block_last_value.wat index c03ccd48b3ba..deaf5583c5b6 100644 --- a/tests/disas/winch/x64/br_if/as_block_last_value.wat +++ b/tests/disas/winch/x64/br_if/as_block_last_value.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xa7 -;; 5b: movq %rdi, %r14 +;; ja 0xa8 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -49,8 +49,8 @@ ;; movl 0xc(%rsp), %ecx ;; movl $0xb, %eax ;; testl %ecx, %ecx -;; jne 0xa1 -;; a1: addq $0x20, %rsp +;; jne 0xa2 +;; a2: addq $0x20, %rsp ;; popq %rbp ;; retq -;; a7: ud2 +;; a8: ud2 diff --git a/tests/disas/winch/x64/br_if/as_br_if_cond.wat b/tests/disas/winch/x64/br_if/as_br_if_cond.wat index 5cfc25f8f896..931870ea8c27 100644 --- a/tests/disas/winch/x64/br_if/as_br_if_cond.wat +++ b/tests/disas/winch/x64/br_if/as_br_if_cond.wat @@ -9,21 +9,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4b -;; 1b: movq %rdi, %r14 +;; ja 0x4c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; jne 0x45 -;; 38: movl $1, %eax +;; jne 0x46 +;; 39: movl $1, %eax ;; testl %eax, %eax -;; jne 0x45 -;; 45: addq $0x10, %rsp +;; jne 0x46 +;; 46: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4b: ud2 +;; 4c: ud2 diff --git a/tests/disas/winch/x64/br_if/as_br_value.wat b/tests/disas/winch/x64/br_if/as_br_value.wat index 98f263c72923..dd61f29497de 100644 --- a/tests/disas/winch/x64/br_if/as_br_value.wat +++ b/tests/disas/winch/x64/br_if/as_br_value.wat @@ -9,19 +9,19 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $2, %ecx ;; movl $1, %eax ;; testl %ecx, %ecx -;; jne 0x3d -;; 3d: addq $0x10, %rsp +;; jne 0x3e +;; 3e: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/br_if/as_call_first.wat b/tests/disas/winch/x64/br_if/as_call_first.wat index 1278b2ff05ce..bc94e04607e8 100644 --- a/tests/disas/winch/x64/br_if/as_call_first.wat +++ b/tests/disas/winch/x64/br_if/as_call_first.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,25 +29,25 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xc5 -;; 6b: movq %rdi, %r14 +;; ja 0xc6 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl $0xc, %eax ;; testl %ecx, %ecx -;; jne 0xbf -;; 8d: subq $4, %rsp +;; jne 0xc0 +;; 8e: subq $4, %rsp ;; movl %eax, (%rsp) ;; subq $0xc, %rsp ;; movq %r14, %rdi @@ -62,4 +62,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; c5: ud2 +;; c6: ud2 diff --git a/tests/disas/winch/x64/br_if/as_call_last.wat b/tests/disas/winch/x64/br_if/as_call_last.wat index a28b592c270e..1c8db44eeed7 100644 --- a/tests/disas/winch/x64/br_if/as_call_last.wat +++ b/tests/disas/winch/x64/br_if/as_call_last.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,25 +29,25 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xc5 -;; 6b: movq %rdi, %r14 +;; ja 0xc6 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl $0xe, %eax ;; testl %ecx, %ecx -;; jne 0xbf -;; 8d: subq $4, %rsp +;; jne 0xc0 +;; 8e: subq $4, %rsp ;; movl %eax, (%rsp) ;; subq $0xc, %rsp ;; movq %r14, %rdi @@ -62,4 +62,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; c5: ud2 +;; c6: ud2 diff --git a/tests/disas/winch/x64/br_if/as_call_mid.wat b/tests/disas/winch/x64/br_if/as_call_mid.wat index ffc1cf196d49..aeb01788f463 100644 --- a/tests/disas/winch/x64/br_if/as_call_mid.wat +++ b/tests/disas/winch/x64/br_if/as_call_mid.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,25 +29,25 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xc5 -;; 6b: movq %rdi, %r14 +;; ja 0xc6 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl $0xd, %eax ;; testl %ecx, %ecx -;; jne 0xbf -;; 8d: subq $4, %rsp +;; jne 0xc0 +;; 8e: subq $4, %rsp ;; movl %eax, (%rsp) ;; subq $0xc, %rsp ;; movq %r14, %rdi @@ -62,4 +62,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; c5: ud2 +;; c6: ud2 diff --git a/tests/disas/winch/x64/br_if/as_if_cond.wat b/tests/disas/winch/x64/br_if/as_if_cond.wat index 065c88022728..8e1b9728715a 100644 --- a/tests/disas/winch/x64/br_if/as_if_cond.wat +++ b/tests/disas/winch/x64/br_if/as_if_cond.wat @@ -15,11 +15,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5e -;; 1b: movq %rdi, %r14 +;; ja 0x5f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,13 +27,13 @@ ;; movl 0xc(%rsp), %ecx ;; movl $1, %eax ;; testl %ecx, %ecx -;; jne 0x58 -;; 41: testl %eax, %eax -;; je 0x53 -;; 49: movl $2, %eax -;; jmp 0x58 -;; 53: movl $3, %eax +;; jne 0x59 +;; 42: testl %eax, %eax +;; je 0x54 +;; 4a: movl $2, %eax +;; jmp 0x59 +;; 54: movl $3, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5e: ud2 +;; 5f: ud2 diff --git a/tests/disas/winch/x64/br_if/as_if_else.wat b/tests/disas/winch/x64/br_if/as_if_else.wat index 046dff66a8b7..873707f1af3d 100644 --- a/tests/disas/winch/x64/br_if/as_if_else.wat +++ b/tests/disas/winch/x64/br_if/as_if_else.wat @@ -13,28 +13,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xa7 -;; 5b: movq %rdi, %r14 +;; ja 0xa8 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,16 +42,16 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x95 -;; 80: movq %r14, %rdi +;; je 0x96 +;; 81: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 -;; jmp 0xa1 -;; 95: movl 8(%rsp), %eax +;; jmp 0xa2 +;; 96: movl 8(%rsp), %eax ;; testl %eax, %eax -;; jne 0xa1 -;; a1: addq $0x20, %rsp +;; jne 0xa2 +;; a2: addq $0x20, %rsp ;; popq %rbp ;; retq -;; a7: ud2 +;; a8: ud2 diff --git a/tests/disas/winch/x64/br_if/as_if_then.wat b/tests/disas/winch/x64/br_if/as_if_then.wat index d5cf269e9c8e..de421e954ec3 100644 --- a/tests/disas/winch/x64/br_if/as_if_then.wat +++ b/tests/disas/winch/x64/br_if/as_if_then.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xa7 -;; 5b: movq %rdi, %r14 +;; ja 0xa8 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,16 +41,16 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x91 -;; 80: movl 8(%rsp), %eax +;; je 0x92 +;; 81: movl 8(%rsp), %eax ;; testl %eax, %eax -;; jne 0xa1 -;; jmp 0xa1 -;; 91: movq %r14, %rdi +;; jne 0xa2 +;; jmp 0xa2 +;; 92: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; a7: ud2 +;; a8: ud2 diff --git a/tests/disas/winch/x64/br_if/as_local_set_value.wat b/tests/disas/winch/x64/br_if/as_local_set_value.wat index f5ac16fff38b..0ebcf1138cb7 100644 --- a/tests/disas/winch/x64/br_if/as_local_set_value.wat +++ b/tests/disas/winch/x64/br_if/as_local_set_value.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,10 +27,10 @@ ;; movl 0xc(%rsp), %ecx ;; movl $0x11, %eax ;; testl %ecx, %ecx -;; jne 0x55 -;; 4c: movl %eax, 0xc(%rsp) +;; jne 0x56 +;; 4d: movl %eax, 0xc(%rsp) ;; movl $0xffffffff, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 +;; 5c: ud2 diff --git a/tests/disas/winch/x64/br_if/as_loop_last.wat b/tests/disas/winch/x64/br_if/as_loop_last.wat index 974f86397c79..d07f1933b925 100644 --- a/tests/disas/winch/x64/br_if/as_loop_last.wat +++ b/tests/disas/winch/x64/br_if/as_loop_last.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x92 -;; 5b: movq %rdi, %r14 +;; ja 0x93 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,8 +42,8 @@ ;; movq 0x18(%rsp), %r14 ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; jne 0x8c -;; 8c: addq $0x20, %rsp +;; jne 0x8d +;; 8d: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 92: ud2 +;; 93: ud2 diff --git a/tests/disas/winch/x64/br_if/save_state_before_br_emission.wat b/tests/disas/winch/x64/br_if/save_state_before_br_emission.wat index 21ae7f323658..61c9043b34fe 100644 --- a/tests/disas/winch/x64/br_if/save_state_before_br_emission.wat +++ b/tests/disas/winch/x64/br_if/save_state_before_br_emission.wat @@ -41,11 +41,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rsi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x58, %r11 ;; cmpq %rsp, %r11 -;; ja 0x106 -;; 1b: movq %rsi, %r14 +;; ja 0x107 +;; 1c: movq %rsi, %r14 ;; subq $0x40, %rsp ;; movq %rsi, 0x38(%rsp) ;; movq %rdx, 0x30(%rsp) @@ -67,23 +67,23 @@ ;; movsd (%rsp), %xmm0 ;; addq $8, %rsp ;; subq $4, %rsp -;; movss 0x71(%rip), %xmm15 +;; movss 0x78(%rip), %xmm15 ;; movss %xmm15, (%rsp) ;; testl %eax, %eax -;; je 0xb7 -;; a5: movl (%rsp), %r11d +;; je 0xb8 +;; a6: movl (%rsp), %r11d ;; movl %r11d, 0x10(%rsp) ;; addq $0x10, %rsp -;; jmp 0xec -;; b7: addq $4, %rsp +;; jmp 0xed +;; b8: addq $4, %rsp ;; movsd (%rsp), %xmm0 ;; addq $8, %rsp ;; movq %xmm0, %rax ;; xorq $0, %rax ;; addq $8, %rsp -;; movsd 0x37(%rip), %xmm0 +;; movsd 0x3e(%rip), %xmm0 ;; subq $4, %rsp -;; movss 0x22(%rip), %xmm15 +;; movss 0x29(%rip), %xmm15 ;; movss %xmm15, (%rsp) ;; movq 0xc(%rsp), %rax ;; movss (%rsp), %xmm15 @@ -92,12 +92,15 @@ ;; addq $0x40, %rsp ;; popq %rbp ;; retq -;; 106: ud2 -;; 108: addb %al, (%rax) -;; 10a: addb %al, (%rax) -;; 10c: addb %al, (%rax) -;; 10e: addb %al, (%rax) -;; 110: addb %al, (%rax) -;; 112: addb %al, (%rax) -;; 114: addb %al, (%rax) -;; 116: addb %al, (%rax) +;; 107: ud2 +;; 109: addb %al, (%rax) +;; 10b: addb %al, (%rax) +;; 10d: addb %al, (%rax) +;; 10f: addb %al, (%rax) +;; 111: addb %al, (%rax) +;; 113: addb %al, (%rax) +;; 115: addb %al, (%rax) +;; 117: addb %al, (%rax) +;; 119: addb %al, (%rax) +;; 11b: addb %al, (%rax) +;; 11d: addb %al, (%rax) diff --git a/tests/disas/winch/x64/br_if/with_machine_stack_entry.wat b/tests/disas/winch/x64/br_if/with_machine_stack_entry.wat index b5b22dd2c821..640f479d5a29 100644 --- a/tests/disas/winch/x64/br_if/with_machine_stack_entry.wat +++ b/tests/disas/winch/x64/br_if/with_machine_stack_entry.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x75 -;; 1b: movq %rdi, %r14 +;; ja 0x76 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -37,24 +37,24 @@ ;; addq $0xc, %rsp ;; movq 0xc(%rsp), %r14 ;; testl %eax, %eax -;; je 0x6b -;; 62: addq $4, %rsp -;; jmp 0x6f -;; 6b: addq $4, %rsp +;; je 0x6c +;; 63: addq $4, %rsp +;; jmp 0x70 +;; 6c: addq $4, %rsp ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 75: ud2 +;; 76: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0xb6 -;; 9b: movq %rdi, %r14 +;; ja 0xb7 +;; 9c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -62,4 +62,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; b6: ud2 +;; b7: ud2 diff --git a/tests/disas/winch/x64/br_table/ensure_sp_state.wat b/tests/disas/winch/x64/br_table/ensure_sp_state.wat index d374bda122c0..c2d2b102ba80 100644 --- a/tests/disas/winch/x64/br_table/ensure_sp_state.wat +++ b/tests/disas/winch/x64/br_table/ensure_sp_state.wat @@ -15,11 +15,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -35,10 +35,10 @@ ;; movslq (%r11, %rcx, 4), %rdx ;; addq %rdx, %r11 ;; jmpq *%r11 -;; 5c: addb $0, %al +;; 5d: addb $0, %al ;; addb %al, (%rax) ;; addq $4, %rsp ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 +;; 6b: ud2 diff --git a/tests/disas/winch/x64/br_table/large.wat b/tests/disas/winch/x64/br_table/large.wat index 02e9f6f7e8ff..b87ff2098a70 100644 --- a/tests/disas/winch/x64/br_table/large.wat +++ b/tests/disas/winch/x64/br_table/large.wat @@ -742,11 +742,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x18104 -;; 1b: movq %rdi, %r14 +;; ja 0x18105 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -759,7 +759,7 @@ ;; movslq (%r11, %rax, 4), %rcx ;; addq %rcx, %r11 ;; jmpq *%r11 -;; 4f: movabsb 0xa0000180aa000180, %al +;; 50: movabsb 0xa0000180aa000180, %al ;; addb $0, (%rcx) ;; stosb %al, (%rdi) ;; addb $0, (%rcx) @@ -25376,9 +25376,9 @@ ;; stosb %al, (%rdi) ;; addb $0, (%rcx) ;; movl $0, %eax -;; jmp 0x180fe -;; 180f9: movl $1, %eax +;; jmp 0x180ff +;; 180fa: movl $1, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 18104: ud2 +;; 18105: ud2 diff --git a/tests/disas/winch/x64/br_table/nested_br_table_loop_block.wat b/tests/disas/winch/x64/br_table/nested_br_table_loop_block.wat index caaf54ac23fa..083283cc1b00 100644 --- a/tests/disas/winch/x64/br_table/nested_br_table_loop_block.wat +++ b/tests/disas/winch/x64/br_table/nested_br_table_loop_block.wat @@ -22,11 +22,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x9f -;; 1b: movq %rdi, %r14 +;; ja 0xa0 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -39,4 +39,4 @@ ;; movslq (%r11, %rax, 4), %rcx ;; addq %rcx, %r11 ;; jmpq *%r11 -;; 4f: loope 0x50 +;; 50: loope 0x51 diff --git a/tests/disas/winch/x64/br_table/stack_handling.wat b/tests/disas/winch/x64/br_table/stack_handling.wat index e19371a72434..d332d47f263e 100644 --- a/tests/disas/winch/x64/br_table/stack_handling.wat +++ b/tests/disas/winch/x64/br_table/stack_handling.wat @@ -15,11 +15,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x81 -;; 1b: movq %rdi, %r14 +;; ja 0x82 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -35,17 +35,17 @@ ;; movslq (%r11, %rax, 4), %rcx ;; addq %rcx, %r11 ;; jmpq *%r11 -;; 5d: sbbb (%rax), %al +;; 5e: sbbb (%rax), %al ;; addb %al, (%rax) ;; adcl %eax, (%rax) ;; addb %al, (%rax) ;; sbbb (%rax), %al ;; addb %al, (%rax) -;; jmp 0x77 -;; 6e: addq $4, %rsp -;; jmp 0x7b -;; 77: addq $4, %rsp +;; jmp 0x78 +;; 6f: addq $4, %rsp +;; jmp 0x7c +;; 78: addq $4, %rsp ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 81: ud2 +;; 82: ud2 diff --git a/tests/disas/winch/x64/call/params.wat b/tests/disas/winch/x64/call/params.wat index 81c0d7eae258..6ac75f718636 100644 --- a/tests/disas/winch/x64/call/params.wat +++ b/tests/disas/winch/x64/call/params.wat @@ -40,11 +40,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x60, %r11 ;; cmpq %rsp, %r11 -;; ja 0x154 -;; 1b: movq %rdi, %r14 +;; ja 0x155 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -117,17 +117,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 154: ud2 +;; 155: ud2 ;; ;; wasm[0]::function[1]::add: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x1d3 -;; 17b: movq %rdi, %r14 +;; ja 0x1d4 +;; 17c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -156,4 +156,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 1d3: ud2 +;; 1d4: ud2 diff --git a/tests/disas/winch/x64/call/recursive.wat b/tests/disas/winch/x64/call/recursive.wat index fe036b2893ff..1be9fb34d697 100644 --- a/tests/disas/winch/x64/call/recursive.wat +++ b/tests/disas/winch/x64/call/recursive.wat @@ -27,11 +27,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0xc5 -;; 1b: movq %rdi, %r14 +;; ja 0xc6 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,10 +41,10 @@ ;; movl $0, %eax ;; setle %al ;; testl %eax, %eax -;; je 0x51 -;; 48: movl 0xc(%rsp), %eax -;; jmp 0xbf -;; 51: movl 0xc(%rsp), %eax +;; je 0x52 +;; 49: movl 0xc(%rsp), %eax +;; jmp 0xc0 +;; 52: movl 0xc(%rsp), %eax ;; subl $1, %eax ;; subq $4, %rsp ;; movl %eax, (%rsp) @@ -77,4 +77,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; c5: ud2 +;; c6: ud2 diff --git a/tests/disas/winch/x64/call/reg_on_stack.wat b/tests/disas/winch/x64/call/reg_on_stack.wat index 292dc2150b9a..b8210e33017e 100644 --- a/tests/disas/winch/x64/call/reg_on_stack.wat +++ b/tests/disas/winch/x64/call/reg_on_stack.wat @@ -15,11 +15,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0xac -;; 1b: movq %rdi, %r14 +;; ja 0xad +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -50,11 +50,11 @@ ;; movl (%rsp), %eax ;; addq $4, %rsp ;; testl %ecx, %ecx -;; je 0xa4 -;; 9b: addq $4, %rsp -;; jmp 0xa6 -;; a4: ud2 +;; je 0xa5 +;; 9c: addq $4, %rsp +;; jmp 0xa7 +;; a5: ud2 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; ac: ud2 +;; ad: ud2 diff --git a/tests/disas/winch/x64/call/simple.wat b/tests/disas/winch/x64/call/simple.wat index f09932bd2ce0..c5863a1c8066 100644 --- a/tests/disas/winch/x64/call/simple.wat +++ b/tests/disas/winch/x64/call/simple.wat @@ -18,11 +18,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x28, %r11 ;; cmpq %rsp, %r11 -;; ja 0x84 -;; 1b: movq %rdi, %r14 +;; ja 0x85 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -49,17 +49,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 84: ud2 +;; 85: ud2 ;; ;; wasm[0]::function[1]::product: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xd7 -;; ab: movq %rdi, %r14 +;; ja 0xd8 +;; ac: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -72,4 +72,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; d7: ud2 +;; d8: ud2 diff --git a/tests/disas/winch/x64/call_indirect/call_indirect.wat b/tests/disas/winch/x64/call_indirect/call_indirect.wat index 7cf5513d5af1..3c3f4b5cd15e 100644 --- a/tests/disas/winch/x64/call_indirect/call_indirect.wat +++ b/tests/disas/winch/x64/call_indirect/call_indirect.wat @@ -34,11 +34,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x1de -;; 1b: movq %rdi, %r14 +;; ja 0x1df +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -48,10 +48,10 @@ ;; movl $0, %eax ;; setbe %al ;; testl %eax, %eax -;; je 0x52 -;; 48: movl $1, %eax -;; jmp 0x1d8 -;; 52: movl 0xc(%rsp), %eax +;; je 0x53 +;; 49: movl $1, %eax +;; jmp 0x1d9 +;; 53: movl 0xc(%rsp), %eax ;; subl $2, %eax ;; subq $4, %rsp ;; movl %eax, (%rsp) @@ -59,8 +59,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x1e0 -;; 75: movq %rcx, %r11 +;; jae 0x1e1 +;; 76: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -69,27 +69,27 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0xc6 -;; 98: subq $4, %rsp +;; jne 0xc7 +;; 99: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $8, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 8(%rsp), %edx -;; callq 0x319 +;; callq 0x31a ;; addq $8, %rsp ;; addq $4, %rsp ;; movq 0x1c(%rsp), %r14 -;; jmp 0xca -;; c6: andq $0xfffffffffffffffe, %rax +;; jmp 0xcb +;; c7: andq $0xfffffffffffffffe, %rax ;; testq %rax, %rax -;; je 0x1e2 -;; d3: movq 0x50(%r14), %r11 +;; je 0x1e3 +;; d4: movq 0x50(%r14), %r11 ;; movl (%r11), %ecx ;; movl 0x10(%rax), %edx ;; cmpl %edx, %ecx -;; jne 0x1e4 -;; e5: pushq %rax +;; jne 0x1e5 +;; e6: pushq %rax ;; popq %rcx ;; movq 0x18(%rcx), %r8 ;; movq 8(%rcx), %rbx @@ -111,8 +111,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x1e6 -;; 136: movq %rcx, %r11 +;; jae 0x1e7 +;; 137: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -121,27 +121,27 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0x187 -;; 159: subq $4, %rsp +;; jne 0x188 +;; 15a: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $4, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 4(%rsp), %edx -;; callq 0x319 +;; callq 0x31a ;; addq $4, %rsp ;; addq $4, %rsp ;; movq 0x20(%rsp), %r14 -;; jmp 0x18b -;; 187: andq $0xfffffffffffffffe, %rax +;; jmp 0x18c +;; 188: andq $0xfffffffffffffffe, %rax ;; testq %rax, %rax -;; je 0x1e8 -;; 194: movq 0x50(%r14), %r11 +;; je 0x1e9 +;; 195: movq 0x50(%r14), %r11 ;; movl (%r11), %ecx ;; movl 0x10(%rax), %edx ;; cmpl %edx, %ecx -;; jne 0x1ea -;; 1a6: pushq %rax +;; jne 0x1eb +;; 1a7: pushq %rax ;; popq %rcx ;; movq 0x18(%rcx), %r8 ;; movq 8(%rcx), %rbx @@ -160,10 +160,10 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 1de: ud2 -;; 1e0: ud2 -;; 1e2: ud2 -;; 1e4: ud2 -;; 1e6: ud2 -;; 1e8: ud2 -;; 1ea: ud2 +;; 1df: ud2 +;; 1e1: ud2 +;; 1e3: ud2 +;; 1e5: ud2 +;; 1e7: ud2 +;; 1e9: ud2 +;; 1eb: ud2 diff --git a/tests/disas/winch/x64/call_indirect/local_arg.wat b/tests/disas/winch/x64/call_indirect/local_arg.wat index 1b8140a87c22..bde5fadf6c82 100644 --- a/tests/disas/winch/x64/call_indirect/local_arg.wat +++ b/tests/disas/winch/x64/call_indirect/local_arg.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,17 +33,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x132 -;; 5b: movq %rdi, %r14 +;; ja 0x133 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -55,8 +55,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x134 -;; 97: movq %rcx, %r11 +;; jae 0x135 +;; 98: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -65,27 +65,27 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0xe8 -;; ba: subq $4, %rsp +;; jne 0xe9 +;; bb: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $8, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 8(%rsp), %edx -;; callq 0x35c +;; callq 0x35d ;; addq $8, %rsp ;; addq $4, %rsp ;; movq 0x1c(%rsp), %r14 -;; jmp 0xec -;; e8: andq $0xfffffffffffffffe, %rax +;; jmp 0xed +;; e9: andq $0xfffffffffffffffe, %rax ;; testq %rax, %rax -;; je 0x136 -;; f5: movq 0x50(%r14), %r11 +;; je 0x137 +;; f6: movq 0x50(%r14), %r11 ;; movl (%r11), %ecx ;; movl 0x10(%rax), %edx ;; cmpl %edx, %ecx -;; jne 0x138 -;; 107: movq 0x18(%rax), %rbx +;; jne 0x139 +;; 108: movq 0x18(%rax), %rbx ;; movq 8(%rax), %rcx ;; subq $0xc, %rsp ;; movq %rbx, %rdi @@ -98,7 +98,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 132: ud2 -;; 134: ud2 -;; 136: ud2 -;; 138: ud2 +;; 133: ud2 +;; 135: ud2 +;; 137: ud2 +;; 139: ud2 diff --git a/tests/disas/winch/x64/epoch/func.wat b/tests/disas/winch/x64/epoch/func.wat new file mode 100644 index 000000000000..425f3afdfd21 --- /dev/null +++ b/tests/disas/winch/x64/epoch/func.wat @@ -0,0 +1,31 @@ +;;! target = "x86_64" +;;! test = "winch" +;;! flags = "-Wepoch-interruption=y" + +(module + (func (export "run"))) +;; wasm[0]::function[0]: +;; pushq %rbp +;; movq %rsp, %rbp +;; movq 8(%rdi), %r11 +;; movq 0x10(%r11), %r11 +;; addq $0x10, %r11 +;; cmpq %rsp, %r11 +;; ja 0x57 +;; 1c: movq %rdi, %r14 +;; subq $0x10, %rsp +;; movq %rdi, 8(%rsp) +;; movq %rsi, (%rsp) +;; movq 0x20(%r14), %rdx +;; movq (%rdx), %rdx +;; movq 8(%r14), %rcx +;; movq 8(%rcx), %rcx +;; cmpq %rcx, %rdx +;; jb 0x51 +;; 44: movq %r14, %rdi +;; callq 0x165 +;; movq 8(%rsp), %r14 +;; addq $0x10, %rsp +;; popq %rbp +;; retq +;; 57: ud2 diff --git a/tests/disas/winch/x64/epoch/loop.wat b/tests/disas/winch/x64/epoch/loop.wat new file mode 100644 index 000000000000..bc6cb334a8aa --- /dev/null +++ b/tests/disas/winch/x64/epoch/loop.wat @@ -0,0 +1,43 @@ +;;! target = "x86_64" +;;! test = "winch" +;;! flags = "-Wepoch-interruption=y" + +(module + (func (export "run") + (loop $l + (br $l)))) +;; wasm[0]::function[0]: +;; pushq %rbp +;; movq %rsp, %rbp +;; movq 8(%rdi), %r11 +;; movq 0x10(%r11), %r11 +;; addq $0x10, %r11 +;; cmpq %rsp, %r11 +;; ja 0x81 +;; 1c: movq %rdi, %r14 +;; subq $0x10, %rsp +;; movq %rdi, 8(%rsp) +;; movq %rsi, (%rsp) +;; movq 0x20(%r14), %rdx +;; movq (%rdx), %rdx +;; movq 8(%r14), %rcx +;; movq 8(%rcx), %rcx +;; cmpq %rcx, %rdx +;; jb 0x51 +;; 44: movq %r14, %rdi +;; callq 0x18f +;; movq 8(%rsp), %r14 +;; movq 0x20(%r14), %rdx +;; movq (%rdx), %rdx +;; movq 8(%r14), %rcx +;; movq 8(%rcx), %rcx +;; cmpq %rcx, %rdx +;; jb 0x76 +;; 69: movq %r14, %rdi +;; callq 0x18f +;; movq 8(%rsp), %r14 +;; jmp 0x51 +;; 7b: addq $0x10, %rsp +;; popq %rbp +;; retq +;; 81: ud2 diff --git a/tests/disas/winch/x64/f32_abs/f32_abs_const.wat b/tests/disas/winch/x64/f32_abs/f32_abs_const.wat index 7574456ab55a..10d0810e3357 100644 --- a/tests/disas/winch/x64/f32_abs/f32_abs_const.wat +++ b/tests/disas/winch/x64/f32_abs/f32_abs_const.wat @@ -11,25 +11,24 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm0 ;; movl $0x7fffffff, %r11d ;; movd %r11d, %xmm15 ;; andps %xmm15, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) -;; 4e: addb %al, (%rax) -;; 50: retq +;; 49: ud2 +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %al, %bl ;; 51: cmc ;; 52: testb $0xbf, %al diff --git a/tests/disas/winch/x64/f32_abs/f32_abs_param.wat b/tests/disas/winch/x64/f32_abs/f32_abs_param.wat index 248a9a923a1f..ddce56c14647 100644 --- a/tests/disas/winch/x64/f32_abs/f32_abs_param.wat +++ b/tests/disas/winch/x64/f32_abs/f32_abs_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/f32_add/const.wat b/tests/disas/winch/x64/f32_add/const.wat index 5d66c86a9d19..9ac0965114a3 100644 --- a/tests/disas/winch/x64/f32_add/const.wat +++ b/tests/disas/winch/x64/f32_add/const.wat @@ -12,26 +12,26 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 -;; movss 0x1d(%rip), %xmm1 +;; movss 0x1c(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm1 ;; addss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) -;; 4e: addb %al, (%rax) -;; 50: int $0xcc +;; 49: ud2 +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %cl, %ch +;; 51: int3 ;; 52: orb $0x40, %al ;; 54: addb %al, (%rax) ;; 56: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_add/locals.wat b/tests/disas/winch/x64/f32_add/locals.wat index ba6b8e236db0..701c2ea1732a 100644 --- a/tests/disas/winch/x64/f32_add/locals.wat +++ b/tests/disas/winch/x64/f32_add/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x33(%rip), %xmm0 +;; movss 0x32(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x2d(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -41,7 +41,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 -;; 6c: addb %al, (%rax) -;; 6e: addb %al, (%rax) -;; 70: int $0xcc +;; 6b: ud2 +;; 6d: addb %al, (%rax) +;; 6f: addb %cl, %ch +;; 71: int3 diff --git a/tests/disas/winch/x64/f32_add/params.wat b/tests/disas/winch/x64/f32_add/params.wat index 84f649bb8571..b1c0e188bbc7 100644 --- a/tests/disas/winch/x64/f32_add/params.wat +++ b/tests/disas/winch/x64/f32_add/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/f32_ceil/f32_ceil_const_sse41.wat b/tests/disas/winch/x64/f32_ceil/f32_ceil_const_sse41.wat index 36d5ac39fd9b..53eb37c48f51 100644 --- a/tests/disas/winch/x64/f32_ceil/f32_ceil_const_sse41.wat +++ b/tests/disas/winch/x64/f32_ceil/f32_ceil_const_sse41.wat @@ -12,23 +12,23 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x15(%rip), %xmm0 +;; movss 0x14(%rip), %xmm0 ;; roundss $2, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %al, %bl +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) +;; 48: retq ;; 49: cmc ;; 4a: testb $0xbf, %al diff --git a/tests/disas/winch/x64/f32_ceil/f32_ceil_param.wat b/tests/disas/winch/x64/f32_ceil/f32_ceil_param.wat index adbe1e2f1de5..e8cd20190e98 100644 --- a/tests/disas/winch/x64/f32_ceil/f32_ceil_param.wat +++ b/tests/disas/winch/x64/f32_ceil/f32_ceil_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f32_ceil/f32_ceil_param_sse41.wat b/tests/disas/winch/x64/f32_ceil/f32_ceil_param_sse41.wat index cc7def0f9c76..a5ee74640b93 100644 --- a/tests/disas/winch/x64/f32_ceil/f32_ceil_param_sse41.wat +++ b/tests/disas/winch/x64/f32_ceil/f32_ceil_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f32_const/call_id.wat b/tests/disas/winch/x64/f32_const/call_id.wat index d4860d96681e..ae81c82999d9 100644 --- a/tests/disas/winch/x64/f32_const/call_id.wat +++ b/tests/disas/winch/x64/f32_const/call_id.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -22,31 +22,31 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x89 -;; 5b: movq %rdi, %r14 +;; ja 0x9a +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq %r14, %rdi ;; movq %r14, %rsi -;; movss 0x17(%rip), %xmm0 +;; movss 0x16(%rip), %xmm0 ;; callq 0 ;; movq 8(%rsp), %r14 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 89: ud2 -;; 8b: addb %al, (%rax) -;; 8d: addb %al, (%rax) -;; 8f: addb %al, %bl -;; 91: cmc -;; 92: testb $0x3f, %al +;; 9a: ud2 +;; 9c: addb %al, (%rax) +;; 9e: addb %al, (%rax) +;; a0: retq +;; a1: cmc +;; a2: testb $0x3f, %al diff --git a/tests/disas/winch/x64/f32_const/id.wat b/tests/disas/winch/x64/f32_const/id.wat index 6f06eb6f9b97..a1dbdb1eb0a2 100644 --- a/tests/disas/winch/x64/f32_const/id.wat +++ b/tests/disas/winch/x64/f32_const/id.wat @@ -8,11 +8,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -21,4 +21,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_s/const.wat b/tests/disas/winch/x64/f32_convert_i32_s/const.wat index 3eff1cd92d7b..345344030f11 100644 --- a/tests/disas/winch/x64/f32_convert_i32_s/const.wat +++ b/tests/disas/winch/x64/f32_convert_i32_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_s/locals.wat b/tests/disas/winch/x64/f32_convert_i32_s/locals.wat index f7aced3fdf6a..e366ad84e87c 100644 --- a/tests/disas/winch/x64/f32_convert_i32_s/locals.wat +++ b/tests/disas/winch/x64/f32_convert_i32_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_s/params.wat b/tests/disas/winch/x64/f32_convert_i32_s/params.wat index 65ed0fe7908e..6bdc326ea8e8 100644 --- a/tests/disas/winch/x64/f32_convert_i32_s/params.wat +++ b/tests/disas/winch/x64/f32_convert_i32_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_s/spilled.wat b/tests/disas/winch/x64/f32_convert_i32_s/spilled.wat index 3ce343d45f5f..01d7373adc01 100644 --- a/tests/disas/winch/x64/f32_convert_i32_s/spilled.wat +++ b/tests/disas/winch/x64/f32_convert_i32_s/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_u/const.wat b/tests/disas/winch/x64/f32_convert_i32_u/const.wat index f855665d3511..8a3c14b6a42c 100644 --- a/tests/disas/winch/x64/f32_convert_i32_u/const.wat +++ b/tests/disas/winch/x64/f32_convert_i32_u/const.wat @@ -11,21 +11,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x66 -;; 1b: movq %rdi, %r14 +;; ja 0x67 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -35,4 +35,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 66: ud2 +;; 67: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_u/locals.wat b/tests/disas/winch/x64/f32_convert_i32_u/locals.wat index abcac7f12738..7a2b92ce346a 100644 --- a/tests/disas/winch/x64/f32_convert_i32_u/locals.wat +++ b/tests/disas/winch/x64/f32_convert_i32_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6f -;; 1b: movq %rdi, %r14 +;; ja 0x70 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,10 +25,10 @@ ;; movl 0xc(%rsp), %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x4f -;; 45: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x69 -;; 4f: movq %rcx, %r11 +;; jl 0x50 +;; 46: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x6a +;; 50: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -38,4 +38,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6f: ud2 +;; 70: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_u/params.wat b/tests/disas/winch/x64/f32_convert_i32_u/params.wat index 2bba922bdada..de6206edb74c 100644 --- a/tests/disas/winch/x64/f32_convert_i32_u/params.wat +++ b/tests/disas/winch/x64/f32_convert_i32_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,10 +23,10 @@ ;; movl 0xc(%rsp), %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x4a -;; 40: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x64 -;; 4a: movq %rcx, %r11 +;; jl 0x4b +;; 41: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x65 +;; 4b: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -36,4 +36,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 +;; 6b: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i32_u/spilled.wat b/tests/disas/winch/x64/f32_convert_i32_u/spilled.wat index 852c676471d8..fe3ab771283e 100644 --- a/tests/disas/winch/x64/f32_convert_i32_u/spilled.wat +++ b/tests/disas/winch/x64/f32_convert_i32_u/spilled.wat @@ -13,21 +13,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 1b: movq %rdi, %r14 +;; ja 0x79 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -41,4 +41,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 78: ud2 +;; 79: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_s/const.wat b/tests/disas/winch/x64/f32_convert_i64_s/const.wat index 81b343697997..fbb9f47218d3 100644 --- a/tests/disas/winch/x64/f32_convert_i64_s/const.wat +++ b/tests/disas/winch/x64/f32_convert_i64_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_s/locals.wat b/tests/disas/winch/x64/f32_convert_i64_s/locals.wat index bac36127b9dc..af60b52d9b0a 100644 --- a/tests/disas/winch/x64/f32_convert_i64_s/locals.wat +++ b/tests/disas/winch/x64/f32_convert_i64_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_s/params.wat b/tests/disas/winch/x64/f32_convert_i64_s/params.wat index 46dd131aa727..cce7a5da0a13 100644 --- a/tests/disas/winch/x64/f32_convert_i64_s/params.wat +++ b/tests/disas/winch/x64/f32_convert_i64_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_s/spilled.wat b/tests/disas/winch/x64/f32_convert_i64_s/spilled.wat index eb0724673711..dcf287b08648 100644 --- a/tests/disas/winch/x64/f32_convert_i64_s/spilled.wat +++ b/tests/disas/winch/x64/f32_convert_i64_s/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_u/const.wat b/tests/disas/winch/x64/f32_convert_i64_u/const.wat index 2a8dd69d0bd6..74ab9bc20773 100644 --- a/tests/disas/winch/x64/f32_convert_i64_u/const.wat +++ b/tests/disas/winch/x64/f32_convert_i64_u/const.wat @@ -11,20 +11,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x66 -;; 1b: movq %rdi, %r14 +;; ja 0x67 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $1, %rcx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -34,4 +34,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 66: ud2 +;; 67: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_u/locals.wat b/tests/disas/winch/x64/f32_convert_i64_u/locals.wat index d840164e6815..6f4e14b99c3b 100644 --- a/tests/disas/winch/x64/f32_convert_i64_u/locals.wat +++ b/tests/disas/winch/x64/f32_convert_i64_u/locals.wat @@ -13,21 +13,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6e -;; 1b: movq %rdi, %r14 +;; ja 0x6f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) ;; movq 8(%rsp), %rcx ;; cmpq $0, %rcx -;; jl 0x4e -;; 44: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x68 -;; 4e: movq %rcx, %r11 +;; jl 0x4f +;; 45: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x69 +;; 4f: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -37,4 +37,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6e: ud2 +;; 6f: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_u/params.wat b/tests/disas/winch/x64/f32_convert_i64_u/params.wat index 0ebf2b4d950f..70d681b4710e 100644 --- a/tests/disas/winch/x64/f32_convert_i64_u/params.wat +++ b/tests/disas/winch/x64/f32_convert_i64_u/params.wat @@ -11,21 +11,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq %rdx, 8(%rsp) ;; movq 8(%rsp), %rcx ;; cmpq $0, %rcx -;; jl 0x4a -;; 40: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x64 -;; 4a: movq %rcx, %r11 +;; jl 0x4b +;; 41: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x65 +;; 4b: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -35,4 +35,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 +;; 6b: ud2 diff --git a/tests/disas/winch/x64/f32_convert_i64_u/spilled.wat b/tests/disas/winch/x64/f32_convert_i64_u/spilled.wat index 7478de710715..09e6d1755e40 100644 --- a/tests/disas/winch/x64/f32_convert_i64_u/spilled.wat +++ b/tests/disas/winch/x64/f32_convert_i64_u/spilled.wat @@ -13,20 +13,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 1b: movq %rdi, %r14 +;; ja 0x79 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $1, %rcx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2ssq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2ssq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 78: ud2 +;; 79: ud2 diff --git a/tests/disas/winch/x64/f32_copysign/const.wat b/tests/disas/winch/x64/f32_copysign/const.wat index e81daece1218..5c4970c30bda 100644 --- a/tests/disas/winch/x64/f32_copysign/const.wat +++ b/tests/disas/winch/x64/f32_copysign/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5e -;; 1b: movq %rdi, %r14 +;; ja 0x5f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x2d(%rip), %xmm0 -;; movss 0x2d(%rip), %xmm1 +;; movss 0x34(%rip), %xmm0 +;; movss 0x34(%rip), %xmm1 ;; movl $0x80000000, %r11d ;; movd %r11d, %xmm15 ;; andps %xmm15, %xmm0 @@ -32,9 +32,13 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5e: ud2 -;; 60: int $0xcc -;; 62: orb $0x40, %al -;; 64: addb %al, (%rax) -;; 66: addb %al, (%rax) -;; 68: int $0xcc +;; 5f: ud2 +;; 61: addb %al, (%rax) +;; 63: addb %al, (%rax) +;; 65: addb %al, (%rax) +;; 67: addb %cl, %ch +;; 69: int3 +;; 6a: orb $0x40, %al +;; 6c: addb %al, (%rax) +;; 6e: addb %al, (%rax) +;; 70: int $0xcc diff --git a/tests/disas/winch/x64/f32_copysign/locals.wat b/tests/disas/winch/x64/f32_copysign/locals.wat index e7780e909202..5f925318cd22 100644 --- a/tests/disas/winch/x64/f32_copysign/locals.wat +++ b/tests/disas/winch/x64/f32_copysign/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x80 -;; 1b: movq %rdi, %r14 +;; ja 0x81 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x4b(%rip), %xmm0 +;; movss 0x4a(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x45(%rip), %xmm0 +;; movss 0x44(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -46,8 +46,8 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 80: ud2 -;; 82: addb %al, (%rax) -;; 84: addb %al, (%rax) -;; 86: addb %al, (%rax) -;; 88: int $0xcc +;; 81: ud2 +;; 83: addb %al, (%rax) +;; 85: addb %al, (%rax) +;; 87: addb %cl, %ch +;; 89: int3 diff --git a/tests/disas/winch/x64/f32_copysign/params.wat b/tests/disas/winch/x64/f32_copysign/params.wat index c8fddff3a5ba..b51acb8ed276 100644 --- a/tests/disas/winch/x64/f32_copysign/params.wat +++ b/tests/disas/winch/x64/f32_copysign/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x67 -;; 1b: movq %rdi, %r14 +;; ja 0x68 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -34,4 +34,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 67: ud2 +;; 68: ud2 diff --git a/tests/disas/winch/x64/f32_demote_f64/const.wat b/tests/disas/winch/x64/f32_demote_f64/const.wat index 85c223f56601..b49275bd4d4d 100644 --- a/tests/disas/winch/x64/f32_demote_f64/const.wat +++ b/tests/disas/winch/x64/f32_demote_f64/const.wat @@ -11,21 +11,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0xd(%rip), %xmm0 +;; movsd 0xc(%rip), %xmm0 ;; cvtsd2ss %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 -;; 3f: addb %al, (%rax) -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %dh, %al +;; 3e: ud2 +;; 40: addb %al, (%rax) +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_demote_f64/locals.wat b/tests/disas/winch/x64/f32_demote_f64/locals.wat index b79a4e2581a2..65251e0b9ba4 100644 --- a/tests/disas/winch/x64/f32_demote_f64/locals.wat +++ b/tests/disas/winch/x64/f32_demote_f64/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/f32_demote_f64/params.wat b/tests/disas/winch/x64/f32_demote_f64/params.wat index dbb08cd030cc..62ba0405b2c0 100644 --- a/tests/disas/winch/x64/f32_demote_f64/params.wat +++ b/tests/disas/winch/x64/f32_demote_f64/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/f32_demote_f64/spilled.wat b/tests/disas/winch/x64/f32_demote_f64/spilled.wat index 7268afdc8f56..aa2786e99f04 100644 --- a/tests/disas/winch/x64/f32_demote_f64/spilled.wat +++ b/tests/disas/winch/x64/f32_demote_f64/spilled.wat @@ -13,15 +13,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x25(%rip), %xmm0 +;; movsd 0x24(%rip), %xmm0 ;; cvtsd2ss %xmm0, %xmm0 ;; subq $4, %rsp ;; movss %xmm0, (%rsp) @@ -30,11 +30,10 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 -;; 51: addb %al, (%rax) -;; 53: addb %al, (%rax) -;; 55: addb %al, (%rax) -;; 57: addb %al, (%rax) -;; 59: addb %al, (%rax) -;; 5b: addb %al, (%rax) -;; 5d: addb %dh, %al +;; 50: ud2 +;; 52: addb %al, (%rax) +;; 54: addb %al, (%rax) +;; 56: addb %al, (%rax) +;; 58: addb %al, (%rax) +;; 5a: addb %al, (%rax) +;; 5c: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_div/const.wat b/tests/disas/winch/x64/f32_div/const.wat index d3924d71e20b..0b27d136c875 100644 --- a/tests/disas/winch/x64/f32_div/const.wat +++ b/tests/disas/winch/x64/f32_div/const.wat @@ -12,26 +12,26 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 -;; movss 0x1d(%rip), %xmm1 +;; movss 0x1c(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm1 ;; divss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) -;; 4e: addb %al, (%rax) -;; 50: int $0xcc +;; 49: ud2 +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %cl, %ch +;; 51: int3 ;; 52: orb $0x40, %al ;; 54: addb %al, (%rax) ;; 56: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_div/locals.wat b/tests/disas/winch/x64/f32_div/locals.wat index b91dcdf4a093..32126c717b14 100644 --- a/tests/disas/winch/x64/f32_div/locals.wat +++ b/tests/disas/winch/x64/f32_div/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x33(%rip), %xmm0 +;; movss 0x32(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x2d(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -41,7 +41,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 -;; 6c: addb %al, (%rax) -;; 6e: addb %al, (%rax) -;; 70: int $0xcc +;; 6b: ud2 +;; 6d: addb %al, (%rax) +;; 6f: addb %cl, %ch +;; 71: int3 diff --git a/tests/disas/winch/x64/f32_div/params.wat b/tests/disas/winch/x64/f32_div/params.wat index 47a15524e359..1f747fc65a15 100644 --- a/tests/disas/winch/x64/f32_div/params.wat +++ b/tests/disas/winch/x64/f32_div/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/f32_eq/const.wat b/tests/disas/winch/x64/f32_eq/const.wat index 4fd4603688d2..0fcf40b7b8a9 100644 --- a/tests/disas/winch/x64/f32_eq/const.wat +++ b/tests/disas/winch/x64/f32_eq/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x2d(%rip), %xmm0 -;; movss 0x2d(%rip), %xmm1 +;; movss 0x2c(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm1 ;; ucomiss %xmm0, %xmm1 ;; movl $0, %eax ;; sete %al @@ -31,10 +31,10 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 -;; 5c: addb %al, (%rax) -;; 5e: addb %al, (%rax) -;; 60: int $0xcc +;; 5b: ud2 +;; 5d: addb %al, (%rax) +;; 5f: addb %cl, %ch +;; 61: int3 ;; 62: orb $0x40, %al ;; 64: addb %al, (%rax) ;; 66: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_eq/locals.wat b/tests/disas/winch/x64/f32_eq/locals.wat index 27c208ed97ec..9eff2c496b3b 100644 --- a/tests/disas/winch/x64/f32_eq/locals.wat +++ b/tests/disas/winch/x64/f32_eq/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7c -;; 1b: movq %rdi, %r14 +;; ja 0x7d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x43(%rip), %xmm0 +;; movss 0x42(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x3d(%rip), %xmm0 +;; movss 0x3c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -45,6 +45,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7c: ud2 -;; 7e: addb %al, (%rax) -;; 80: int $0xcc +;; 7d: ud2 +;; 7f: addb %cl, %ch +;; 81: int3 diff --git a/tests/disas/winch/x64/f32_eq/params.wat b/tests/disas/winch/x64/f32_eq/params.wat index 76cad6a17c69..4e53d4eaac96 100644 --- a/tests/disas/winch/x64/f32_eq/params.wat +++ b/tests/disas/winch/x64/f32_eq/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x63 -;; 1b: movq %rdi, %r14 +;; ja 0x64 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 63: ud2 +;; 64: ud2 diff --git a/tests/disas/winch/x64/f32_floor/f32_floor_const_sse41.wat b/tests/disas/winch/x64/f32_floor/f32_floor_const_sse41.wat index b14fbaf320a5..27ffdd50e9b8 100644 --- a/tests/disas/winch/x64/f32_floor/f32_floor_const_sse41.wat +++ b/tests/disas/winch/x64/f32_floor/f32_floor_const_sse41.wat @@ -12,23 +12,23 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x15(%rip), %xmm0 +;; movss 0x14(%rip), %xmm0 ;; roundss $1, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %al, %bl +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) +;; 48: retq ;; 49: cmc ;; 4a: testb $0xbf, %al diff --git a/tests/disas/winch/x64/f32_floor/f32_floor_param.wat b/tests/disas/winch/x64/f32_floor/f32_floor_param.wat index 05336bd42b18..edf3566e44de 100644 --- a/tests/disas/winch/x64/f32_floor/f32_floor_param.wat +++ b/tests/disas/winch/x64/f32_floor/f32_floor_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f32_floor/f32_floor_param_sse41.wat b/tests/disas/winch/x64/f32_floor/f32_floor_param_sse41.wat index ff7507cb5e92..2ef057bfbd4c 100644 --- a/tests/disas/winch/x64/f32_floor/f32_floor_param_sse41.wat +++ b/tests/disas/winch/x64/f32_floor/f32_floor_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f32_ge/const.wat b/tests/disas/winch/x64/f32_ge/const.wat index 5c6649845bf6..7f626651c8ab 100644 --- a/tests/disas/winch/x64/f32_ge/const.wat +++ b/tests/disas/winch/x64/f32_ge/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x2d(%rip), %xmm0 -;; movss 0x2d(%rip), %xmm1 +;; movss 0x2c(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm1 ;; ucomiss %xmm0, %xmm1 ;; movl $0, %eax ;; setae %al @@ -31,10 +31,10 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 -;; 5c: addb %al, (%rax) -;; 5e: addb %al, (%rax) -;; 60: int $0xcc +;; 5b: ud2 +;; 5d: addb %al, (%rax) +;; 5f: addb %cl, %ch +;; 61: int3 ;; 62: orb $0x40, %al ;; 64: addb %al, (%rax) ;; 66: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_ge/locals.wat b/tests/disas/winch/x64/f32_ge/locals.wat index 5a6a056bfcb0..3e3229707ce8 100644 --- a/tests/disas/winch/x64/f32_ge/locals.wat +++ b/tests/disas/winch/x64/f32_ge/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7c -;; 1b: movq %rdi, %r14 +;; ja 0x7d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x43(%rip), %xmm0 +;; movss 0x42(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x3d(%rip), %xmm0 +;; movss 0x3c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -45,6 +45,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7c: ud2 -;; 7e: addb %al, (%rax) -;; 80: int $0xcc +;; 7d: ud2 +;; 7f: addb %cl, %ch +;; 81: int3 diff --git a/tests/disas/winch/x64/f32_ge/params.wat b/tests/disas/winch/x64/f32_ge/params.wat index 1912c01c1211..3daa21714dfe 100644 --- a/tests/disas/winch/x64/f32_ge/params.wat +++ b/tests/disas/winch/x64/f32_ge/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x63 -;; 1b: movq %rdi, %r14 +;; ja 0x64 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 63: ud2 +;; 64: ud2 diff --git a/tests/disas/winch/x64/f32_gt/const.wat b/tests/disas/winch/x64/f32_gt/const.wat index 76d6b3e1247e..7decb69e85fc 100644 --- a/tests/disas/winch/x64/f32_gt/const.wat +++ b/tests/disas/winch/x64/f32_gt/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x2d(%rip), %xmm0 -;; movss 0x2d(%rip), %xmm1 +;; movss 0x2c(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm1 ;; ucomiss %xmm0, %xmm1 ;; movl $0, %eax ;; seta %al @@ -31,10 +31,10 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 -;; 5c: addb %al, (%rax) -;; 5e: addb %al, (%rax) -;; 60: int $0xcc +;; 5b: ud2 +;; 5d: addb %al, (%rax) +;; 5f: addb %cl, %ch +;; 61: int3 ;; 62: orb $0x40, %al ;; 64: addb %al, (%rax) ;; 66: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_gt/locals.wat b/tests/disas/winch/x64/f32_gt/locals.wat index 4e3143f3d4ea..10a7848d3eab 100644 --- a/tests/disas/winch/x64/f32_gt/locals.wat +++ b/tests/disas/winch/x64/f32_gt/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7c -;; 1b: movq %rdi, %r14 +;; ja 0x7d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x43(%rip), %xmm0 +;; movss 0x42(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x3d(%rip), %xmm0 +;; movss 0x3c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -45,6 +45,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7c: ud2 -;; 7e: addb %al, (%rax) -;; 80: int $0xcc +;; 7d: ud2 +;; 7f: addb %cl, %ch +;; 81: int3 diff --git a/tests/disas/winch/x64/f32_gt/params.wat b/tests/disas/winch/x64/f32_gt/params.wat index 739ff45f4413..7808017050eb 100644 --- a/tests/disas/winch/x64/f32_gt/params.wat +++ b/tests/disas/winch/x64/f32_gt/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x63 -;; 1b: movq %rdi, %r14 +;; ja 0x64 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 63: ud2 +;; 64: ud2 diff --git a/tests/disas/winch/x64/f32_le/const.wat b/tests/disas/winch/x64/f32_le/const.wat index 8196c81cd938..d3f36624364a 100644 --- a/tests/disas/winch/x64/f32_le/const.wat +++ b/tests/disas/winch/x64/f32_le/const.wat @@ -12,25 +12,24 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 -;; movss 0x1d(%rip), %xmm1 +;; movss 0x1c(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm1 ;; ucomiss %xmm1, %xmm0 ;; movl $0, %eax ;; setae %al ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 -;; 4f: addb %cl, %ch -;; 51: int3 +;; 4e: ud2 +;; 50: int $0xcc ;; 52: orb $0x40, %al ;; 54: addb %al, (%rax) ;; 56: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_le/locals.wat b/tests/disas/winch/x64/f32_le/locals.wat index c860de854afc..6395ff09615e 100644 --- a/tests/disas/winch/x64/f32_le/locals.wat +++ b/tests/disas/winch/x64/f32_le/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6f -;; 1b: movq %rdi, %r14 +;; ja 0x70 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x3b(%rip), %xmm0 +;; movss 0x3a(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x35(%rip), %xmm0 +;; movss 0x34(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -42,9 +42,8 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6f: ud2 -;; 71: addb %al, (%rax) -;; 73: addb %al, (%rax) -;; 75: addb %al, (%rax) -;; 77: addb %cl, %ch -;; 79: int3 +;; 70: ud2 +;; 72: addb %al, (%rax) +;; 74: addb %al, (%rax) +;; 76: addb %al, (%rax) +;; 78: int $0xcc diff --git a/tests/disas/winch/x64/f32_le/params.wat b/tests/disas/winch/x64/f32_le/params.wat index 1f93e312b45c..4a69ac4093bc 100644 --- a/tests/disas/winch/x64/f32_le/params.wat +++ b/tests/disas/winch/x64/f32_le/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x56 -;; 1b: movq %rdi, %r14 +;; ja 0x57 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 56: ud2 +;; 57: ud2 diff --git a/tests/disas/winch/x64/f32_lt/const.wat b/tests/disas/winch/x64/f32_lt/const.wat index 8800c6078d79..6f0e55f995dd 100644 --- a/tests/disas/winch/x64/f32_lt/const.wat +++ b/tests/disas/winch/x64/f32_lt/const.wat @@ -12,25 +12,24 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 -;; movss 0x1d(%rip), %xmm1 +;; movss 0x1c(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm1 ;; ucomiss %xmm1, %xmm0 ;; movl $0, %eax ;; seta %al ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 -;; 4f: addb %cl, %ch -;; 51: int3 +;; 4e: ud2 +;; 50: int $0xcc ;; 52: orb $0x40, %al ;; 54: addb %al, (%rax) ;; 56: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_lt/locals.wat b/tests/disas/winch/x64/f32_lt/locals.wat index 87bc63943c6e..5bd54a88e577 100644 --- a/tests/disas/winch/x64/f32_lt/locals.wat +++ b/tests/disas/winch/x64/f32_lt/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6f -;; 1b: movq %rdi, %r14 +;; ja 0x70 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x3b(%rip), %xmm0 +;; movss 0x3a(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x35(%rip), %xmm0 +;; movss 0x34(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -42,9 +42,8 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6f: ud2 -;; 71: addb %al, (%rax) -;; 73: addb %al, (%rax) -;; 75: addb %al, (%rax) -;; 77: addb %cl, %ch -;; 79: int3 +;; 70: ud2 +;; 72: addb %al, (%rax) +;; 74: addb %al, (%rax) +;; 76: addb %al, (%rax) +;; 78: int $0xcc diff --git a/tests/disas/winch/x64/f32_lt/params.wat b/tests/disas/winch/x64/f32_lt/params.wat index d9d98a651c2a..b057e0d95968 100644 --- a/tests/disas/winch/x64/f32_lt/params.wat +++ b/tests/disas/winch/x64/f32_lt/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x56 -;; 1b: movq %rdi, %r14 +;; ja 0x57 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 56: ud2 +;; 57: ud2 diff --git a/tests/disas/winch/x64/f32_max/const.wat b/tests/disas/winch/x64/f32_max/const.wat index 137933de99a8..7ac5329e3871 100644 --- a/tests/disas/winch/x64/f32_max/const.wat +++ b/tests/disas/winch/x64/f32_max/const.wat @@ -12,33 +12,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x69 -;; 1b: movq %rdi, %r14 +;; ja 0x6a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x3d(%rip), %xmm0 -;; movss 0x3d(%rip), %xmm1 +;; movss 0x3c(%rip), %xmm0 +;; movss 0x3c(%rip), %xmm1 ;; ucomiss %xmm0, %xmm1 -;; jne 0x5c -;; jp 0x52 -;; 4a: andps %xmm0, %xmm1 -;; jmp 0x60 -;; 52: addss %xmm0, %xmm1 -;; jp 0x60 -;; 5c: maxss %xmm0, %xmm1 +;; jne 0x5d +;; jp 0x53 +;; 4b: andps %xmm0, %xmm1 +;; jmp 0x61 +;; 53: addss %xmm0, %xmm1 +;; jp 0x61 +;; 5d: maxss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 69: ud2 -;; 6b: addb %al, (%rax) -;; 6d: addb %al, (%rax) -;; 6f: addb %cl, %ch -;; 71: int3 +;; 6a: ud2 +;; 6c: addb %al, (%rax) +;; 6e: addb %al, (%rax) +;; 70: int $0xcc ;; 72: orb $0x40, %al ;; 74: addb %al, (%rax) ;; 76: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_max/locals.wat b/tests/disas/winch/x64/f32_max/locals.wat index 973acd49d178..f3d1cdeac186 100644 --- a/tests/disas/winch/x64/f32_max/locals.wat +++ b/tests/disas/winch/x64/f32_max/locals.wat @@ -21,34 +21,33 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8b -;; 1b: movq %rdi, %r14 +;; ja 0x8c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x53(%rip), %xmm0 +;; movss 0x52(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x4d(%rip), %xmm0 +;; movss 0x4c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 ;; ucomiss %xmm0, %xmm1 -;; jne 0x7e -;; jp 0x74 -;; 6c: andps %xmm0, %xmm1 -;; jmp 0x82 -;; 74: addss %xmm0, %xmm1 -;; jp 0x82 -;; 7e: maxss %xmm0, %xmm1 +;; jne 0x7f +;; jp 0x75 +;; 6d: andps %xmm0, %xmm1 +;; jmp 0x83 +;; 75: addss %xmm0, %xmm1 +;; jp 0x83 +;; 7f: maxss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8b: ud2 -;; 8d: addb %al, (%rax) -;; 8f: addb %cl, %ch -;; 91: int3 +;; 8c: ud2 +;; 8e: addb %al, (%rax) +;; 90: int $0xcc diff --git a/tests/disas/winch/x64/f32_max/params.wat b/tests/disas/winch/x64/f32_max/params.wat index 0b461d3f7505..3c000a0de8e0 100644 --- a/tests/disas/winch/x64/f32_max/params.wat +++ b/tests/disas/winch/x64/f32_max/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x72 -;; 1b: movq %rdi, %r14 +;; ja 0x73 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,15 +25,15 @@ ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 ;; ucomiss %xmm0, %xmm1 -;; jne 0x65 -;; jp 0x5b -;; 53: andps %xmm0, %xmm1 -;; jmp 0x69 -;; 5b: addss %xmm0, %xmm1 -;; jp 0x69 -;; 65: maxss %xmm0, %xmm1 +;; jne 0x66 +;; jp 0x5c +;; 54: andps %xmm0, %xmm1 +;; jmp 0x6a +;; 5c: addss %xmm0, %xmm1 +;; jp 0x6a +;; 66: maxss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 72: ud2 +;; 73: ud2 diff --git a/tests/disas/winch/x64/f32_min/const.wat b/tests/disas/winch/x64/f32_min/const.wat index 0b78caa6d081..26b38bd711f2 100644 --- a/tests/disas/winch/x64/f32_min/const.wat +++ b/tests/disas/winch/x64/f32_min/const.wat @@ -12,33 +12,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x69 -;; 1b: movq %rdi, %r14 +;; ja 0x6a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x3d(%rip), %xmm0 -;; movss 0x3d(%rip), %xmm1 +;; movss 0x3c(%rip), %xmm0 +;; movss 0x3c(%rip), %xmm1 ;; ucomiss %xmm0, %xmm1 -;; jne 0x5c -;; jp 0x52 -;; 4a: orps %xmm0, %xmm1 -;; jmp 0x60 -;; 52: addss %xmm0, %xmm1 -;; jp 0x60 -;; 5c: minss %xmm0, %xmm1 +;; jne 0x5d +;; jp 0x53 +;; 4b: orps %xmm0, %xmm1 +;; jmp 0x61 +;; 53: addss %xmm0, %xmm1 +;; jp 0x61 +;; 5d: minss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 69: ud2 -;; 6b: addb %al, (%rax) -;; 6d: addb %al, (%rax) -;; 6f: addb %cl, %ch -;; 71: int3 +;; 6a: ud2 +;; 6c: addb %al, (%rax) +;; 6e: addb %al, (%rax) +;; 70: int $0xcc ;; 72: orb $0x40, %al ;; 74: addb %al, (%rax) ;; 76: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_min/locals.wat b/tests/disas/winch/x64/f32_min/locals.wat index f5051fad4ea7..1832fe795a01 100644 --- a/tests/disas/winch/x64/f32_min/locals.wat +++ b/tests/disas/winch/x64/f32_min/locals.wat @@ -21,34 +21,33 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8b -;; 1b: movq %rdi, %r14 +;; ja 0x8c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x53(%rip), %xmm0 +;; movss 0x52(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x4d(%rip), %xmm0 +;; movss 0x4c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 ;; ucomiss %xmm0, %xmm1 -;; jne 0x7e -;; jp 0x74 -;; 6c: orps %xmm0, %xmm1 -;; jmp 0x82 -;; 74: addss %xmm0, %xmm1 -;; jp 0x82 -;; 7e: minss %xmm0, %xmm1 +;; jne 0x7f +;; jp 0x75 +;; 6d: orps %xmm0, %xmm1 +;; jmp 0x83 +;; 75: addss %xmm0, %xmm1 +;; jp 0x83 +;; 7f: minss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8b: ud2 -;; 8d: addb %al, (%rax) -;; 8f: addb %cl, %ch -;; 91: int3 +;; 8c: ud2 +;; 8e: addb %al, (%rax) +;; 90: int $0xcc diff --git a/tests/disas/winch/x64/f32_min/params.wat b/tests/disas/winch/x64/f32_min/params.wat index 77a6da36e6e3..84a49e999e44 100644 --- a/tests/disas/winch/x64/f32_min/params.wat +++ b/tests/disas/winch/x64/f32_min/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x72 -;; 1b: movq %rdi, %r14 +;; ja 0x73 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,15 +25,15 @@ ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 ;; ucomiss %xmm0, %xmm1 -;; jne 0x65 -;; jp 0x5b -;; 53: orps %xmm0, %xmm1 -;; jmp 0x69 -;; 5b: addss %xmm0, %xmm1 -;; jp 0x69 -;; 65: minss %xmm0, %xmm1 +;; jne 0x66 +;; jp 0x5c +;; 54: orps %xmm0, %xmm1 +;; jmp 0x6a +;; 5c: addss %xmm0, %xmm1 +;; jp 0x6a +;; 66: minss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 72: ud2 +;; 73: ud2 diff --git a/tests/disas/winch/x64/f32_mul/const.wat b/tests/disas/winch/x64/f32_mul/const.wat index ffc1ae62a95e..f84fcc201944 100644 --- a/tests/disas/winch/x64/f32_mul/const.wat +++ b/tests/disas/winch/x64/f32_mul/const.wat @@ -12,26 +12,26 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 -;; movss 0x1d(%rip), %xmm1 +;; movss 0x1c(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm1 ;; mulss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) -;; 4e: addb %al, (%rax) -;; 50: int $0xcc +;; 49: ud2 +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %cl, %ch +;; 51: int3 ;; 52: orb $0x40, %al ;; 54: addb %al, (%rax) ;; 56: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_mul/locals.wat b/tests/disas/winch/x64/f32_mul/locals.wat index 180a8c156473..76c0defd525e 100644 --- a/tests/disas/winch/x64/f32_mul/locals.wat +++ b/tests/disas/winch/x64/f32_mul/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x33(%rip), %xmm0 +;; movss 0x32(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x2d(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -41,7 +41,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 -;; 6c: addb %al, (%rax) -;; 6e: addb %al, (%rax) -;; 70: int $0xcc +;; 6b: ud2 +;; 6d: addb %al, (%rax) +;; 6f: addb %cl, %ch +;; 71: int3 diff --git a/tests/disas/winch/x64/f32_mul/params.wat b/tests/disas/winch/x64/f32_mul/params.wat index cd61bd697564..dc7b88bb4531 100644 --- a/tests/disas/winch/x64/f32_mul/params.wat +++ b/tests/disas/winch/x64/f32_mul/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/f32_ne/const.wat b/tests/disas/winch/x64/f32_ne/const.wat index 6a111ddfcd49..494b12fd9227 100644 --- a/tests/disas/winch/x64/f32_ne/const.wat +++ b/tests/disas/winch/x64/f32_ne/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x2d(%rip), %xmm0 -;; movss 0x2d(%rip), %xmm1 +;; movss 0x2c(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm1 ;; ucomiss %xmm0, %xmm1 ;; movl $0, %eax ;; setne %al @@ -31,10 +31,10 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 -;; 5c: addb %al, (%rax) -;; 5e: addb %al, (%rax) -;; 60: int $0xcc +;; 5b: ud2 +;; 5d: addb %al, (%rax) +;; 5f: addb %cl, %ch +;; 61: int3 ;; 62: orb $0x40, %al ;; 64: addb %al, (%rax) ;; 66: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_ne/locals.wat b/tests/disas/winch/x64/f32_ne/locals.wat index c5ad122246d8..74121c67119b 100644 --- a/tests/disas/winch/x64/f32_ne/locals.wat +++ b/tests/disas/winch/x64/f32_ne/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7c -;; 1b: movq %rdi, %r14 +;; ja 0x7d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x43(%rip), %xmm0 +;; movss 0x42(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x3d(%rip), %xmm0 +;; movss 0x3c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -45,6 +45,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7c: ud2 -;; 7e: addb %al, (%rax) -;; 80: int $0xcc +;; 7d: ud2 +;; 7f: addb %cl, %ch +;; 81: int3 diff --git a/tests/disas/winch/x64/f32_ne/params.wat b/tests/disas/winch/x64/f32_ne/params.wat index 7830120d6ca8..9861f9979a80 100644 --- a/tests/disas/winch/x64/f32_ne/params.wat +++ b/tests/disas/winch/x64/f32_ne/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x63 -;; 1b: movq %rdi, %r14 +;; ja 0x64 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 63: ud2 +;; 64: ud2 diff --git a/tests/disas/winch/x64/f32_nearest/f32_floor_const_sse41.wat b/tests/disas/winch/x64/f32_nearest/f32_floor_const_sse41.wat index 3576f85a34df..d2b769488e6f 100644 --- a/tests/disas/winch/x64/f32_nearest/f32_floor_const_sse41.wat +++ b/tests/disas/winch/x64/f32_nearest/f32_floor_const_sse41.wat @@ -12,23 +12,23 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x15(%rip), %xmm0 +;; movss 0x14(%rip), %xmm0 ;; roundss $0, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %al, %bl +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) +;; 48: retq ;; 49: cmc ;; 4a: testb $0xbf, %al diff --git a/tests/disas/winch/x64/f32_nearest/f32_floor_param_sse41.wat b/tests/disas/winch/x64/f32_nearest/f32_floor_param_sse41.wat index 78b174fdda28..4e2dae36fcb4 100644 --- a/tests/disas/winch/x64/f32_nearest/f32_floor_param_sse41.wat +++ b/tests/disas/winch/x64/f32_nearest/f32_floor_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f32_nearest/f32_nearest_param.wat b/tests/disas/winch/x64/f32_nearest/f32_nearest_param.wat index ddb825e09b17..b357a209bc25 100644 --- a/tests/disas/winch/x64/f32_nearest/f32_nearest_param.wat +++ b/tests/disas/winch/x64/f32_nearest/f32_nearest_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f32_neg/f32_neg_const.wat b/tests/disas/winch/x64/f32_neg/f32_neg_const.wat index d53966d2b5ee..0b76a0cedd93 100644 --- a/tests/disas/winch/x64/f32_neg/f32_neg_const.wat +++ b/tests/disas/winch/x64/f32_neg/f32_neg_const.wat @@ -11,25 +11,24 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm0 ;; movl $0x80000000, %r11d ;; movd %r11d, %xmm15 ;; xorps %xmm15, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) -;; 4e: addb %al, (%rax) -;; 50: retq +;; 49: ud2 +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %al, %bl ;; 51: cmc ;; 52: testb $0xbf, %al diff --git a/tests/disas/winch/x64/f32_neg/f32_neg_param.wat b/tests/disas/winch/x64/f32_neg/f32_neg_param.wat index 9e38bf8d350a..c4911e20b40c 100644 --- a/tests/disas/winch/x64/f32_neg/f32_neg_param.wat +++ b/tests/disas/winch/x64/f32_neg/f32_neg_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/f32_reinterpret_i32/const.wat b/tests/disas/winch/x64/f32_reinterpret_i32/const.wat index f4cef682d430..a977fb9cd29a 100644 --- a/tests/disas/winch/x64/f32_reinterpret_i32/const.wat +++ b/tests/disas/winch/x64/f32_reinterpret_i32/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/f32_reinterpret_i32/locals.wat b/tests/disas/winch/x64/f32_reinterpret_i32/locals.wat index 24f6aa51b744..b45e41043136 100644 --- a/tests/disas/winch/x64/f32_reinterpret_i32/locals.wat +++ b/tests/disas/winch/x64/f32_reinterpret_i32/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/f32_reinterpret_i32/params.wat b/tests/disas/winch/x64/f32_reinterpret_i32/params.wat index 57e2bca734f8..475aba133046 100644 --- a/tests/disas/winch/x64/f32_reinterpret_i32/params.wat +++ b/tests/disas/winch/x64/f32_reinterpret_i32/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/f32_reinterpret_i32/ret_int.wat b/tests/disas/winch/x64/f32_reinterpret_i32/ret_int.wat index 82a97b8d3fb0..80724652211f 100644 --- a/tests/disas/winch/x64/f32_reinterpret_i32/ret_int.wat +++ b/tests/disas/winch/x64/f32_reinterpret_i32/ret_int.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/f32_reinterpret_i32/spilled.wat b/tests/disas/winch/x64/f32_reinterpret_i32/spilled.wat index b7a9a2f8e8d0..ac0bd627c7ea 100644 --- a/tests/disas/winch/x64/f32_reinterpret_i32/spilled.wat +++ b/tests/disas/winch/x64/f32_reinterpret_i32/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/f32_sqrt/f32_sqrt_const.wat b/tests/disas/winch/x64/f32_sqrt/f32_sqrt_const.wat index d37417b99920..9714f332447e 100644 --- a/tests/disas/winch/x64/f32_sqrt/f32_sqrt_const.wat +++ b/tests/disas/winch/x64/f32_sqrt/f32_sqrt_const.wat @@ -11,20 +11,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0xd(%rip), %xmm0 +;; movss 0xc(%rip), %xmm0 ;; sqrtss %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 -;; 3f: addb %al, %bl +;; 3e: ud2 +;; 40: retq ;; 41: cmc ;; 42: testb $0x3f, %al diff --git a/tests/disas/winch/x64/f32_sqrt/f32_sqrt_param.wat b/tests/disas/winch/x64/f32_sqrt/f32_sqrt_param.wat index 38764f30efba..c9773035940d 100644 --- a/tests/disas/winch/x64/f32_sqrt/f32_sqrt_param.wat +++ b/tests/disas/winch/x64/f32_sqrt/f32_sqrt_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/f32_sub/const.wat b/tests/disas/winch/x64/f32_sub/const.wat index 48daf4098ade..7aafe4de8840 100644 --- a/tests/disas/winch/x64/f32_sub/const.wat +++ b/tests/disas/winch/x64/f32_sub/const.wat @@ -12,26 +12,26 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 -;; movss 0x1d(%rip), %xmm1 +;; movss 0x1c(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm1 ;; subss %xmm0, %xmm1 ;; movaps %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) -;; 4e: addb %al, (%rax) -;; 50: int $0xcc +;; 49: ud2 +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %cl, %ch +;; 51: int3 ;; 52: orb $0x40, %al ;; 54: addb %al, (%rax) ;; 56: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f32_sub/locals.wat b/tests/disas/winch/x64/f32_sub/locals.wat index c8afe6e42f29..28fa4625036c 100644 --- a/tests/disas/winch/x64/f32_sub/locals.wat +++ b/tests/disas/winch/x64/f32_sub/locals.wat @@ -21,18 +21,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) -;; movss 0x33(%rip), %xmm0 +;; movss 0x32(%rip), %xmm0 ;; movss %xmm0, 0xc(%rsp) -;; movss 0x2d(%rip), %xmm0 +;; movss 0x2c(%rip), %xmm0 ;; movss %xmm0, 8(%rsp) ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 @@ -41,7 +41,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 -;; 6c: addb %al, (%rax) -;; 6e: addb %al, (%rax) -;; 70: int $0xcc +;; 6b: ud2 +;; 6d: addb %al, (%rax) +;; 6f: addb %cl, %ch +;; 71: int3 diff --git a/tests/disas/winch/x64/f32_sub/params.wat b/tests/disas/winch/x64/f32_sub/params.wat index bbfb9b4923fd..1643bdb66727 100644 --- a/tests/disas/winch/x64/f32_sub/params.wat +++ b/tests/disas/winch/x64/f32_sub/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/f32_trunc/f32_trunc_const_sse41.wat b/tests/disas/winch/x64/f32_trunc/f32_trunc_const_sse41.wat index 7c574e2fc87c..83e3c0933a72 100644 --- a/tests/disas/winch/x64/f32_trunc/f32_trunc_const_sse41.wat +++ b/tests/disas/winch/x64/f32_trunc/f32_trunc_const_sse41.wat @@ -12,23 +12,23 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x15(%rip), %xmm0 +;; movss 0x14(%rip), %xmm0 ;; roundss $3, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %al, %bl +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) +;; 48: retq ;; 49: cmc ;; 4a: testb $0xbf, %al diff --git a/tests/disas/winch/x64/f32_trunc/f32_trunc_param.wat b/tests/disas/winch/x64/f32_trunc/f32_trunc_param.wat index 15a663ca7fd4..6354b789a339 100644 --- a/tests/disas/winch/x64/f32_trunc/f32_trunc_param.wat +++ b/tests/disas/winch/x64/f32_trunc/f32_trunc_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f32_trunc/f32_trunc_param_sse41.wat b/tests/disas/winch/x64/f32_trunc/f32_trunc_param_sse41.wat index 2c34d929675c..cea498d961e9 100644 --- a/tests/disas/winch/x64/f32_trunc/f32_trunc_param_sse41.wat +++ b/tests/disas/winch/x64/f32_trunc/f32_trunc_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f64_abs/f64_abs_const.wat b/tests/disas/winch/x64/f64_abs/f64_abs_const.wat index 4e584c09d964..48cc56a585f0 100644 --- a/tests/disas/winch/x64/f64_abs/f64_abs_const.wat +++ b/tests/disas/winch/x64/f64_abs/f64_abs_const.wat @@ -11,22 +11,19 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm0 ;; movabsq $0x7fffffffffffffff, %r11 ;; movq %r11, %xmm15 ;; andpd %xmm15, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 -;; 4f: addb %bl, (%rdi) -;; 51: testl %ebp, %ebx -;; 53: pushq %rcx +;; 4e: ud2 diff --git a/tests/disas/winch/x64/f64_abs/f64_abs_param.wat b/tests/disas/winch/x64/f64_abs/f64_abs_param.wat index 8483eb7ce052..c7ff2cfdabbf 100644 --- a/tests/disas/winch/x64/f64_abs/f64_abs_param.wat +++ b/tests/disas/winch/x64/f64_abs/f64_abs_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/f64_add/const.wat b/tests/disas/winch/x64/f64_add/const.wat index 3ffd678137cc..7378a5184e40 100644 --- a/tests/disas/winch/x64/f64_add/const.wat +++ b/tests/disas/winch/x64/f64_add/const.wat @@ -12,30 +12,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 -;; movsd 0x1d(%rip), %xmm1 +;; movsd 0x1c(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm1 ;; addsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %bl, -0x66666667(%rdx) -;; 55: cltd -;; 56: addl %eax, -0x66(%rax) -;; 59: cltd -;; 5a: cltd -;; 5b: cltd -;; 5c: cltd -;; 5d: cltd -;; 5e: int1 +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_add/locals.wat b/tests/disas/winch/x64/f64_add/locals.wat index a4dc97e09c53..52dc635fa6c6 100644 --- a/tests/disas/winch/x64/f64_add/locals.wat +++ b/tests/disas/winch/x64/f64_add/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x30(%rip), %xmm0 +;; movsd 0x2f(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x2a(%rip), %xmm0 +;; movsd 0x29(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -43,5 +43,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 -;; 6e: addb %al, (%rax) +;; 6d: ud2 +;; 6f: addb %bl, -0x66666667(%rdx) +;; 75: cltd +;; 76: int1 diff --git a/tests/disas/winch/x64/f64_add/params.wat b/tests/disas/winch/x64/f64_add/params.wat index 00d454d66af1..eb764810533f 100644 --- a/tests/disas/winch/x64/f64_add/params.wat +++ b/tests/disas/winch/x64/f64_add/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x50 -;; 1b: movq %rdi, %r14 +;; ja 0x51 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 50: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/f64_ceil/f64_ceil_const_sse41.wat b/tests/disas/winch/x64/f64_ceil/f64_ceil_const_sse41.wat index 9f7671fd28ba..2a60193d7097 100644 --- a/tests/disas/winch/x64/f64_ceil/f64_ceil_const_sse41.wat +++ b/tests/disas/winch/x64/f64_ceil/f64_ceil_const_sse41.wat @@ -12,23 +12,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x15(%rip), %xmm0 +;; movsd 0x14(%rip), %xmm0 ;; roundsd $2, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %bl, (%rdi) -;; 49: testl %ebp, %ebx -;; 4b: pushq %rcx +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_ceil/f64_ceil_param.wat b/tests/disas/winch/x64/f64_ceil/f64_ceil_param.wat index 85d81bc5e05a..ede75cebc9fe 100644 --- a/tests/disas/winch/x64/f64_ceil/f64_ceil_param.wat +++ b/tests/disas/winch/x64/f64_ceil/f64_ceil_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f64_ceil/f64_ceil_param_sse41.wat b/tests/disas/winch/x64/f64_ceil/f64_ceil_param_sse41.wat index 820c803205bc..98b94d179112 100644 --- a/tests/disas/winch/x64/f64_ceil/f64_ceil_param_sse41.wat +++ b/tests/disas/winch/x64/f64_ceil/f64_ceil_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f64_const/call_id.wat b/tests/disas/winch/x64/f64_const/call_id.wat index 5712752d2ded..2be65a9fce52 100644 --- a/tests/disas/winch/x64/f64_const/call_id.wat +++ b/tests/disas/winch/x64/f64_const/call_id.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -22,31 +22,28 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x89 -;; 5b: movq %rdi, %r14 +;; ja 0x9a +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq %r14, %rdi ;; movq %r14, %rsi -;; movsd 0x17(%rip), %xmm0 +;; movsd 0x16(%rip), %xmm0 ;; callq 0 ;; movq 8(%rsp), %r14 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 89: ud2 -;; 8b: addb %al, (%rax) -;; 8d: addb %al, (%rax) -;; 8f: addb %bl, (%rdi) -;; 91: testl %ebp, %ebx -;; 93: pushq %rcx +;; 9a: ud2 +;; 9c: addb %al, (%rax) +;; 9e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_const/id.wat b/tests/disas/winch/x64/f64_const/id.wat index b12a6b089af4..106e758eed0c 100644 --- a/tests/disas/winch/x64/f64_const/id.wat +++ b/tests/disas/winch/x64/f64_const/id.wat @@ -8,11 +8,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -21,4 +21,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_s/const.wat b/tests/disas/winch/x64/f64_convert_i32_s/const.wat index f89e4c292e72..155d23aecdc3 100644 --- a/tests/disas/winch/x64/f64_convert_i32_s/const.wat +++ b/tests/disas/winch/x64/f64_convert_i32_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_s/locals.wat b/tests/disas/winch/x64/f64_convert_i32_s/locals.wat index 6f54b6ca53e4..88de4b6764cb 100644 --- a/tests/disas/winch/x64/f64_convert_i32_s/locals.wat +++ b/tests/disas/winch/x64/f64_convert_i32_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_s/params.wat b/tests/disas/winch/x64/f64_convert_i32_s/params.wat index d75ed2bd0c59..9bec05e4a313 100644 --- a/tests/disas/winch/x64/f64_convert_i32_s/params.wat +++ b/tests/disas/winch/x64/f64_convert_i32_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_s/spilled.wat b/tests/disas/winch/x64/f64_convert_i32_s/spilled.wat index a565924173de..ec32c5bb1b66 100644 --- a/tests/disas/winch/x64/f64_convert_i32_s/spilled.wat +++ b/tests/disas/winch/x64/f64_convert_i32_s/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_u/const.wat b/tests/disas/winch/x64/f64_convert_i32_u/const.wat index ddda5fb25d95..5fdd8cd9c1a8 100644 --- a/tests/disas/winch/x64/f64_convert_i32_u/const.wat +++ b/tests/disas/winch/x64/f64_convert_i32_u/const.wat @@ -11,21 +11,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x66 -;; 1b: movq %rdi, %r14 +;; ja 0x67 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -35,4 +35,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 66: ud2 +;; 67: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_u/locals.wat b/tests/disas/winch/x64/f64_convert_i32_u/locals.wat index 7c3a2810d840..3e5d4f978450 100644 --- a/tests/disas/winch/x64/f64_convert_i32_u/locals.wat +++ b/tests/disas/winch/x64/f64_convert_i32_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6f -;; 1b: movq %rdi, %r14 +;; ja 0x70 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,10 +25,10 @@ ;; movl 0xc(%rsp), %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x4f -;; 45: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x69 -;; 4f: movq %rcx, %r11 +;; jl 0x50 +;; 46: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x6a +;; 50: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -38,4 +38,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6f: ud2 +;; 70: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_u/params.wat b/tests/disas/winch/x64/f64_convert_i32_u/params.wat index 5fe5801b57ba..8433981e0c15 100644 --- a/tests/disas/winch/x64/f64_convert_i32_u/params.wat +++ b/tests/disas/winch/x64/f64_convert_i32_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,10 +23,10 @@ ;; movl 0xc(%rsp), %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x4a -;; 40: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x64 -;; 4a: movq %rcx, %r11 +;; jl 0x4b +;; 41: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x65 +;; 4b: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -36,4 +36,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 +;; 6b: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i32_u/spilled.wat b/tests/disas/winch/x64/f64_convert_i32_u/spilled.wat index 129aebcf7b33..27c58a36299e 100644 --- a/tests/disas/winch/x64/f64_convert_i32_u/spilled.wat +++ b/tests/disas/winch/x64/f64_convert_i32_u/spilled.wat @@ -13,21 +13,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 1b: movq %rdi, %r14 +;; ja 0x79 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl %ecx, %ecx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -41,4 +41,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 78: ud2 +;; 79: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_s/const.wat b/tests/disas/winch/x64/f64_convert_i64_s/const.wat index 893adef86c10..3c975e651e3c 100644 --- a/tests/disas/winch/x64/f64_convert_i64_s/const.wat +++ b/tests/disas/winch/x64/f64_convert_i64_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_s/locals.wat b/tests/disas/winch/x64/f64_convert_i64_s/locals.wat index 58cf53418cba..b8de5abac8b9 100644 --- a/tests/disas/winch/x64/f64_convert_i64_s/locals.wat +++ b/tests/disas/winch/x64/f64_convert_i64_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_s/params.wat b/tests/disas/winch/x64/f64_convert_i64_s/params.wat index 9b03d4df7e67..059512f03ded 100644 --- a/tests/disas/winch/x64/f64_convert_i64_s/params.wat +++ b/tests/disas/winch/x64/f64_convert_i64_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_s/spilled.wat b/tests/disas/winch/x64/f64_convert_i64_s/spilled.wat index bd74e70c1a47..0fecd32bb7c2 100644 --- a/tests/disas/winch/x64/f64_convert_i64_s/spilled.wat +++ b/tests/disas/winch/x64/f64_convert_i64_s/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_u/const.wat b/tests/disas/winch/x64/f64_convert_i64_u/const.wat index 29b0fc0b0823..0f3c941d70dc 100644 --- a/tests/disas/winch/x64/f64_convert_i64_u/const.wat +++ b/tests/disas/winch/x64/f64_convert_i64_u/const.wat @@ -11,20 +11,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x66 -;; 1b: movq %rdi, %r14 +;; ja 0x67 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $1, %rcx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -34,4 +34,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 66: ud2 +;; 67: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_u/locals.wat b/tests/disas/winch/x64/f64_convert_i64_u/locals.wat index 89ceb3907d93..3cd4edbb5e1a 100644 --- a/tests/disas/winch/x64/f64_convert_i64_u/locals.wat +++ b/tests/disas/winch/x64/f64_convert_i64_u/locals.wat @@ -13,21 +13,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6e -;; 1b: movq %rdi, %r14 +;; ja 0x6f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) ;; movq 8(%rsp), %rcx ;; cmpq $0, %rcx -;; jl 0x4e -;; 44: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x68 -;; 4e: movq %rcx, %r11 +;; jl 0x4f +;; 45: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x69 +;; 4f: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -37,4 +37,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6e: ud2 +;; 6f: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_u/params.wat b/tests/disas/winch/x64/f64_convert_i64_u/params.wat index 99c7d3cf970d..464fb6a260e3 100644 --- a/tests/disas/winch/x64/f64_convert_i64_u/params.wat +++ b/tests/disas/winch/x64/f64_convert_i64_u/params.wat @@ -11,21 +11,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6a -;; 1b: movq %rdi, %r14 +;; ja 0x6b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq %rdx, 8(%rsp) ;; movq 8(%rsp), %rcx ;; cmpq $0, %rcx -;; jl 0x4a -;; 40: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x64 -;; 4a: movq %rcx, %r11 +;; jl 0x4b +;; 41: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x65 +;; 4b: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -35,4 +35,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6a: ud2 +;; 6b: ud2 diff --git a/tests/disas/winch/x64/f64_convert_i64_u/spilled.wat b/tests/disas/winch/x64/f64_convert_i64_u/spilled.wat index a4589c1ca6a9..b6e1f132ddaa 100644 --- a/tests/disas/winch/x64/f64_convert_i64_u/spilled.wat +++ b/tests/disas/winch/x64/f64_convert_i64_u/spilled.wat @@ -13,20 +13,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 1b: movq %rdi, %r14 +;; ja 0x79 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $1, %rcx ;; cmpq $0, %rcx -;; jl 0x46 -;; 3c: cvtsi2sdq %rcx, %xmm0 -;; jmp 0x60 -;; 46: movq %rcx, %r11 +;; jl 0x47 +;; 3d: cvtsi2sdq %rcx, %xmm0 +;; jmp 0x61 +;; 47: movq %rcx, %r11 ;; shrq $1, %r11 ;; movq %rcx, %rax ;; andq $1, %rax @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 78: ud2 +;; 79: ud2 diff --git a/tests/disas/winch/x64/f64_copysign/const.wat b/tests/disas/winch/x64/f64_copysign/const.wat index de3c43a00716..22ef1d5162b9 100644 --- a/tests/disas/winch/x64/f64_copysign/const.wat +++ b/tests/disas/winch/x64/f64_copysign/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x67 -;; 1b: movq %rdi, %r14 +;; ja 0x68 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x3d(%rip), %xmm0 -;; movsd 0x3d(%rip), %xmm1 +;; movsd 0x3c(%rip), %xmm0 +;; movsd 0x3c(%rip), %xmm1 ;; movabsq $9223372036854775808, %r11 ;; movq %r11, %xmm15 ;; andpd %xmm15, %xmm0 @@ -32,16 +32,7 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 67: ud2 -;; 69: addb %al, (%rax) -;; 6b: addb %al, (%rax) -;; 6d: addb %al, (%rax) -;; 6f: addb %bl, -0x66666667(%rdx) -;; 75: cltd -;; 76: addl %eax, -0x66(%rax) -;; 79: cltd -;; 7a: cltd -;; 7b: cltd -;; 7c: cltd -;; 7d: cltd -;; 7e: int1 +;; 68: ud2 +;; 6a: addb %al, (%rax) +;; 6c: addb %al, (%rax) +;; 6e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_copysign/locals.wat b/tests/disas/winch/x64/f64_copysign/locals.wat index b89df0c4ee40..d694f72a5119 100644 --- a/tests/disas/winch/x64/f64_copysign/locals.wat +++ b/tests/disas/winch/x64/f64_copysign/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8a -;; 1b: movq %rdi, %r14 +;; ja 0x8b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x50(%rip), %xmm0 +;; movsd 0x4f(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x4a(%rip), %xmm0 +;; movsd 0x49(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -48,6 +48,11 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8a: ud2 -;; 8c: addb %al, (%rax) -;; 8e: addb %al, (%rax) +;; 8b: ud2 +;; 8d: addb %al, (%rax) +;; 8f: addb %bl, -0x66666667(%rdx) +;; 95: cltd +;; 96: int1 +;; 97: movl $0x9999999a, %edi +;; 9c: cltd +;; 9d: cltd diff --git a/tests/disas/winch/x64/f64_copysign/params.wat b/tests/disas/winch/x64/f64_copysign/params.wat index ef2066e7f71e..14e16e76e973 100644 --- a/tests/disas/winch/x64/f64_copysign/params.wat +++ b/tests/disas/winch/x64/f64_copysign/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6e -;; 1b: movq %rdi, %r14 +;; ja 0x6f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -34,4 +34,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6e: ud2 +;; 6f: ud2 diff --git a/tests/disas/winch/x64/f64_div/const.wat b/tests/disas/winch/x64/f64_div/const.wat index 0277d1b76590..c353d6d7ecd9 100644 --- a/tests/disas/winch/x64/f64_div/const.wat +++ b/tests/disas/winch/x64/f64_div/const.wat @@ -12,30 +12,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 -;; movsd 0x1d(%rip), %xmm1 +;; movsd 0x1c(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm1 ;; divsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %bl, -0x66666667(%rdx) -;; 55: cltd -;; 56: addl %eax, -0x66(%rax) -;; 59: cltd -;; 5a: cltd -;; 5b: cltd -;; 5c: cltd -;; 5d: cltd -;; 5e: int1 +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_div/locals.wat b/tests/disas/winch/x64/f64_div/locals.wat index e70bfbf16e76..1da9784c626d 100644 --- a/tests/disas/winch/x64/f64_div/locals.wat +++ b/tests/disas/winch/x64/f64_div/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x30(%rip), %xmm0 +;; movsd 0x2f(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x2a(%rip), %xmm0 +;; movsd 0x29(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -43,5 +43,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 -;; 6e: addb %al, (%rax) +;; 6d: ud2 +;; 6f: addb %bl, -0x66666667(%rdx) +;; 75: cltd +;; 76: int1 diff --git a/tests/disas/winch/x64/f64_div/params.wat b/tests/disas/winch/x64/f64_div/params.wat index 45aebc48eb06..078d3c6ff0f5 100644 --- a/tests/disas/winch/x64/f64_div/params.wat +++ b/tests/disas/winch/x64/f64_div/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x50 -;; 1b: movq %rdi, %r14 +;; ja 0x51 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 50: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/f64_eq/const.wat b/tests/disas/winch/x64/f64_eq/const.wat index 52baa7ae50f7..99b037c0f7ab 100644 --- a/tests/disas/winch/x64/f64_eq/const.wat +++ b/tests/disas/winch/x64/f64_eq/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x2d(%rip), %xmm0 -;; movsd 0x2d(%rip), %xmm1 +;; movsd 0x2c(%rip), %xmm0 +;; movsd 0x2c(%rip), %xmm1 ;; ucomisd %xmm0, %xmm1 ;; movl $0, %eax ;; sete %al @@ -31,14 +31,5 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 -;; 5d: addb %al, (%rax) -;; 5f: addb %bl, -0x66666667(%rdx) -;; 65: cltd -;; 66: addl %eax, -0x66(%rax) -;; 69: cltd -;; 6a: cltd -;; 6b: cltd -;; 6c: cltd -;; 6d: cltd -;; 6e: int1 +;; 5c: ud2 +;; 5e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_eq/locals.wat b/tests/disas/winch/x64/f64_eq/locals.wat index e37fa97e5660..8f3f1740a94b 100644 --- a/tests/disas/winch/x64/f64_eq/locals.wat +++ b/tests/disas/winch/x64/f64_eq/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7e -;; 1b: movq %rdi, %r14 +;; ja 0x7f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x40(%rip), %xmm0 +;; movsd 0x47(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x3a(%rip), %xmm0 +;; movsd 0x41(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -47,4 +47,10 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7e: ud2 +;; 7f: ud2 +;; 81: addb %al, (%rax) +;; 83: addb %al, (%rax) +;; 85: addb %al, (%rax) +;; 87: addb %bl, -0x66666667(%rdx) +;; 8d: cltd +;; 8e: int1 diff --git a/tests/disas/winch/x64/f64_eq/params.wat b/tests/disas/winch/x64/f64_eq/params.wat index acd66e9db9b1..b162fc9bf5dc 100644 --- a/tests/disas/winch/x64/f64_eq/params.wat +++ b/tests/disas/winch/x64/f64_eq/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/f64_floor/f64_floor_const_sse41.wat b/tests/disas/winch/x64/f64_floor/f64_floor_const_sse41.wat index e3cc19067543..bff755e7631b 100644 --- a/tests/disas/winch/x64/f64_floor/f64_floor_const_sse41.wat +++ b/tests/disas/winch/x64/f64_floor/f64_floor_const_sse41.wat @@ -12,23 +12,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x15(%rip), %xmm0 +;; movsd 0x14(%rip), %xmm0 ;; roundsd $1, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %bl, (%rdi) -;; 49: testl %ebp, %ebx -;; 4b: pushq %rcx +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_floor/f64_floor_param.wat b/tests/disas/winch/x64/f64_floor/f64_floor_param.wat index 1c9c6d158d3a..2babf3bb0b7e 100644 --- a/tests/disas/winch/x64/f64_floor/f64_floor_param.wat +++ b/tests/disas/winch/x64/f64_floor/f64_floor_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f64_floor/f64_floor_param_sse41.wat b/tests/disas/winch/x64/f64_floor/f64_floor_param_sse41.wat index 080b9d6f1905..5cf1db18b096 100644 --- a/tests/disas/winch/x64/f64_floor/f64_floor_param_sse41.wat +++ b/tests/disas/winch/x64/f64_floor/f64_floor_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f64_ge/const.wat b/tests/disas/winch/x64/f64_ge/const.wat index 3272307c7125..c104eb9aaf55 100644 --- a/tests/disas/winch/x64/f64_ge/const.wat +++ b/tests/disas/winch/x64/f64_ge/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x2d(%rip), %xmm0 -;; movsd 0x2d(%rip), %xmm1 +;; movsd 0x2c(%rip), %xmm0 +;; movsd 0x2c(%rip), %xmm1 ;; ucomisd %xmm0, %xmm1 ;; movl $0, %eax ;; setae %al @@ -31,14 +31,5 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 -;; 5d: addb %al, (%rax) -;; 5f: addb %bl, -0x66666667(%rdx) -;; 65: cltd -;; 66: addl %eax, -0x66(%rax) -;; 69: cltd -;; 6a: cltd -;; 6b: cltd -;; 6c: cltd -;; 6d: cltd -;; 6e: int1 +;; 5c: ud2 +;; 5e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_ge/locals.wat b/tests/disas/winch/x64/f64_ge/locals.wat index 2842be67fbcb..76940aab92ff 100644 --- a/tests/disas/winch/x64/f64_ge/locals.wat +++ b/tests/disas/winch/x64/f64_ge/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7e -;; 1b: movq %rdi, %r14 +;; ja 0x7f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x40(%rip), %xmm0 +;; movsd 0x47(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x3a(%rip), %xmm0 +;; movsd 0x41(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -47,4 +47,10 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7e: ud2 +;; 7f: ud2 +;; 81: addb %al, (%rax) +;; 83: addb %al, (%rax) +;; 85: addb %al, (%rax) +;; 87: addb %bl, -0x66666667(%rdx) +;; 8d: cltd +;; 8e: int1 diff --git a/tests/disas/winch/x64/f64_ge/params.wat b/tests/disas/winch/x64/f64_ge/params.wat index 3daa9b5c0d6a..9a933fb61ef6 100644 --- a/tests/disas/winch/x64/f64_ge/params.wat +++ b/tests/disas/winch/x64/f64_ge/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/f64_gt/const.wat b/tests/disas/winch/x64/f64_gt/const.wat index 6190cc35352b..38f5b4e9a4ef 100644 --- a/tests/disas/winch/x64/f64_gt/const.wat +++ b/tests/disas/winch/x64/f64_gt/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x2d(%rip), %xmm0 -;; movsd 0x2d(%rip), %xmm1 +;; movsd 0x2c(%rip), %xmm0 +;; movsd 0x2c(%rip), %xmm1 ;; ucomisd %xmm0, %xmm1 ;; movl $0, %eax ;; seta %al @@ -31,14 +31,5 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 -;; 5d: addb %al, (%rax) -;; 5f: addb %bl, -0x66666667(%rdx) -;; 65: cltd -;; 66: addl %eax, -0x66(%rax) -;; 69: cltd -;; 6a: cltd -;; 6b: cltd -;; 6c: cltd -;; 6d: cltd -;; 6e: int1 +;; 5c: ud2 +;; 5e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_gt/locals.wat b/tests/disas/winch/x64/f64_gt/locals.wat index bd52ed34aa9f..621ef974ff71 100644 --- a/tests/disas/winch/x64/f64_gt/locals.wat +++ b/tests/disas/winch/x64/f64_gt/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7e -;; 1b: movq %rdi, %r14 +;; ja 0x7f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x40(%rip), %xmm0 +;; movsd 0x47(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x3a(%rip), %xmm0 +;; movsd 0x41(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -47,4 +47,10 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7e: ud2 +;; 7f: ud2 +;; 81: addb %al, (%rax) +;; 83: addb %al, (%rax) +;; 85: addb %al, (%rax) +;; 87: addb %bl, -0x66666667(%rdx) +;; 8d: cltd +;; 8e: int1 diff --git a/tests/disas/winch/x64/f64_gt/params.wat b/tests/disas/winch/x64/f64_gt/params.wat index cb55a02f5183..41653ea7f6f6 100644 --- a/tests/disas/winch/x64/f64_gt/params.wat +++ b/tests/disas/winch/x64/f64_gt/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/f64_le/const.wat b/tests/disas/winch/x64/f64_le/const.wat index 1f0333ca1325..fe42d45ca5ca 100644 --- a/tests/disas/winch/x64/f64_le/const.wat +++ b/tests/disas/winch/x64/f64_le/const.wat @@ -12,20 +12,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 -;; movsd 0x1d(%rip), %xmm1 +;; movsd 0x24(%rip), %xmm0 +;; movsd 0x24(%rip), %xmm1 ;; ucomisd %xmm1, %xmm0 ;; movl $0, %eax ;; setae %al ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 +;; 4f: ud2 +;; 51: addb %al, (%rax) +;; 53: addb %al, (%rax) +;; 55: addb %al, (%rax) +;; 57: addb %bl, -0x66666667(%rdx) +;; 5d: cltd +;; 5e: addl %eax, -0x66(%rax) +;; 61: cltd +;; 62: cltd +;; 63: cltd +;; 64: cltd +;; 65: cltd +;; 66: int1 diff --git a/tests/disas/winch/x64/f64_le/locals.wat b/tests/disas/winch/x64/f64_le/locals.wat index 8f8fd67ae4cb..363b552420ff 100644 --- a/tests/disas/winch/x64/f64_le/locals.wat +++ b/tests/disas/winch/x64/f64_le/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 1b: movq %rdi, %r14 +;; ja 0x72 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x38(%rip), %xmm0 +;; movsd 0x37(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x32(%rip), %xmm0 +;; movsd 0x31(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -44,9 +44,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 71: ud2 -;; 73: addb %al, (%rax) -;; 75: addb %al, (%rax) -;; 77: addb %bl, -0x66666667(%rdx) -;; 7d: cltd -;; 7e: int1 +;; 72: ud2 +;; 74: addb %al, (%rax) +;; 76: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_le/params.wat b/tests/disas/winch/x64/f64_le/params.wat index 8f8fd67ae4cb..363b552420ff 100644 --- a/tests/disas/winch/x64/f64_le/params.wat +++ b/tests/disas/winch/x64/f64_le/params.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 1b: movq %rdi, %r14 +;; ja 0x72 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x38(%rip), %xmm0 +;; movsd 0x37(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x32(%rip), %xmm0 +;; movsd 0x31(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -44,9 +44,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 71: ud2 -;; 73: addb %al, (%rax) -;; 75: addb %al, (%rax) -;; 77: addb %bl, -0x66666667(%rdx) -;; 7d: cltd -;; 7e: int1 +;; 72: ud2 +;; 74: addb %al, (%rax) +;; 76: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_lt/const.wat b/tests/disas/winch/x64/f64_lt/const.wat index a87a64568252..32966facd60c 100644 --- a/tests/disas/winch/x64/f64_lt/const.wat +++ b/tests/disas/winch/x64/f64_lt/const.wat @@ -12,20 +12,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 -;; movsd 0x1d(%rip), %xmm1 +;; movsd 0x24(%rip), %xmm0 +;; movsd 0x24(%rip), %xmm1 ;; ucomisd %xmm1, %xmm0 ;; movl $0, %eax ;; seta %al ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 +;; 4f: ud2 +;; 51: addb %al, (%rax) +;; 53: addb %al, (%rax) +;; 55: addb %al, (%rax) +;; 57: addb %bl, -0x66666667(%rdx) +;; 5d: cltd +;; 5e: addl %eax, -0x66(%rax) +;; 61: cltd +;; 62: cltd +;; 63: cltd +;; 64: cltd +;; 65: cltd +;; 66: int1 diff --git a/tests/disas/winch/x64/f64_lt/locals.wat b/tests/disas/winch/x64/f64_lt/locals.wat index d71943e9e747..d35d7636ac72 100644 --- a/tests/disas/winch/x64/f64_lt/locals.wat +++ b/tests/disas/winch/x64/f64_lt/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 1b: movq %rdi, %r14 +;; ja 0x72 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x38(%rip), %xmm0 +;; movsd 0x37(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x32(%rip), %xmm0 +;; movsd 0x31(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -44,9 +44,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 71: ud2 -;; 73: addb %al, (%rax) -;; 75: addb %al, (%rax) -;; 77: addb %bl, -0x66666667(%rdx) -;; 7d: cltd -;; 7e: int1 +;; 72: ud2 +;; 74: addb %al, (%rax) +;; 76: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_lt/params.wat b/tests/disas/winch/x64/f64_lt/params.wat index 6a34ab7029cc..5b422f841075 100644 --- a/tests/disas/winch/x64/f64_lt/params.wat +++ b/tests/disas/winch/x64/f64_lt/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x55 -;; 1b: movq %rdi, %r14 +;; ja 0x56 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 55: ud2 +;; 56: ud2 diff --git a/tests/disas/winch/x64/f64_max/const.wat b/tests/disas/winch/x64/f64_max/const.wat index 016dec397f3b..a79649e27e80 100644 --- a/tests/disas/winch/x64/f64_max/const.wat +++ b/tests/disas/winch/x64/f64_max/const.wat @@ -12,27 +12,35 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x3d(%rip), %xmm0 -;; movsd 0x3d(%rip), %xmm1 +;; movsd 0x3c(%rip), %xmm0 +;; movsd 0x3c(%rip), %xmm1 ;; ucomisd %xmm0, %xmm1 -;; jne 0x5e -;; jp 0x54 -;; 4b: andpd %xmm0, %xmm1 -;; jmp 0x62 -;; 54: addsd %xmm0, %xmm1 -;; jp 0x62 -;; 5e: maxsd %xmm0, %xmm1 +;; jne 0x5f +;; jp 0x55 +;; 4c: andpd %xmm0, %xmm1 +;; jmp 0x63 +;; 55: addsd %xmm0, %xmm1 +;; jp 0x63 +;; 5f: maxsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 -;; 6e: addb %al, (%rax) +;; 6d: ud2 +;; 6f: addb %bl, -0x66666667(%rdx) +;; 75: cltd +;; 76: addl %eax, -0x66(%rax) +;; 79: cltd +;; 7a: cltd +;; 7b: cltd +;; 7c: cltd +;; 7d: cltd +;; 7e: int1 diff --git a/tests/disas/winch/x64/f64_max/locals.wat b/tests/disas/winch/x64/f64_max/locals.wat index f3c683e52166..cb84723914a7 100644 --- a/tests/disas/winch/x64/f64_max/locals.wat +++ b/tests/disas/winch/x64/f64_max/locals.wat @@ -21,39 +21,36 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8f -;; 1b: movq %rdi, %r14 +;; ja 0x90 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x58(%rip), %xmm0 +;; movsd 0x57(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x52(%rip), %xmm0 +;; movsd 0x51(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 ;; ucomisd %xmm0, %xmm1 -;; jne 0x81 -;; jp 0x77 -;; 6e: andpd %xmm0, %xmm1 -;; jmp 0x85 -;; 77: addsd %xmm0, %xmm1 -;; jp 0x85 -;; 81: maxsd %xmm0, %xmm1 +;; jne 0x82 +;; jp 0x78 +;; 6f: andpd %xmm0, %xmm1 +;; jmp 0x86 +;; 78: addsd %xmm0, %xmm1 +;; jp 0x86 +;; 82: maxsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8f: ud2 -;; 91: addb %al, (%rax) -;; 93: addb %al, (%rax) -;; 95: addb %al, (%rax) -;; 97: addb %bl, -0x66666667(%rdx) -;; 9d: cltd -;; 9e: int1 +;; 90: ud2 +;; 92: addb %al, (%rax) +;; 94: addb %al, (%rax) +;; 96: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_max/params.wat b/tests/disas/winch/x64/f64_max/params.wat index ef3ffd9deb77..e818c3be5c5b 100644 --- a/tests/disas/winch/x64/f64_max/params.wat +++ b/tests/disas/winch/x64/f64_max/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x73 -;; 1b: movq %rdi, %r14 +;; ja 0x74 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,15 +25,15 @@ ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 ;; ucomisd %xmm0, %xmm1 -;; jne 0x65 -;; jp 0x5b -;; 52: andpd %xmm0, %xmm1 -;; jmp 0x69 -;; 5b: addsd %xmm0, %xmm1 -;; jp 0x69 -;; 65: maxsd %xmm0, %xmm1 +;; jne 0x66 +;; jp 0x5c +;; 53: andpd %xmm0, %xmm1 +;; jmp 0x6a +;; 5c: addsd %xmm0, %xmm1 +;; jp 0x6a +;; 66: maxsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 73: ud2 +;; 74: ud2 diff --git a/tests/disas/winch/x64/f64_min/const.wat b/tests/disas/winch/x64/f64_min/const.wat index 3cdbe17016b9..9f8798f951ae 100644 --- a/tests/disas/winch/x64/f64_min/const.wat +++ b/tests/disas/winch/x64/f64_min/const.wat @@ -12,27 +12,35 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x3d(%rip), %xmm0 -;; movsd 0x3d(%rip), %xmm1 +;; movsd 0x3c(%rip), %xmm0 +;; movsd 0x3c(%rip), %xmm1 ;; ucomisd %xmm0, %xmm1 -;; jne 0x5e -;; jp 0x54 -;; 4b: orpd %xmm0, %xmm1 -;; jmp 0x62 -;; 54: addsd %xmm0, %xmm1 -;; jp 0x62 -;; 5e: minsd %xmm0, %xmm1 +;; jne 0x5f +;; jp 0x55 +;; 4c: orpd %xmm0, %xmm1 +;; jmp 0x63 +;; 55: addsd %xmm0, %xmm1 +;; jp 0x63 +;; 5f: minsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 -;; 6e: addb %al, (%rax) +;; 6d: ud2 +;; 6f: addb %bl, -0x66666667(%rdx) +;; 75: cltd +;; 76: addl %eax, -0x66(%rax) +;; 79: cltd +;; 7a: cltd +;; 7b: cltd +;; 7c: cltd +;; 7d: cltd +;; 7e: int1 diff --git a/tests/disas/winch/x64/f64_min/locals.wat b/tests/disas/winch/x64/f64_min/locals.wat index 2da36481ea1d..239b5d514340 100644 --- a/tests/disas/winch/x64/f64_min/locals.wat +++ b/tests/disas/winch/x64/f64_min/locals.wat @@ -21,39 +21,36 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8f -;; 1b: movq %rdi, %r14 +;; ja 0x90 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x58(%rip), %xmm0 +;; movsd 0x57(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x52(%rip), %xmm0 +;; movsd 0x51(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 ;; ucomisd %xmm0, %xmm1 -;; jne 0x81 -;; jp 0x77 -;; 6e: orpd %xmm0, %xmm1 -;; jmp 0x85 -;; 77: addsd %xmm0, %xmm1 -;; jp 0x85 -;; 81: minsd %xmm0, %xmm1 +;; jne 0x82 +;; jp 0x78 +;; 6f: orpd %xmm0, %xmm1 +;; jmp 0x86 +;; 78: addsd %xmm0, %xmm1 +;; jp 0x86 +;; 82: minsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8f: ud2 -;; 91: addb %al, (%rax) -;; 93: addb %al, (%rax) -;; 95: addb %al, (%rax) -;; 97: addb %bl, -0x66666667(%rdx) -;; 9d: cltd -;; 9e: int1 +;; 90: ud2 +;; 92: addb %al, (%rax) +;; 94: addb %al, (%rax) +;; 96: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_min/params.wat b/tests/disas/winch/x64/f64_min/params.wat index 12d130888258..81fe8fe53ebd 100644 --- a/tests/disas/winch/x64/f64_min/params.wat +++ b/tests/disas/winch/x64/f64_min/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x73 -;; 1b: movq %rdi, %r14 +;; ja 0x74 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,15 +25,15 @@ ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 ;; ucomisd %xmm0, %xmm1 -;; jne 0x65 -;; jp 0x5b -;; 52: orpd %xmm0, %xmm1 -;; jmp 0x69 -;; 5b: addsd %xmm0, %xmm1 -;; jp 0x69 -;; 65: minsd %xmm0, %xmm1 +;; jne 0x66 +;; jp 0x5c +;; 53: orpd %xmm0, %xmm1 +;; jmp 0x6a +;; 5c: addsd %xmm0, %xmm1 +;; jp 0x6a +;; 66: minsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 73: ud2 +;; 74: ud2 diff --git a/tests/disas/winch/x64/f64_mul/const.wat b/tests/disas/winch/x64/f64_mul/const.wat index 88ce38431b2e..62f5d4ff0787 100644 --- a/tests/disas/winch/x64/f64_mul/const.wat +++ b/tests/disas/winch/x64/f64_mul/const.wat @@ -12,30 +12,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 -;; movsd 0x1d(%rip), %xmm1 +;; movsd 0x1c(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm1 ;; mulsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %bl, -0x66666667(%rdx) -;; 55: cltd -;; 56: addl %eax, -0x66(%rax) -;; 59: cltd -;; 5a: cltd -;; 5b: cltd -;; 5c: cltd -;; 5d: cltd -;; 5e: int1 +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_mul/locals.wat b/tests/disas/winch/x64/f64_mul/locals.wat index d4ca122da439..cfdbf7f4b00b 100644 --- a/tests/disas/winch/x64/f64_mul/locals.wat +++ b/tests/disas/winch/x64/f64_mul/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x30(%rip), %xmm0 +;; movsd 0x2f(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x2a(%rip), %xmm0 +;; movsd 0x29(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -43,5 +43,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 -;; 6e: addb %al, (%rax) +;; 6d: ud2 +;; 6f: addb %bl, -0x66666667(%rdx) +;; 75: cltd +;; 76: int1 diff --git a/tests/disas/winch/x64/f64_mul/params.wat b/tests/disas/winch/x64/f64_mul/params.wat index 6a0ee16c5ff0..9197e159bdb0 100644 --- a/tests/disas/winch/x64/f64_mul/params.wat +++ b/tests/disas/winch/x64/f64_mul/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x50 -;; 1b: movq %rdi, %r14 +;; ja 0x51 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 50: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/f64_ne/const.wat b/tests/disas/winch/x64/f64_ne/const.wat index 8fc3e6fe6884..55e392c5a48d 100644 --- a/tests/disas/winch/x64/f64_ne/const.wat +++ b/tests/disas/winch/x64/f64_ne/const.wat @@ -12,16 +12,16 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x2d(%rip), %xmm0 -;; movsd 0x2d(%rip), %xmm1 +;; movsd 0x2c(%rip), %xmm0 +;; movsd 0x2c(%rip), %xmm1 ;; ucomisd %xmm0, %xmm1 ;; movl $0, %eax ;; setne %al @@ -31,14 +31,5 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 -;; 5d: addb %al, (%rax) -;; 5f: addb %bl, -0x66666667(%rdx) -;; 65: cltd -;; 66: addl %eax, -0x66(%rax) -;; 69: cltd -;; 6a: cltd -;; 6b: cltd -;; 6c: cltd -;; 6d: cltd -;; 6e: int1 +;; 5c: ud2 +;; 5e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_ne/locals.wat b/tests/disas/winch/x64/f64_ne/locals.wat index 00255a1e51fd..8e7162257d50 100644 --- a/tests/disas/winch/x64/f64_ne/locals.wat +++ b/tests/disas/winch/x64/f64_ne/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7e -;; 1b: movq %rdi, %r14 +;; ja 0x7f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x40(%rip), %xmm0 +;; movsd 0x47(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x3a(%rip), %xmm0 +;; movsd 0x41(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -47,4 +47,10 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7e: ud2 +;; 7f: ud2 +;; 81: addb %al, (%rax) +;; 83: addb %al, (%rax) +;; 85: addb %al, (%rax) +;; 87: addb %bl, -0x66666667(%rdx) +;; 8d: cltd +;; 8e: int1 diff --git a/tests/disas/winch/x64/f64_ne/params.wat b/tests/disas/winch/x64/f64_ne/params.wat index 84a01f3919cb..7df9591e1a57 100644 --- a/tests/disas/winch/x64/f64_ne/params.wat +++ b/tests/disas/winch/x64/f64_ne/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/f64_nearest/f64_nearest_const_sse41.wat b/tests/disas/winch/x64/f64_nearest/f64_nearest_const_sse41.wat index 1fb11ce99ab0..00791c583527 100644 --- a/tests/disas/winch/x64/f64_nearest/f64_nearest_const_sse41.wat +++ b/tests/disas/winch/x64/f64_nearest/f64_nearest_const_sse41.wat @@ -12,23 +12,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x15(%rip), %xmm0 +;; movsd 0x14(%rip), %xmm0 ;; roundsd $0, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %bl, (%rdi) -;; 49: testl %ebp, %ebx -;; 4b: pushq %rcx +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_nearest/f64_nearest_param.wat b/tests/disas/winch/x64/f64_nearest/f64_nearest_param.wat index a97dee25e041..3d26427e6c5e 100644 --- a/tests/disas/winch/x64/f64_nearest/f64_nearest_param.wat +++ b/tests/disas/winch/x64/f64_nearest/f64_nearest_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f64_nearest/f64_nearest_param_sse41.wat b/tests/disas/winch/x64/f64_nearest/f64_nearest_param_sse41.wat index 8534b826dfb4..4c4ecc7448ad 100644 --- a/tests/disas/winch/x64/f64_nearest/f64_nearest_param_sse41.wat +++ b/tests/disas/winch/x64/f64_nearest/f64_nearest_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f64_neg/f64_neg_const.wat b/tests/disas/winch/x64/f64_neg/f64_neg_const.wat index b94a507ef805..7c50738dcb8d 100644 --- a/tests/disas/winch/x64/f64_neg/f64_neg_const.wat +++ b/tests/disas/winch/x64/f64_neg/f64_neg_const.wat @@ -11,22 +11,19 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm0 ;; movabsq $9223372036854775808, %r11 ;; movq %r11, %xmm15 ;; xorpd %xmm15, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 -;; 4f: addb %bl, (%rdi) -;; 51: testl %ebp, %ebx -;; 53: pushq %rcx +;; 4e: ud2 diff --git a/tests/disas/winch/x64/f64_neg/f64_neg_param.wat b/tests/disas/winch/x64/f64_neg/f64_neg_param.wat index 7eebf41f6128..a0f8919497ca 100644 --- a/tests/disas/winch/x64/f64_neg/f64_neg_param.wat +++ b/tests/disas/winch/x64/f64_neg/f64_neg_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/f64_promote_f32/const.wat b/tests/disas/winch/x64/f64_promote_f32/const.wat index bf6007a5f926..2d093c0417a9 100644 --- a/tests/disas/winch/x64/f64_promote_f32/const.wat +++ b/tests/disas/winch/x64/f64_promote_f32/const.wat @@ -11,18 +11,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0xd(%rip), %xmm0 +;; movss 0xc(%rip), %xmm0 ;; cvtss2sd %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 -;; 3f: addb %al, (%rax) +;; 3e: ud2 +;; 40: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_promote_f32/locals.wat b/tests/disas/winch/x64/f64_promote_f32/locals.wat index 5a97ad1fed3a..ad8cc6361607 100644 --- a/tests/disas/winch/x64/f64_promote_f32/locals.wat +++ b/tests/disas/winch/x64/f64_promote_f32/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/f64_promote_f32/params.wat b/tests/disas/winch/x64/f64_promote_f32/params.wat index d8e2658cf37d..1824b4305416 100644 --- a/tests/disas/winch/x64/f64_promote_f32/params.wat +++ b/tests/disas/winch/x64/f64_promote_f32/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/f64_promote_f32/spilled.wat b/tests/disas/winch/x64/f64_promote_f32/spilled.wat index e23b0ef53ae7..0f2a3a71a608 100644 --- a/tests/disas/winch/x64/f64_promote_f32/spilled.wat +++ b/tests/disas/winch/x64/f64_promote_f32/spilled.wat @@ -13,15 +13,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x25(%rip), %xmm0 +;; movss 0x24(%rip), %xmm0 ;; cvtss2sd %xmm0, %xmm0 ;; subq $8, %rsp ;; movsd %xmm0, (%rsp) @@ -30,8 +30,8 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 -;; 51: addb %al, (%rax) -;; 53: addb %al, (%rax) -;; 55: addb %al, (%rax) -;; 57: addb %al, (%rax) +;; 50: ud2 +;; 52: addb %al, (%rax) +;; 54: addb %al, (%rax) +;; 56: addb %al, (%rax) +;; 58: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_reinterpret_i64/const.wat b/tests/disas/winch/x64/f64_reinterpret_i64/const.wat index 6fbb0d49c049..1cd3ea56a0ab 100644 --- a/tests/disas/winch/x64/f64_reinterpret_i64/const.wat +++ b/tests/disas/winch/x64/f64_reinterpret_i64/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/f64_reinterpret_i64/locals.wat b/tests/disas/winch/x64/f64_reinterpret_i64/locals.wat index 133adaa90357..f37c087c6d7d 100644 --- a/tests/disas/winch/x64/f64_reinterpret_i64/locals.wat +++ b/tests/disas/winch/x64/f64_reinterpret_i64/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/f64_reinterpret_i64/params.wat b/tests/disas/winch/x64/f64_reinterpret_i64/params.wat index 70e496b8d11c..d8af86e2e13f 100644 --- a/tests/disas/winch/x64/f64_reinterpret_i64/params.wat +++ b/tests/disas/winch/x64/f64_reinterpret_i64/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/f64_reinterpret_i64/ret_int.wat b/tests/disas/winch/x64/f64_reinterpret_i64/ret_int.wat index 4df7a8e36890..0b5fb2976092 100644 --- a/tests/disas/winch/x64/f64_reinterpret_i64/ret_int.wat +++ b/tests/disas/winch/x64/f64_reinterpret_i64/ret_int.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/f64_reinterpret_i64/spilled.wat b/tests/disas/winch/x64/f64_reinterpret_i64/spilled.wat index 406792977d8a..271a5f9c7601 100644 --- a/tests/disas/winch/x64/f64_reinterpret_i64/spilled.wat +++ b/tests/disas/winch/x64/f64_reinterpret_i64/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/f64_sqrt/f64_sqrt_const.wat b/tests/disas/winch/x64/f64_sqrt/f64_sqrt_const.wat index 6014fb412d8d..eedecd6c956a 100644 --- a/tests/disas/winch/x64/f64_sqrt/f64_sqrt_const.wat +++ b/tests/disas/winch/x64/f64_sqrt/f64_sqrt_const.wat @@ -11,20 +11,17 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0xd(%rip), %xmm0 +;; movsd 0xc(%rip), %xmm0 ;; sqrtsd %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 -;; 3f: addb %bl, (%rdi) -;; 41: testl %ebp, %ebx -;; 43: pushq %rcx +;; 3e: ud2 diff --git a/tests/disas/winch/x64/f64_sqrt/f64_sqrt_param.wat b/tests/disas/winch/x64/f64_sqrt/f64_sqrt_param.wat index 395ee90ce7c3..da6b43667bf0 100644 --- a/tests/disas/winch/x64/f64_sqrt/f64_sqrt_param.wat +++ b/tests/disas/winch/x64/f64_sqrt/f64_sqrt_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/f64_sub/const.wat b/tests/disas/winch/x64/f64_sub/const.wat index d02a9496d1d6..4d749ac564c9 100644 --- a/tests/disas/winch/x64/f64_sub/const.wat +++ b/tests/disas/winch/x64/f64_sub/const.wat @@ -12,30 +12,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 -;; movsd 0x1d(%rip), %xmm1 +;; movsd 0x1c(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm1 ;; subsd %xmm0, %xmm1 ;; movapd %xmm1, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %bl, -0x66666667(%rdx) -;; 55: cltd -;; 56: addl %eax, -0x66(%rax) -;; 59: cltd -;; 5a: cltd -;; 5b: cltd -;; 5c: cltd -;; 5d: cltd -;; 5e: int1 +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_sub/locals.wat b/tests/disas/winch/x64/f64_sub/locals.wat index a3504af30d56..1ee298ec388c 100644 --- a/tests/disas/winch/x64/f64_sub/locals.wat +++ b/tests/disas/winch/x64/f64_sub/locals.wat @@ -21,20 +21,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; xorq %r11, %r11 ;; movq %r11, 8(%rsp) ;; movq %r11, (%rsp) -;; movsd 0x30(%rip), %xmm0 +;; movsd 0x2f(%rip), %xmm0 ;; movsd %xmm0, 8(%rsp) -;; movsd 0x2a(%rip), %xmm0 +;; movsd 0x29(%rip), %xmm0 ;; movsd %xmm0, (%rsp) ;; movsd (%rsp), %xmm0 ;; movsd 8(%rsp), %xmm1 @@ -43,5 +43,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 -;; 6e: addb %al, (%rax) +;; 6d: ud2 +;; 6f: addb %bl, -0x66666667(%rdx) +;; 75: cltd +;; 76: int1 diff --git a/tests/disas/winch/x64/f64_sub/params.wat b/tests/disas/winch/x64/f64_sub/params.wat index 2bfd0e23dc45..7c8713d7cc4d 100644 --- a/tests/disas/winch/x64/f64_sub/params.wat +++ b/tests/disas/winch/x64/f64_sub/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x50 -;; 1b: movq %rdi, %r14 +;; ja 0x51 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 50: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/f64_trunc/f64_trunc_const_sse41.wat b/tests/disas/winch/x64/f64_trunc/f64_trunc_const_sse41.wat index b952e039af90..dba85355d7d7 100644 --- a/tests/disas/winch/x64/f64_trunc/f64_trunc_const_sse41.wat +++ b/tests/disas/winch/x64/f64_trunc/f64_trunc_const_sse41.wat @@ -12,23 +12,20 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x15(%rip), %xmm0 +;; movsd 0x14(%rip), %xmm0 ;; roundsd $3, %xmm0, %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 -;; 41: addb %al, (%rax) -;; 43: addb %al, (%rax) -;; 45: addb %al, (%rax) -;; 47: addb %bl, (%rdi) -;; 49: testl %ebp, %ebx -;; 4b: pushq %rcx +;; 40: ud2 +;; 42: addb %al, (%rax) +;; 44: addb %al, (%rax) +;; 46: addb %al, (%rax) diff --git a/tests/disas/winch/x64/f64_trunc/f64_trunc_param.wat b/tests/disas/winch/x64/f64_trunc/f64_trunc_param.wat index a8837dba16c7..181fdfcdb327 100644 --- a/tests/disas/winch/x64/f64_trunc/f64_trunc_param.wat +++ b/tests/disas/winch/x64/f64_trunc/f64_trunc_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/f64_trunc/f64_trunc_param_sse41.wat b/tests/disas/winch/x64/f64_trunc/f64_trunc_param_sse41.wat index 0afaa68f8244..77d86c77aebc 100644 --- a/tests/disas/winch/x64/f64_trunc/f64_trunc_param_sse41.wat +++ b/tests/disas/winch/x64/f64_trunc/f64_trunc_param_sse41.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/fuel/call.wat b/tests/disas/winch/x64/fuel/call.wat new file mode 100644 index 000000000000..3b28af180a33 --- /dev/null +++ b/tests/disas/winch/x64/fuel/call.wat @@ -0,0 +1,78 @@ +;;! target = "x86_64" +;;! test = "winch" +;;! flags = "-Wfuel=1" +(module + (import "" "" (func)) + (func (export "") + call 0 + call $other) + (func $other)) +;; wasm[0]::function[1]: +;; pushq %rbp +;; movq %rsp, %rbp +;; movq 8(%rdi), %r11 +;; movq 0x10(%r11), %r11 +;; addq $0x10, %r11 +;; cmpq %rsp, %r11 +;; ja 0x91 +;; 1c: movq %rdi, %r14 +;; subq $0x10, %rsp +;; movq %rdi, 8(%rsp) +;; movq %rsi, (%rsp) +;; movq 8(%r14), %rcx +;; movq (%rcx), %rcx +;; cmpq $0, %rcx +;; jl 0x4a +;; 3d: movq %r14, %rdi +;; callq 0x20c +;; movq 8(%rsp), %r14 +;; movq 8(%r14), %rax +;; movq (%rax), %r11 +;; addq $2, %r11 +;; movq %r11, (%rax) +;; movq 0x68(%r14), %rcx +;; movq 0x58(%r14), %rax +;; movq %rcx, %rdi +;; movq %r14, %rsi +;; callq *%rax +;; movq 8(%rsp), %r14 +;; movq 8(%r14), %rax +;; movq (%rax), %r11 +;; addq $1, %r11 +;; movq %r11, (%rax) +;; movq %r14, %rdi +;; movq %r14, %rsi +;; callq 0xa0 +;; movq 8(%rsp), %r14 +;; addq $0x10, %rsp +;; popq %rbp +;; retq +;; 91: ud2 +;; +;; wasm[0]::function[2]::other: +;; pushq %rbp +;; movq %rsp, %rbp +;; movq 8(%rdi), %r11 +;; movq 0x10(%r11), %r11 +;; addq $0x10, %r11 +;; cmpq %rsp, %r11 +;; ja 0xfe +;; bc: movq %rdi, %r14 +;; subq $0x10, %rsp +;; movq %rdi, 8(%rsp) +;; movq %rsi, (%rsp) +;; movq 8(%r14), %rcx +;; movq (%rcx), %rcx +;; cmpq $0, %rcx +;; jl 0xea +;; dd: movq %r14, %rdi +;; callq 0x20c +;; movq 8(%rsp), %r14 +;; movq 8(%r14), %rax +;; movq (%rax), %r11 +;; addq $1, %r11 +;; movq %r11, (%rax) +;; addq $0x10, %rsp +;; popq %rbp +;; retq +;; fe: ud2 diff --git a/tests/disas/winch/x64/fuel/func.wat b/tests/disas/winch/x64/fuel/func.wat new file mode 100644 index 000000000000..eb93e4beec1b --- /dev/null +++ b/tests/disas/winch/x64/fuel/func.wat @@ -0,0 +1,32 @@ +;;! target = "x86_64" +;;! test = "winch" +;;! flags = "-Wfuel=1" +(module + (func (export "run"))) +;; wasm[0]::function[0]: +;; pushq %rbp +;; movq %rsp, %rbp +;; movq 8(%rdi), %r11 +;; movq 0x10(%r11), %r11 +;; addq $0x10, %r11 +;; cmpq %rsp, %r11 +;; ja 0x5e +;; 1c: movq %rdi, %r14 +;; subq $0x10, %rsp +;; movq %rdi, 8(%rsp) +;; movq %rsi, (%rsp) +;; movq 8(%r14), %rcx +;; movq (%rcx), %rcx +;; cmpq $0, %rcx +;; jl 0x4a +;; 3d: movq %r14, %rdi +;; callq 0x16c +;; movq 8(%rsp), %r14 +;; movq 8(%r14), %rax +;; movq (%rax), %r11 +;; addq $1, %r11 +;; movq %r11, (%rax) +;; addq $0x10, %rsp +;; popq %rbp +;; retq +;; 5e: ud2 diff --git a/tests/disas/winch/x64/fuel/loop.wat b/tests/disas/winch/x64/fuel/loop.wat new file mode 100644 index 000000000000..7b1afecd095b --- /dev/null +++ b/tests/disas/winch/x64/fuel/loop.wat @@ -0,0 +1,46 @@ +;;! target = "x86_64" +;;! test = "winch" +;;! flags = "-Wfuel=1" +(module + (func (export "run") + (loop $l + (br $l)))) +;; wasm[0]::function[0]: +;; pushq %rbp +;; movq %rsp, %rbp +;; movq 8(%rdi), %r11 +;; movq 0x10(%r11), %r11 +;; addq $0x10, %r11 +;; cmpq %rsp, %r11 +;; ja 0x8f +;; 1c: movq %rdi, %r14 +;; subq $0x10, %rsp +;; movq %rdi, 8(%rsp) +;; movq %rsi, (%rsp) +;; movq 8(%r14), %rcx +;; movq (%rcx), %rcx +;; cmpq $0, %rcx +;; jl 0x4a +;; 3d: movq %r14, %rdi +;; callq 0x19d +;; movq 8(%rsp), %r14 +;; movq 8(%r14), %rax +;; movq (%rax), %r11 +;; addq $1, %r11 +;; movq %r11, (%rax) +;; movq 8(%r14), %rcx +;; movq (%rcx), %rcx +;; cmpq $0, %rcx +;; jl 0x76 +;; 69: movq %r14, %rdi +;; callq 0x19d +;; movq 8(%rsp), %r14 +;; movq 8(%r14), %rax +;; movq (%rax), %r11 +;; addq $1, %r11 +;; movq %r11, (%rax) +;; jmp 0x58 +;; 89: addq $0x10, %rsp +;; popq %rbp +;; retq +;; 8f: ud2 diff --git a/tests/disas/winch/x64/i32_add/const.wat b/tests/disas/winch/x64/i32_add/const.wat index c7791e510638..55c76b290752 100644 --- a/tests/disas/winch/x64/i32_add/const.wat +++ b/tests/disas/winch/x64/i32_add/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_add/locals.wat b/tests/disas/winch/x64/i32_add/locals.wat index 27ab1335452f..b6975b769191 100644 --- a/tests/disas/winch/x64/i32_add/locals.wat +++ b/tests/disas/winch/x64/i32_add/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,4 +41,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/i32_add/max.wat b/tests/disas/winch/x64/i32_add/max.wat index 5afae0576253..abc9771dba3a 100644 --- a/tests/disas/winch/x64/i32_add/max.wat +++ b/tests/disas/winch/x64/i32_add/max.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_add/max_one.wat b/tests/disas/winch/x64/i32_add/max_one.wat index f37ee356c84a..226093db3749 100644 --- a/tests/disas/winch/x64/i32_add/max_one.wat +++ b/tests/disas/winch/x64/i32_add/max_one.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_add/mixed.wat b/tests/disas/winch/x64/i32_add/mixed.wat index 057ef24f4fde..803063ba3461 100644 --- a/tests/disas/winch/x64/i32_add/mixed.wat +++ b/tests/disas/winch/x64/i32_add/mixed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_add/params.wat b/tests/disas/winch/x64/i32_add/params.wat index 013fa6a45eaf..8ca53ff76cb1 100644 --- a/tests/disas/winch/x64/i32_add/params.wat +++ b/tests/disas/winch/x64/i32_add/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i32_add/signed.wat b/tests/disas/winch/x64/i32_add/signed.wat index a5a115a4b213..2566fb75b6ce 100644 --- a/tests/disas/winch/x64/i32_add/signed.wat +++ b/tests/disas/winch/x64/i32_add/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_add/unsigned_with_zero.wat b/tests/disas/winch/x64/i32_add/unsigned_with_zero.wat index ae0e2409b16c..a2c3c1542281 100644 --- a/tests/disas/winch/x64/i32_add/unsigned_with_zero.wat +++ b/tests/disas/winch/x64/i32_add/unsigned_with_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_and/const.wat b/tests/disas/winch/x64/i32_and/const.wat index 8984367c73e6..efc8529c7fd2 100644 --- a/tests/disas/winch/x64/i32_and/const.wat +++ b/tests/disas/winch/x64/i32_and/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_and/locals.wat b/tests/disas/winch/x64/i32_and/locals.wat index e130e200b77a..1906b76db20c 100644 --- a/tests/disas/winch/x64/i32_and/locals.wat +++ b/tests/disas/winch/x64/i32_and/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,4 +41,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/i32_and/params.wat b/tests/disas/winch/x64/i32_and/params.wat index 985e82b2db02..a58ccc98753a 100644 --- a/tests/disas/winch/x64/i32_and/params.wat +++ b/tests/disas/winch/x64/i32_and/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i32_clz/lzcnt_const.wat b/tests/disas/winch/x64/i32_clz/lzcnt_const.wat index 13b3686c35c1..3b1edf9486a3 100644 --- a/tests/disas/winch/x64/i32_clz/lzcnt_const.wat +++ b/tests/disas/winch/x64/i32_clz/lzcnt_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/i32_clz/lzcnt_local.wat b/tests/disas/winch/x64/i32_clz/lzcnt_local.wat index cac7db33bbed..ac7ad0d6fae4 100644 --- a/tests/disas/winch/x64/i32_clz/lzcnt_local.wat +++ b/tests/disas/winch/x64/i32_clz/lzcnt_local.wat @@ -17,11 +17,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/i32_clz/lzcnt_param.wat b/tests/disas/winch/x64/i32_clz/lzcnt_param.wat index 0c5edaf0e9c0..049f5c9ce212 100644 --- a/tests/disas/winch/x64/i32_clz/lzcnt_param.wat +++ b/tests/disas/winch/x64/i32_clz/lzcnt_param.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/i32_clz/no_lzcnt_const.wat b/tests/disas/winch/x64/i32_clz/no_lzcnt_const.wat index 8259720bdfa3..3d32be549423 100644 --- a/tests/disas/winch/x64/i32_clz/no_lzcnt_const.wat +++ b/tests/disas/winch/x64/i32_clz/no_lzcnt_const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4b -;; 1b: movq %rdi, %r14 +;; ja 0x4c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -29,4 +29,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4b: ud2 +;; 4c: ud2 diff --git a/tests/disas/winch/x64/i32_clz/no_lzcnt_local.wat b/tests/disas/winch/x64/i32_clz/no_lzcnt_local.wat index f9d0496d7904..be601a139b87 100644 --- a/tests/disas/winch/x64/i32_clz/no_lzcnt_local.wat +++ b/tests/disas/winch/x64/i32_clz/no_lzcnt_local.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5d -;; 1b: movq %rdi, %r14 +;; ja 0x5e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -37,4 +37,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5d: ud2 +;; 5e: ud2 diff --git a/tests/disas/winch/x64/i32_clz/no_lzcnt_param.wat b/tests/disas/winch/x64/i32_clz/no_lzcnt_param.wat index 25b78060ba5d..0cafbb337cea 100644 --- a/tests/disas/winch/x64/i32_clz/no_lzcnt_param.wat +++ b/tests/disas/winch/x64/i32_clz/no_lzcnt_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_ctz/bmi1_const.wat b/tests/disas/winch/x64/i32_ctz/bmi1_const.wat index 15067c2fc0fc..e3fc54b726f0 100644 --- a/tests/disas/winch/x64/i32_ctz/bmi1_const.wat +++ b/tests/disas/winch/x64/i32_ctz/bmi1_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/i32_ctz/bmi1_local.wat b/tests/disas/winch/x64/i32_ctz/bmi1_local.wat index 16ffb193c93f..08385797485f 100644 --- a/tests/disas/winch/x64/i32_ctz/bmi1_local.wat +++ b/tests/disas/winch/x64/i32_ctz/bmi1_local.wat @@ -18,11 +18,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -34,4 +34,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/i32_ctz/bmi1_param.wat b/tests/disas/winch/x64/i32_ctz/bmi1_param.wat index ca6306cc754a..cf4818cb406e 100644 --- a/tests/disas/winch/x64/i32_ctz/bmi1_param.wat +++ b/tests/disas/winch/x64/i32_ctz/bmi1_param.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/i32_ctz/no_bmi1_const.wat b/tests/disas/winch/x64/i32_ctz/no_bmi1_const.wat index df598706a976..2881021d7747 100644 --- a/tests/disas/winch/x64/i32_ctz/no_bmi1_const.wat +++ b/tests/disas/winch/x64/i32_ctz/no_bmi1_const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/i32_ctz/no_bmi1_local.wat b/tests/disas/winch/x64/i32_ctz/no_bmi1_local.wat index 47744188b41f..5d504e26c94b 100644 --- a/tests/disas/winch/x64/i32_ctz/no_bmi1_local.wat +++ b/tests/disas/winch/x64/i32_ctz/no_bmi1_local.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5c -;; 1b: movq %rdi, %r14 +;; ja 0x5d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -36,4 +36,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5c: ud2 +;; 5d: ud2 diff --git a/tests/disas/winch/x64/i32_ctz/no_bmi1_param.wat b/tests/disas/winch/x64/i32_ctz/no_bmi1_param.wat index 0396cbbf9ebb..2703675aa408 100644 --- a/tests/disas/winch/x64/i32_ctz/no_bmi1_param.wat +++ b/tests/disas/winch/x64/i32_ctz/no_bmi1_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 +;; 4f: ud2 diff --git a/tests/disas/winch/x64/i32_divs/const.wat b/tests/disas/winch/x64/i32_divs/const.wat index 823ec5edb0cf..9fe4dd8bd4e4 100644 --- a/tests/disas/winch/x64/i32_divs/const.wat +++ b/tests/disas/winch/x64/i32_divs/const.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $0xa, %ecx ;; movl $0x14, %eax ;; cmpl $0, %ecx -;; je 0x49 -;; 3e: cltd +;; je 0x4a +;; 3f: cltd ;; idivl %ecx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 47: ud2 -;; 49: ud2 +;; 48: ud2 +;; 4a: ud2 diff --git a/tests/disas/winch/x64/i32_divs/one_zero.wat b/tests/disas/winch/x64/i32_divs/one_zero.wat index c3b9d77a4c1d..a7f615686455 100644 --- a/tests/disas/winch/x64/i32_divs/one_zero.wat +++ b/tests/disas/winch/x64/i32_divs/one_zero.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $0, %ecx ;; movl $1, %eax ;; cmpl $0, %ecx -;; je 0x49 -;; 3e: cltd +;; je 0x4a +;; 3f: cltd ;; idivl %ecx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 47: ud2 -;; 49: ud2 +;; 48: ud2 +;; 4a: ud2 diff --git a/tests/disas/winch/x64/i32_divs/overflow.wat b/tests/disas/winch/x64/i32_divs/overflow.wat index 87c943038db6..711eda0a657c 100644 --- a/tests/disas/winch/x64/i32_divs/overflow.wat +++ b/tests/disas/winch/x64/i32_divs/overflow.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $0xffffffff, %ecx ;; movl $0x80000000, %eax ;; cmpl $0, %ecx -;; je 0x49 -;; 3e: cltd +;; je 0x4a +;; 3f: cltd ;; idivl %ecx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 47: ud2 -;; 49: ud2 +;; 48: ud2 +;; 4a: ud2 diff --git a/tests/disas/winch/x64/i32_divs/params.wat b/tests/disas/winch/x64/i32_divs/params.wat index 3204e2b0458d..82887f73081a 100644 --- a/tests/disas/winch/x64/i32_divs/params.wat +++ b/tests/disas/winch/x64/i32_divs/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,11 +25,11 @@ ;; movl 8(%rsp), %ecx ;; movl 0xc(%rsp), %eax ;; cmpl $0, %ecx -;; je 0x50 -;; 45: cltd +;; je 0x51 +;; 46: cltd ;; idivl %ecx ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 -;; 50: ud2 +;; 4f: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/i32_divs/zero_zero.wat b/tests/disas/winch/x64/i32_divs/zero_zero.wat index 2e3b56e87834..40b2fd0167e3 100644 --- a/tests/disas/winch/x64/i32_divs/zero_zero.wat +++ b/tests/disas/winch/x64/i32_divs/zero_zero.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $0, %ecx ;; movl $0, %eax ;; cmpl $0, %ecx -;; je 0x49 -;; 3e: cltd +;; je 0x4a +;; 3f: cltd ;; idivl %ecx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 47: ud2 -;; 49: ud2 +;; 48: ud2 +;; 4a: ud2 diff --git a/tests/disas/winch/x64/i32_divu/const.wat b/tests/disas/winch/x64/i32_divu/const.wat index 1e909fd4131d..43c31149551a 100644 --- a/tests/disas/winch/x64/i32_divu/const.wat +++ b/tests/disas/winch/x64/i32_divu/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i32_divu/one_zero.wat b/tests/disas/winch/x64/i32_divu/one_zero.wat index 2f12d30eb7b3..7e3c1ef383a6 100644 --- a/tests/disas/winch/x64/i32_divu/one_zero.wat +++ b/tests/disas/winch/x64/i32_divu/one_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i32_divu/params.wat b/tests/disas/winch/x64/i32_divu/params.wat index 9e6957d0961a..3efdd2983205 100644 --- a/tests/disas/winch/x64/i32_divu/params.wat +++ b/tests/disas/winch/x64/i32_divu/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i32_divu/signed.wat b/tests/disas/winch/x64/i32_divu/signed.wat index 0122f76e3aa5..f13a617e10fe 100644 --- a/tests/disas/winch/x64/i32_divu/signed.wat +++ b/tests/disas/winch/x64/i32_divu/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i32_divu/zero_zero.wat b/tests/disas/winch/x64/i32_divu/zero_zero.wat index 2c471cb8ba32..e796aee93213 100644 --- a/tests/disas/winch/x64/i32_divu/zero_zero.wat +++ b/tests/disas/winch/x64/i32_divu/zero_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i32_eq/const.wat b/tests/disas/winch/x64/i32_eq/const.wat index c94906bbb19e..d74571af7f61 100644 --- a/tests/disas/winch/x64/i32_eq/const.wat +++ b/tests/disas/winch/x64/i32_eq/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_eq/locals.wat b/tests/disas/winch/x64/i32_eq/locals.wat index b22bbdcf4c71..cbb203a5e52f 100644 --- a/tests/disas/winch/x64/i32_eq/locals.wat +++ b/tests/disas/winch/x64/i32_eq/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_eq/params.wat b/tests/disas/winch/x64/i32_eq/params.wat index 4cd4cc234cde..49e055ad6ab3 100644 --- a/tests/disas/winch/x64/i32_eq/params.wat +++ b/tests/disas/winch/x64/i32_eq/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_eqz/const.wat b/tests/disas/winch/x64/i32_eqz/const.wat index a4a2cf9416c2..5fc1c211cb74 100644 --- a/tests/disas/winch/x64/i32_eqz/const.wat +++ b/tests/disas/winch/x64/i32_eqz/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_eqz/local.wat b/tests/disas/winch/x64/i32_eqz/local.wat index fbc995d8bbf4..43e356ce3448 100644 --- a/tests/disas/winch/x64/i32_eqz/local.wat +++ b/tests/disas/winch/x64/i32_eqz/local.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x54 -;; 1b: movq %rdi, %r14 +;; ja 0x55 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -34,4 +34,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 54: ud2 +;; 55: ud2 diff --git a/tests/disas/winch/x64/i32_eqz/param.wat b/tests/disas/winch/x64/i32_eqz/param.wat index fced2a460122..d25c8a8586c2 100644 --- a/tests/disas/winch/x64/i32_eqz/param.wat +++ b/tests/disas/winch/x64/i32_eqz/param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i32_extend_16_s/const.wat b/tests/disas/winch/x64/i32_extend_16_s/const.wat index 2f7f2b821286..e69d551a133d 100644 --- a/tests/disas/winch/x64/i32_extend_16_s/const.wat +++ b/tests/disas/winch/x64/i32_extend_16_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_extend_16_s/locals.wat b/tests/disas/winch/x64/i32_extend_16_s/locals.wat index c1fb9cc9478c..a6710d4bba4b 100644 --- a/tests/disas/winch/x64/i32_extend_16_s/locals.wat +++ b/tests/disas/winch/x64/i32_extend_16_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_extend_16_s/params.wat b/tests/disas/winch/x64/i32_extend_16_s/params.wat index 55f6cbe75327..db10af6f166e 100644 --- a/tests/disas/winch/x64/i32_extend_16_s/params.wat +++ b/tests/disas/winch/x64/i32_extend_16_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/i32_extend_8_s/const.wat b/tests/disas/winch/x64/i32_extend_8_s/const.wat index 29a2729701e3..91cbe6002e33 100644 --- a/tests/disas/winch/x64/i32_extend_8_s/const.wat +++ b/tests/disas/winch/x64/i32_extend_8_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_extend_8_s/locals.wat b/tests/disas/winch/x64/i32_extend_8_s/locals.wat index f6b807f8e4d4..a8675c08cafc 100644 --- a/tests/disas/winch/x64/i32_extend_8_s/locals.wat +++ b/tests/disas/winch/x64/i32_extend_8_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_extend_8_s/params.wat b/tests/disas/winch/x64/i32_extend_8_s/params.wat index 5a6074fd06c7..2dbdb6481b6c 100644 --- a/tests/disas/winch/x64/i32_extend_8_s/params.wat +++ b/tests/disas/winch/x64/i32_extend_8_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/i32_ge_s/const.wat b/tests/disas/winch/x64/i32_ge_s/const.wat index fc0f79b566f4..94e9c0a2297f 100644 --- a/tests/disas/winch/x64/i32_ge_s/const.wat +++ b/tests/disas/winch/x64/i32_ge_s/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_ge_s/locals.wat b/tests/disas/winch/x64/i32_ge_s/locals.wat index d665149379ff..c9601bda393e 100644 --- a/tests/disas/winch/x64/i32_ge_s/locals.wat +++ b/tests/disas/winch/x64/i32_ge_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_ge_s/params.wat b/tests/disas/winch/x64/i32_ge_s/params.wat index 637bc1df49f7..2a69e1f7770c 100644 --- a/tests/disas/winch/x64/i32_ge_s/params.wat +++ b/tests/disas/winch/x64/i32_ge_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_ge_u/const.wat b/tests/disas/winch/x64/i32_ge_u/const.wat index 583571985345..3011925ce0ee 100644 --- a/tests/disas/winch/x64/i32_ge_u/const.wat +++ b/tests/disas/winch/x64/i32_ge_u/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_ge_u/locals.wat b/tests/disas/winch/x64/i32_ge_u/locals.wat index 9af0de8e77dd..d15113d4b86d 100644 --- a/tests/disas/winch/x64/i32_ge_u/locals.wat +++ b/tests/disas/winch/x64/i32_ge_u/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_ge_u/params.wat b/tests/disas/winch/x64/i32_ge_u/params.wat index 47767ca6f8d1..2ee952fb3994 100644 --- a/tests/disas/winch/x64/i32_ge_u/params.wat +++ b/tests/disas/winch/x64/i32_ge_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_gt_s/const.wat b/tests/disas/winch/x64/i32_gt_s/const.wat index 8c0b5efb8a8f..395fb78cc412 100644 --- a/tests/disas/winch/x64/i32_gt_s/const.wat +++ b/tests/disas/winch/x64/i32_gt_s/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_gt_s/locals.wat b/tests/disas/winch/x64/i32_gt_s/locals.wat index d4f248f65eeb..85708a621da7 100644 --- a/tests/disas/winch/x64/i32_gt_s/locals.wat +++ b/tests/disas/winch/x64/i32_gt_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_gt_s/params.wat b/tests/disas/winch/x64/i32_gt_s/params.wat index 51c7389a1793..d0af1d0688aa 100644 --- a/tests/disas/winch/x64/i32_gt_s/params.wat +++ b/tests/disas/winch/x64/i32_gt_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_gt_u/const.wat b/tests/disas/winch/x64/i32_gt_u/const.wat index f55814102617..fb3f649852f8 100644 --- a/tests/disas/winch/x64/i32_gt_u/const.wat +++ b/tests/disas/winch/x64/i32_gt_u/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_gt_u/locals.wat b/tests/disas/winch/x64/i32_gt_u/locals.wat index ed7b937fcdbb..7803681cbdab 100644 --- a/tests/disas/winch/x64/i32_gt_u/locals.wat +++ b/tests/disas/winch/x64/i32_gt_u/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_gt_u/params.wat b/tests/disas/winch/x64/i32_gt_u/params.wat index 24135443a7b2..d34bcf4e975a 100644 --- a/tests/disas/winch/x64/i32_gt_u/params.wat +++ b/tests/disas/winch/x64/i32_gt_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_le_s/const.wat b/tests/disas/winch/x64/i32_le_s/const.wat index 751b0e0494df..7b2cecdf1c26 100644 --- a/tests/disas/winch/x64/i32_le_s/const.wat +++ b/tests/disas/winch/x64/i32_le_s/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_le_s/locals.wat b/tests/disas/winch/x64/i32_le_s/locals.wat index bf76f8e4e191..598100efcc51 100644 --- a/tests/disas/winch/x64/i32_le_s/locals.wat +++ b/tests/disas/winch/x64/i32_le_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_le_s/params.wat b/tests/disas/winch/x64/i32_le_s/params.wat index f198747e3d4b..9af7c6fc88af 100644 --- a/tests/disas/winch/x64/i32_le_s/params.wat +++ b/tests/disas/winch/x64/i32_le_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_le_u/const.wat b/tests/disas/winch/x64/i32_le_u/const.wat index 37e77eb0a785..6c2cc201cbd9 100644 --- a/tests/disas/winch/x64/i32_le_u/const.wat +++ b/tests/disas/winch/x64/i32_le_u/const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_le_u/locals.wat b/tests/disas/winch/x64/i32_le_u/locals.wat index 5d142231f523..b2eea2fdf90b 100644 --- a/tests/disas/winch/x64/i32_le_u/locals.wat +++ b/tests/disas/winch/x64/i32_le_u/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,4 +43,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_le_u/params.wat b/tests/disas/winch/x64/i32_le_u/params.wat index 49861f2421d2..9127e7b2cdfa 100644 --- a/tests/disas/winch/x64/i32_le_u/params.wat +++ b/tests/disas/winch/x64/i32_le_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_lt_s/const.wat b/tests/disas/winch/x64/i32_lt_s/const.wat index 97fd85f2d08a..460902ce4789 100644 --- a/tests/disas/winch/x64/i32_lt_s/const.wat +++ b/tests/disas/winch/x64/i32_lt_s/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_lt_s/locals.wat b/tests/disas/winch/x64/i32_lt_s/locals.wat index 7e6be9cbb1b3..81a3a555b00c 100644 --- a/tests/disas/winch/x64/i32_lt_s/locals.wat +++ b/tests/disas/winch/x64/i32_lt_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_lt_s/params.wat b/tests/disas/winch/x64/i32_lt_s/params.wat index 0f96ca0bcb13..04105998bbf7 100644 --- a/tests/disas/winch/x64/i32_lt_s/params.wat +++ b/tests/disas/winch/x64/i32_lt_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_lt_u/const.wat b/tests/disas/winch/x64/i32_lt_u/const.wat index 686179cd6e97..bf2f5fa532aa 100644 --- a/tests/disas/winch/x64/i32_lt_u/const.wat +++ b/tests/disas/winch/x64/i32_lt_u/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_lt_u/locals.wat b/tests/disas/winch/x64/i32_lt_u/locals.wat index 22d3ee6ee844..ba578b4505cc 100644 --- a/tests/disas/winch/x64/i32_lt_u/locals.wat +++ b/tests/disas/winch/x64/i32_lt_u/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,4 +43,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_lt_u/params.wat b/tests/disas/winch/x64/i32_lt_u/params.wat index 37eb05e924b2..f76a5c35ada7 100644 --- a/tests/disas/winch/x64/i32_lt_u/params.wat +++ b/tests/disas/winch/x64/i32_lt_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_mul/const.wat b/tests/disas/winch/x64/i32_mul/const.wat index 08af3b9b3d96..e9938b4966ca 100644 --- a/tests/disas/winch/x64/i32_mul/const.wat +++ b/tests/disas/winch/x64/i32_mul/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_mul/locals.wat b/tests/disas/winch/x64/i32_mul/locals.wat index e51d2d71db76..04bdd8749fdb 100644 --- a/tests/disas/winch/x64/i32_mul/locals.wat +++ b/tests/disas/winch/x64/i32_mul/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,4 +41,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 +;; 5b: ud2 diff --git a/tests/disas/winch/x64/i32_mul/max.wat b/tests/disas/winch/x64/i32_mul/max.wat index a8ccdfb7475c..aca2b372e71a 100644 --- a/tests/disas/winch/x64/i32_mul/max.wat +++ b/tests/disas/winch/x64/i32_mul/max.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_mul/max_one.wat b/tests/disas/winch/x64/i32_mul/max_one.wat index 5d8d122eb4d8..58dbfde5cf52 100644 --- a/tests/disas/winch/x64/i32_mul/max_one.wat +++ b/tests/disas/winch/x64/i32_mul/max_one.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_mul/mixed.wat b/tests/disas/winch/x64/i32_mul/mixed.wat index 2034307f7aaa..d0a091bc256a 100644 --- a/tests/disas/winch/x64/i32_mul/mixed.wat +++ b/tests/disas/winch/x64/i32_mul/mixed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_mul/params.wat b/tests/disas/winch/x64/i32_mul/params.wat index 4078ab9ae68e..00645c4b21c5 100644 --- a/tests/disas/winch/x64/i32_mul/params.wat +++ b/tests/disas/winch/x64/i32_mul/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 47: ud2 +;; 48: ud2 diff --git a/tests/disas/winch/x64/i32_mul/signed.wat b/tests/disas/winch/x64/i32_mul/signed.wat index f62ab6f758cd..d3fbf036050f 100644 --- a/tests/disas/winch/x64/i32_mul/signed.wat +++ b/tests/disas/winch/x64/i32_mul/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_mul/unsigned_with_zero.wat b/tests/disas/winch/x64/i32_mul/unsigned_with_zero.wat index 6335ff448a65..5f536129598d 100644 --- a/tests/disas/winch/x64/i32_mul/unsigned_with_zero.wat +++ b/tests/disas/winch/x64/i32_mul/unsigned_with_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_ne/const.wat b/tests/disas/winch/x64/i32_ne/const.wat index 4d565b09dbc8..4ef49f29adc8 100644 --- a/tests/disas/winch/x64/i32_ne/const.wat +++ b/tests/disas/winch/x64/i32_ne/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_ne/locals.wat b/tests/disas/winch/x64/i32_ne/locals.wat index 15db22c2d7a8..208742bc9678 100644 --- a/tests/disas/winch/x64/i32_ne/locals.wat +++ b/tests/disas/winch/x64/i32_ne/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x62 -;; 1b: movq %rdi, %r14 +;; ja 0x63 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 62: ud2 +;; 63: ud2 diff --git a/tests/disas/winch/x64/i32_ne/params.wat b/tests/disas/winch/x64/i32_ne/params.wat index 3a6ecac53f0c..93a78e1147f0 100644 --- a/tests/disas/winch/x64/i32_ne/params.wat +++ b/tests/disas/winch/x64/i32_ne/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4f -;; 1b: movq %rdi, %r14 +;; ja 0x50 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4f: ud2 +;; 50: ud2 diff --git a/tests/disas/winch/x64/i32_or/const.wat b/tests/disas/winch/x64/i32_or/const.wat index 64beb07cf724..3608f0ce1b03 100644 --- a/tests/disas/winch/x64/i32_or/const.wat +++ b/tests/disas/winch/x64/i32_or/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_or/locals.wat b/tests/disas/winch/x64/i32_or/locals.wat index 68fb5396d066..480c0761d87a 100644 --- a/tests/disas/winch/x64/i32_or/locals.wat +++ b/tests/disas/winch/x64/i32_or/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,4 +41,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/i32_or/params.wat b/tests/disas/winch/x64/i32_or/params.wat index a0f96012eeef..1deb22326246 100644 --- a/tests/disas/winch/x64/i32_or/params.wat +++ b/tests/disas/winch/x64/i32_or/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i32_popcnt/const.wat b/tests/disas/winch/x64/i32_popcnt/const.wat index 2e26ab716779..5a0eaa86ac09 100644 --- a/tests/disas/winch/x64/i32_popcnt/const.wat +++ b/tests/disas/winch/x64/i32_popcnt/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/i32_popcnt/fallback.wat b/tests/disas/winch/x64/i32_popcnt/fallback.wat index fd9e7791797d..c71e43caa154 100644 --- a/tests/disas/winch/x64/i32_popcnt/fallback.wat +++ b/tests/disas/winch/x64/i32_popcnt/fallback.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -39,4 +39,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i32_popcnt/no_sse42.wat b/tests/disas/winch/x64/i32_popcnt/no_sse42.wat index cdd64bd38972..c0a05a2a7dfc 100644 --- a/tests/disas/winch/x64/i32_popcnt/no_sse42.wat +++ b/tests/disas/winch/x64/i32_popcnt/no_sse42.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i32_popcnt/reg.wat b/tests/disas/winch/x64/i32_popcnt/reg.wat index 622be6127fbf..5d9e1fb6a1bd 100644 --- a/tests/disas/winch/x64/i32_popcnt/reg.wat +++ b/tests/disas/winch/x64/i32_popcnt/reg.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/i32_reinterpret_f32/const.wat b/tests/disas/winch/x64/i32_reinterpret_f32/const.wat index beba89798252..a8bbfb9de28a 100644 --- a/tests/disas/winch/x64/i32_reinterpret_f32/const.wat +++ b/tests/disas/winch/x64/i32_reinterpret_f32/const.wat @@ -11,18 +11,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0xd(%rip), %xmm0 +;; movss 0xc(%rip), %xmm0 ;; movd %xmm0, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 -;; 3f: addb %al, (%rax) +;; 3e: ud2 +;; 40: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i32_reinterpret_f32/locals.wat b/tests/disas/winch/x64/i32_reinterpret_f32/locals.wat index 7d313635e78f..46d79e0af899 100644 --- a/tests/disas/winch/x64/i32_reinterpret_f32/locals.wat +++ b/tests/disas/winch/x64/i32_reinterpret_f32/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i32_reinterpret_f32/params.wat b/tests/disas/winch/x64/i32_reinterpret_f32/params.wat index ef9bf0be6996..070b0b65038f 100644 --- a/tests/disas/winch/x64/i32_reinterpret_f32/params.wat +++ b/tests/disas/winch/x64/i32_reinterpret_f32/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_reinterpret_f32/ret_float.wat b/tests/disas/winch/x64/i32_reinterpret_f32/ret_float.wat index 66c101ff2422..08da48240d5e 100644 --- a/tests/disas/winch/x64/i32_reinterpret_f32/ret_float.wat +++ b/tests/disas/winch/x64/i32_reinterpret_f32/ret_float.wat @@ -13,19 +13,19 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x15(%rip), %xmm0 +;; movss 0x14(%rip), %xmm0 ;; movd %xmm0, %eax -;; movss 9(%rip), %xmm0 +;; movss 8(%rip), %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 -;; 47: addb %al, (%rax) +;; 46: ud2 +;; 48: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i32_rems/const.wat b/tests/disas/winch/x64/i32_rems/const.wat index 8aa15694db9c..29f16cef53ec 100644 --- a/tests/disas/winch/x64/i32_rems/const.wat +++ b/tests/disas/winch/x64/i32_rems/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movl $7, %eax ;; cltd ;; cmpl $-1, %ecx -;; jne 0x49 -;; 3f: movl $0, %edx -;; jmp 0x4b -;; 49: idivl %ecx +;; jne 0x4a +;; 40: movl $0, %edx +;; jmp 0x4c +;; 4a: idivl %ecx ;; movl %edx, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/i32_rems/one_zero.wat b/tests/disas/winch/x64/i32_rems/one_zero.wat index af1f22e42a08..4aedc65d9b82 100644 --- a/tests/disas/winch/x64/i32_rems/one_zero.wat +++ b/tests/disas/winch/x64/i32_rems/one_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movl $1, %eax ;; cltd ;; cmpl $-1, %ecx -;; jne 0x49 -;; 3f: movl $0, %edx -;; jmp 0x4b -;; 49: idivl %ecx +;; jne 0x4a +;; 40: movl $0, %edx +;; jmp 0x4c +;; 4a: idivl %ecx ;; movl %edx, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/i32_rems/overflow.wat b/tests/disas/winch/x64/i32_rems/overflow.wat index 3f1a27cba81f..df566014da93 100644 --- a/tests/disas/winch/x64/i32_rems/overflow.wat +++ b/tests/disas/winch/x64/i32_rems/overflow.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movl $0x80000000, %eax ;; cltd ;; cmpl $-1, %ecx -;; jne 0x49 -;; 3f: movl $0, %edx -;; jmp 0x4b -;; 49: idivl %ecx +;; jne 0x4a +;; 40: movl $0, %edx +;; jmp 0x4c +;; 4a: idivl %ecx ;; movl %edx, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/i32_rems/params.wat b/tests/disas/winch/x64/i32_rems/params.wat index 17d1e20dbae6..b2e4cb4d27e4 100644 --- a/tests/disas/winch/x64/i32_rems/params.wat +++ b/tests/disas/winch/x64/i32_rems/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,12 +26,12 @@ ;; movl 0xc(%rsp), %eax ;; cltd ;; cmpl $-1, %ecx -;; jne 0x50 -;; 46: movl $0, %edx -;; jmp 0x52 -;; 50: idivl %ecx +;; jne 0x51 +;; 47: movl $0, %edx +;; jmp 0x53 +;; 51: idivl %ecx ;; movl %edx, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 +;; 5b: ud2 diff --git a/tests/disas/winch/x64/i32_rems/zero_zero.wat b/tests/disas/winch/x64/i32_rems/zero_zero.wat index 82f7e1a2a09b..15de95b6c84e 100644 --- a/tests/disas/winch/x64/i32_rems/zero_zero.wat +++ b/tests/disas/winch/x64/i32_rems/zero_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movl $0, %eax ;; cltd ;; cmpl $-1, %ecx -;; jne 0x49 -;; 3f: movl $0, %edx -;; jmp 0x4b -;; 49: idivl %ecx +;; jne 0x4a +;; 40: movl $0, %edx +;; jmp 0x4c +;; 4a: idivl %ecx ;; movl %edx, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/i32_remu/const.wat b/tests/disas/winch/x64/i32_remu/const.wat index 194485baca7f..a8ac8e7e74dc 100644 --- a/tests/disas/winch/x64/i32_remu/const.wat +++ b/tests/disas/winch/x64/i32_remu/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i32_remu/one_zero.wat b/tests/disas/winch/x64/i32_remu/one_zero.wat index 5b81ae968d84..e35ccc89b7ef 100644 --- a/tests/disas/winch/x64/i32_remu/one_zero.wat +++ b/tests/disas/winch/x64/i32_remu/one_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i32_remu/params.wat b/tests/disas/winch/x64/i32_remu/params.wat index c6efd3b3bc2a..2c42d4efbda3 100644 --- a/tests/disas/winch/x64/i32_remu/params.wat +++ b/tests/disas/winch/x64/i32_remu/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i32_remu/signed.wat b/tests/disas/winch/x64/i32_remu/signed.wat index e31afe826d61..44d334cc918b 100644 --- a/tests/disas/winch/x64/i32_remu/signed.wat +++ b/tests/disas/winch/x64/i32_remu/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i32_remu/zero_zero.wat b/tests/disas/winch/x64/i32_remu/zero_zero.wat index 1260580bc063..1ca303b92b47 100644 --- a/tests/disas/winch/x64/i32_remu/zero_zero.wat +++ b/tests/disas/winch/x64/i32_remu/zero_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i32_rotl/16_const.wat b/tests/disas/winch/x64/i32_rotl/16_const.wat index 7c78787e4e3a..06c7e4bb78fb 100644 --- a/tests/disas/winch/x64/i32_rotl/16_const.wat +++ b/tests/disas/winch/x64/i32_rotl/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_rotl/8_const.wat b/tests/disas/winch/x64/i32_rotl/8_const.wat index 2af7807c8d6e..92479a7db115 100644 --- a/tests/disas/winch/x64/i32_rotl/8_const.wat +++ b/tests/disas/winch/x64/i32_rotl/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_rotl/locals.wat b/tests/disas/winch/x64/i32_rotl/locals.wat index b24df5fa1bf4..b2f1ee21391e 100644 --- a/tests/disas/winch/x64/i32_rotl/locals.wat +++ b/tests/disas/winch/x64/i32_rotl/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x57 -;; 1b: movq %rdi, %r14 +;; ja 0x58 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -40,4 +40,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 57: ud2 +;; 58: ud2 diff --git a/tests/disas/winch/x64/i32_rotl/params.wat b/tests/disas/winch/x64/i32_rotl/params.wat index 75cb86388e66..5f38d9468c25 100644 --- a/tests/disas/winch/x64/i32_rotl/params.wat +++ b/tests/disas/winch/x64/i32_rotl/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i32_rotr/16_const.wat b/tests/disas/winch/x64/i32_rotr/16_const.wat index b3f04e5a526a..081077101a74 100644 --- a/tests/disas/winch/x64/i32_rotr/16_const.wat +++ b/tests/disas/winch/x64/i32_rotr/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_rotr/8_const.wat b/tests/disas/winch/x64/i32_rotr/8_const.wat index 26975a918070..b253d5d17fdd 100644 --- a/tests/disas/winch/x64/i32_rotr/8_const.wat +++ b/tests/disas/winch/x64/i32_rotr/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_rotr/locals.wat b/tests/disas/winch/x64/i32_rotr/locals.wat index 7c2f0ca0fa72..6041b49637f6 100644 --- a/tests/disas/winch/x64/i32_rotr/locals.wat +++ b/tests/disas/winch/x64/i32_rotr/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x57 -;; 1b: movq %rdi, %r14 +;; ja 0x58 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -40,4 +40,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 57: ud2 +;; 58: ud2 diff --git a/tests/disas/winch/x64/i32_rotr/params.wat b/tests/disas/winch/x64/i32_rotr/params.wat index d87d6a7f8809..c140ea8d0d81 100644 --- a/tests/disas/winch/x64/i32_rotr/params.wat +++ b/tests/disas/winch/x64/i32_rotr/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i32_shl/16_const.wat b/tests/disas/winch/x64/i32_shl/16_const.wat index da01d3a64557..8bfc1a7957f7 100644 --- a/tests/disas/winch/x64/i32_shl/16_const.wat +++ b/tests/disas/winch/x64/i32_shl/16_const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_shl/8_const.wat b/tests/disas/winch/x64/i32_shl/8_const.wat index 4e6ab0f64104..c6c5d80bc6ab 100644 --- a/tests/disas/winch/x64/i32_shl/8_const.wat +++ b/tests/disas/winch/x64/i32_shl/8_const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_shl/locals.wat b/tests/disas/winch/x64/i32_shl/locals.wat index 9192e07b9403..ed6fdeed5bed 100644 --- a/tests/disas/winch/x64/i32_shl/locals.wat +++ b/tests/disas/winch/x64/i32_shl/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x57 -;; 1b: movq %rdi, %r14 +;; ja 0x58 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -40,4 +40,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 57: ud2 +;; 58: ud2 diff --git a/tests/disas/winch/x64/i32_shl/params.wat b/tests/disas/winch/x64/i32_shl/params.wat index e5dfc78c4d4c..8e465173b3fd 100644 --- a/tests/disas/winch/x64/i32_shl/params.wat +++ b/tests/disas/winch/x64/i32_shl/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i32_shr_s/16_const.wat b/tests/disas/winch/x64/i32_shr_s/16_const.wat index 0596e265631c..02fa4743dde5 100644 --- a/tests/disas/winch/x64/i32_shr_s/16_const.wat +++ b/tests/disas/winch/x64/i32_shr_s/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_shr_s/8_const.wat b/tests/disas/winch/x64/i32_shr_s/8_const.wat index 07366a3fe499..7628d09518ce 100644 --- a/tests/disas/winch/x64/i32_shr_s/8_const.wat +++ b/tests/disas/winch/x64/i32_shr_s/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_shr_s/locals.wat b/tests/disas/winch/x64/i32_shr_s/locals.wat index 3bc8d1e71eb3..8d36b224882b 100644 --- a/tests/disas/winch/x64/i32_shr_s/locals.wat +++ b/tests/disas/winch/x64/i32_shr_s/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x57 -;; 1b: movq %rdi, %r14 +;; ja 0x58 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -40,4 +40,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 57: ud2 +;; 58: ud2 diff --git a/tests/disas/winch/x64/i32_shr_s/params.wat b/tests/disas/winch/x64/i32_shr_s/params.wat index 9fc6e0c05dbe..6a4c6ff97d30 100644 --- a/tests/disas/winch/x64/i32_shr_s/params.wat +++ b/tests/disas/winch/x64/i32_shr_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i32_shr_u/16_const.wat b/tests/disas/winch/x64/i32_shr_u/16_const.wat index ad2e0e48f1fa..add160c15a12 100644 --- a/tests/disas/winch/x64/i32_shr_u/16_const.wat +++ b/tests/disas/winch/x64/i32_shr_u/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_shr_u/8_const.wat b/tests/disas/winch/x64/i32_shr_u/8_const.wat index a83ceb2af4fc..f1325e8d153e 100644 --- a/tests/disas/winch/x64/i32_shr_u/8_const.wat +++ b/tests/disas/winch/x64/i32_shr_u/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_shr_u/locals.wat b/tests/disas/winch/x64/i32_shr_u/locals.wat index 9bd73df19636..b7fea6203e52 100644 --- a/tests/disas/winch/x64/i32_shr_u/locals.wat +++ b/tests/disas/winch/x64/i32_shr_u/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x57 -;; 1b: movq %rdi, %r14 +;; ja 0x58 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -40,4 +40,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 57: ud2 +;; 58: ud2 diff --git a/tests/disas/winch/x64/i32_shr_u/params.wat b/tests/disas/winch/x64/i32_shr_u/params.wat index a1d71fb6ddbe..71958b824603 100644 --- a/tests/disas/winch/x64/i32_shr_u/params.wat +++ b/tests/disas/winch/x64/i32_shr_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i32_sub/const.wat b/tests/disas/winch/x64/i32_sub/const.wat index 73dd3cc77db7..ff7e26898fd9 100644 --- a/tests/disas/winch/x64/i32_sub/const.wat +++ b/tests/disas/winch/x64/i32_sub/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_sub/locals.wat b/tests/disas/winch/x64/i32_sub/locals.wat index 22c2548a2089..1a1627afa46f 100644 --- a/tests/disas/winch/x64/i32_sub/locals.wat +++ b/tests/disas/winch/x64/i32_sub/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,4 +41,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/i32_sub/max.wat b/tests/disas/winch/x64/i32_sub/max.wat index f39a20621e82..da468f0ac422 100644 --- a/tests/disas/winch/x64/i32_sub/max.wat +++ b/tests/disas/winch/x64/i32_sub/max.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_sub/max_one.wat b/tests/disas/winch/x64/i32_sub/max_one.wat index 51a47785fb00..da7413fbb0de 100644 --- a/tests/disas/winch/x64/i32_sub/max_one.wat +++ b/tests/disas/winch/x64/i32_sub/max_one.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_sub/mixed.wat b/tests/disas/winch/x64/i32_sub/mixed.wat index 012ddb4c2a1a..b33f98b4dead 100644 --- a/tests/disas/winch/x64/i32_sub/mixed.wat +++ b/tests/disas/winch/x64/i32_sub/mixed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_sub/params.wat b/tests/disas/winch/x64/i32_sub/params.wat index 2acb8f47a43e..9ebdbf7438c3 100644 --- a/tests/disas/winch/x64/i32_sub/params.wat +++ b/tests/disas/winch/x64/i32_sub/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i32_sub/signed.wat b/tests/disas/winch/x64/i32_sub/signed.wat index fd219c95346e..44e0a2a33d0d 100644 --- a/tests/disas/winch/x64/i32_sub/signed.wat +++ b/tests/disas/winch/x64/i32_sub/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_sub/unsigned_with_zero.wat b/tests/disas/winch/x64/i32_sub/unsigned_with_zero.wat index e0e5203d6908..9ead2b23acc3 100644 --- a/tests/disas/winch/x64/i32_sub/unsigned_with_zero.wat +++ b/tests/disas/winch/x64/i32_sub/unsigned_with_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f32_s/const.wat b/tests/disas/winch/x64/i32_trunc_f32_s/const.wat index 7b2cab7c2cd7..b6c25b27f9dd 100644 --- a/tests/disas/winch/x64/i32_trunc_f32_s/const.wat +++ b/tests/disas/winch/x64/i32_trunc_f32_s/const.wat @@ -11,34 +11,34 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x73 -;; 1b: movq %rdi, %r14 +;; ja 0x74 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x4d(%rip), %xmm0 +;; movss 0x4c(%rip), %xmm0 ;; cvttss2si %xmm0, %eax ;; cmpl $1, %eax -;; jno 0x6d -;; 40: ucomiss %xmm0, %xmm0 -;; jp 0x75 -;; 49: movl $0xcf000000, %r11d +;; jno 0x6e +;; 41: ucomiss %xmm0, %xmm0 +;; jp 0x76 +;; 4a: movl $0xcf000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm0 -;; jb 0x77 -;; 5e: xorpd %xmm15, %xmm15 +;; jb 0x78 +;; 5f: xorpd %xmm15, %xmm15 ;; ucomiss %xmm0, %xmm15 -;; jb 0x79 -;; 6d: addq $0x10, %rsp +;; jb 0x7a +;; 6e: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 73: ud2 -;; 75: ud2 -;; 77: ud2 -;; 79: ud2 -;; 7b: addb %al, (%rax) -;; 7d: addb %al, (%rax) -;; 7f: addb %al, (%rax) +;; 74: ud2 +;; 76: ud2 +;; 78: ud2 +;; 7a: ud2 +;; 7c: addb %al, (%rax) +;; 7e: addb %al, (%rax) +;; 80: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i32_trunc_f32_s/locals.wat b/tests/disas/winch/x64/i32_trunc_f32_s/locals.wat index a9d1ae3a697d..163b9ca8d34f 100644 --- a/tests/disas/winch/x64/i32_trunc_f32_s/locals.wat +++ b/tests/disas/winch/x64/i32_trunc_f32_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7b -;; 1b: movq %rdi, %r14 +;; ja 0x7c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,20 +25,20 @@ ;; movss 0xc(%rsp), %xmm0 ;; cvttss2si %xmm0, %eax ;; cmpl $1, %eax -;; jno 0x75 -;; 48: ucomiss %xmm0, %xmm0 -;; jp 0x7d -;; 51: movl $0xcf000000, %r11d +;; jno 0x76 +;; 49: ucomiss %xmm0, %xmm0 +;; jp 0x7e +;; 52: movl $0xcf000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm0 -;; jb 0x7f -;; 66: xorpd %xmm15, %xmm15 +;; jb 0x80 +;; 67: xorpd %xmm15, %xmm15 ;; ucomiss %xmm0, %xmm15 -;; jb 0x81 -;; 75: addq $0x20, %rsp +;; jb 0x82 +;; 76: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7b: ud2 -;; 7d: ud2 -;; 7f: ud2 -;; 81: ud2 +;; 7c: ud2 +;; 7e: ud2 +;; 80: ud2 +;; 82: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f32_s/params.wat b/tests/disas/winch/x64/i32_trunc_f32_s/params.wat index 774342027062..8290bbd471ad 100644 --- a/tests/disas/winch/x64/i32_trunc_f32_s/params.wat +++ b/tests/disas/winch/x64/i32_trunc_f32_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 1b: movq %rdi, %r14 +;; ja 0x79 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,20 +23,20 @@ ;; movss 0xc(%rsp), %xmm0 ;; cvttss2si %xmm0, %eax ;; cmpl $1, %eax -;; jno 0x72 -;; 45: ucomiss %xmm0, %xmm0 -;; jp 0x7a -;; 4e: movl $0xcf000000, %r11d +;; jno 0x73 +;; 46: ucomiss %xmm0, %xmm0 +;; jp 0x7b +;; 4f: movl $0xcf000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm0 -;; jb 0x7c -;; 63: xorpd %xmm15, %xmm15 +;; jb 0x7d +;; 64: xorpd %xmm15, %xmm15 ;; ucomiss %xmm0, %xmm15 -;; jb 0x7e -;; 72: addq $0x20, %rsp +;; jb 0x7f +;; 73: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 78: ud2 -;; 7a: ud2 -;; 7c: ud2 -;; 7e: ud2 +;; 79: ud2 +;; 7b: ud2 +;; 7d: ud2 +;; 7f: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f32_u/const.wat b/tests/disas/winch/x64/i32_trunc_f32_u/const.wat index fd797005e3b6..9ee69f917dbc 100644 --- a/tests/disas/winch/x64/i32_trunc_f32_u/const.wat +++ b/tests/disas/winch/x64/i32_trunc_f32_u/const.wat @@ -11,36 +11,35 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7e -;; 1b: movq %rdi, %r14 +;; ja 0x7f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x55(%rip), %xmm1 +;; movss 0x54(%rip), %xmm1 ;; movl $0x4f000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm1 -;; jae 0x5d -;; jp 0x80 -;; 4e: cvttss2si %xmm1, %eax +;; jae 0x5e +;; jp 0x81 +;; 4f: cvttss2si %xmm1, %eax ;; cmpl $0, %eax -;; jge 0x78 -;; 5b: ud2 +;; jge 0x79 +;; 5c: ud2 ;; movaps %xmm1, %xmm0 ;; subss %xmm15, %xmm0 ;; cvttss2si %xmm0, %eax ;; cmpl $0, %eax -;; jl 0x82 -;; 72: addl $0x80000000, %eax +;; jl 0x83 +;; 73: addl $0x80000000, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 7e: ud2 -;; 80: ud2 -;; 82: ud2 -;; 84: addb %al, (%rax) -;; 86: addb %al, (%rax) -;; 88: addb %al, (%rax) +;; 7f: ud2 +;; 81: ud2 +;; 83: ud2 +;; 85: addb %al, (%rax) +;; 87: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i32_trunc_f32_u/locals.wat b/tests/disas/winch/x64/i32_trunc_f32_u/locals.wat index 3a1f076d4ef9..39d1b73ed408 100644 --- a/tests/disas/winch/x64/i32_trunc_f32_u/locals.wat +++ b/tests/disas/winch/x64/i32_trunc_f32_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 1b: movq %rdi, %r14 +;; ja 0x87 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,21 +26,21 @@ ;; movl $0x4f000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm1 -;; jae 0x65 -;; jp 0x88 -;; 56: cvttss2si %xmm1, %eax +;; jae 0x66 +;; jp 0x89 +;; 57: cvttss2si %xmm1, %eax ;; cmpl $0, %eax -;; jge 0x80 -;; 63: ud2 +;; jge 0x81 +;; 64: ud2 ;; movaps %xmm1, %xmm0 ;; subss %xmm15, %xmm0 ;; cvttss2si %xmm0, %eax ;; cmpl $0, %eax -;; jl 0x8a -;; 7a: addl $0x80000000, %eax +;; jl 0x8b +;; 7b: addl $0x80000000, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 86: ud2 -;; 88: ud2 -;; 8a: ud2 +;; 87: ud2 +;; 89: ud2 +;; 8b: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f32_u/params.wat b/tests/disas/winch/x64/i32_trunc_f32_u/params.wat index b51d82cc5ab5..8d14717dd874 100644 --- a/tests/disas/winch/x64/i32_trunc_f32_u/params.wat +++ b/tests/disas/winch/x64/i32_trunc_f32_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 1b: movq %rdi, %r14 +;; ja 0x84 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -24,21 +24,21 @@ ;; movl $0x4f000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm1 -;; jae 0x62 -;; jp 0x85 -;; 53: cvttss2si %xmm1, %eax +;; jae 0x63 +;; jp 0x86 +;; 54: cvttss2si %xmm1, %eax ;; cmpl $0, %eax -;; jge 0x7d -;; 60: ud2 +;; jge 0x7e +;; 61: ud2 ;; movaps %xmm1, %xmm0 ;; subss %xmm15, %xmm0 ;; cvttss2si %xmm0, %eax ;; cmpl $0, %eax -;; jl 0x87 -;; 77: addl $0x80000000, %eax +;; jl 0x88 +;; 78: addl $0x80000000, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 83: ud2 -;; 85: ud2 -;; 87: ud2 +;; 84: ud2 +;; 86: ud2 +;; 88: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f64_s/const.wat b/tests/disas/winch/x64/i32_trunc_f64_s/const.wat index bbdade444d43..f5d58d9d8822 100644 --- a/tests/disas/winch/x64/i32_trunc_f64_s/const.wat +++ b/tests/disas/winch/x64/i32_trunc_f64_s/const.wat @@ -11,37 +11,37 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7a -;; 1b: movq %rdi, %r14 +;; ja 0x7b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x55(%rip), %xmm0 +;; movsd 0x54(%rip), %xmm0 ;; cvttsd2si %xmm0, %eax ;; cmpl $1, %eax -;; jno 0x74 -;; 40: ucomisd %xmm0, %xmm0 -;; jp 0x7c -;; 4a: movabsq $13970166044105375744, %r11 +;; jno 0x75 +;; 41: ucomisd %xmm0, %xmm0 +;; jp 0x7d +;; 4b: movabsq $13970166044105375744, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm0 -;; jbe 0x7e -;; 64: xorpd %xmm15, %xmm15 +;; jbe 0x7f +;; 65: xorpd %xmm15, %xmm15 ;; ucomisd %xmm0, %xmm15 -;; jb 0x80 -;; 74: addq $0x10, %rsp +;; jb 0x81 +;; 75: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 7a: ud2 -;; 7c: ud2 -;; 7e: ud2 -;; 80: ud2 -;; 82: addb %al, (%rax) -;; 84: addb %al, (%rax) -;; 86: addb %al, (%rax) -;; 88: addb %al, (%rax) -;; 8a: addb %al, (%rax) -;; 8c: addb %al, (%rax) +;; 7b: ud2 +;; 7d: ud2 +;; 7f: ud2 +;; 81: ud2 +;; 83: addb %al, (%rax) +;; 85: addb %al, (%rax) +;; 87: addb %al, (%rax) +;; 89: addb %al, (%rax) +;; 8b: addb %al, (%rax) +;; 8d: addb %dh, %al diff --git a/tests/disas/winch/x64/i32_trunc_f64_s/locals.wat b/tests/disas/winch/x64/i32_trunc_f64_s/locals.wat index f90481b0307b..3daa08e79116 100644 --- a/tests/disas/winch/x64/i32_trunc_f64_s/locals.wat +++ b/tests/disas/winch/x64/i32_trunc_f64_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x82 -;; 1b: movq %rdi, %r14 +;; ja 0x83 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,20 +25,20 @@ ;; movsd 8(%rsp), %xmm0 ;; cvttsd2si %xmm0, %eax ;; cmpl $1, %eax -;; jno 0x7c -;; 48: ucomisd %xmm0, %xmm0 -;; jp 0x84 -;; 52: movabsq $13970166044105375744, %r11 +;; jno 0x7d +;; 49: ucomisd %xmm0, %xmm0 +;; jp 0x85 +;; 53: movabsq $13970166044105375744, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm0 -;; jbe 0x86 -;; 6c: xorpd %xmm15, %xmm15 +;; jbe 0x87 +;; 6d: xorpd %xmm15, %xmm15 ;; ucomisd %xmm0, %xmm15 -;; jb 0x88 -;; 7c: addq $0x20, %rsp +;; jb 0x89 +;; 7d: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 82: ud2 -;; 84: ud2 -;; 86: ud2 -;; 88: ud2 +;; 83: ud2 +;; 85: ud2 +;; 87: ud2 +;; 89: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f64_s/params.wat b/tests/disas/winch/x64/i32_trunc_f64_s/params.wat index af4882b56200..543f896560f1 100644 --- a/tests/disas/winch/x64/i32_trunc_f64_s/params.wat +++ b/tests/disas/winch/x64/i32_trunc_f64_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7f -;; 1b: movq %rdi, %r14 +;; ja 0x80 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,20 +23,20 @@ ;; movsd 8(%rsp), %xmm0 ;; cvttsd2si %xmm0, %eax ;; cmpl $1, %eax -;; jno 0x79 -;; 45: ucomisd %xmm0, %xmm0 -;; jp 0x81 -;; 4f: movabsq $13970166044105375744, %r11 +;; jno 0x7a +;; 46: ucomisd %xmm0, %xmm0 +;; jp 0x82 +;; 50: movabsq $13970166044105375744, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm0 -;; jbe 0x83 -;; 69: xorpd %xmm15, %xmm15 +;; jbe 0x84 +;; 6a: xorpd %xmm15, %xmm15 ;; ucomisd %xmm0, %xmm15 -;; jb 0x85 -;; 79: addq $0x20, %rsp +;; jb 0x86 +;; 7a: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7f: ud2 -;; 81: ud2 -;; 83: ud2 -;; 85: ud2 +;; 80: ud2 +;; 82: ud2 +;; 84: ud2 +;; 86: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f64_u/const.wat b/tests/disas/winch/x64/i32_trunc_f64_u/const.wat index a15a80948f60..27829cced8cf 100644 --- a/tests/disas/winch/x64/i32_trunc_f64_u/const.wat +++ b/tests/disas/winch/x64/i32_trunc_f64_u/const.wat @@ -11,40 +11,39 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 1b: movq %rdi, %r14 +;; ja 0x84 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x5d(%rip), %xmm1 +;; movsd 0x5c(%rip), %xmm1 ;; movabsq $0x41e0000000000000, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm1 -;; jae 0x62 -;; jp 0x85 -;; 53: cvttsd2si %xmm1, %eax +;; jae 0x63 +;; jp 0x86 +;; 54: cvttsd2si %xmm1, %eax ;; cmpl $0, %eax -;; jge 0x7d -;; 60: ud2 +;; jge 0x7e +;; 61: ud2 ;; movaps %xmm1, %xmm0 ;; subsd %xmm15, %xmm0 ;; cvttsd2si %xmm0, %eax ;; cmpl $0, %eax -;; jl 0x87 -;; 77: addl $0x80000000, %eax +;; jl 0x88 +;; 78: addl $0x80000000, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 -;; 85: ud2 -;; 87: ud2 -;; 89: addb %al, (%rax) -;; 8b: addb %al, (%rax) -;; 8d: addb %al, (%rax) -;; 8f: addb %al, (%rax) -;; 91: addb %al, (%rax) -;; 93: addb %al, (%rax) -;; 95: addb %dh, %al +;; 84: ud2 +;; 86: ud2 +;; 88: ud2 +;; 8a: addb %al, (%rax) +;; 8c: addb %al, (%rax) +;; 8e: addb %al, (%rax) +;; 90: addb %al, (%rax) +;; 92: addb %al, (%rax) +;; 94: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i32_trunc_f64_u/locals.wat b/tests/disas/winch/x64/i32_trunc_f64_u/locals.wat index 51dfb9f6f2f6..c9fedcc46da4 100644 --- a/tests/disas/winch/x64/i32_trunc_f64_u/locals.wat +++ b/tests/disas/winch/x64/i32_trunc_f64_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8b -;; 1b: movq %rdi, %r14 +;; ja 0x8c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,21 +26,21 @@ ;; movabsq $0x41e0000000000000, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm1 -;; jae 0x6a -;; jp 0x8d -;; 5b: cvttsd2si %xmm1, %eax +;; jae 0x6b +;; jp 0x8e +;; 5c: cvttsd2si %xmm1, %eax ;; cmpl $0, %eax -;; jge 0x85 -;; 68: ud2 +;; jge 0x86 +;; 69: ud2 ;; movaps %xmm1, %xmm0 ;; subsd %xmm15, %xmm0 ;; cvttsd2si %xmm0, %eax ;; cmpl $0, %eax -;; jl 0x8f -;; 7f: addl $0x80000000, %eax +;; jl 0x90 +;; 80: addl $0x80000000, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8b: ud2 -;; 8d: ud2 -;; 8f: ud2 +;; 8c: ud2 +;; 8e: ud2 +;; 90: ud2 diff --git a/tests/disas/winch/x64/i32_trunc_f64_u/params.wat b/tests/disas/winch/x64/i32_trunc_f64_u/params.wat index a98c09654539..cc2a673fadda 100644 --- a/tests/disas/winch/x64/i32_trunc_f64_u/params.wat +++ b/tests/disas/winch/x64/i32_trunc_f64_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x88 -;; 1b: movq %rdi, %r14 +;; ja 0x89 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -24,21 +24,21 @@ ;; movabsq $0x41e0000000000000, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm1 -;; jae 0x67 -;; jp 0x8a -;; 58: cvttsd2si %xmm1, %eax +;; jae 0x68 +;; jp 0x8b +;; 59: cvttsd2si %xmm1, %eax ;; cmpl $0, %eax -;; jge 0x82 -;; 65: ud2 +;; jge 0x83 +;; 66: ud2 ;; movaps %xmm1, %xmm0 ;; subsd %xmm15, %xmm0 ;; cvttsd2si %xmm0, %eax ;; cmpl $0, %eax -;; jl 0x8c -;; 7c: addl $0x80000000, %eax +;; jl 0x8d +;; 7d: addl $0x80000000, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 88: ud2 -;; 8a: ud2 -;; 8c: ud2 +;; 89: ud2 +;; 8b: ud2 +;; 8d: ud2 diff --git a/tests/disas/winch/x64/i32_wrap_i64/const.wat b/tests/disas/winch/x64/i32_wrap_i64/const.wat index 9a5b7129ad25..0827b20c2dda 100644 --- a/tests/disas/winch/x64/i32_wrap_i64/const.wat +++ b/tests/disas/winch/x64/i32_wrap_i64/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/i32_wrap_i64/locals.wat b/tests/disas/winch/x64/i32_wrap_i64/locals.wat index b4a6cd1ef67f..0bc9a712af4c 100644 --- a/tests/disas/winch/x64/i32_wrap_i64/locals.wat +++ b/tests/disas/winch/x64/i32_wrap_i64/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i32_wrap_i64/params.wat b/tests/disas/winch/x64/i32_wrap_i64/params.wat index 22b338da1679..fa51de0c4f92 100644 --- a/tests/disas/winch/x64/i32_wrap_i64/params.wat +++ b/tests/disas/winch/x64/i32_wrap_i64/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/i32_wrap_i64/spilled.wat b/tests/disas/winch/x64/i32_wrap_i64/spilled.wat index af588e3a616f..92d0e0e5a8ee 100644 --- a/tests/disas/winch/x64/i32_wrap_i64/spilled.wat +++ b/tests/disas/winch/x64/i32_wrap_i64/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -30,4 +30,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i32_xor/const.wat b/tests/disas/winch/x64/i32_xor/const.wat index d775a914f94d..64d063ceb2dd 100644 --- a/tests/disas/winch/x64/i32_xor/const.wat +++ b/tests/disas/winch/x64/i32_xor/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i32_xor/locals.wat b/tests/disas/winch/x64/i32_xor/locals.wat index cb77a435c0e7..b80b01ef020a 100644 --- a/tests/disas/winch/x64/i32_xor/locals.wat +++ b/tests/disas/winch/x64/i32_xor/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -41,4 +41,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/i32_xor/params.wat b/tests/disas/winch/x64/i32_xor/params.wat index 2546fccb1cca..1df5ffd1a396 100644 --- a/tests/disas/winch/x64/i32_xor/params.wat +++ b/tests/disas/winch/x64/i32_xor/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i64_add/const.wat b/tests/disas/winch/x64/i64_add/const.wat index ac1514efadec..1fe162888d60 100644 --- a/tests/disas/winch/x64/i64_add/const.wat +++ b/tests/disas/winch/x64/i64_add/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_add/locals.wat b/tests/disas/winch/x64/i64_add/locals.wat index 984f996b5f4b..b9e801517f08 100644 --- a/tests/disas/winch/x64/i64_add/locals.wat +++ b/tests/disas/winch/x64/i64_add/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x64 -;; 1b: movq %rdi, %r14 +;; ja 0x65 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,4 +43,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 64: ud2 +;; 65: ud2 diff --git a/tests/disas/winch/x64/i64_add/max.wat b/tests/disas/winch/x64/i64_add/max.wat index 35c236cde295..a9bf1e29e86b 100644 --- a/tests/disas/winch/x64/i64_add/max.wat +++ b/tests/disas/winch/x64/i64_add/max.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_add/max_one.wat b/tests/disas/winch/x64/i64_add/max_one.wat index 82c44cceaea7..fdeaaa25b1c1 100644 --- a/tests/disas/winch/x64/i64_add/max_one.wat +++ b/tests/disas/winch/x64/i64_add/max_one.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i64_add/mixed.wat b/tests/disas/winch/x64/i64_add/mixed.wat index 3224d883021c..ba89965de5a9 100644 --- a/tests/disas/winch/x64/i64_add/mixed.wat +++ b/tests/disas/winch/x64/i64_add/mixed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_add/params.wat b/tests/disas/winch/x64/i64_add/params.wat index 8e88b2fe8baf..d263316598ff 100644 --- a/tests/disas/winch/x64/i64_add/params.wat +++ b/tests/disas/winch/x64/i64_add/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/i64_add/signed.wat b/tests/disas/winch/x64/i64_add/signed.wat index ade6a5af0ea2..27a49220de22 100644 --- a/tests/disas/winch/x64/i64_add/signed.wat +++ b/tests/disas/winch/x64/i64_add/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_add/unsigned_with_zero.wat b/tests/disas/winch/x64/i64_add/unsigned_with_zero.wat index 4cd53a5f0ef0..33d8494083ca 100644 --- a/tests/disas/winch/x64/i64_add/unsigned_with_zero.wat +++ b/tests/disas/winch/x64/i64_add/unsigned_with_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_and/32_const.wat b/tests/disas/winch/x64/i64_and/32_const.wat index 94531f193569..14f3e635c447 100644 --- a/tests/disas/winch/x64/i64_and/32_const.wat +++ b/tests/disas/winch/x64/i64_and/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_and/64_const.wat b/tests/disas/winch/x64/i64_and/64_const.wat index c9cfc813a197..04dad2308a71 100644 --- a/tests/disas/winch/x64/i64_and/64_const.wat +++ b/tests/disas/winch/x64/i64_and/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_and/locals.wat b/tests/disas/winch/x64/i64_and/locals.wat index 22d1f7bc2416..1f0d5bf858d5 100644 --- a/tests/disas/winch/x64/i64_and/locals.wat +++ b/tests/disas/winch/x64/i64_and/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x64 -;; 1b: movq %rdi, %r14 +;; ja 0x65 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 64: ud2 +;; 65: ud2 diff --git a/tests/disas/winch/x64/i64_and/params.wat b/tests/disas/winch/x64/i64_and/params.wat index f5310b3100ae..df1f1b9389c9 100644 --- a/tests/disas/winch/x64/i64_and/params.wat +++ b/tests/disas/winch/x64/i64_and/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/i64_clz/lzcnt_const.wat b/tests/disas/winch/x64/i64_clz/lzcnt_const.wat index 62d318d3f72e..84336edd8363 100644 --- a/tests/disas/winch/x64/i64_clz/lzcnt_const.wat +++ b/tests/disas/winch/x64/i64_clz/lzcnt_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/i64_clz/lzcnt_local.wat b/tests/disas/winch/x64/i64_clz/lzcnt_local.wat index 28f299c9635d..a27ef80105b8 100644 --- a/tests/disas/winch/x64/i64_clz/lzcnt_local.wat +++ b/tests/disas/winch/x64/i64_clz/lzcnt_local.wat @@ -17,11 +17,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_clz/lzcnt_param.wat b/tests/disas/winch/x64/i64_clz/lzcnt_param.wat index 1064e6bcadf2..283462cfda69 100644 --- a/tests/disas/winch/x64/i64_clz/lzcnt_param.wat +++ b/tests/disas/winch/x64/i64_clz/lzcnt_param.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i64_clz/no_lzcnt_const.wat b/tests/disas/winch/x64/i64_clz/no_lzcnt_const.wat index fd2716740ad5..a8e696a498f0 100644 --- a/tests/disas/winch/x64/i64_clz/no_lzcnt_const.wat +++ b/tests/disas/winch/x64/i64_clz/no_lzcnt_const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x50 -;; 1b: movq %rdi, %r14 +;; ja 0x51 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -29,4 +29,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 50: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/i64_clz/no_lzcnt_local.wat b/tests/disas/winch/x64/i64_clz/no_lzcnt_local.wat index 7f95d62c876f..02070dff0797 100644 --- a/tests/disas/winch/x64/i64_clz/no_lzcnt_local.wat +++ b/tests/disas/winch/x64/i64_clz/no_lzcnt_local.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x64 -;; 1b: movq %rdi, %r14 +;; ja 0x65 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -37,4 +37,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 64: ud2 +;; 65: ud2 diff --git a/tests/disas/winch/x64/i64_clz/no_lzcnt_param.wat b/tests/disas/winch/x64/i64_clz/no_lzcnt_param.wat index 0802b7af50f9..227e9d27b789 100644 --- a/tests/disas/winch/x64/i64_clz/no_lzcnt_param.wat +++ b/tests/disas/winch/x64/i64_clz/no_lzcnt_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x54 -;; 1b: movq %rdi, %r14 +;; ja 0x55 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 54: ud2 +;; 55: ud2 diff --git a/tests/disas/winch/x64/i64_ctz/bmi1_const.wat b/tests/disas/winch/x64/i64_ctz/bmi1_const.wat index 019f05f43744..4e57b700c02e 100644 --- a/tests/disas/winch/x64/i64_ctz/bmi1_const.wat +++ b/tests/disas/winch/x64/i64_ctz/bmi1_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/i64_ctz/bmi1_local.wat b/tests/disas/winch/x64/i64_ctz/bmi1_local.wat index 5cd93805f246..f63e5c4bb8b5 100644 --- a/tests/disas/winch/x64/i64_ctz/bmi1_local.wat +++ b/tests/disas/winch/x64/i64_ctz/bmi1_local.wat @@ -17,11 +17,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -33,4 +33,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_ctz/bmi1_param.wat b/tests/disas/winch/x64/i64_ctz/bmi1_param.wat index cf4eaa7a625a..3f5b80850865 100644 --- a/tests/disas/winch/x64/i64_ctz/bmi1_param.wat +++ b/tests/disas/winch/x64/i64_ctz/bmi1_param.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i64_ctz/no_bmi1_const.wat b/tests/disas/winch/x64/i64_ctz/no_bmi1_const.wat index 9114939f2aa1..40aeedd395e4 100644 --- a/tests/disas/winch/x64/i64_ctz/no_bmi1_const.wat +++ b/tests/disas/winch/x64/i64_ctz/no_bmi1_const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/i64_ctz/no_bmi1_local.wat b/tests/disas/winch/x64/i64_ctz/no_bmi1_local.wat index db19dee19d9d..654f0f560462 100644 --- a/tests/disas/winch/x64/i64_ctz/no_bmi1_local.wat +++ b/tests/disas/winch/x64/i64_ctz/no_bmi1_local.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x61 -;; 1b: movq %rdi, %r14 +;; ja 0x62 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -36,4 +36,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 61: ud2 +;; 62: ud2 diff --git a/tests/disas/winch/x64/i64_ctz/no_bmi1_param.wat b/tests/disas/winch/x64/i64_ctz/no_bmi1_param.wat index bf247bfef5b6..0e3a2048a8e6 100644 --- a/tests/disas/winch/x64/i64_ctz/no_bmi1_param.wat +++ b/tests/disas/winch/x64/i64_ctz/no_bmi1_param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_divs/const.wat b/tests/disas/winch/x64/i64_divs/const.wat index 45d2d4283e03..dd7999919bef 100644 --- a/tests/disas/winch/x64/i64_divs/const.wat +++ b/tests/disas/winch/x64/i64_divs/const.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $0xa, %rcx ;; movq $0x14, %rax ;; cmpq $0, %rcx -;; je 0x50 -;; 43: cqto +;; je 0x51 +;; 44: cqto ;; idivq %rcx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 -;; 50: ud2 +;; 4f: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/i64_divs/one_zero.wat b/tests/disas/winch/x64/i64_divs/one_zero.wat index 2419a3145f09..3f142a762114 100644 --- a/tests/disas/winch/x64/i64_divs/one_zero.wat +++ b/tests/disas/winch/x64/i64_divs/one_zero.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $0, %rcx ;; movq $1, %rax ;; cmpq $0, %rcx -;; je 0x50 -;; 43: cqto +;; je 0x51 +;; 44: cqto ;; idivq %rcx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 -;; 50: ud2 +;; 4f: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/i64_divs/overflow.wat b/tests/disas/winch/x64/i64_divs/overflow.wat index f000191b40eb..db021b1706c7 100644 --- a/tests/disas/winch/x64/i64_divs/overflow.wat +++ b/tests/disas/winch/x64/i64_divs/overflow.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $18446744073709551615, %rcx ;; movabsq $9223372036854775808, %rax ;; cmpq $0, %rcx -;; je 0x53 -;; 46: cqto +;; je 0x54 +;; 47: cqto ;; idivq %rcx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 -;; 53: ud2 +;; 52: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/i64_divs/params.wat b/tests/disas/winch/x64/i64_divs/params.wat index d6751aaf2313..68f984e15e3f 100644 --- a/tests/disas/winch/x64/i64_divs/params.wat +++ b/tests/disas/winch/x64/i64_divs/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,11 +25,11 @@ ;; movq (%rsp), %rcx ;; movq 8(%rsp), %rax ;; cmpq $0, %rcx -;; je 0x55 -;; 48: cqto +;; je 0x56 +;; 49: cqto ;; idivq %rcx ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 53: ud2 -;; 55: ud2 +;; 54: ud2 +;; 56: ud2 diff --git a/tests/disas/winch/x64/i64_divs/zero_zero.wat b/tests/disas/winch/x64/i64_divs/zero_zero.wat index c664fcc579ef..558bd9fdc2df 100644 --- a/tests/disas/winch/x64/i64_divs/zero_zero.wat +++ b/tests/disas/winch/x64/i64_divs/zero_zero.wat @@ -12,22 +12,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4e -;; 1b: movq %rdi, %r14 +;; ja 0x4f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq $0, %rcx ;; movq $0, %rax ;; cmpq $0, %rcx -;; je 0x50 -;; 43: cqto +;; je 0x51 +;; 44: cqto ;; idivq %rcx ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4e: ud2 -;; 50: ud2 +;; 4f: ud2 +;; 51: ud2 diff --git a/tests/disas/winch/x64/i64_divu/const.wat b/tests/disas/winch/x64/i64_divu/const.wat index 7e88ca7218d8..b1862fc089f6 100644 --- a/tests/disas/winch/x64/i64_divu/const.wat +++ b/tests/disas/winch/x64/i64_divu/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_divu/one_zero.wat b/tests/disas/winch/x64/i64_divu/one_zero.wat index 1637e3583fad..d4a87095ace6 100644 --- a/tests/disas/winch/x64/i64_divu/one_zero.wat +++ b/tests/disas/winch/x64/i64_divu/one_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_divu/params.wat b/tests/disas/winch/x64/i64_divu/params.wat index 1a2ce3ae76d8..190298dfd872 100644 --- a/tests/disas/winch/x64/i64_divu/params.wat +++ b/tests/disas/winch/x64/i64_divu/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/i64_divu/signed.wat b/tests/disas/winch/x64/i64_divu/signed.wat index a261bbafe052..6d2cefd9e838 100644 --- a/tests/disas/winch/x64/i64_divu/signed.wat +++ b/tests/disas/winch/x64/i64_divu/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_divu/zero_zero.wat b/tests/disas/winch/x64/i64_divu/zero_zero.wat index fd663dfe7961..32c34aca095d 100644 --- a/tests/disas/winch/x64/i64_divu/zero_zero.wat +++ b/tests/disas/winch/x64/i64_divu/zero_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_eq/32_const.wat b/tests/disas/winch/x64/i64_eq/32_const.wat index 6b9168f3422b..591bef8a9d15 100644 --- a/tests/disas/winch/x64/i64_eq/32_const.wat +++ b/tests/disas/winch/x64/i64_eq/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_eq/64_const.wat b/tests/disas/winch/x64/i64_eq/64_const.wat index 3a68c0a5764b..4a201a6631fa 100644 --- a/tests/disas/winch/x64/i64_eq/64_const.wat +++ b/tests/disas/winch/x64/i64_eq/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_eq/locals.wat b/tests/disas/winch/x64/i64_eq/locals.wat index 8f84c5f8812d..86af54acf62b 100644 --- a/tests/disas/winch/x64/i64_eq/locals.wat +++ b/tests/disas/winch/x64/i64_eq/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_eq/params.wat b/tests/disas/winch/x64/i64_eq/params.wat index b26985ffb68d..45de406e1279 100644 --- a/tests/disas/winch/x64/i64_eq/params.wat +++ b/tests/disas/winch/x64/i64_eq/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_eqz/32_const.wat b/tests/disas/winch/x64/i64_eqz/32_const.wat index 63b99ba1cffd..a7f14ec7dd05 100644 --- a/tests/disas/winch/x64/i64_eqz/32_const.wat +++ b/tests/disas/winch/x64/i64_eqz/32_const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_eqz/64_const.wat b/tests/disas/winch/x64/i64_eqz/64_const.wat index 8fe8ec5e2169..4d7cdd45928b 100644 --- a/tests/disas/winch/x64/i64_eqz/64_const.wat +++ b/tests/disas/winch/x64/i64_eqz/64_const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_eqz/local.wat b/tests/disas/winch/x64/i64_eqz/local.wat index 3c5de92fc4ba..0f4b58aa7591 100644 --- a/tests/disas/winch/x64/i64_eqz/local.wat +++ b/tests/disas/winch/x64/i64_eqz/local.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -34,4 +34,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/i64_eqz/param.wat b/tests/disas/winch/x64/i64_eqz/param.wat index 073a7b7bd46e..f5c64a920526 100644 --- a/tests/disas/winch/x64/i64_eqz/param.wat +++ b/tests/disas/winch/x64/i64_eqz/param.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 49: ud2 +;; 4a: ud2 diff --git a/tests/disas/winch/x64/i64_eqz/spilled.wat b/tests/disas/winch/x64/i64_eqz/spilled.wat index 1466e7158a6b..acc7f091e1eb 100644 --- a/tests/disas/winch/x64/i64_eqz/spilled.wat +++ b/tests/disas/winch/x64/i64_eqz/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x14, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -32,4 +32,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/i64_extend_16_s/const.wat b/tests/disas/winch/x64/i64_extend_16_s/const.wat index 1789634a3310..639ac547e460 100644 --- a/tests/disas/winch/x64/i64_extend_16_s/const.wat +++ b/tests/disas/winch/x64/i64_extend_16_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_extend_16_s/locals.wat b/tests/disas/winch/x64/i64_extend_16_s/locals.wat index fbc63570c254..bb5201d9a221 100644 --- a/tests/disas/winch/x64/i64_extend_16_s/locals.wat +++ b/tests/disas/winch/x64/i64_extend_16_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i64_extend_16_s/params.wat b/tests/disas/winch/x64/i64_extend_16_s/params.wat index 65fa91aa7770..3e3af0584150 100644 --- a/tests/disas/winch/x64/i64_extend_16_s/params.wat +++ b/tests/disas/winch/x64/i64_extend_16_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x40 -;; 1b: movq %rdi, %r14 +;; ja 0x41 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 40: ud2 +;; 41: ud2 diff --git a/tests/disas/winch/x64/i64_extend_32_s/const.wat b/tests/disas/winch/x64/i64_extend_32_s/const.wat index fe971266b321..ccee1a8653e7 100644 --- a/tests/disas/winch/x64/i64_extend_32_s/const.wat +++ b/tests/disas/winch/x64/i64_extend_32_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3b -;; 1b: movq %rdi, %r14 +;; ja 0x3c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3b: ud2 +;; 3c: ud2 diff --git a/tests/disas/winch/x64/i64_extend_32_s/locals.wat b/tests/disas/winch/x64/i64_extend_32_s/locals.wat index 4ec636bc98a1..42514da58aa5 100644 --- a/tests/disas/winch/x64/i64_extend_32_s/locals.wat +++ b/tests/disas/winch/x64/i64_extend_32_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/i64_extend_32_s/params.wat b/tests/disas/winch/x64/i64_extend_32_s/params.wat index 25d62d7ba12b..b6a2e09f035e 100644 --- a/tests/disas/winch/x64/i64_extend_32_s/params.wat +++ b/tests/disas/winch/x64/i64_extend_32_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i64_extend_8_s/const.wat b/tests/disas/winch/x64/i64_extend_8_s/const.wat index d8f0ec574bc5..cf355f8acef1 100644 --- a/tests/disas/winch/x64/i64_extend_8_s/const.wat +++ b/tests/disas/winch/x64/i64_extend_8_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_extend_8_s/locals.wat b/tests/disas/winch/x64/i64_extend_8_s/locals.wat index fa6f15bf4135..be1b8c79ab0f 100644 --- a/tests/disas/winch/x64/i64_extend_8_s/locals.wat +++ b/tests/disas/winch/x64/i64_extend_8_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/i64_extend_8_s/params.wat b/tests/disas/winch/x64/i64_extend_8_s/params.wat index 97462e40971c..53b44d76f568 100644 --- a/tests/disas/winch/x64/i64_extend_8_s/params.wat +++ b/tests/disas/winch/x64/i64_extend_8_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x40 -;; 1b: movq %rdi, %r14 +;; ja 0x41 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 40: ud2 +;; 41: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_s/const.wat b/tests/disas/winch/x64/i64_extend_i32_s/const.wat index 4f63bf7f156e..7d12998f2c5c 100644 --- a/tests/disas/winch/x64/i64_extend_i32_s/const.wat +++ b/tests/disas/winch/x64/i64_extend_i32_s/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x39 -;; 1b: movq %rdi, %r14 +;; ja 0x3a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 39: ud2 +;; 3a: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_s/locals.wat b/tests/disas/winch/x64/i64_extend_i32_s/locals.wat index 709e1774dafe..1eb64bb2f184 100644 --- a/tests/disas/winch/x64/i64_extend_i32_s/locals.wat +++ b/tests/disas/winch/x64/i64_extend_i32_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x42 -;; 1b: movq %rdi, %r14 +;; ja 0x43 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 42: ud2 +;; 43: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_s/params.wat b/tests/disas/winch/x64/i64_extend_i32_s/params.wat index a4967c22622a..e34619710b24 100644 --- a/tests/disas/winch/x64/i64_extend_i32_s/params.wat +++ b/tests/disas/winch/x64/i64_extend_i32_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_s/spilled.wat b/tests/disas/winch/x64/i64_extend_i32_s/spilled.wat index 89e060332f78..5fdac4697cf3 100644 --- a/tests/disas/winch/x64/i64_extend_i32_s/spilled.wat +++ b/tests/disas/winch/x64/i64_extend_i32_s/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3b -;; 1b: movq %rdi, %r14 +;; ja 0x3c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3b: ud2 +;; 3c: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_u/const.wat b/tests/disas/winch/x64/i64_extend_i32_u/const.wat index 7dee85992342..4370fe08973a 100644 --- a/tests/disas/winch/x64/i64_extend_i32_u/const.wat +++ b/tests/disas/winch/x64/i64_extend_i32_u/const.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x38 -;; 1b: movq %rdi, %r14 +;; ja 0x39 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 38: ud2 +;; 39: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_u/locals.wat b/tests/disas/winch/x64/i64_extend_i32_u/locals.wat index f84a64a1fa70..29d1c3a43cc9 100644 --- a/tests/disas/winch/x64/i64_extend_i32_u/locals.wat +++ b/tests/disas/winch/x64/i64_extend_i32_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_u/params.wat b/tests/disas/winch/x64/i64_extend_i32_u/params.wat index dd212978a97c..5e3ce8ac5fc8 100644 --- a/tests/disas/winch/x64/i64_extend_i32_u/params.wat +++ b/tests/disas/winch/x64/i64_extend_i32_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_extend_i32_u/spilled.wat b/tests/disas/winch/x64/i64_extend_i32_u/spilled.wat index 445b554d0810..c3ea344467ef 100644 --- a/tests/disas/winch/x64/i64_extend_i32_u/spilled.wat +++ b/tests/disas/winch/x64/i64_extend_i32_u/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x18, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 diff --git a/tests/disas/winch/x64/i64_ge_s/32_const.wat b/tests/disas/winch/x64/i64_ge_s/32_const.wat index cd416df62cc4..6f203d69d1e0 100644 --- a/tests/disas/winch/x64/i64_ge_s/32_const.wat +++ b/tests/disas/winch/x64/i64_ge_s/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_ge_s/64_const.wat b/tests/disas/winch/x64/i64_ge_s/64_const.wat index 6e857e2ff0d0..f3485e75f4c3 100644 --- a/tests/disas/winch/x64/i64_ge_s/64_const.wat +++ b/tests/disas/winch/x64/i64_ge_s/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_ge_s/locals.wat b/tests/disas/winch/x64/i64_ge_s/locals.wat index eb91bbbc3895..f955d97533b6 100644 --- a/tests/disas/winch/x64/i64_ge_s/locals.wat +++ b/tests/disas/winch/x64/i64_ge_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_ge_s/params.wat b/tests/disas/winch/x64/i64_ge_s/params.wat index e0691bd3af14..5d103637968f 100644 --- a/tests/disas/winch/x64/i64_ge_s/params.wat +++ b/tests/disas/winch/x64/i64_ge_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_ge_u/32_const.wat b/tests/disas/winch/x64/i64_ge_u/32_const.wat index 603663b25e29..15eae43aaa2e 100644 --- a/tests/disas/winch/x64/i64_ge_u/32_const.wat +++ b/tests/disas/winch/x64/i64_ge_u/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_ge_u/64_const.wat b/tests/disas/winch/x64/i64_ge_u/64_const.wat index 6eb2f240ca2a..418c93ed00f0 100644 --- a/tests/disas/winch/x64/i64_ge_u/64_const.wat +++ b/tests/disas/winch/x64/i64_ge_u/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_ge_u/locals.wat b/tests/disas/winch/x64/i64_ge_u/locals.wat index d076be460811..913bea2fb81b 100644 --- a/tests/disas/winch/x64/i64_ge_u/locals.wat +++ b/tests/disas/winch/x64/i64_ge_u/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_ge_u/params.wat b/tests/disas/winch/x64/i64_ge_u/params.wat index faa78ff2aa62..26b36ee46a59 100644 --- a/tests/disas/winch/x64/i64_ge_u/params.wat +++ b/tests/disas/winch/x64/i64_ge_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_gt_s/32_const.wat b/tests/disas/winch/x64/i64_gt_s/32_const.wat index 89967bacd225..2971bd512457 100644 --- a/tests/disas/winch/x64/i64_gt_s/32_const.wat +++ b/tests/disas/winch/x64/i64_gt_s/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_gt_s/64_const.wat b/tests/disas/winch/x64/i64_gt_s/64_const.wat index 89fdff985f7f..a88b61ce528e 100644 --- a/tests/disas/winch/x64/i64_gt_s/64_const.wat +++ b/tests/disas/winch/x64/i64_gt_s/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_gt_s/locals.wat b/tests/disas/winch/x64/i64_gt_s/locals.wat index fc5a58619aa8..074875ac774b 100644 --- a/tests/disas/winch/x64/i64_gt_s/locals.wat +++ b/tests/disas/winch/x64/i64_gt_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_gt_s/params.wat b/tests/disas/winch/x64/i64_gt_s/params.wat index 7d88374bd88c..3afb2edf6b6b 100644 --- a/tests/disas/winch/x64/i64_gt_s/params.wat +++ b/tests/disas/winch/x64/i64_gt_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_gt_u/32_const.wat b/tests/disas/winch/x64/i64_gt_u/32_const.wat index bffe835bb66b..26f965d839d9 100644 --- a/tests/disas/winch/x64/i64_gt_u/32_const.wat +++ b/tests/disas/winch/x64/i64_gt_u/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_gt_u/64_const.wat b/tests/disas/winch/x64/i64_gt_u/64_const.wat index ae404af3ddff..a470b653dda4 100644 --- a/tests/disas/winch/x64/i64_gt_u/64_const.wat +++ b/tests/disas/winch/x64/i64_gt_u/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_gt_u/locals.wat b/tests/disas/winch/x64/i64_gt_u/locals.wat index af245db70041..522d035abe9e 100644 --- a/tests/disas/winch/x64/i64_gt_u/locals.wat +++ b/tests/disas/winch/x64/i64_gt_u/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_gt_u/params.wat b/tests/disas/winch/x64/i64_gt_u/params.wat index 14e41b349aa0..ead1517fb129 100644 --- a/tests/disas/winch/x64/i64_gt_u/params.wat +++ b/tests/disas/winch/x64/i64_gt_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_le_s/32_const.wat b/tests/disas/winch/x64/i64_le_s/32_const.wat index bcac582318e8..04c333cae797 100644 --- a/tests/disas/winch/x64/i64_le_s/32_const.wat +++ b/tests/disas/winch/x64/i64_le_s/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_le_s/64_const.wat b/tests/disas/winch/x64/i64_le_s/64_const.wat index d397ecff5ead..c7bc2ccca856 100644 --- a/tests/disas/winch/x64/i64_le_s/64_const.wat +++ b/tests/disas/winch/x64/i64_le_s/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_le_s/locals.wat b/tests/disas/winch/x64/i64_le_s/locals.wat index 5464b6bab68a..3c9105cf490f 100644 --- a/tests/disas/winch/x64/i64_le_s/locals.wat +++ b/tests/disas/winch/x64/i64_le_s/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_le_s/params.wat b/tests/disas/winch/x64/i64_le_s/params.wat index 62c1f128698c..9c38465b48a7 100644 --- a/tests/disas/winch/x64/i64_le_s/params.wat +++ b/tests/disas/winch/x64/i64_le_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_le_u/32_const.wat b/tests/disas/winch/x64/i64_le_u/32_const.wat index 954f730514ed..6835fa0b44e8 100644 --- a/tests/disas/winch/x64/i64_le_u/32_const.wat +++ b/tests/disas/winch/x64/i64_le_u/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_le_u/64_const.wat b/tests/disas/winch/x64/i64_le_u/64_const.wat index 639f916a06ca..6922c9084432 100644 --- a/tests/disas/winch/x64/i64_le_u/64_const.wat +++ b/tests/disas/winch/x64/i64_le_u/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_le_u/locals.wat b/tests/disas/winch/x64/i64_le_u/locals.wat index c8d56f1f8599..246a992c5c14 100644 --- a/tests/disas/winch/x64/i64_le_u/locals.wat +++ b/tests/disas/winch/x64/i64_le_u/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_le_u/params.wat b/tests/disas/winch/x64/i64_le_u/params.wat index 1a3ea206c620..263d9addb179 100644 --- a/tests/disas/winch/x64/i64_le_u/params.wat +++ b/tests/disas/winch/x64/i64_le_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_lt_s/32_const.wat b/tests/disas/winch/x64/i64_lt_s/32_const.wat index 5130309e825b..1d07259dcb3e 100644 --- a/tests/disas/winch/x64/i64_lt_s/32_const.wat +++ b/tests/disas/winch/x64/i64_lt_s/32_const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_lt_s/64_const.wat b/tests/disas/winch/x64/i64_lt_s/64_const.wat index 427215c14473..bb7a522eaf6a 100644 --- a/tests/disas/winch/x64/i64_lt_s/64_const.wat +++ b/tests/disas/winch/x64/i64_lt_s/64_const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -29,4 +29,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_lt_s/locals.wat b/tests/disas/winch/x64/i64_lt_s/locals.wat index be14f09195b4..fc571278d90c 100644 --- a/tests/disas/winch/x64/i64_lt_s/locals.wat +++ b/tests/disas/winch/x64/i64_lt_s/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -45,4 +45,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_lt_s/params.wat b/tests/disas/winch/x64/i64_lt_s/params.wat index dee5cd289a8e..4ac8f8a5f8bb 100644 --- a/tests/disas/winch/x64/i64_lt_s/params.wat +++ b/tests/disas/winch/x64/i64_lt_s/params.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -32,4 +32,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_lt_u/32_const.wat b/tests/disas/winch/x64/i64_lt_u/32_const.wat index aeb4da191bbf..20d8d54016cc 100644 --- a/tests/disas/winch/x64/i64_lt_u/32_const.wat +++ b/tests/disas/winch/x64/i64_lt_u/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_lt_u/64_const.wat b/tests/disas/winch/x64/i64_lt_u/64_const.wat index f7aafd8360f9..2977b489cf0c 100644 --- a/tests/disas/winch/x64/i64_lt_u/64_const.wat +++ b/tests/disas/winch/x64/i64_lt_u/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_lt_u/locals.wat b/tests/disas/winch/x64/i64_lt_u/locals.wat index 9c1b7d8fb05f..a2e8cb8c51a5 100644 --- a/tests/disas/winch/x64/i64_lt_u/locals.wat +++ b/tests/disas/winch/x64/i64_lt_u/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_lt_u/params.wat b/tests/disas/winch/x64/i64_lt_u/params.wat index 1130db4f69fe..21a7330abca3 100644 --- a/tests/disas/winch/x64/i64_lt_u/params.wat +++ b/tests/disas/winch/x64/i64_lt_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_mul/const.wat b/tests/disas/winch/x64/i64_mul/const.wat index 981c0e21c7eb..6589101981bd 100644 --- a/tests/disas/winch/x64/i64_mul/const.wat +++ b/tests/disas/winch/x64/i64_mul/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_mul/locals.wat b/tests/disas/winch/x64/i64_mul/locals.wat index fb0d99c2f847..424b82cb94c6 100644 --- a/tests/disas/winch/x64/i64_mul/locals.wat +++ b/tests/disas/winch/x64/i64_mul/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x65 -;; 1b: movq %rdi, %r14 +;; ja 0x66 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,4 +43,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 65: ud2 +;; 66: ud2 diff --git a/tests/disas/winch/x64/i64_mul/max.wat b/tests/disas/winch/x64/i64_mul/max.wat index baa823be345f..aa220efb00bf 100644 --- a/tests/disas/winch/x64/i64_mul/max.wat +++ b/tests/disas/winch/x64/i64_mul/max.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i64_mul/max_one.wat b/tests/disas/winch/x64/i64_mul/max_one.wat index 64f980eb838e..c7e20b8520b5 100644 --- a/tests/disas/winch/x64/i64_mul/max_one.wat +++ b/tests/disas/winch/x64/i64_mul/max_one.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i64_mul/mixed.wat b/tests/disas/winch/x64/i64_mul/mixed.wat index a3480ba55d7a..3e52f5e3a6c7 100644 --- a/tests/disas/winch/x64/i64_mul/mixed.wat +++ b/tests/disas/winch/x64/i64_mul/mixed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_mul/params.wat b/tests/disas/winch/x64/i64_mul/params.wat index 1df640c996e5..06d295f79a57 100644 --- a/tests/disas/winch/x64/i64_mul/params.wat +++ b/tests/disas/winch/x64/i64_mul/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4b -;; 1b: movq %rdi, %r14 +;; ja 0x4c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4b: ud2 +;; 4c: ud2 diff --git a/tests/disas/winch/x64/i64_mul/signed.wat b/tests/disas/winch/x64/i64_mul/signed.wat index 824a073534cf..7f783b327a1d 100644 --- a/tests/disas/winch/x64/i64_mul/signed.wat +++ b/tests/disas/winch/x64/i64_mul/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_mul/unsigned_with_zero.wat b/tests/disas/winch/x64/i64_mul/unsigned_with_zero.wat index 42913e49aafd..babc52b7df45 100644 --- a/tests/disas/winch/x64/i64_mul/unsigned_with_zero.wat +++ b/tests/disas/winch/x64/i64_mul/unsigned_with_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_ne/32_const.wat b/tests/disas/winch/x64/i64_ne/32_const.wat index 80ae4b37a8c8..171b98db5ca9 100644 --- a/tests/disas/winch/x64/i64_ne/32_const.wat +++ b/tests/disas/winch/x64/i64_ne/32_const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x45 -;; 1b: movq %rdi, %r14 +;; ja 0x46 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 45: ud2 +;; 46: ud2 diff --git a/tests/disas/winch/x64/i64_ne/64_const.wat b/tests/disas/winch/x64/i64_ne/64_const.wat index 23ddf11b031a..1c83f3c2af28 100644 --- a/tests/disas/winch/x64/i64_ne/64_const.wat +++ b/tests/disas/winch/x64/i64_ne/64_const.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -29,4 +29,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/i64_ne/locals.wat b/tests/disas/winch/x64/i64_ne/locals.wat index 40e2cf51d0d1..db6aa3c04d97 100644 --- a/tests/disas/winch/x64/i64_ne/locals.wat +++ b/tests/disas/winch/x64/i64_ne/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6c -;; 1b: movq %rdi, %r14 +;; ja 0x6d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -45,4 +45,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6c: ud2 +;; 6d: ud2 diff --git a/tests/disas/winch/x64/i64_ne/params.wat b/tests/disas/winch/x64/i64_ne/params.wat index 8f6efa75901d..97770c37935c 100644 --- a/tests/disas/winch/x64/i64_ne/params.wat +++ b/tests/disas/winch/x64/i64_ne/params.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x52 -;; 1b: movq %rdi, %r14 +;; ja 0x53 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -32,4 +32,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 52: ud2 +;; 53: ud2 diff --git a/tests/disas/winch/x64/i64_or/32_const.wat b/tests/disas/winch/x64/i64_or/32_const.wat index 1dcddddcb7b5..95485740eff7 100644 --- a/tests/disas/winch/x64/i64_or/32_const.wat +++ b/tests/disas/winch/x64/i64_or/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_or/64_const.wat b/tests/disas/winch/x64/i64_or/64_const.wat index ff256848cdb2..06faac8d56fd 100644 --- a/tests/disas/winch/x64/i64_or/64_const.wat +++ b/tests/disas/winch/x64/i64_or/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_or/locals.wat b/tests/disas/winch/x64/i64_or/locals.wat index 1c07a892ac3f..5abb50b316a3 100644 --- a/tests/disas/winch/x64/i64_or/locals.wat +++ b/tests/disas/winch/x64/i64_or/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x64 -;; 1b: movq %rdi, %r14 +;; ja 0x65 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 64: ud2 +;; 65: ud2 diff --git a/tests/disas/winch/x64/i64_or/params.wat b/tests/disas/winch/x64/i64_or/params.wat index 8651f5ac7963..a95f8c8249d7 100644 --- a/tests/disas/winch/x64/i64_or/params.wat +++ b/tests/disas/winch/x64/i64_or/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/i64_popcnt/const.wat b/tests/disas/winch/x64/i64_popcnt/const.wat index f3a97174213f..c20b30d60c6b 100644 --- a/tests/disas/winch/x64/i64_popcnt/const.wat +++ b/tests/disas/winch/x64/i64_popcnt/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3d -;; 1b: movq %rdi, %r14 +;; ja 0x3e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3d: ud2 +;; 3e: ud2 diff --git a/tests/disas/winch/x64/i64_popcnt/fallback.wat b/tests/disas/winch/x64/i64_popcnt/fallback.wat index 30f0aa85fa4c..8afd3e742541 100644 --- a/tests/disas/winch/x64/i64_popcnt/fallback.wat +++ b/tests/disas/winch/x64/i64_popcnt/fallback.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x92 -;; 1b: movq %rdi, %r14 +;; ja 0x93 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -42,4 +42,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 92: ud2 +;; 93: ud2 diff --git a/tests/disas/winch/x64/i64_popcnt/no_sse42.wat b/tests/disas/winch/x64/i64_popcnt/no_sse42.wat index 4cb4d7b2de85..3c4d49a8c6f6 100644 --- a/tests/disas/winch/x64/i64_popcnt/no_sse42.wat +++ b/tests/disas/winch/x64/i64_popcnt/no_sse42.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x92 -;; 1b: movq %rdi, %r14 +;; ja 0x93 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 92: ud2 +;; 93: ud2 diff --git a/tests/disas/winch/x64/i64_popcnt/reg.wat b/tests/disas/winch/x64/i64_popcnt/reg.wat index 56acfe95f498..dc6e2ae03e83 100644 --- a/tests/disas/winch/x64/i64_popcnt/reg.wat +++ b/tests/disas/winch/x64/i64_popcnt/reg.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,4 +26,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/i64_reinterpret_f64/const.wat b/tests/disas/winch/x64/i64_reinterpret_f64/const.wat index 519ef6679e28..4b5d26213ca1 100644 --- a/tests/disas/winch/x64/i64_reinterpret_f64/const.wat +++ b/tests/disas/winch/x64/i64_reinterpret_f64/const.wat @@ -11,20 +11,24 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0xd(%rip), %xmm0 +;; movsd 0x14(%rip), %xmm0 ;; movq %xmm0, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 -;; 40: addb %al, (%rax) -;; 42: addb %al, (%rax) -;; 44: addb %al, (%rax) +;; 3f: ud2 +;; 41: addb %al, (%rax) +;; 43: addb %al, (%rax) +;; 45: addb %al, (%rax) +;; 47: addb %al, (%rax) +;; 49: addb %al, (%rax) +;; 4b: addb %al, (%rax) +;; 4d: addb %dh, %al diff --git a/tests/disas/winch/x64/i64_reinterpret_f64/locals.wat b/tests/disas/winch/x64/i64_reinterpret_f64/locals.wat index cc0afe76bdba..29a75ea59799 100644 --- a/tests/disas/winch/x64/i64_reinterpret_f64/locals.wat +++ b/tests/disas/winch/x64/i64_reinterpret_f64/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -27,4 +27,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 46: ud2 +;; 47: ud2 diff --git a/tests/disas/winch/x64/i64_reinterpret_f64/params.wat b/tests/disas/winch/x64/i64_reinterpret_f64/params.wat index 0193adb2eae6..593aff1e98fe 100644 --- a/tests/disas/winch/x64/i64_reinterpret_f64/params.wat +++ b/tests/disas/winch/x64/i64_reinterpret_f64/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/i64_reinterpret_f64/ret_float.wat b/tests/disas/winch/x64/i64_reinterpret_f64/ret_float.wat index 2044728fd09a..d7a29f3d13f6 100644 --- a/tests/disas/winch/x64/i64_reinterpret_f64/ret_float.wat +++ b/tests/disas/winch/x64/i64_reinterpret_f64/ret_float.wat @@ -13,21 +13,25 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x46 -;; 1b: movq %rdi, %r14 +;; ja 0x47 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x15(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm0 ;; movq %xmm0, %rax -;; movsd 8(%rip), %xmm0 +;; movsd 0xf(%rip), %xmm0 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 46: ud2 -;; 48: addb %al, (%rax) -;; 4a: addb %al, (%rax) -;; 4c: addb %al, (%rax) +;; 47: ud2 +;; 49: addb %al, (%rax) +;; 4b: addb %al, (%rax) +;; 4d: addb %al, (%rax) +;; 4f: addb %al, (%rax) +;; 51: addb %al, (%rax) +;; 53: addb %al, (%rax) +;; 55: addb %dh, %al diff --git a/tests/disas/winch/x64/i64_rems/const.wat b/tests/disas/winch/x64/i64_rems/const.wat index a418dbef6b10..af4d5ffcc93e 100644 --- a/tests/disas/winch/x64/i64_rems/const.wat +++ b/tests/disas/winch/x64/i64_rems/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movq $7, %rax ;; cqto ;; cmpq $-1, %rcx -;; jne 0x4f -;; 45: movl $0, %edx -;; jmp 0x52 -;; 4f: idivq %rcx +;; jne 0x50 +;; 46: movl $0, %edx +;; jmp 0x53 +;; 50: idivq %rcx ;; movq %rdx, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 +;; 5c: ud2 diff --git a/tests/disas/winch/x64/i64_rems/one_zero.wat b/tests/disas/winch/x64/i64_rems/one_zero.wat index 5f84f29dc104..81607617f615 100644 --- a/tests/disas/winch/x64/i64_rems/one_zero.wat +++ b/tests/disas/winch/x64/i64_rems/one_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movq $1, %rax ;; cqto ;; cmpq $-1, %rcx -;; jne 0x4f -;; 45: movl $0, %edx -;; jmp 0x52 -;; 4f: idivq %rcx +;; jne 0x50 +;; 46: movl $0, %edx +;; jmp 0x53 +;; 50: idivq %rcx ;; movq %rdx, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 +;; 5c: ud2 diff --git a/tests/disas/winch/x64/i64_rems/overflow.wat b/tests/disas/winch/x64/i64_rems/overflow.wat index 60ded3317223..346bf5a10ec6 100644 --- a/tests/disas/winch/x64/i64_rems/overflow.wat +++ b/tests/disas/winch/x64/i64_rems/overflow.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5e -;; 1b: movq %rdi, %r14 +;; ja 0x5f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movabsq $9223372036854775808, %rax ;; cqto ;; cmpq $-1, %rcx -;; jne 0x52 -;; 48: movl $0, %edx -;; jmp 0x55 -;; 52: idivq %rcx +;; jne 0x53 +;; 49: movl $0, %edx +;; jmp 0x56 +;; 53: idivq %rcx ;; movq %rdx, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5e: ud2 +;; 5f: ud2 diff --git a/tests/disas/winch/x64/i64_rems/params.wat b/tests/disas/winch/x64/i64_rems/params.wat index ca2eab2b19d9..912758de0b0a 100644 --- a/tests/disas/winch/x64/i64_rems/params.wat +++ b/tests/disas/winch/x64/i64_rems/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x60 -;; 1b: movq %rdi, %r14 +;; ja 0x61 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,12 +26,12 @@ ;; movq 8(%rsp), %rax ;; cqto ;; cmpq $-1, %rcx -;; jne 0x54 -;; 4a: movl $0, %edx -;; jmp 0x57 -;; 54: idivq %rcx +;; jne 0x55 +;; 4b: movl $0, %edx +;; jmp 0x58 +;; 55: idivq %rcx ;; movq %rdx, %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 60: ud2 +;; 61: ud2 diff --git a/tests/disas/winch/x64/i64_rems/zero_zero.wat b/tests/disas/winch/x64/i64_rems/zero_zero.wat index b7307cda7769..422f58837d06 100644 --- a/tests/disas/winch/x64/i64_rems/zero_zero.wat +++ b/tests/disas/winch/x64/i64_rems/zero_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5b -;; 1b: movq %rdi, %r14 +;; ja 0x5c +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,12 +24,12 @@ ;; movq $0, %rax ;; cqto ;; cmpq $-1, %rcx -;; jne 0x4f -;; 45: movl $0, %edx -;; jmp 0x52 -;; 4f: idivq %rcx +;; jne 0x50 +;; 46: movl $0, %edx +;; jmp 0x53 +;; 50: idivq %rcx ;; movq %rdx, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 5b: ud2 +;; 5c: ud2 diff --git a/tests/disas/winch/x64/i64_remu/const.wat b/tests/disas/winch/x64/i64_remu/const.wat index a21a894463a2..d9355cef80c3 100644 --- a/tests/disas/winch/x64/i64_remu/const.wat +++ b/tests/disas/winch/x64/i64_remu/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_remu/one_zero.wat b/tests/disas/winch/x64/i64_remu/one_zero.wat index a5be75ab8df8..47d2a097c7ab 100644 --- a/tests/disas/winch/x64/i64_remu/one_zero.wat +++ b/tests/disas/winch/x64/i64_remu/one_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_remu/params.wat b/tests/disas/winch/x64/i64_remu/params.wat index dee21d98551c..a8b637cccfa3 100644 --- a/tests/disas/winch/x64/i64_remu/params.wat +++ b/tests/disas/winch/x64/i64_remu/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/i64_remu/signed.wat b/tests/disas/winch/x64/i64_remu/signed.wat index 8ba1928453dd..a7ad35531f57 100644 --- a/tests/disas/winch/x64/i64_remu/signed.wat +++ b/tests/disas/winch/x64/i64_remu/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_remu/zero_zero.wat b/tests/disas/winch/x64/i64_remu/zero_zero.wat index 92aa6601d12d..ee8cc4285b21 100644 --- a/tests/disas/winch/x64/i64_remu/zero_zero.wat +++ b/tests/disas/winch/x64/i64_remu/zero_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -28,4 +28,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_rotl/16_const.wat b/tests/disas/winch/x64/i64_rotl/16_const.wat index 436da18f8541..f5769e8ab7ca 100644 --- a/tests/disas/winch/x64/i64_rotl/16_const.wat +++ b/tests/disas/winch/x64/i64_rotl/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_rotl/8_const.wat b/tests/disas/winch/x64/i64_rotl/8_const.wat index 8312aaf3cb8e..62e587ba9091 100644 --- a/tests/disas/winch/x64/i64_rotl/8_const.wat +++ b/tests/disas/winch/x64/i64_rotl/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_rotl/locals.wat b/tests/disas/winch/x64/i64_rotl/locals.wat index b36135def187..0e3628c050c1 100644 --- a/tests/disas/winch/x64/i64_rotl/locals.wat +++ b/tests/disas/winch/x64/i64_rotl/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x61 -;; 1b: movq %rdi, %r14 +;; ja 0x62 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 61: ud2 +;; 62: ud2 diff --git a/tests/disas/winch/x64/i64_rotl/params.wat b/tests/disas/winch/x64/i64_rotl/params.wat index 198da72cc60f..3b2b4ec0b2eb 100644 --- a/tests/disas/winch/x64/i64_rotl/params.wat +++ b/tests/disas/winch/x64/i64_rotl/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 47: ud2 +;; 48: ud2 diff --git a/tests/disas/winch/x64/i64_rotr/16_const.wat b/tests/disas/winch/x64/i64_rotr/16_const.wat index 0b99748f167e..72229bd7e264 100644 --- a/tests/disas/winch/x64/i64_rotr/16_const.wat +++ b/tests/disas/winch/x64/i64_rotr/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_rotr/8_const.wat b/tests/disas/winch/x64/i64_rotr/8_const.wat index 81e333865d49..f7d7708dc4bd 100644 --- a/tests/disas/winch/x64/i64_rotr/8_const.wat +++ b/tests/disas/winch/x64/i64_rotr/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_rotr/locals.wat b/tests/disas/winch/x64/i64_rotr/locals.wat index 45ef6a6c6b93..0e07c0d7f91c 100644 --- a/tests/disas/winch/x64/i64_rotr/locals.wat +++ b/tests/disas/winch/x64/i64_rotr/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x61 -;; 1b: movq %rdi, %r14 +;; ja 0x62 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 61: ud2 +;; 62: ud2 diff --git a/tests/disas/winch/x64/i64_rotr/params.wat b/tests/disas/winch/x64/i64_rotr/params.wat index e37ede29d3d6..19d8e386f560 100644 --- a/tests/disas/winch/x64/i64_rotr/params.wat +++ b/tests/disas/winch/x64/i64_rotr/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 47: ud2 +;; 48: ud2 diff --git a/tests/disas/winch/x64/i64_shl/16_const.wat b/tests/disas/winch/x64/i64_shl/16_const.wat index 5ea6775bbc5f..baff7becca73 100644 --- a/tests/disas/winch/x64/i64_shl/16_const.wat +++ b/tests/disas/winch/x64/i64_shl/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_shl/8_const.wat b/tests/disas/winch/x64/i64_shl/8_const.wat index efe65ff3dbb4..c8561755b770 100644 --- a/tests/disas/winch/x64/i64_shl/8_const.wat +++ b/tests/disas/winch/x64/i64_shl/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_shl/locals.wat b/tests/disas/winch/x64/i64_shl/locals.wat index 50d91296f0d4..d65fb69acce5 100644 --- a/tests/disas/winch/x64/i64_shl/locals.wat +++ b/tests/disas/winch/x64/i64_shl/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x61 -;; 1b: movq %rdi, %r14 +;; ja 0x62 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 61: ud2 +;; 62: ud2 diff --git a/tests/disas/winch/x64/i64_shl/params.wat b/tests/disas/winch/x64/i64_shl/params.wat index 426799998fb0..e16a46d3b74b 100644 --- a/tests/disas/winch/x64/i64_shl/params.wat +++ b/tests/disas/winch/x64/i64_shl/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 47: ud2 +;; 48: ud2 diff --git a/tests/disas/winch/x64/i64_shr_s/16_const.wat b/tests/disas/winch/x64/i64_shr_s/16_const.wat index d29990af9acc..70fe78155b22 100644 --- a/tests/disas/winch/x64/i64_shr_s/16_const.wat +++ b/tests/disas/winch/x64/i64_shr_s/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_shr_s/8_const.wat b/tests/disas/winch/x64/i64_shr_s/8_const.wat index ec8eaa03ffcb..bb5d5db4e6c2 100644 --- a/tests/disas/winch/x64/i64_shr_s/8_const.wat +++ b/tests/disas/winch/x64/i64_shr_s/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_shr_s/locals.wat b/tests/disas/winch/x64/i64_shr_s/locals.wat index ba348d72f72c..269d04876485 100644 --- a/tests/disas/winch/x64/i64_shr_s/locals.wat +++ b/tests/disas/winch/x64/i64_shr_s/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x61 -;; 1b: movq %rdi, %r14 +;; ja 0x62 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 61: ud2 +;; 62: ud2 diff --git a/tests/disas/winch/x64/i64_shr_s/params.wat b/tests/disas/winch/x64/i64_shr_s/params.wat index ea9d52c666c7..8e7e55ffc232 100644 --- a/tests/disas/winch/x64/i64_shr_s/params.wat +++ b/tests/disas/winch/x64/i64_shr_s/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 47: ud2 +;; 48: ud2 diff --git a/tests/disas/winch/x64/i64_shr_u/16_const.wat b/tests/disas/winch/x64/i64_shr_u/16_const.wat index 62115deb56bd..b855332b13a1 100644 --- a/tests/disas/winch/x64/i64_shr_u/16_const.wat +++ b/tests/disas/winch/x64/i64_shr_u/16_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_shr_u/8_const.wat b/tests/disas/winch/x64/i64_shr_u/8_const.wat index f9bd3c86355b..06daaaeca6bb 100644 --- a/tests/disas/winch/x64/i64_shr_u/8_const.wat +++ b/tests/disas/winch/x64/i64_shr_u/8_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_shr_u/locals.wat b/tests/disas/winch/x64/i64_shr_u/locals.wat index 0d7bd08f6a70..d0cf20c06494 100644 --- a/tests/disas/winch/x64/i64_shr_u/locals.wat +++ b/tests/disas/winch/x64/i64_shr_u/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x61 -;; 1b: movq %rdi, %r14 +;; ja 0x62 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 61: ud2 +;; 62: ud2 diff --git a/tests/disas/winch/x64/i64_shr_u/params.wat b/tests/disas/winch/x64/i64_shr_u/params.wat index 0da4cd55e80c..8599ccab6afd 100644 --- a/tests/disas/winch/x64/i64_shr_u/params.wat +++ b/tests/disas/winch/x64/i64_shr_u/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x47 -;; 1b: movq %rdi, %r14 +;; ja 0x48 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,4 +28,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 47: ud2 +;; 48: ud2 diff --git a/tests/disas/winch/x64/i64_sub/const.wat b/tests/disas/winch/x64/i64_sub/const.wat index 7419fd775908..0e0c58dc6f83 100644 --- a/tests/disas/winch/x64/i64_sub/const.wat +++ b/tests/disas/winch/x64/i64_sub/const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_sub/locals.wat b/tests/disas/winch/x64/i64_sub/locals.wat index 936e42a65a05..7d5323d4d83c 100644 --- a/tests/disas/winch/x64/i64_sub/locals.wat +++ b/tests/disas/winch/x64/i64_sub/locals.wat @@ -21,11 +21,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x64 -;; 1b: movq %rdi, %r14 +;; ja 0x65 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,4 +43,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 64: ud2 +;; 65: ud2 diff --git a/tests/disas/winch/x64/i64_sub/max.wat b/tests/disas/winch/x64/i64_sub/max.wat index ce1231892aff..d0f97649bef6 100644 --- a/tests/disas/winch/x64/i64_sub/max.wat +++ b/tests/disas/winch/x64/i64_sub/max.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i64_sub/max_one.wat b/tests/disas/winch/x64/i64_sub/max_one.wat index abf231c3cada..8c23f225cf8a 100644 --- a/tests/disas/winch/x64/i64_sub/max_one.wat +++ b/tests/disas/winch/x64/i64_sub/max_one.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/i64_sub/mixed.wat b/tests/disas/winch/x64/i64_sub/mixed.wat index 65042efdcd37..21ac041adb85 100644 --- a/tests/disas/winch/x64/i64_sub/mixed.wat +++ b/tests/disas/winch/x64/i64_sub/mixed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_sub/params.wat b/tests/disas/winch/x64/i64_sub/params.wat index e19164e3cef5..e1494c63bad4 100644 --- a/tests/disas/winch/x64/i64_sub/params.wat +++ b/tests/disas/winch/x64/i64_sub/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/i64_sub/signed.wat b/tests/disas/winch/x64/i64_sub/signed.wat index 505dbebab7bf..d951678f03ec 100644 --- a/tests/disas/winch/x64/i64_sub/signed.wat +++ b/tests/disas/winch/x64/i64_sub/signed.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_sub/unsigned_with_zero.wat b/tests/disas/winch/x64/i64_sub/unsigned_with_zero.wat index 6c95c06fb65c..5982c90ab032 100644 --- a/tests/disas/winch/x64/i64_sub/unsigned_with_zero.wat +++ b/tests/disas/winch/x64/i64_sub/unsigned_with_zero.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f32_s/const.wat b/tests/disas/winch/x64/i64_trunc_f32_s/const.wat index 35ea8307cddf..5aee604ebc55 100644 --- a/tests/disas/winch/x64/i64_trunc_f32_s/const.wat +++ b/tests/disas/winch/x64/i64_trunc_f32_s/const.wat @@ -11,33 +11,33 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x75 -;; 1b: movq %rdi, %r14 +;; ja 0x76 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x4d(%rip), %xmm0 +;; movss 0x4c(%rip), %xmm0 ;; cvttss2si %xmm0, %rax ;; cmpq $1, %rax -;; jno 0x6f -;; 42: ucomiss %xmm0, %xmm0 -;; jp 0x77 -;; 4b: movl $0xdf000000, %r11d +;; jno 0x70 +;; 43: ucomiss %xmm0, %xmm0 +;; jp 0x78 +;; 4c: movl $0xdf000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm0 -;; jb 0x79 -;; 60: xorpd %xmm15, %xmm15 +;; jb 0x7a +;; 61: xorpd %xmm15, %xmm15 ;; ucomiss %xmm0, %xmm15 -;; jb 0x7b -;; 6f: addq $0x10, %rsp +;; jb 0x7c +;; 70: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 75: ud2 -;; 77: ud2 -;; 79: ud2 -;; 7b: ud2 -;; 7d: addb %al, (%rax) -;; 7f: addb %al, (%rax) +;; 76: ud2 +;; 78: ud2 +;; 7a: ud2 +;; 7c: ud2 +;; 7e: addb %al, (%rax) +;; 80: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i64_trunc_f32_s/locals.wat b/tests/disas/winch/x64/i64_trunc_f32_s/locals.wat index b4632374b975..c4c34eff4098 100644 --- a/tests/disas/winch/x64/i64_trunc_f32_s/locals.wat +++ b/tests/disas/winch/x64/i64_trunc_f32_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7d -;; 1b: movq %rdi, %r14 +;; ja 0x7e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,20 +25,20 @@ ;; movss 0xc(%rsp), %xmm0 ;; cvttss2si %xmm0, %rax ;; cmpq $1, %rax -;; jno 0x77 -;; 4a: ucomiss %xmm0, %xmm0 -;; jp 0x7f -;; 53: movl $0xdf000000, %r11d +;; jno 0x78 +;; 4b: ucomiss %xmm0, %xmm0 +;; jp 0x80 +;; 54: movl $0xdf000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm0 -;; jb 0x81 -;; 68: xorpd %xmm15, %xmm15 +;; jb 0x82 +;; 69: xorpd %xmm15, %xmm15 ;; ucomiss %xmm0, %xmm15 -;; jb 0x83 -;; 77: addq $0x20, %rsp +;; jb 0x84 +;; 78: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7d: ud2 -;; 7f: ud2 -;; 81: ud2 -;; 83: ud2 +;; 7e: ud2 +;; 80: ud2 +;; 82: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f32_s/params.wat b/tests/disas/winch/x64/i64_trunc_f32_s/params.wat index 2e4e82e57535..b822d20534b1 100644 --- a/tests/disas/winch/x64/i64_trunc_f32_s/params.wat +++ b/tests/disas/winch/x64/i64_trunc_f32_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7a -;; 1b: movq %rdi, %r14 +;; ja 0x7b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,20 +23,20 @@ ;; movss 0xc(%rsp), %xmm0 ;; cvttss2si %xmm0, %rax ;; cmpq $1, %rax -;; jno 0x74 -;; 47: ucomiss %xmm0, %xmm0 -;; jp 0x7c -;; 50: movl $0xdf000000, %r11d +;; jno 0x75 +;; 48: ucomiss %xmm0, %xmm0 +;; jp 0x7d +;; 51: movl $0xdf000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm0 -;; jb 0x7e -;; 65: xorpd %xmm15, %xmm15 +;; jb 0x7f +;; 66: xorpd %xmm15, %xmm15 ;; ucomiss %xmm0, %xmm15 -;; jb 0x80 -;; 74: addq $0x20, %rsp +;; jb 0x81 +;; 75: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 7a: ud2 -;; 7c: ud2 -;; 7e: ud2 -;; 80: ud2 +;; 7b: ud2 +;; 7d: ud2 +;; 7f: ud2 +;; 81: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f32_u/const.wat b/tests/disas/winch/x64/i64_trunc_f32_u/const.wat index a87160cd03d8..a79a1969d7cb 100644 --- a/tests/disas/winch/x64/i64_trunc_f32_u/const.wat +++ b/tests/disas/winch/x64/i64_trunc_f32_u/const.wat @@ -11,35 +11,35 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x89 -;; 1b: movq %rdi, %r14 +;; ja 0x8a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x5d(%rip), %xmm1 +;; movss 0x5c(%rip), %xmm1 ;; movl $0x5f000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm1 -;; jae 0x5f -;; jp 0x8b -;; 4e: cvttss2si %xmm1, %rax +;; jae 0x60 +;; jp 0x8c +;; 4f: cvttss2si %xmm1, %rax ;; cmpq $0, %rax -;; jge 0x83 -;; 5d: ud2 +;; jge 0x84 +;; 5e: ud2 ;; movaps %xmm1, %xmm0 ;; subss %xmm15, %xmm0 ;; cvttss2si %xmm0, %rax ;; cmpq $0, %rax -;; jl 0x8d -;; 76: movabsq $9223372036854775808, %r11 +;; jl 0x8e +;; 77: movabsq $9223372036854775808, %r11 ;; addq %r11, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 89: ud2 -;; 8b: ud2 -;; 8d: ud2 -;; 8f: addb %al, (%rax) +;; 8a: ud2 +;; 8c: ud2 +;; 8e: ud2 +;; 90: addb %al, (%rax) diff --git a/tests/disas/winch/x64/i64_trunc_f32_u/locals.wat b/tests/disas/winch/x64/i64_trunc_f32_u/locals.wat index 9a85f7d94493..87b917348b50 100644 --- a/tests/disas/winch/x64/i64_trunc_f32_u/locals.wat +++ b/tests/disas/winch/x64/i64_trunc_f32_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x91 -;; 1b: movq %rdi, %r14 +;; ja 0x92 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,22 +26,22 @@ ;; movl $0x5f000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm1 -;; jae 0x67 -;; jp 0x93 -;; 56: cvttss2si %xmm1, %rax +;; jae 0x68 +;; jp 0x94 +;; 57: cvttss2si %xmm1, %rax ;; cmpq $0, %rax -;; jge 0x8b -;; 65: ud2 +;; jge 0x8c +;; 66: ud2 ;; movaps %xmm1, %xmm0 ;; subss %xmm15, %xmm0 ;; cvttss2si %xmm0, %rax ;; cmpq $0, %rax -;; jl 0x95 -;; 7e: movabsq $9223372036854775808, %r11 +;; jl 0x96 +;; 7f: movabsq $9223372036854775808, %r11 ;; addq %r11, %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 91: ud2 -;; 93: ud2 -;; 95: ud2 +;; 92: ud2 +;; 94: ud2 +;; 96: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f32_u/params.wat b/tests/disas/winch/x64/i64_trunc_f32_u/params.wat index 9d9cf404a288..035e0486263d 100644 --- a/tests/disas/winch/x64/i64_trunc_f32_u/params.wat +++ b/tests/disas/winch/x64/i64_trunc_f32_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8e -;; 1b: movq %rdi, %r14 +;; ja 0x8f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -24,22 +24,22 @@ ;; movl $0x5f000000, %r11d ;; movd %r11d, %xmm15 ;; ucomiss %xmm15, %xmm1 -;; jae 0x64 -;; jp 0x90 -;; 53: cvttss2si %xmm1, %rax +;; jae 0x65 +;; jp 0x91 +;; 54: cvttss2si %xmm1, %rax ;; cmpq $0, %rax -;; jge 0x88 -;; 62: ud2 +;; jge 0x89 +;; 63: ud2 ;; movaps %xmm1, %xmm0 ;; subss %xmm15, %xmm0 ;; cvttss2si %xmm0, %rax ;; cmpq $0, %rax -;; jl 0x92 -;; 7b: movabsq $9223372036854775808, %r11 +;; jl 0x93 +;; 7c: movabsq $9223372036854775808, %r11 ;; addq %r11, %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8e: ud2 -;; 90: ud2 -;; 92: ud2 +;; 8f: ud2 +;; 91: ud2 +;; 93: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f64_s/const.wat b/tests/disas/winch/x64/i64_trunc_f64_s/const.wat index 387531df7d57..f184a2b4ab17 100644 --- a/tests/disas/winch/x64/i64_trunc_f64_s/const.wat +++ b/tests/disas/winch/x64/i64_trunc_f64_s/const.wat @@ -11,36 +11,36 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x7c -;; 1b: movq %rdi, %r14 +;; ja 0x7d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x55(%rip), %xmm0 +;; movsd 0x54(%rip), %xmm0 ;; cvttsd2si %xmm0, %rax ;; cmpq $1, %rax -;; jno 0x76 -;; 42: ucomisd %xmm0, %xmm0 -;; jp 0x7e -;; 4c: movabsq $14114281232179134464, %r11 +;; jno 0x77 +;; 43: ucomisd %xmm0, %xmm0 +;; jp 0x7f +;; 4d: movabsq $14114281232179134464, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm0 -;; jb 0x80 -;; 66: xorpd %xmm15, %xmm15 +;; jb 0x81 +;; 67: xorpd %xmm15, %xmm15 ;; ucomisd %xmm0, %xmm15 -;; jb 0x82 -;; 76: addq $0x10, %rsp +;; jb 0x83 +;; 77: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 7c: ud2 -;; 7e: ud2 -;; 80: ud2 -;; 82: ud2 -;; 84: addb %al, (%rax) -;; 86: addb %al, (%rax) -;; 88: addb %al, (%rax) -;; 8a: addb %al, (%rax) -;; 8c: addb %al, (%rax) +;; 7d: ud2 +;; 7f: ud2 +;; 81: ud2 +;; 83: ud2 +;; 85: addb %al, (%rax) +;; 87: addb %al, (%rax) +;; 89: addb %al, (%rax) +;; 8b: addb %al, (%rax) +;; 8d: addb %dh, %al diff --git a/tests/disas/winch/x64/i64_trunc_f64_s/locals.wat b/tests/disas/winch/x64/i64_trunc_f64_s/locals.wat index 4e7f4d31a3a5..df3d589e03e6 100644 --- a/tests/disas/winch/x64/i64_trunc_f64_s/locals.wat +++ b/tests/disas/winch/x64/i64_trunc_f64_s/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x84 -;; 1b: movq %rdi, %r14 +;; ja 0x85 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,20 +25,20 @@ ;; movsd 8(%rsp), %xmm0 ;; cvttsd2si %xmm0, %rax ;; cmpq $1, %rax -;; jno 0x7e -;; 4a: ucomisd %xmm0, %xmm0 -;; jp 0x86 -;; 54: movabsq $14114281232179134464, %r11 +;; jno 0x7f +;; 4b: ucomisd %xmm0, %xmm0 +;; jp 0x87 +;; 55: movabsq $14114281232179134464, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm0 -;; jb 0x88 -;; 6e: xorpd %xmm15, %xmm15 +;; jb 0x89 +;; 6f: xorpd %xmm15, %xmm15 ;; ucomisd %xmm0, %xmm15 -;; jb 0x8a -;; 7e: addq $0x20, %rsp +;; jb 0x8b +;; 7f: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 84: ud2 -;; 86: ud2 -;; 88: ud2 -;; 8a: ud2 +;; 85: ud2 +;; 87: ud2 +;; 89: ud2 +;; 8b: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f64_s/params.wat b/tests/disas/winch/x64/i64_trunc_f64_s/params.wat index ca749c1e5c3f..9bf3272c9c1f 100644 --- a/tests/disas/winch/x64/i64_trunc_f64_s/params.wat +++ b/tests/disas/winch/x64/i64_trunc_f64_s/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x81 -;; 1b: movq %rdi, %r14 +;; ja 0x82 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,20 +23,20 @@ ;; movsd 8(%rsp), %xmm0 ;; cvttsd2si %xmm0, %rax ;; cmpq $1, %rax -;; jno 0x7b -;; 47: ucomisd %xmm0, %xmm0 -;; jp 0x83 -;; 51: movabsq $14114281232179134464, %r11 +;; jno 0x7c +;; 48: ucomisd %xmm0, %xmm0 +;; jp 0x84 +;; 52: movabsq $14114281232179134464, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm0 -;; jb 0x85 -;; 6b: xorpd %xmm15, %xmm15 +;; jb 0x86 +;; 6c: xorpd %xmm15, %xmm15 ;; ucomisd %xmm0, %xmm15 -;; jb 0x87 -;; 7b: addq $0x20, %rsp +;; jb 0x88 +;; 7c: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 81: ud2 -;; 83: ud2 -;; 85: ud2 -;; 87: ud2 +;; 82: ud2 +;; 84: ud2 +;; 86: ud2 +;; 88: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f64_u/const.wat b/tests/disas/winch/x64/i64_trunc_f64_u/const.wat index a72734625844..dcf6b5192aea 100644 --- a/tests/disas/winch/x64/i64_trunc_f64_u/const.wat +++ b/tests/disas/winch/x64/i64_trunc_f64_u/const.wat @@ -11,39 +11,39 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8e -;; 1b: movq %rdi, %r14 +;; ja 0x8f +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x65(%rip), %xmm1 +;; movsd 0x64(%rip), %xmm1 ;; movabsq $0x43e0000000000000, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm1 -;; jae 0x64 -;; jp 0x90 -;; 53: cvttsd2si %xmm1, %rax +;; jae 0x65 +;; jp 0x91 +;; 54: cvttsd2si %xmm1, %rax ;; cmpq $0, %rax -;; jge 0x88 -;; 62: ud2 +;; jge 0x89 +;; 63: ud2 ;; movaps %xmm1, %xmm0 ;; subsd %xmm15, %xmm0 ;; cvttsd2si %xmm0, %rax ;; cmpq $0, %rax -;; jl 0x92 -;; 7b: movabsq $9223372036854775808, %r11 +;; jl 0x93 +;; 7c: movabsq $9223372036854775808, %r11 ;; addq %r11, %rax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 8e: ud2 -;; 90: ud2 -;; 92: ud2 -;; 94: addb %al, (%rax) -;; 96: addb %al, (%rax) -;; 98: addb %al, (%rax) -;; 9a: addb %al, (%rax) -;; 9c: addb %al, (%rax) +;; 8f: ud2 +;; 91: ud2 +;; 93: ud2 +;; 95: addb %al, (%rax) +;; 97: addb %al, (%rax) +;; 99: addb %al, (%rax) +;; 9b: addb %al, (%rax) +;; 9d: addb %dh, %al diff --git a/tests/disas/winch/x64/i64_trunc_f64_u/locals.wat b/tests/disas/winch/x64/i64_trunc_f64_u/locals.wat index f057cd5b0a60..6fccba41614d 100644 --- a/tests/disas/winch/x64/i64_trunc_f64_u/locals.wat +++ b/tests/disas/winch/x64/i64_trunc_f64_u/locals.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x96 -;; 1b: movq %rdi, %r14 +;; ja 0x97 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,22 +26,22 @@ ;; movabsq $0x43e0000000000000, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm1 -;; jae 0x6c -;; jp 0x98 -;; 5b: cvttsd2si %xmm1, %rax +;; jae 0x6d +;; jp 0x99 +;; 5c: cvttsd2si %xmm1, %rax ;; cmpq $0, %rax -;; jge 0x90 -;; 6a: ud2 +;; jge 0x91 +;; 6b: ud2 ;; movaps %xmm1, %xmm0 ;; subsd %xmm15, %xmm0 ;; cvttsd2si %xmm0, %rax ;; cmpq $0, %rax -;; jl 0x9a -;; 83: movabsq $9223372036854775808, %r11 +;; jl 0x9b +;; 84: movabsq $9223372036854775808, %r11 ;; addq %r11, %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 96: ud2 -;; 98: ud2 -;; 9a: ud2 +;; 97: ud2 +;; 99: ud2 +;; 9b: ud2 diff --git a/tests/disas/winch/x64/i64_trunc_f64_u/params.wat b/tests/disas/winch/x64/i64_trunc_f64_u/params.wat index 9b19890af47b..87f87989af8c 100644 --- a/tests/disas/winch/x64/i64_trunc_f64_u/params.wat +++ b/tests/disas/winch/x64/i64_trunc_f64_u/params.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x93 -;; 1b: movq %rdi, %r14 +;; ja 0x94 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -24,22 +24,22 @@ ;; movabsq $0x43e0000000000000, %r11 ;; movq %r11, %xmm15 ;; ucomisd %xmm15, %xmm1 -;; jae 0x69 -;; jp 0x95 -;; 58: cvttsd2si %xmm1, %rax +;; jae 0x6a +;; jp 0x96 +;; 59: cvttsd2si %xmm1, %rax ;; cmpq $0, %rax -;; jge 0x8d -;; 67: ud2 +;; jge 0x8e +;; 68: ud2 ;; movaps %xmm1, %xmm0 ;; subsd %xmm15, %xmm0 ;; cvttsd2si %xmm0, %rax ;; cmpq $0, %rax -;; jl 0x97 -;; 80: movabsq $9223372036854775808, %r11 +;; jl 0x98 +;; 81: movabsq $9223372036854775808, %r11 ;; addq %r11, %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 93: ud2 -;; 95: ud2 -;; 97: ud2 +;; 94: ud2 +;; 96: ud2 +;; 98: ud2 diff --git a/tests/disas/winch/x64/i64_xor/32_const.wat b/tests/disas/winch/x64/i64_xor/32_const.wat index f44e0223fad5..27693b628716 100644 --- a/tests/disas/winch/x64/i64_xor/32_const.wat +++ b/tests/disas/winch/x64/i64_xor/32_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/i64_xor/64_const.wat b/tests/disas/winch/x64/i64_xor/64_const.wat index ea42b476065a..fd46e22f453c 100644 --- a/tests/disas/winch/x64/i64_xor/64_const.wat +++ b/tests/disas/winch/x64/i64_xor/64_const.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -26,4 +26,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/i64_xor/locals.wat b/tests/disas/winch/x64/i64_xor/locals.wat index 324902b1ea82..ddaee9c01f19 100644 --- a/tests/disas/winch/x64/i64_xor/locals.wat +++ b/tests/disas/winch/x64/i64_xor/locals.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x64 -;; 1b: movq %rdi, %r14 +;; ja 0x65 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -42,4 +42,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 64: ud2 +;; 65: ud2 diff --git a/tests/disas/winch/x64/i64_xor/params.wat b/tests/disas/winch/x64/i64_xor/params.wat index 4a3f3ca18b2f..206fff0a9a67 100644 --- a/tests/disas/winch/x64/i64_xor/params.wat +++ b/tests/disas/winch/x64/i64_xor/params.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/if/as_binop.wat b/tests/disas/winch/x64/if/as_binop.wat index f28b816b8134..2e01e8822d3d 100644 --- a/tests/disas/winch/x64/if/as_binop.wat +++ b/tests/disas/winch/x64/if/as_binop.wat @@ -20,28 +20,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x113 -;; 5b: movq %rdi, %r14 +;; ja 0x114 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -49,14 +49,14 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x9a -;; 80: movq %r14, %rdi +;; je 0x9b +;; 81: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $3, %eax -;; jmp 0xaf -;; 9a: movq %r14, %rdi +;; jmp 0xb0 +;; 9b: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 @@ -65,16 +65,16 @@ ;; subq $4, %rsp ;; movl %eax, (%rsp) ;; testl %ecx, %ecx -;; je 0xe4 -;; c2: subq $0xc, %rsp +;; je 0xe5 +;; c3: subq $0xc, %rsp ;; movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; addq $0xc, %rsp ;; movq 0x1c(%rsp), %r14 ;; movl $4, %eax -;; jmp 0x101 -;; e4: subq $0xc, %rsp +;; jmp 0x102 +;; e5: subq $0xc, %rsp ;; movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 @@ -88,4 +88,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 113: ud2 +;; 114: ud2 diff --git a/tests/disas/winch/x64/if/as_br_if_last.wat b/tests/disas/winch/x64/if/as_br_if_last.wat index dd7d8edbd733..a10df5a47a38 100644 --- a/tests/disas/winch/x64/if/as_br_if_last.wat +++ b/tests/disas/winch/x64/if/as_br_if_last.wat @@ -19,42 +19,42 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0xdc -;; 5b: movq %rdi, %r14 +;; ja 0xdd +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movl %edx, 0xc(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x96 -;; 7c: movq %r14, %rdi +;; je 0x97 +;; 7d: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $1, %eax -;; jmp 0xab -;; 96: movq %r14, %rdi +;; jmp 0xac +;; 97: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 @@ -65,12 +65,12 @@ ;; addq $4, %rsp ;; movl $2, %eax ;; testl %ecx, %ecx -;; jne 0xd6 -;; c6: subq $4, %rsp +;; jne 0xd7 +;; c7: subq $4, %rsp ;; movl %eax, (%rsp) ;; movl $3, %eax ;; addq $4, %rsp ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; dc: ud2 +;; dd: ud2 diff --git a/tests/disas/winch/x64/if/as_if_cond.wat b/tests/disas/winch/x64/if/as_if_cond.wat index 232fcf892ce8..5c02f3a83eb7 100644 --- a/tests/disas/winch/x64/if/as_if_cond.wat +++ b/tests/disas/winch/x64/if/as_if_cond.wat @@ -17,47 +17,47 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xc8 -;; 5b: movq %rdi, %r14 +;; ja 0xc9 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movl %edx, 0xc(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x86 -;; 7c: movl $1, %eax -;; jmp 0x8b -;; 86: movl $0, %eax +;; je 0x87 +;; 7d: movl $1, %eax +;; jmp 0x8c +;; 87: movl $0, %eax ;; testl %eax, %eax -;; je 0xad -;; 93: movq %r14, %rdi +;; je 0xae +;; 94: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $2, %eax -;; jmp 0xc2 -;; ad: movq %r14, %rdi +;; jmp 0xc3 +;; ae: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 @@ -65,4 +65,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; c8: ud2 +;; c9: ud2 diff --git a/tests/disas/winch/x64/if/as_testop.wat b/tests/disas/winch/x64/if/as_testop.wat index 5b0947686063..9e4cfce3ff8a 100644 --- a/tests/disas/winch/x64/if/as_testop.wat +++ b/tests/disas/winch/x64/if/as_testop.wat @@ -15,42 +15,42 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xbd -;; 5b: movq %rdi, %r14 +;; ja 0xbe +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movl %edx, 0xc(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x96 -;; 7c: movq %r14, %rdi +;; je 0x97 +;; 7d: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $0xd, %eax -;; jmp 0xab -;; 96: movq %r14, %rdi +;; jmp 0xac +;; 97: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 @@ -61,4 +61,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; bd: ud2 +;; be: ud2 diff --git a/tests/disas/winch/x64/if/break_value.wat b/tests/disas/winch/x64/if/break_value.wat index 1bf48ad855ed..809280b4ce26 100644 --- a/tests/disas/winch/x64/if/break_value.wat +++ b/tests/disas/winch/x64/if/break_value.wat @@ -13,22 +13,22 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movl %edx, 0xc(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x46 -;; 3c: movl $0x12, %eax -;; jmp 0x4b -;; 46: movl $0x15, %eax +;; je 0x47 +;; 3d: movl $0x12, %eax +;; jmp 0x4c +;; 47: movl $0x15, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/if/nested.wat b/tests/disas/winch/x64/if/nested.wat index 6082c1a0f344..0f0c2a019eaa 100644 --- a/tests/disas/winch/x64/if/nested.wat +++ b/tests/disas/winch/x64/if/nested.wat @@ -27,28 +27,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x17b -;; 5b: movq %rdi, %r14 +;; ja 0x17c +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -56,62 +56,62 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0xfd -;; 80: movl 8(%rsp), %eax +;; je 0xfe +;; 81: movl 8(%rsp), %eax ;; testl %eax, %eax -;; je 0x9c -;; 8c: movq %r14, %rdi +;; je 0x9d +;; 8d: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl 8(%rsp), %eax ;; testl %eax, %eax -;; je 0xad -;; jmp 0xbd -;; ad: movq %r14, %rdi +;; je 0xae +;; jmp 0xbe +;; ae: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl 8(%rsp), %eax ;; testl %eax, %eax -;; je 0xe3 -;; c9: movq %r14, %rdi +;; je 0xe4 +;; ca: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $9, %eax -;; jmp 0x175 -;; e3: movq %r14, %rdi +;; jmp 0x176 +;; e4: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $0xa, %eax -;; jmp 0x175 -;; fd: movl 8(%rsp), %eax +;; jmp 0x176 +;; fe: movl 8(%rsp), %eax ;; testl %eax, %eax -;; je 0x119 -;; 109: movq %r14, %rdi +;; je 0x11a +;; 10a: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl 8(%rsp), %eax ;; testl %eax, %eax -;; je 0x12a -;; jmp 0x13a -;; 12a: movq %r14, %rdi +;; je 0x12b +;; jmp 0x13b +;; 12b: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl 8(%rsp), %eax ;; testl %eax, %eax -;; je 0x160 -;; 146: movq %r14, %rdi +;; je 0x161 +;; 147: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 ;; movl $0xa, %eax -;; jmp 0x175 -;; 160: movq %r14, %rdi +;; jmp 0x176 +;; 161: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 0x18(%rsp), %r14 @@ -119,4 +119,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 17b: ud2 +;; 17c: ud2 diff --git a/tests/disas/winch/x64/if/reachability.wat b/tests/disas/winch/x64/if/reachability.wat index d760a1dff2bb..052b7aa8bb35 100644 --- a/tests/disas/winch/x64/if/reachability.wat +++ b/tests/disas/winch/x64/if/reachability.wat @@ -18,11 +18,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x6d -;; 1b: movq %rdi, %r14 +;; ja 0x6e +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -32,11 +32,11 @@ ;; subq $4, %rsp ;; movl %r11d, (%rsp) ;; testl %eax, %eax -;; je 0x57 -;; 49: movl $1, %eax +;; je 0x58 +;; 4a: movl $1, %eax ;; addq $4, %rsp -;; jmp 0x67 -;; 57: movl $2, %eax +;; jmp 0x68 +;; 58: movl $2, %eax ;; movl (%rsp), %ecx ;; addq $4, %rsp ;; subl %eax, %ecx @@ -44,4 +44,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 6d: ud2 +;; 6e: ud2 diff --git a/tests/disas/winch/x64/if/singular.wat b/tests/disas/winch/x64/if/singular.wat index 737293f9b553..ae75bc43bdc0 100644 --- a/tests/disas/winch/x64/if/singular.wat +++ b/tests/disas/winch/x64/if/singular.wat @@ -13,45 +13,45 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xa9 -;; 5b: movq %rdi, %r14 +;; ja 0xaa +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movl %edx, 0xc(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x7c -;; 7c: movl 0xc(%rsp), %eax +;; je 0x7d +;; 7d: movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x88 -;; 88: movl 0xc(%rsp), %eax +;; je 0x89 +;; 89: movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x9e -;; 94: movl $7, %eax -;; jmp 0xa3 -;; 9e: movl $8, %eax +;; je 0x9f +;; 95: movl $7, %eax +;; jmp 0xa4 +;; 9f: movl $8, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; a9: ud2 +;; aa: ud2 diff --git a/tests/disas/winch/x64/load/f32.wat b/tests/disas/winch/x64/load/f32.wat index 4c32af906855..0f0d396bf9d3 100644 --- a/tests/disas/winch/x64/load/f32.wat +++ b/tests/disas/winch/x64/load/f32.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/load/f64.wat b/tests/disas/winch/x64/load/f64.wat index ebcd6f3c5063..5539ea8ade40 100644 --- a/tests/disas/winch/x64/load/f64.wat +++ b/tests/disas/winch/x64/load/f64.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/load/grow_load.wat b/tests/disas/winch/x64/load/grow_load.wat index 4ef0e39424f0..fdadf8c26635 100644 --- a/tests/disas/winch/x64/load/grow_load.wat +++ b/tests/disas/winch/x64/load/grow_load.wat @@ -31,11 +31,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rsi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x70, %r11 ;; cmpq %rsp, %r11 -;; ja 0x120 -;; 1b: movq %rsi, %r14 +;; ja 0x121 +;; 1c: movq %rsi, %r14 ;; subq $0x60, %rsp ;; movq %rsi, 0x58(%rsp) ;; movq %rdx, 0x50(%rsp) @@ -52,8 +52,8 @@ ;; movl $0, %eax ;; sete %al ;; testl %eax, %eax -;; je 0x76 -;; 74: ud2 +;; je 0x77 +;; 75: ud2 ;; movl 0x80(%r14), %eax ;; subl $1, %eax ;; movl %eax, 0x80(%r14) @@ -74,11 +74,11 @@ ;; addq %rax, %rcx ;; addq $0x23024, %rcx ;; movsbq (%rcx), %rax -;; movss 0x55(%rip), %xmm0 +;; movss 0x54(%rip), %xmm0 ;; subq $0xc, %rsp -;; movsd 0x50(%rip), %xmm15 +;; movsd 0x4f(%rip), %xmm15 ;; movsd %xmm15, (%rsp) -;; movss 0x39(%rip), %xmm15 +;; movss 0x38(%rip), %xmm15 ;; movss %xmm15, 8(%rsp) ;; movq 0x14(%rsp), %rax ;; movsd (%rsp), %xmm15 @@ -90,15 +90,14 @@ ;; addq $0x60, %rsp ;; popq %rbp ;; retq -;; 120: ud2 -;; 122: addb %al, (%rax) -;; 124: addb %al, (%rax) -;; 126: addb %al, (%rax) -;; 128: addb %al, (%rax) -;; 12a: addb %al, (%rax) -;; 12c: addb %al, (%rax) -;; 12e: addb %al, (%rax) -;; 130: addb %al, (%rax) -;; 132: addb %al, (%rax) -;; 134: addb %al, (%rax) -;; 136: addb %al, (%rax) +;; 121: ud2 +;; 123: addb %al, (%rax) +;; 125: addb %al, (%rax) +;; 127: addb %al, (%rax) +;; 129: addb %al, (%rax) +;; 12b: addb %al, (%rax) +;; 12d: addb %al, (%rax) +;; 12f: addb %al, (%rax) +;; 131: addb %al, (%rax) +;; 133: addb %al, (%rax) +;; 135: addb %al, (%rax) diff --git a/tests/disas/winch/x64/load/i32.wat b/tests/disas/winch/x64/load/i32.wat index 2bc6a21bac06..b2ffa705664f 100644 --- a/tests/disas/winch/x64/load/i32.wat +++ b/tests/disas/winch/x64/load/i32.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 diff --git a/tests/disas/winch/x64/load/i64.wat b/tests/disas/winch/x64/load/i64.wat index 987ee8c764a5..3c1b5fafd464 100644 --- a/tests/disas/winch/x64/load/i64.wat +++ b/tests/disas/winch/x64/load/i64.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5a -;; 1b: movq %rdi, %r14 +;; ja 0x5b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -32,4 +32,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5a: ud2 +;; 5b: ud2 diff --git a/tests/disas/winch/x64/load/v128.wat b/tests/disas/winch/x64/load/v128.wat index 876ef2c150b2..50f3ae828de2 100644 --- a/tests/disas/winch/x64/load/v128.wat +++ b/tests/disas/winch/x64/load/v128.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x41 -;; 1b: movq %rdi, %r14 +;; ja 0x42 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -25,4 +25,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 41: ud2 +;; 42: ud2 diff --git a/tests/disas/winch/x64/local/latent.wat b/tests/disas/winch/x64/local/latent.wat index 6576ad9131fe..c1fd156624f7 100644 --- a/tests/disas/winch/x64/local/latent.wat +++ b/tests/disas/winch/x64/local/latent.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/local/materialized.wat b/tests/disas/winch/x64/local/materialized.wat index 0987127d6f46..6f725a8f7c6e 100644 --- a/tests/disas/winch/x64/local/materialized.wat +++ b/tests/disas/winch/x64/local/materialized.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3e -;; 1b: movq %rdi, %r14 +;; ja 0x3f +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,4 +25,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3e: ud2 +;; 3f: ud2 diff --git a/tests/disas/winch/x64/loop/as_binary_operand.wat b/tests/disas/winch/x64/loop/as_binary_operand.wat index 7df234a8c6e6..f4ad6112df10 100644 --- a/tests/disas/winch/x64/loop/as_binary_operand.wat +++ b/tests/disas/winch/x64/loop/as_binary_operand.wat @@ -13,28 +13,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x99 -;; 5b: movq %rdi, %r14 +;; ja 0x9a +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -51,4 +51,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 99: ud2 +;; 9a: ud2 diff --git a/tests/disas/winch/x64/loop/as_br_if_first.wat b/tests/disas/winch/x64/loop/as_br_if_first.wat index e6dcb472c1a0..8ae083c7bfd3 100644 --- a/tests/disas/winch/x64/loop/as_br_if_first.wat +++ b/tests/disas/winch/x64/loop/as_br_if_first.wat @@ -9,19 +9,19 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $2, %ecx ;; movl $1, %eax ;; testl %ecx, %ecx -;; jne 0x3d -;; 3d: addq $0x10, %rsp +;; jne 0x3e +;; 3e: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/loop/as_br_if_last.wat b/tests/disas/winch/x64/loop/as_br_if_last.wat index 09d92110dd3c..8ca7d1bba060 100644 --- a/tests/disas/winch/x64/loop/as_br_if_last.wat +++ b/tests/disas/winch/x64/loop/as_br_if_last.wat @@ -9,19 +9,19 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x43 -;; 1b: movq %rdi, %r14 +;; ja 0x44 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %ecx ;; movl $2, %eax ;; testl %ecx, %ecx -;; jne 0x3d -;; 3d: addq $0x10, %rsp +;; jne 0x3e +;; 3e: addq $0x10, %rsp ;; popq %rbp ;; retq -;; 43: ud2 +;; 44: ud2 diff --git a/tests/disas/winch/x64/loop/as_br_value.wat b/tests/disas/winch/x64/loop/as_br_value.wat index da723169c409..a8c673df5601 100644 --- a/tests/disas/winch/x64/loop/as_br_value.wat +++ b/tests/disas/winch/x64/loop/as_br_value.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -21,4 +21,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/loop/as_call_value.wat b/tests/disas/winch/x64/loop/as_call_value.wat index f9dbfb74debc..8bf1f288018b 100644 --- a/tests/disas/winch/x64/loop/as_call_value.wat +++ b/tests/disas/winch/x64/loop/as_call_value.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3a -;; 1b: movq %rdi, %r14 +;; ja 0x3b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,17 +23,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3a: ud2 +;; 3b: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -45,4 +45,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/loop/as_if_condition.wat b/tests/disas/winch/x64/loop/as_if_condition.wat index ce0eacb628a2..daa9adbc2a24 100644 --- a/tests/disas/winch/x64/loop/as_if_condition.wat +++ b/tests/disas/winch/x64/loop/as_if_condition.wat @@ -10,39 +10,39 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8e -;; 5b: movq %rdi, %r14 +;; ja 0x8f +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; je 0x88 -;; 78: movq %r14, %rdi +;; je 0x89 +;; 79: movq %r14, %rdi ;; movq %r14, %rsi ;; callq 0 ;; movq 8(%rsp), %r14 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 8e: ud2 +;; 8f: ud2 diff --git a/tests/disas/winch/x64/loop/as_if_else.wat b/tests/disas/winch/x64/loop/as_if_else.wat index a8f79f630585..edc42ba06a76 100644 --- a/tests/disas/winch/x64/loop/as_if_else.wat +++ b/tests/disas/winch/x64/loop/as_if_else.wat @@ -9,21 +9,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; je 0x42 -;; 38: movl $2, %eax -;; jmp 0x47 -;; 42: movl $1, %eax +;; je 0x43 +;; 39: movl $2, %eax +;; jmp 0x48 +;; 43: movl $1, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/loop/as_if_then.wat b/tests/disas/winch/x64/loop/as_if_then.wat index a88a0dffa21b..9caf66861b8b 100644 --- a/tests/disas/winch/x64/loop/as_if_then.wat +++ b/tests/disas/winch/x64/loop/as_if_then.wat @@ -9,21 +9,21 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4d -;; 1b: movq %rdi, %r14 +;; ja 0x4e +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movl $1, %eax ;; testl %eax, %eax -;; je 0x42 -;; 38: movl $1, %eax -;; jmp 0x47 -;; 42: movl $2, %eax +;; je 0x43 +;; 39: movl $1, %eax +;; jmp 0x48 +;; 43: movl $2, %eax ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 4d: ud2 +;; 4e: ud2 diff --git a/tests/disas/winch/x64/loop/as_local_set_value.wat b/tests/disas/winch/x64/loop/as_local_set_value.wat index 7b43d4837a0c..3abda42351a3 100644 --- a/tests/disas/winch/x64/loop/as_local_set_value.wat +++ b/tests/disas/winch/x64/loop/as_local_set_value.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x48 -;; 1b: movq %rdi, %r14 +;; ja 0x49 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -24,4 +24,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 48: ud2 +;; 49: ud2 diff --git a/tests/disas/winch/x64/loop/as_test_operand.wat b/tests/disas/winch/x64/loop/as_test_operand.wat index 5ddc5238aedb..aa83f0482088 100644 --- a/tests/disas/winch/x64/loop/as_test_operand.wat +++ b/tests/disas/winch/x64/loop/as_test_operand.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x92 -;; 5b: movq %rdi, %r14 +;; ja 0x93 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -46,4 +46,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 92: ud2 +;; 93: ud2 diff --git a/tests/disas/winch/x64/loop/as_unary_operand.wat b/tests/disas/winch/x64/loop/as_unary_operand.wat index 13a5449182ef..b346bf07243e 100644 --- a/tests/disas/winch/x64/loop/as_unary_operand.wat +++ b/tests/disas/winch/x64/loop/as_unary_operand.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x9a -;; 5b: movq %rdi, %r14 +;; ja 0x9b +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -48,4 +48,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 9a: ud2 +;; 9b: ud2 diff --git a/tests/disas/winch/x64/loop/break_inner.wat b/tests/disas/winch/x64/loop/break_inner.wat index 48ec1753b553..2213d1e82631 100644 --- a/tests/disas/winch/x64/loop/break_inner.wat +++ b/tests/disas/winch/x64/loop/break_inner.wat @@ -16,11 +16,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0xe3 -;; 1b: movq %rdi, %r14 +;; ja 0xe4 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -71,4 +71,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; e3: ud2 +;; e4: ud2 diff --git a/tests/disas/winch/x64/loop/cont_inner.wat b/tests/disas/winch/x64/loop/cont_inner.wat index 1a1e7cb499bf..fa40088f990a 100644 --- a/tests/disas/winch/x64/loop/cont_inner.wat +++ b/tests/disas/winch/x64/loop/cont_inner.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x56 -;; 1b: movq %rdi, %r14 +;; ja 0x57 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -28,8 +28,8 @@ ;; movl 0xc(%rsp), %r11d ;; subq $4, %rsp ;; movl %r11d, (%rsp) -;; jmp 0x4b -;; 50: addq $0x20, %rsp +;; jmp 0x4c +;; 51: addq $0x20, %rsp ;; popq %rbp ;; retq -;; 56: ud2 +;; 57: ud2 diff --git a/tests/disas/winch/x64/loop/deep.wat b/tests/disas/winch/x64/loop/deep.wat index b60c55acf8c4..b3043a959894 100644 --- a/tests/disas/winch/x64/loop/deep.wat +++ b/tests/disas/winch/x64/loop/deep.wat @@ -51,28 +51,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -84,4 +84,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/loop/effects.wat b/tests/disas/winch/x64/loop/effects.wat index dc88ca705898..86d9cb3fb729 100644 --- a/tests/disas/winch/x64/loop/effects.wat +++ b/tests/disas/winch/x64/loop/effects.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x75 -;; 1b: movq %rdi, %r14 +;; ja 0x76 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -47,4 +47,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 75: ud2 +;; 76: ud2 diff --git a/tests/disas/winch/x64/loop/empty.wat b/tests/disas/winch/x64/loop/empty.wat index 3b830edf1b45..ce41bbfefe7c 100644 --- a/tests/disas/winch/x64/loop/empty.wat +++ b/tests/disas/winch/x64/loop/empty.wat @@ -11,15 +11,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 diff --git a/tests/disas/winch/x64/loop/for.wat b/tests/disas/winch/x64/loop/for.wat index 50e46e765904..14426bc2aab8 100644 --- a/tests/disas/winch/x64/loop/for.wat +++ b/tests/disas/winch/x64/loop/for.wat @@ -20,11 +20,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0xa5 -;; 1b: movq %rdi, %r14 +;; ja 0xa6 +;; 1c: movq %rdi, %r14 ;; subq $0x30, %rsp ;; movq %rdi, 0x28(%rsp) ;; movq %rsi, 0x20(%rsp) @@ -42,17 +42,17 @@ ;; movl $0, %ecx ;; seta %cl ;; testl %ecx, %ecx -;; jne 0x9a -;; 74: movq 8(%rsp), %rax +;; jne 0x9b +;; 75: movq 8(%rsp), %rax ;; movq 0x10(%rsp), %rcx ;; imulq %rax, %rcx ;; movq %rcx, 0x10(%rsp) ;; movq 8(%rsp), %rax ;; addq $1, %rax ;; movq %rax, 8(%rsp) -;; jmp 0x56 -;; 9a: movq 0x10(%rsp), %rax +;; jmp 0x57 +;; 9b: movq 0x10(%rsp), %rax ;; addq $0x30, %rsp ;; popq %rbp ;; retq -;; a5: ud2 +;; a6: ud2 diff --git a/tests/disas/winch/x64/loop/multi.wat b/tests/disas/winch/x64/loop/multi.wat index d43531681bc2..e4ccc2187d5a 100644 --- a/tests/disas/winch/x64/loop/multi.wat +++ b/tests/disas/winch/x64/loop/multi.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0xe6 -;; 5b: movq %rdi, %r14 +;; ja 0xe7 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -69,4 +69,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; e6: ud2 +;; e7: ud2 diff --git a/tests/disas/winch/x64/loop/nested.wat b/tests/disas/winch/x64/loop/nested.wat index 8c1fbd9bf2b6..4ea8195be88d 100644 --- a/tests/disas/winch/x64/loop/nested.wat +++ b/tests/disas/winch/x64/loop/nested.wat @@ -13,28 +13,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x96 -;; 5b: movq %rdi, %r14 +;; ja 0x97 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -50,4 +50,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 96: ud2 +;; 97: ud2 diff --git a/tests/disas/winch/x64/loop/singular.wat b/tests/disas/winch/x64/loop/singular.wat index 2947f1af7632..cdc51e693e15 100644 --- a/tests/disas/winch/x64/loop/singular.wat +++ b/tests/disas/winch/x64/loop/singular.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -23,4 +23,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/loop/while.wat b/tests/disas/winch/x64/loop/while.wat index b688b1a6ca2d..15b1d14bbe06 100644 --- a/tests/disas/winch/x64/loop/while.wat +++ b/tests/disas/winch/x64/loop/while.wat @@ -19,11 +19,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x8c -;; 1b: movq %rdi, %r14 +;; ja 0x8d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -36,17 +36,17 @@ ;; movl $0, %eax ;; sete %al ;; testl %eax, %eax -;; jne 0x82 -;; 5e: movq (%rsp), %rax +;; jne 0x83 +;; 5f: movq (%rsp), %rax ;; movq 8(%rsp), %rcx ;; imulq %rax, %rcx ;; movq %rcx, (%rsp) ;; movq 8(%rsp), %rax ;; subq $1, %rax ;; movq %rax, 8(%rsp) -;; jmp 0x44 -;; 82: movq (%rsp), %rax +;; jmp 0x45 +;; 83: movq (%rsp), %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 8c: ud2 +;; 8d: ud2 diff --git a/tests/disas/winch/x64/nop/nop.wat b/tests/disas/winch/x64/nop/nop.wat index 958735cd4b51..98a2c38514dd 100644 --- a/tests/disas/winch/x64/nop/nop.wat +++ b/tests/disas/winch/x64/nop/nop.wat @@ -11,15 +11,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 diff --git a/tests/disas/winch/x64/return/as_block_first.wat b/tests/disas/winch/x64/return/as_block_first.wat index 0114f54772c1..87f4b9bfcadb 100644 --- a/tests/disas/winch/x64/return/as_block_first.wat +++ b/tests/disas/winch/x64/return/as_block_first.wat @@ -11,32 +11,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 5b: movq %rdi, %r14 +;; ja 0x72 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 71: ud2 +;; 72: ud2 diff --git a/tests/disas/winch/x64/return/as_block_last.wat b/tests/disas/winch/x64/return/as_block_last.wat index 2caf07ccff92..3be51d7fa4b2 100644 --- a/tests/disas/winch/x64/return/as_block_last.wat +++ b/tests/disas/winch/x64/return/as_block_last.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x81 -;; 5b: movq %rdi, %r14 +;; ja 0x82 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 81: ud2 +;; 82: ud2 diff --git a/tests/disas/winch/x64/return/as_block_mid.wat b/tests/disas/winch/x64/return/as_block_mid.wat index 100de03d1528..22303b0976de 100644 --- a/tests/disas/winch/x64/return/as_block_mid.wat +++ b/tests/disas/winch/x64/return/as_block_mid.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x81 -;; 5b: movq %rdi, %r14 +;; ja 0x82 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 81: ud2 +;; 82: ud2 diff --git a/tests/disas/winch/x64/return/as_block_value.wat b/tests/disas/winch/x64/return/as_block_value.wat index 7fa73dbeadd9..d2ed50e03e67 100644 --- a/tests/disas/winch/x64/return/as_block_value.wat +++ b/tests/disas/winch/x64/return/as_block_value.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_br_if_cond.wat b/tests/disas/winch/x64/return/as_br_if_cond.wat index bdee5f7286ac..04d1ad0c355d 100644 --- a/tests/disas/winch/x64/return/as_br_if_cond.wat +++ b/tests/disas/winch/x64/return/as_br_if_cond.wat @@ -11,32 +11,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 5b: movq %rdi, %r14 +;; ja 0x72 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 71: ud2 +;; 72: ud2 diff --git a/tests/disas/winch/x64/return/as_br_value.wat b/tests/disas/winch/x64/return/as_br_value.wat index 752869e73df4..90d92105e7f5 100644 --- a/tests/disas/winch/x64/return/as_br_value.wat +++ b/tests/disas/winch/x64/return/as_br_value.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x76 -;; 5b: movq %rdi, %r14 +;; ja 0x77 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 76: ud2 +;; 77: ud2 diff --git a/tests/disas/winch/x64/return/as_call_fist.wat b/tests/disas/winch/x64/return/as_call_fist.wat index 58a6fe06f032..3b7e4d64b28e 100644 --- a/tests/disas/winch/x64/return/as_call_fist.wat +++ b/tests/disas/winch/x64/return/as_call_fist.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,17 +26,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_call_last.wat b/tests/disas/winch/x64/return/as_call_last.wat index d58617f197d8..2a4825444062 100644 --- a/tests/disas/winch/x64/return/as_call_last.wat +++ b/tests/disas/winch/x64/return/as_call_last.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,17 +26,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_call_mid.wat b/tests/disas/winch/x64/return/as_call_mid.wat index 056ffee67299..f91b39735380 100644 --- a/tests/disas/winch/x64/return/as_call_mid.wat +++ b/tests/disas/winch/x64/return/as_call_mid.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,17 +26,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 6b: movq %rdi, %r14 +;; ja 0x87 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_func_first.wat b/tests/disas/winch/x64/return/as_func_first.wat index 7e0e5dd480f3..b161cb91fbcb 100644 --- a/tests/disas/winch/x64/return/as_func_first.wat +++ b/tests/disas/winch/x64/return/as_func_first.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x76 -;; 5b: movq %rdi, %r14 +;; ja 0x77 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 76: ud2 +;; 77: ud2 diff --git a/tests/disas/winch/x64/return/as_func_last.wat b/tests/disas/winch/x64/return/as_func_last.wat index 0f6a545cb2c6..cfd058ca8b07 100644 --- a/tests/disas/winch/x64/return/as_func_last.wat +++ b/tests/disas/winch/x64/return/as_func_last.wat @@ -8,15 +8,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 diff --git a/tests/disas/winch/x64/return/as_func_mid.wat b/tests/disas/winch/x64/return/as_func_mid.wat index 730073fcfc8a..ecc08597085a 100644 --- a/tests/disas/winch/x64/return/as_func_mid.wat +++ b/tests/disas/winch/x64/return/as_func_mid.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_func_value.wat b/tests/disas/winch/x64/return/as_func_value.wat index 3311f70de309..288bbadae385 100644 --- a/tests/disas/winch/x64/return/as_func_value.wat +++ b/tests/disas/winch/x64/return/as_func_value.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_if_cond.wat b/tests/disas/winch/x64/return/as_if_cond.wat index c1b869dd2b0d..089445605d53 100644 --- a/tests/disas/winch/x64/return/as_if_cond.wat +++ b/tests/disas/winch/x64/return/as_if_cond.wat @@ -13,28 +13,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x76 -;; 5b: movq %rdi, %r14 +;; ja 0x77 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -42,4 +42,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 76: ud2 +;; 77: ud2 diff --git a/tests/disas/winch/x64/return/as_if_else.wat b/tests/disas/winch/x64/return/as_if_else.wat index b96e50873d1b..4ec919bab931 100644 --- a/tests/disas/winch/x64/return/as_if_else.wat +++ b/tests/disas/winch/x64/return/as_if_else.wat @@ -14,28 +14,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x94 -;; 5b: movq %rdi, %r14 +;; ja 0x95 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,11 +43,11 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x89 -;; 80: movl 8(%rsp), %eax -;; jmp 0x8e -;; 89: movl $4, %eax +;; je 0x8a +;; 81: movl 8(%rsp), %eax +;; jmp 0x8f +;; 8a: movl $4, %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 94: ud2 +;; 95: ud2 diff --git a/tests/disas/winch/x64/return/as_if_then.wat b/tests/disas/winch/x64/return/as_if_then.wat index c1037db9dbd0..81cb1f1f41e6 100644 --- a/tests/disas/winch/x64/return/as_if_then.wat +++ b/tests/disas/winch/x64/return/as_if_then.wat @@ -14,28 +14,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x94 -;; 5b: movq %rdi, %r14 +;; ja 0x95 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -43,11 +43,11 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x8a -;; 80: movl $3, %eax -;; jmp 0x8e -;; 8a: movl 8(%rsp), %eax +;; je 0x8b +;; 81: movl $3, %eax +;; jmp 0x8f +;; 8b: movl 8(%rsp), %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 94: ud2 +;; 95: ud2 diff --git a/tests/disas/winch/x64/return/as_loop_first.wat b/tests/disas/winch/x64/return/as_loop_first.wat index ffc33d39aed2..6b7ce6c981d9 100644 --- a/tests/disas/winch/x64/return/as_loop_first.wat +++ b/tests/disas/winch/x64/return/as_loop_first.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x76 -;; 5b: movq %rdi, %r14 +;; ja 0x77 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 76: ud2 +;; 77: ud2 diff --git a/tests/disas/winch/x64/return/as_loop_last.wat b/tests/disas/winch/x64/return/as_loop_last.wat index 503a653055b4..5e325d215be1 100644 --- a/tests/disas/winch/x64/return/as_loop_last.wat +++ b/tests/disas/winch/x64/return/as_loop_last.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_loop_mid.wat b/tests/disas/winch/x64/return/as_loop_mid.wat index 7d238eca40da..d7020365de6f 100644 --- a/tests/disas/winch/x64/return/as_loop_mid.wat +++ b/tests/disas/winch/x64/return/as_loop_mid.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/return/as_return_value.wat b/tests/disas/winch/x64/return/as_return_value.wat index d6273e7d70dc..84a5603a5bc1 100644 --- a/tests/disas/winch/x64/return/as_return_value.wat +++ b/tests/disas/winch/x64/return/as_return_value.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 5b: movq %rdi, %r14 +;; ja 0x79 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -40,4 +40,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 78: ud2 +;; 79: ud2 diff --git a/tests/disas/winch/x64/return/nullary.wat b/tests/disas/winch/x64/return/nullary.wat index 91b8d1fcd237..611f929123bf 100644 --- a/tests/disas/winch/x64/return/nullary.wat +++ b/tests/disas/winch/x64/return/nullary.wat @@ -9,32 +9,32 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 5b: movq %rdi, %r14 +;; ja 0x72 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 71: ud2 +;; 72: ud2 diff --git a/tests/disas/winch/x64/return/type_i32.wat b/tests/disas/winch/x64/return/type_i32.wat index 66703bbc80f2..d1ee046273a2 100644 --- a/tests/disas/winch/x64/return/type_i32.wat +++ b/tests/disas/winch/x64/return/type_i32.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x76 -;; 5b: movq %rdi, %r14 +;; ja 0x77 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -41,4 +41,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 76: ud2 +;; 77: ud2 diff --git a/tests/disas/winch/x64/return/type_i64_value.wat b/tests/disas/winch/x64/return/type_i64_value.wat index 802f3578e363..187035c73786 100644 --- a/tests/disas/winch/x64/return/type_i64_value.wat +++ b/tests/disas/winch/x64/return/type_i64_value.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x78 -;; 5b: movq %rdi, %r14 +;; ja 0x79 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -41,4 +41,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 78: ud2 +;; 79: ud2 diff --git a/tests/disas/winch/x64/select/f32.wat b/tests/disas/winch/x64/select/f32.wat index caa5cf2e4024..a09f4d144edc 100644 --- a/tests/disas/winch/x64/select/f32.wat +++ b/tests/disas/winch/x64/select/f32.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5f -;; 1b: movq %rdi, %r14 +;; ja 0x60 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,9 +26,9 @@ ;; movss 8(%rsp), %xmm0 ;; movss 0xc(%rsp), %xmm1 ;; cmpl $0, %eax -;; je 0x59 -;; 55: movsd %xmm1, %xmm0 +;; je 0x5a +;; 56: movsd %xmm1, %xmm0 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 5f: ud2 +;; 60: ud2 diff --git a/tests/disas/winch/x64/select/f64.wat b/tests/disas/winch/x64/select/f64.wat index e5a71bb39469..04a899d99385 100644 --- a/tests/disas/winch/x64/select/f64.wat +++ b/tests/disas/winch/x64/select/f64.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x5f -;; 1b: movq %rdi, %r14 +;; ja 0x60 +;; 1c: movq %rdi, %r14 ;; subq $0x30, %rsp ;; movq %rdi, 0x28(%rsp) ;; movq %rsi, 0x20(%rsp) @@ -26,9 +26,9 @@ ;; movsd 0x10(%rsp), %xmm0 ;; movsd 0x18(%rsp), %xmm1 ;; cmpl $0, %eax -;; je 0x59 -;; 55: movsd %xmm1, %xmm0 +;; je 0x5a +;; 56: movsd %xmm1, %xmm0 ;; addq $0x30, %rsp ;; popq %rbp ;; retq -;; 5f: ud2 +;; 60: ud2 diff --git a/tests/disas/winch/x64/select/i32.wat b/tests/disas/winch/x64/select/i32.wat index 1ee0eacf0bd0..dd765c3f4c8d 100644 --- a/tests/disas/winch/x64/select/i32.wat +++ b/tests/disas/winch/x64/select/i32.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x53 -;; 1b: movq %rdi, %r14 +;; ja 0x54 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 53: ud2 +;; 54: ud2 diff --git a/tests/disas/winch/x64/select/i64.wat b/tests/disas/winch/x64/select/i64.wat index 09a704c3fbbf..6fd3f5f4c717 100644 --- a/tests/disas/winch/x64/select/i64.wat +++ b/tests/disas/winch/x64/select/i64.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x59 -;; 1b: movq %rdi, %r14 +;; ja 0x5a +;; 1c: movq %rdi, %r14 ;; subq $0x30, %rsp ;; movq %rdi, 0x28(%rsp) ;; movq %rsi, 0x20(%rsp) @@ -31,4 +31,4 @@ ;; addq $0x30, %rsp ;; popq %rbp ;; retq -;; 59: ud2 +;; 5a: ud2 diff --git a/tests/disas/winch/x64/store/f32.wat b/tests/disas/winch/x64/store/f32.wat index a1c413c99752..6381b6dc7ff6 100644 --- a/tests/disas/winch/x64/store/f32.wat +++ b/tests/disas/winch/x64/store/f32.wat @@ -9,15 +9,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movss 0x1d(%rip), %xmm0 +;; movss 0x1c(%rip), %xmm0 ;; movl $0, %eax ;; movq 0x60(%r14), %rcx ;; addq %rax, %rcx @@ -25,7 +25,7 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %al, (%rax) +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) +;; 50: addb %al, (%rax) diff --git a/tests/disas/winch/x64/store/f64.wat b/tests/disas/winch/x64/store/f64.wat index 4f5debe8fc63..c19f69323363 100644 --- a/tests/disas/winch/x64/store/f64.wat +++ b/tests/disas/winch/x64/store/f64.wat @@ -10,15 +10,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movsd 0x1d(%rip), %xmm0 +;; movsd 0x1c(%rip), %xmm0 ;; movl $0, %eax ;; movq 0x60(%r14), %rcx ;; addq %rax, %rcx @@ -26,10 +26,10 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %al, (%rax) -;; 51: addb %al, (%rax) -;; 53: addb %al, (%rax) -;; 55: addb %dh, %ah +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) +;; 50: addb %al, (%rax) +;; 52: addb %al, (%rax) +;; 54: addb %al, (%rax) +;; 56: hlt diff --git a/tests/disas/winch/x64/store/i32.wat b/tests/disas/winch/x64/store/i32.wat index 24c776709d19..23a2b477a584 100644 --- a/tests/disas/winch/x64/store/i32.wat +++ b/tests/disas/winch/x64/store/i32.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x44 -;; 1b: movq %rdi, %r14 +;; ja 0x45 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -27,4 +27,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 44: ud2 +;; 45: ud2 diff --git a/tests/disas/winch/x64/store/i64.wat b/tests/disas/winch/x64/store/i64.wat index 0a4c451dc694..bea92185184a 100644 --- a/tests/disas/winch/x64/store/i64.wat +++ b/tests/disas/winch/x64/store/i64.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -24,4 +24,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 diff --git a/tests/disas/winch/x64/store/oob.wat b/tests/disas/winch/x64/store/oob.wat index 4cb68e0d811a..58a6dff51312 100644 --- a/tests/disas/winch/x64/store/oob.wat +++ b/tests/disas/winch/x64/store/oob.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x85 -;; 1b: movq %rdi, %r14 +;; ja 0x86 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,10 +29,10 @@ ;; movl %ecx, %ebx ;; movabsq $0x100000000, %r11 ;; addq %r11, %rbx -;; jb 0x87 -;; 52: cmpq %rdx, %rbx -;; ja 0x89 -;; 5b: movq 0x60(%r14), %rsi +;; jb 0x88 +;; 53: cmpq %rdx, %rbx +;; ja 0x8a +;; 5c: movq 0x60(%r14), %rsi ;; addq %rcx, %rsi ;; movabsq $0xffffffff, %r11 ;; addq %r11, %rsi @@ -43,6 +43,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 85: ud2 -;; 87: ud2 -;; 89: ud2 +;; 86: ud2 +;; 88: ud2 +;; 8a: ud2 diff --git a/tests/disas/winch/x64/store/v128.wat b/tests/disas/winch/x64/store/v128.wat index 8ca447b28e12..142e0fdc12f1 100644 --- a/tests/disas/winch/x64/store/v128.wat +++ b/tests/disas/winch/x64/store/v128.wat @@ -9,15 +9,15 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x49 -;; 1b: movq %rdi, %r14 +;; ja 0x4a +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) -;; movdqu 0x1d(%rip), %xmm0 +;; movdqu 0x1c(%rip), %xmm0 ;; movl $0, %eax ;; movq 0x60(%r14), %rcx ;; addq %rax, %rcx @@ -25,14 +25,14 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 49: ud2 -;; 4b: addb %al, (%rax) -;; 4d: addb %al, (%rax) -;; 4f: addb %al, (%rcx) -;; 51: addb %al, (%rax) -;; 53: addb %al, (%rax) -;; 55: addb %al, (%rax) -;; 57: addb %al, (%rdx) -;; 59: addb %al, (%rax) -;; 5b: addb %al, (%rax) -;; 5d: addb %al, (%rax) +;; 4a: ud2 +;; 4c: addb %al, (%rax) +;; 4e: addb %al, (%rax) +;; 50: addl %eax, (%rax) +;; 52: addb %al, (%rax) +;; 54: addb %al, (%rax) +;; 56: addb %al, (%rax) +;; 58: addb (%rax), %al +;; 5a: addb %al, (%rax) +;; 5c: addb %al, (%rax) +;; 5e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/table/fill.wat b/tests/disas/winch/x64/table/fill.wat index 1d2f432b2ad0..1f139baf396d 100644 --- a/tests/disas/winch/x64/table/fill.wat +++ b/tests/disas/winch/x64/table/fill.wat @@ -24,62 +24,62 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]::f2: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x71 -;; 5b: movq %rdi, %r14 +;; ja 0x72 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 71: ud2 +;; 72: ud2 ;; ;; wasm[0]::function[2]::f3: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0xb1 -;; 9b: movq %rdi, %r14 +;; ja 0xb2 +;; 9c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; b1: ud2 +;; b2: ud2 ;; ;; wasm[0]::function[3]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x40, %r11 ;; cmpq %rsp, %r11 -;; ja 0x1d2 -;; db: movq %rdi, %r14 +;; ja 0x1d3 +;; dc: movq %rdi, %r14 ;; subq $0x30, %rsp ;; movq %rdi, 0x28(%rsp) ;; movq %rsi, 0x20(%rsp) @@ -96,8 +96,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x1d4 -;; 12e: movq %rcx, %r11 +;; jae 0x1d5 +;; 12f: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -106,19 +106,19 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0x17f -;; 151: subq $4, %rsp +;; jne 0x180 +;; 152: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $0xc, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 0xc(%rsp), %edx -;; callq 0x515 +;; callq 0x516 ;; addq $0xc, %rsp ;; addq $4, %rsp ;; movq 0x28(%rsp), %r14 -;; jmp 0x183 -;; 17f: andq $0xfffffffffffffffe, %rax +;; jmp 0x184 +;; 180: andq $0xfffffffffffffffe, %rax ;; movq %rax, 0xc(%rsp) ;; movl 0x1c(%rsp), %r11d ;; subq $4, %rsp @@ -133,11 +133,11 @@ ;; movl 0xc(%rsp), %edx ;; movq 4(%rsp), %rcx ;; movl (%rsp), %r8d -;; callq 0x556 +;; callq 0x557 ;; addq $0x10, %rsp ;; movq 0x28(%rsp), %r14 ;; addq $0x30, %rsp ;; popq %rbp ;; retq -;; 1d2: ud2 -;; 1d4: ud2 +;; 1d3: ud2 +;; 1d5: ud2 diff --git a/tests/disas/winch/x64/table/get.wat b/tests/disas/winch/x64/table/get.wat index 2927b19b7c78..6be19080da85 100644 --- a/tests/disas/winch/x64/table/get.wat +++ b/tests/disas/winch/x64/table/get.wat @@ -14,28 +14,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]::f3: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0xef -;; 5b: movq %rdi, %r14 +;; ja 0xf0 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -48,8 +48,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0xf1 -;; 94: movq %rcx, %r11 +;; jae 0xf2 +;; 95: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -58,21 +58,21 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0xe5 -;; b7: subq $4, %rsp +;; jne 0xe6 +;; b8: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $0xc, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 0xc(%rsp), %edx -;; callq 0x32d +;; callq 0x32e ;; addq $0xc, %rsp ;; addq $4, %rsp ;; movq 0x18(%rsp), %r14 -;; jmp 0xe9 -;; e5: andq $0xfffffffffffffffe, %rax +;; jmp 0xea +;; e6: andq $0xfffffffffffffffe, %rax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; ef: ud2 -;; f1: ud2 +;; f0: ud2 +;; f2: ud2 diff --git a/tests/disas/winch/x64/table/grow.wat b/tests/disas/winch/x64/table/grow.wat index be7068a3aeff..b0bd79844c74 100644 --- a/tests/disas/winch/x64/table/grow.wat +++ b/tests/disas/winch/x64/table/grow.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x66 -;; 1b: movq %rdi, %r14 +;; ja 0x67 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,11 +30,11 @@ ;; movl $0, %esi ;; movl $0xa, %edx ;; movq 8(%rsp), %rcx -;; callq 0x196 +;; callq 0x197 ;; addq $8, %rsp ;; addq $8, %rsp ;; movq 0x18(%rsp), %r14 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 66: ud2 +;; 67: ud2 diff --git a/tests/disas/winch/x64/table/init_copy_drop.wat b/tests/disas/winch/x64/table/init_copy_drop.wat index 0cb0dffe13c1..ddfc94b3a7a5 100644 --- a/tests/disas/winch/x64/table/init_copy_drop.wat +++ b/tests/disas/winch/x64/table/init_copy_drop.wat @@ -38,11 +38,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x36 -;; 1b: movq %rdi, %r14 +;; ja 0x37 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -50,17 +50,17 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 36: ud2 +;; 37: ud2 ;; ;; wasm[0]::function[6]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x76 -;; 5b: movq %rdi, %r14 +;; ja 0x77 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -68,17 +68,17 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 76: ud2 +;; 77: ud2 ;; ;; wasm[0]::function[7]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0xb6 -;; 9b: movq %rdi, %r14 +;; ja 0xb7 +;; 9c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -86,17 +86,17 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; b6: ud2 +;; b7: ud2 ;; ;; wasm[0]::function[8]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0xf6 -;; db: movq %rdi, %r14 +;; ja 0xf7 +;; dc: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -104,17 +104,17 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; f6: ud2 +;; f7: ud2 ;; ;; wasm[0]::function[9]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x136 -;; 11b: movq %rdi, %r14 +;; ja 0x137 +;; 11c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -122,17 +122,17 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 136: ud2 +;; 137: ud2 ;; ;; wasm[0]::function[10]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x2ad -;; 15b: movq %rdi, %r14 +;; ja 0x2ae +;; 15c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -142,11 +142,11 @@ ;; movl $7, %ecx ;; movl $0, %r8d ;; movl $4, %r9d -;; callq 0x974 +;; callq 0x975 ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $1, %esi -;; callq 0x9b6 +;; callq 0x9d0 ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $0, %esi @@ -154,11 +154,11 @@ ;; movl $0xf, %ecx ;; movl $1, %r8d ;; movl $3, %r9d -;; callq 0x974 +;; callq 0x975 ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $3, %esi -;; callq 0x9b6 +;; callq 0x9d0 ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $0, %esi @@ -166,7 +166,7 @@ ;; movl $0x14, %ecx ;; movl $0xf, %r8d ;; movl $5, %r9d -;; callq 0x9f5 +;; callq 0xa0f ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $0, %esi @@ -174,7 +174,7 @@ ;; movl $0x15, %ecx ;; movl $0x1d, %r8d ;; movl $1, %r9d -;; callq 0x9f5 +;; callq 0xa0f ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $0, %esi @@ -182,7 +182,7 @@ ;; movl $0x18, %ecx ;; movl $0xa, %r8d ;; movl $1, %r9d -;; callq 0x9f5 +;; callq 0xa0f ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $0, %esi @@ -190,7 +190,7 @@ ;; movl $0xd, %ecx ;; movl $0xb, %r8d ;; movl $4, %r9d -;; callq 0x9f5 +;; callq 0xa0f ;; movq 8(%rsp), %r14 ;; movq %r14, %rdi ;; movl $0, %esi @@ -198,22 +198,22 @@ ;; movl $0x13, %ecx ;; movl $0x14, %r8d ;; movl $5, %r9d -;; callq 0x9f5 +;; callq 0xa0f ;; movq 8(%rsp), %r14 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 2ad: ud2 +;; 2ae: ud2 ;; ;; wasm[0]::function[11]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x397 -;; 2cb: movq %rdi, %r14 +;; ja 0x398 +;; 2cc: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -226,8 +226,8 @@ ;; movq %r14, %rdx ;; movq 0xd8(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x399 -;; 307: movq %rcx, %r11 +;; jae 0x39a +;; 308: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0xd0(%rdx), %rdx ;; movq %rdx, %rsi @@ -236,27 +236,27 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0x35b -;; 32d: subq $4, %rsp +;; jne 0x35c +;; 32e: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $0xc, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 0xc(%rsp), %edx -;; callq 0xa37 +;; callq 0xa6a ;; addq $0xc, %rsp ;; addq $4, %rsp ;; movq 0x18(%rsp), %r14 -;; jmp 0x35f -;; 35b: andq $0xfffffffffffffffe, %rax +;; jmp 0x360 +;; 35c: andq $0xfffffffffffffffe, %rax ;; testq %rax, %rax -;; je 0x39b -;; 368: movq 0x50(%r14), %r11 +;; je 0x39c +;; 369: movq 0x50(%r14), %r11 ;; movl (%r11), %ecx ;; movl 0x10(%rax), %edx ;; cmpl %edx, %ecx -;; jne 0x39d -;; 37a: pushq %rax +;; jne 0x39e +;; 37b: pushq %rax ;; popq %rcx ;; movq 0x18(%rcx), %rbx ;; movq 8(%rcx), %rdx @@ -267,7 +267,7 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 397: ud2 -;; 399: ud2 -;; 39b: ud2 -;; 39d: ud2 +;; 398: ud2 +;; 39a: ud2 +;; 39c: ud2 +;; 39e: ud2 diff --git a/tests/disas/winch/x64/table/set.wat b/tests/disas/winch/x64/table/set.wat index cbfa924843bb..9c0bd02ef852 100644 --- a/tests/disas/winch/x64/table/set.wat +++ b/tests/disas/winch/x64/table/set.wat @@ -19,28 +19,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0xb0 -;; 5b: movq %rdi, %r14 +;; ja 0xb1 +;; 5c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -51,8 +51,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0xb2 -;; 8c: movq %rcx, %r11 +;; jae 0xb3 +;; 8d: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -64,18 +64,18 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; b0: ud2 -;; b2: ud2 +;; b1: ud2 +;; b3: ud2 ;; ;; wasm[0]::function[2]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x1b5 -;; db: movq %rdi, %r14 +;; ja 0x1b6 +;; dc: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -92,8 +92,8 @@ ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x1b7 -;; 125: movq %rcx, %r11 +;; jae 0x1b8 +;; 126: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -102,26 +102,26 @@ ;; cmovaeq %rsi, %rdx ;; movq (%rdx), %rax ;; testq %rax, %rax -;; jne 0x176 -;; 148: subq $4, %rsp +;; jne 0x177 +;; 149: subq $4, %rsp ;; movl %ecx, (%rsp) ;; subq $8, %rsp ;; movq %r14, %rdi ;; movl $0, %esi ;; movl 8(%rsp), %edx -;; callq 0x4ff +;; callq 0x500 ;; addq $8, %rsp ;; addq $4, %rsp ;; movq 0x1c(%rsp), %r14 -;; jmp 0x17a -;; 176: andq $0xfffffffffffffffe, %rax +;; jmp 0x17b +;; 177: andq $0xfffffffffffffffe, %rax ;; movl (%rsp), %ecx ;; addq $4, %rsp ;; movq %r14, %rdx ;; movq 0x60(%rdx), %rbx ;; cmpq %rbx, %rcx -;; jae 0x1b9 -;; 191: movq %rcx, %r11 +;; jae 0x1ba +;; 192: movq %rcx, %r11 ;; imulq $8, %r11, %r11 ;; movq 0x58(%rdx), %rdx ;; movq %rdx, %rsi @@ -133,6 +133,6 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 1b5: ud2 -;; 1b7: ud2 -;; 1b9: ud2 +;; 1b6: ud2 +;; 1b8: ud2 +;; 1ba: ud2 diff --git a/tests/disas/winch/x64/table/size.wat b/tests/disas/winch/x64/table/size.wat index 989b897196fd..5749b86f37b6 100644 --- a/tests/disas/winch/x64/table/size.wat +++ b/tests/disas/winch/x64/table/size.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x38 -;; 1b: movq %rdi, %r14 +;; ja 0x39 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -22,4 +22,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 38: ud2 +;; 39: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_block_broke.wat b/tests/disas/winch/x64/unreachable/as_block_broke.wat index 39b70350438e..c0376de91e45 100644 --- a/tests/disas/winch/x64/unreachable/as_block_broke.wat +++ b/tests/disas/winch/x64/unreachable/as_block_broke.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_block_first.wat b/tests/disas/winch/x64/unreachable/as_block_first.wat index 97a232f99e53..eb5661b0edd4 100644 --- a/tests/disas/winch/x64/unreachable/as_block_first.wat +++ b/tests/disas/winch/x64/unreachable/as_block_first.wat @@ -9,11 +9,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -21,4 +21,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_block_last.wat b/tests/disas/winch/x64/unreachable/as_block_last.wat index ab32d0e0f0ac..b9825b5e4394 100644 --- a/tests/disas/winch/x64/unreachable/as_block_last.wat +++ b/tests/disas/winch/x64/unreachable/as_block_last.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_block_mid.wat b/tests/disas/winch/x64/unreachable/as_block_mid.wat index 501df3a27dc5..9f83db843a24 100644 --- a/tests/disas/winch/x64/unreachable/as_block_mid.wat +++ b/tests/disas/winch/x64/unreachable/as_block_mid.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_block_value.wat b/tests/disas/winch/x64/unreachable/as_block_value.wat index cf5f8e2a44fb..2863ed47b8c2 100644 --- a/tests/disas/winch/x64/unreachable/as_block_value.wat +++ b/tests/disas/winch/x64/unreachable/as_block_value.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_br_if_cond.wat b/tests/disas/winch/x64/unreachable/as_br_if_cond.wat index cf082023e127..468f6566c452 100644 --- a/tests/disas/winch/x64/unreachable/as_br_if_cond.wat +++ b/tests/disas/winch/x64/unreachable/as_br_if_cond.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -22,4 +22,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_br_value.wat b/tests/disas/winch/x64/unreachable/as_br_value.wat index 2986585b777c..dc461647603c 100644 --- a/tests/disas/winch/x64/unreachable/as_br_value.wat +++ b/tests/disas/winch/x64/unreachable/as_br_value.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -22,4 +22,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_call_first.wat b/tests/disas/winch/x64/unreachable/as_call_first.wat index b878ceb5a4af..adb6fdcbfde8 100644 --- a/tests/disas/winch/x64/unreachable/as_call_first.wat +++ b/tests/disas/winch/x64/unreachable/as_call_first.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,17 +25,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 6b: movq %rdi, %r14 +;; ja 0x84 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_call_last.wat b/tests/disas/winch/x64/unreachable/as_call_last.wat index 5f43280618b5..e32a8f505bd8 100644 --- a/tests/disas/winch/x64/unreachable/as_call_last.wat +++ b/tests/disas/winch/x64/unreachable/as_call_last.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -26,17 +26,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 6b: movq %rdi, %r14 +;; ja 0x84 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_call_mid.wat b/tests/disas/winch/x64/unreachable/as_call_mid.wat index b6b2fc3934ba..ed687ceea281 100644 --- a/tests/disas/winch/x64/unreachable/as_call_mid.wat +++ b/tests/disas/winch/x64/unreachable/as_call_mid.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3f -;; 1b: movq %rdi, %r14 +;; ja 0x40 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,17 +25,17 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3f: ud2 +;; 40: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 6b: movq %rdi, %r14 +;; ja 0x84 +;; 6c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_func_first.wat b/tests/disas/winch/x64/unreachable/as_func_first.wat index c36754b7d199..47f30dd5785a 100644 --- a/tests/disas/winch/x64/unreachable/as_func_first.wat +++ b/tests/disas/winch/x64/unreachable/as_func_first.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x73 -;; 5b: movq %rdi, %r14 +;; ja 0x74 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -39,4 +39,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 73: ud2 +;; 74: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_func_last.wat b/tests/disas/winch/x64/unreachable/as_func_last.wat index 88ad788e070a..3f458ea4bd9e 100644 --- a/tests/disas/winch/x64/unreachable/as_func_last.wat +++ b/tests/disas/winch/x64/unreachable/as_func_last.wat @@ -10,28 +10,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -43,4 +43,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_func_mid.wat b/tests/disas/winch/x64/unreachable/as_func_mid.wat index 9173c23d4408..6e348adc6129 100644 --- a/tests/disas/winch/x64/unreachable/as_func_mid.wat +++ b/tests/disas/winch/x64/unreachable/as_func_mid.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_func_value.wat b/tests/disas/winch/x64/unreachable/as_func_value.wat index 23b75ad14c94..816ca0e29742 100644 --- a/tests/disas/winch/x64/unreachable/as_func_value.wat +++ b/tests/disas/winch/x64/unreachable/as_func_value.wat @@ -11,28 +11,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -44,4 +44,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_if_cond.wat b/tests/disas/winch/x64/unreachable/as_if_cond.wat index 897dc101dadd..5d6d56e42055 100644 --- a/tests/disas/winch/x64/unreachable/as_if_cond.wat +++ b/tests/disas/winch/x64/unreachable/as_if_cond.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -22,4 +22,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_if_else.wat b/tests/disas/winch/x64/unreachable/as_if_else.wat index 96ebfdd58d6c..b87277f9db02 100644 --- a/tests/disas/winch/x64/unreachable/as_if_else.wat +++ b/tests/disas/winch/x64/unreachable/as_if_else.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x51 -;; 1b: movq %rdi, %r14 +;; ja 0x52 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -23,11 +23,11 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x49 -;; 40: movl 8(%rsp), %eax -;; jmp 0x4b -;; 49: ud2 +;; je 0x4a +;; 41: movl 8(%rsp), %eax +;; jmp 0x4c +;; 4a: ud2 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 51: ud2 +;; 52: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_if_then.wat b/tests/disas/winch/x64/unreachable/as_if_then.wat index 6f29baef305a..e9e616f4ee06 100644 --- a/tests/disas/winch/x64/unreachable/as_if_then.wat +++ b/tests/disas/winch/x64/unreachable/as_if_then.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -22,10 +22,10 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x42 -;; 40: ud2 +;; je 0x43 +;; 41: ud2 ;; movl 8(%rsp), %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_if_then_no_else.wat b/tests/disas/winch/x64/unreachable/as_if_then_no_else.wat index 93f47a70b134..9b34b62a5ee4 100644 --- a/tests/disas/winch/x64/unreachable/as_if_then_no_else.wat +++ b/tests/disas/winch/x64/unreachable/as_if_then_no_else.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4c -;; 1b: movq %rdi, %r14 +;; ja 0x4d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -22,10 +22,10 @@ ;; movl %ecx, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x42 -;; 40: ud2 +;; je 0x43 +;; 41: ud2 ;; movl 8(%rsp), %eax ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4c: ud2 +;; 4d: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_loop_broke.wat b/tests/disas/winch/x64/unreachable/as_loop_broke.wat index 3d54604955bb..7285f2d838c6 100644 --- a/tests/disas/winch/x64/unreachable/as_loop_broke.wat +++ b/tests/disas/winch/x64/unreachable/as_loop_broke.wat @@ -13,28 +13,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x86 -;; 5b: movq %rdi, %r14 +;; ja 0x87 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -46,4 +46,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 86: ud2 +;; 87: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_loop_first.wat b/tests/disas/winch/x64/unreachable/as_loop_first.wat index f68f83d26d61..40b9bf4304d4 100644 --- a/tests/disas/winch/x64/unreachable/as_loop_first.wat +++ b/tests/disas/winch/x64/unreachable/as_loop_first.wat @@ -11,11 +11,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -23,4 +23,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_loop_last.wat b/tests/disas/winch/x64/unreachable/as_loop_last.wat index e265bcd52ab4..04d0c4a1fba3 100644 --- a/tests/disas/winch/x64/unreachable/as_loop_last.wat +++ b/tests/disas/winch/x64/unreachable/as_loop_last.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -45,4 +45,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_loop_mid.wat b/tests/disas/winch/x64/unreachable/as_loop_mid.wat index 77624e2a3c9f..447de95a1f16 100644 --- a/tests/disas/winch/x64/unreachable/as_loop_mid.wat +++ b/tests/disas/winch/x64/unreachable/as_loop_mid.wat @@ -12,28 +12,28 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x31 -;; 1b: movq %rdi, %r14 +;; ja 0x32 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 31: ud2 +;; 32: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x83 -;; 5b: movq %rdi, %r14 +;; ja 0x84 +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -45,4 +45,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 83: ud2 +;; 84: ud2 diff --git a/tests/disas/winch/x64/unreachable/as_return_value.wat b/tests/disas/winch/x64/unreachable/as_return_value.wat index 053bae613392..1bb0ae41f9fd 100644 --- a/tests/disas/winch/x64/unreachable/as_return_value.wat +++ b/tests/disas/winch/x64/unreachable/as_return_value.wat @@ -10,11 +10,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -22,4 +22,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/type_i32.wat b/tests/disas/winch/x64/unreachable/type_i32.wat index 43b87fdf6159..939f1fcf5ef5 100644 --- a/tests/disas/winch/x64/unreachable/type_i32.wat +++ b/tests/disas/winch/x64/unreachable/type_i32.wat @@ -8,11 +8,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -20,4 +20,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/type_i64.wat b/tests/disas/winch/x64/unreachable/type_i64.wat index 89c951e1483d..d8943f7583d3 100644 --- a/tests/disas/winch/x64/unreachable/type_i64.wat +++ b/tests/disas/winch/x64/unreachable/type_i64.wat @@ -8,11 +8,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x33 -;; 1b: movq %rdi, %r14 +;; ja 0x34 +;; 1c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) @@ -20,4 +20,4 @@ ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 33: ud2 +;; 34: ud2 diff --git a/tests/disas/winch/x64/unreachable/with_spilled_local.wat b/tests/disas/winch/x64/unreachable/with_spilled_local.wat index 378bb6870299..e0a66d3f3a03 100644 --- a/tests/disas/winch/x64/unreachable/with_spilled_local.wat +++ b/tests/disas/winch/x64/unreachable/with_spilled_local.wat @@ -14,11 +14,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4a -;; 1b: movq %rdi, %r14 +;; ja 0x4b +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -30,4 +30,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4a: ud2 +;; 4b: ud2 diff --git a/tests/disas/winch/x64/unreachable/with_spilled_local_in_if.wat b/tests/disas/winch/x64/unreachable/with_spilled_local_in_if.wat index 16df9579292b..ff5c043fc2ab 100644 --- a/tests/disas/winch/x64/unreachable/with_spilled_local_in_if.wat +++ b/tests/disas/winch/x64/unreachable/with_spilled_local_in_if.wat @@ -19,23 +19,23 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x24, %r11 ;; cmpq %rsp, %r11 -;; ja 0x56 -;; 1b: movq %rdi, %r14 +;; ja 0x57 +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) ;; movq $0, 8(%rsp) ;; movl 0xc(%rsp), %eax ;; testl %eax, %eax -;; je 0x50 -;; 41: movl 0xc(%rsp), %r11d +;; je 0x51 +;; 42: movl 0xc(%rsp), %r11d ;; subq $4, %rsp ;; movl %r11d, (%rsp) ;; ud2 ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 56: ud2 +;; 57: ud2 diff --git a/tests/disas/winch/x64/v128_const/call_id.wat b/tests/disas/winch/x64/v128_const/call_id.wat index e0ecf57f2b08..9153ce7ced26 100644 --- a/tests/disas/winch/x64/v128_const/call_id.wat +++ b/tests/disas/winch/x64/v128_const/call_id.wat @@ -12,11 +12,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -25,36 +25,36 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 ;; ;; wasm[0]::function[1]: ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x10, %r11 ;; cmpq %rsp, %r11 -;; ja 0x89 -;; 5b: movq %rdi, %r14 +;; ja 0x8a +;; 5c: movq %rdi, %r14 ;; subq $0x10, %rsp ;; movq %rdi, 8(%rsp) ;; movq %rsi, (%rsp) ;; movq %r14, %rdi ;; movq %r14, %rsi -;; movdqu 0x17(%rip), %xmm0 +;; movdqu 0x16(%rip), %xmm0 ;; callq 0 ;; movq 8(%rsp), %r14 ;; addq $0x10, %rsp ;; popq %rbp ;; retq -;; 89: ud2 -;; 8b: addb %al, (%rax) -;; 8d: addb %al, (%rax) -;; 8f: addb %al, (%rcx) -;; 91: addb %al, (%rax) -;; 93: addb %al, (%rax) -;; 95: addb %al, (%rax) -;; 97: addb %al, (%rdx) -;; 99: addb %al, (%rax) -;; 9b: addb %al, (%rax) -;; 9d: addb %al, (%rax) +;; 8a: ud2 +;; 8c: addb %al, (%rax) +;; 8e: addb %al, (%rax) +;; 90: addl %eax, (%rax) +;; 92: addb %al, (%rax) +;; 94: addb %al, (%rax) +;; 96: addb %al, (%rax) +;; 98: addb (%rax), %al +;; 9a: addb %al, (%rax) +;; 9c: addb %al, (%rax) +;; 9e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/v128_const/id.wat b/tests/disas/winch/x64/v128_const/id.wat index c8af72a4df8b..d44e5f974ecd 100644 --- a/tests/disas/winch/x64/v128_const/id.wat +++ b/tests/disas/winch/x64/v128_const/id.wat @@ -8,11 +8,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x20, %r11 ;; cmpq %rsp, %r11 -;; ja 0x3c -;; 1b: movq %rdi, %r14 +;; ja 0x3d +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -21,4 +21,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 3c: ud2 +;; 3d: ud2 diff --git a/tests/disas/winch/x64/v128_const/multivalue.wat b/tests/disas/winch/x64/v128_const/multivalue.wat index 273755c43def..3a8add9dd220 100644 --- a/tests/disas/winch/x64/v128_const/multivalue.wat +++ b/tests/disas/winch/x64/v128_const/multivalue.wat @@ -11,18 +11,18 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rsi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x67 -;; 1b: movq %rsi, %r14 +;; ja 0x68 +;; 1c: movq %rsi, %r14 ;; subq $0x20, %rsp ;; movq %rsi, 0x18(%rsp) ;; movq %rdx, 0x10(%rsp) ;; movq %rdi, 8(%rsp) -;; movdqu 0x37(%rip), %xmm0 +;; movdqu 0x36(%rip), %xmm0 ;; subq $0x10, %rsp -;; movdqu 0x2a(%rip), %xmm15 +;; movdqu 0x29(%rip), %xmm15 ;; movdqu %xmm15, 0x30(%rsp) ;; movq 0x18(%rsp), %rax ;; movdqu (%rsp), %xmm15 @@ -31,15 +31,15 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 67: ud2 -;; 69: addb %al, (%rax) -;; 6b: addb %al, (%rax) -;; 6d: addb %al, (%rax) -;; 6f: addb %al, (%rax) -;; 71: addb %al, (%rax) -;; 73: addb %al, (%rax) -;; 75: addb %al, (%rax) -;; 77: addb %al, (%rax) -;; 79: addb %al, (%rax) -;; 7b: addb %al, (%rax) -;; 7d: addb %al, (%rax) +;; 68: ud2 +;; 6a: addb %al, (%rax) +;; 6c: addb %al, (%rax) +;; 6e: addb %al, (%rax) +;; 70: addb %al, (%rax) +;; 72: addb %al, (%rax) +;; 74: addb %al, (%rax) +;; 76: addb %al, (%rax) +;; 78: addb %al, (%rax) +;; 7a: addb %al, (%rax) +;; 7c: addb %al, (%rax) +;; 7e: addb %al, (%rax) diff --git a/tests/disas/winch/x64/v128_const/spilled.wat b/tests/disas/winch/x64/v128_const/spilled.wat index 88a2e9f7c565..f4ee01342cd0 100644 --- a/tests/disas/winch/x64/v128_const/spilled.wat +++ b/tests/disas/winch/x64/v128_const/spilled.wat @@ -13,11 +13,11 @@ ;; pushq %rbp ;; movq %rsp, %rbp ;; movq 8(%rdi), %r11 -;; movq (%r11), %r11 +;; movq 0x10(%r11), %r11 ;; addq $0x30, %r11 ;; cmpq %rsp, %r11 -;; ja 0x4b -;; 1b: movq %rdi, %r14 +;; ja 0x4c +;; 1c: movq %rdi, %r14 ;; subq $0x20, %rsp ;; movq %rdi, 0x18(%rsp) ;; movq %rsi, 0x10(%rsp) @@ -29,4 +29,4 @@ ;; addq $0x20, %rsp ;; popq %rbp ;; retq -;; 4b: ud2 +;; 4c: ud2 diff --git a/tests/rlimited-memory.rs b/tests/rlimited-memory.rs index c0fac24c0a37..06bfa5eea4b1 100644 --- a/tests/rlimited-memory.rs +++ b/tests/rlimited-memory.rs @@ -71,7 +71,7 @@ fn custom_limiter_detect_os_oom_failure() -> Result<()> { // limit process to 256MiB memory let rlimit = libc::rlimit { rlim_cur: 0, - rlim_max: process_max_memory as u64, + rlim_max: process_max_memory as libc::rlim_t, }; let res = libc::setrlimit(libc::RLIMIT_DATA, &rlimit); assert_eq!(res, 0, "setrlimit failed: {res}"); diff --git a/tests/wast.rs b/tests/wast.rs index cfbd12a06899..fc062c39fc45 100644 --- a/tests/wast.rs +++ b/tests/wast.rs @@ -22,7 +22,16 @@ fn main() { // run this test in. for test in tests { let test_uses_gc_types = test.test_uses_gc_types(); - for compiler in [Compiler::Cranelift, Compiler::Winch] { + for compiler in [ + Compiler::CraneliftNative, + Compiler::Winch, + Compiler::CraneliftPulley, + ] { + // Skip compilers that have no support for this host. + if !compiler.supports_host() { + continue; + } + for pooling in [true, false] { let collectors: &[_] = if !pooling && test_uses_gc_types { &[Collector::DeferredReferenceCounting, Collector::Null] @@ -104,12 +113,12 @@ fn run_wast(test: &WastTest, config: WastConfig) -> anyhow::Result<()> { // `crates/wast-util/src/lib.rs` file. let should_fail = test.should_fail(&config); - let multi_memory = test_config.multi_memory.unwrap_or(false); - let test_hogs_memory = test_config.hogs_memory.unwrap_or(false); - let relaxed_simd = test_config.relaxed_simd.unwrap_or(false); + let multi_memory = test_config.multi_memory(); + let test_hogs_memory = test_config.hogs_memory(); + let relaxed_simd = test_config.relaxed_simd(); let is_cranelift = match config.compiler { - Compiler::Cranelift => true, + Compiler::CraneliftNative | Compiler::CraneliftPulley => true, _ => false, }; @@ -130,7 +139,11 @@ fn run_wast(test: &WastTest, config: WastConfig) -> anyhow::Result<()> { // Locally testing this out this drops QEMU's memory usage running this // tests suite from 10GiB to 600MiB. Previously we saw that crossing the // 10GiB threshold caused our processes to get OOM killed on CI. - if std::env::var("WASMTIME_TEST_NO_HOG_MEMORY").is_ok() { + // + // Note that this branch is also taken for 32-bit platforms which generally + // can't test much of the pooling allocator as the virtual address space is + // so limited. + if cfg!(target_pointer_width = "32") || std::env::var("WASMTIME_TEST_NO_HOG_MEMORY").is_ok() { // The pooling allocator hogs ~6TB of virtual address space for each // store, so if we don't to hog memory then ignore pooling tests. if config.pooling { diff --git a/winch/codegen/src/abi/mod.rs b/winch/codegen/src/abi/mod.rs index c205f7ea54c4..d46144489b85 100644 --- a/winch/codegen/src/abi/mod.rs +++ b/winch/codegen/src/abi/mod.rs @@ -567,7 +567,7 @@ impl ABIParams { } /// An ABI-specific representation of a function signature. -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone)] pub(crate) struct ABISig { /// Function parameters. pub params: ABIParams, @@ -575,11 +575,24 @@ pub(crate) struct ABISig { pub results: ABIResults, /// A unique set of registers used in the entire [`ABISig`]. pub regs: HashSet, + /// Calling convention used. + pub call_conv: CallingConvention, +} + +impl Default for ABISig { + fn default() -> Self { + Self { + params: Default::default(), + results: Default::default(), + regs: Default::default(), + call_conv: CallingConvention::Default, + } + } } impl ABISig { /// Create a new ABI signature. - pub fn new(params: ABIParams, results: ABIResults) -> Self { + pub fn new(cc: CallingConvention, params: ABIParams, results: ABIResults) -> Self { let regs = params .operands .regs @@ -590,6 +603,7 @@ impl ABISig { params, results, regs, + call_conv: cc, } } diff --git a/winch/codegen/src/codegen/builtin.rs b/winch/codegen/src/codegen/builtin.rs index cb094a5ba24d..96268ccfd1ef 100644 --- a/winch/codegen/src/codegen/builtin.rs +++ b/winch/codegen/src/codegen/builtin.rs @@ -150,8 +150,8 @@ macro_rules! declare_function_sig { WasmValType::I64 } - fn reference(&self) -> WasmValType { - self.pointer() + fn bool(&self) -> WasmValType { + WasmValType::I32 } fn over_f64(&self) -> ABISig { diff --git a/winch/codegen/src/codegen/call.rs b/winch/codegen/src/codegen/call.rs index 2cbb06bf96b5..5bfbcb9205e5 100644 --- a/winch/codegen/src/codegen/call.rs +++ b/winch/codegen/src/codegen/call.rs @@ -96,7 +96,7 @@ impl FnCall { let arg_stack_space = sig.params_stack_size(); let reserved_stack = masm.call(arg_stack_space, |masm| { Self::assign(sig, &callee_context, ret_area.as_ref(), context, masm); - kind + (kind, sig.call_conv) }); Self::cleanup( diff --git a/winch/codegen/src/codegen/context.rs b/winch/codegen/src/codegen/context.rs index 99b9dc765667..b23096bc44ed 100644 --- a/winch/codegen/src/codegen/context.rs +++ b/winch/codegen/src/codegen/context.rs @@ -624,4 +624,11 @@ impl<'a> CodeGenContext<'a, Emission> { self.stack.push(lo.into()); self.stack.push(hi.into()); } + + /// Pops a register from the stack and then immediately frees it. Used to + /// discard values from the last operation, for example. + pub fn pop_and_free(&mut self, masm: &mut M) { + let reg = self.pop_to_reg(masm, None); + self.free_reg(reg.reg); + } } diff --git a/winch/codegen/src/codegen/mod.rs b/winch/codegen/src/codegen/mod.rs index 63f442c23444..b540f1649fc7 100644 --- a/winch/codegen/src/codegen/mod.rs +++ b/winch/codegen/src/codegen/mod.rs @@ -272,9 +272,9 @@ where body: &mut BinaryReader<'a>, validator: &mut FuncValidator, ) -> Result<()> { - if self.tunables.consume_fuel { - self.emit_fuel_check(); - } + self.maybe_emit_fuel_check(); + + self.maybe_emit_epoch_check(); // Once we have emitted the epilogue and reserved stack space for the locals, we push the // base control flow block. @@ -966,18 +966,24 @@ where self.context.stack.push(dst.into()); } - /// Emit a series of instructions that check the current fuel usage by - /// performing a zero-comparison with the number of units stored in - /// `VMRuntimeLimits`. - pub fn emit_fuel_check(&mut self) { + /// Checks if fuel consumption is enabled and emits a series of instructions + /// that check the current fuel usage by performing a zero-comparison with + /// the number of units stored in `VMRuntimeLimits`. + pub fn maybe_emit_fuel_check(&mut self) { + if !self.tunables.consume_fuel { + return; + } + let out_of_fuel = self.env.builtins.out_of_gas::(); - let fuel_var = + let fuel_reg = self.context .without::(&out_of_fuel.sig().regs, self.masm, |cx, masm| { cx.any_gpr(masm) }); - self.emit_load_fuel_consumed(fuel_var); + self.emit_load_fuel_consumed(fuel_reg); + + // The continuation label if the current fuel is under the limit. let continuation = self.masm.get_label(); // Spill locals and registers to avoid conflicts at the out-of-fuel @@ -987,7 +993,7 @@ where // we're still under the fuel limits. self.masm.branch( IntCmpKind::LtS, - fuel_var, + fuel_reg, RegImm::i64(0), continuation, OperandSize::S64, @@ -999,29 +1005,124 @@ where &mut self.context, Callee::Builtin(out_of_fuel.clone()), ); + self.context.pop_and_free(self.masm); + // Under fuel limits branch. self.masm.bind(continuation); - self.context.free_reg(fuel_var); + self.context.free_reg(fuel_reg); } /// Emits a series of instructions that load the `fuel_consumed` field from /// `VMRuntimeLimits`. - fn emit_load_fuel_consumed(&mut self, fuel_var: Reg) { + fn emit_load_fuel_consumed(&mut self, fuel_reg: Reg) { let limits_offset = self.env.vmoffsets.ptr.vmctx_runtime_limits(); let fuel_offset = self.env.vmoffsets.ptr.vmruntime_limits_fuel_consumed(); self.masm.load_ptr( self.masm.address_at_vmctx(u32::from(limits_offset)), - writable!(fuel_var), + writable!(fuel_reg), ); self.masm.load( - self.masm.address_at_reg(fuel_var, u32::from(fuel_offset)), - writable!(fuel_var), + self.masm.address_at_reg(fuel_reg, u32::from(fuel_offset)), + writable!(fuel_reg), // Fuel is an i64. OperandSize::S64, ); } + /// Checks if epoch interruption is configured and emits a series of + /// instructions that check the current epoch against its deadline. + pub fn maybe_emit_epoch_check(&mut self) { + if !self.tunables.epoch_interruption { + return; + } + + // The continuation branch if the current epoch hasn't reached the + // configured deadline. + let cont = self.masm.get_label(); + let new_epoch = self.env.builtins.new_epoch::(); + + // Checks for runtime limits (e.g., fuel, epoch) are special since they + // require inserting abritrary function calls and control flow. + // Special care must be taken to ensure that all invariants are met. In + // this case, since `new_epoch` takes an argument and returns a value, + // we must ensure that any registers used to hold the current epoch + // value and deadline are not going to be needed later on by the + // function call. + let (epoch_deadline_reg, epoch_counter_reg) = self.context.without::<(Reg, Reg), M, _>( + &new_epoch.sig().regs, + self.masm, + |cx, masm| (cx.any_gpr(masm), cx.any_gpr(masm)), + ); + + self.emit_load_epoch_deadline_and_counter(epoch_deadline_reg, epoch_counter_reg); + + // Spill locals and registers to avoid conflicts at the control flow + // merge below. + self.context.spill(self.masm); + self.masm.branch( + IntCmpKind::LtU, + epoch_counter_reg, + RegImm::reg(epoch_deadline_reg), + cont, + OperandSize::S64, + ); + // Epoch deadline reached branch. + FnCall::emit::( + &mut self.env, + self.masm, + &mut self.context, + Callee::Builtin(new_epoch.clone()), + ); + // `new_epoch` returns the new deadline. However we don't + // perform any caching, so we simply drop this value. + self.visit_drop(); + + // Under epoch deadline branch. + self.masm.bind(cont); + + self.context.free_reg(epoch_deadline_reg); + self.context.free_reg(epoch_counter_reg); + } + + fn emit_load_epoch_deadline_and_counter( + &mut self, + epoch_deadline_reg: Reg, + epoch_counter_reg: Reg, + ) { + let epoch_ptr_offset = self.env.vmoffsets.ptr.vmctx_epoch_ptr(); + let runtime_limits_offset = self.env.vmoffsets.ptr.vmctx_runtime_limits(); + let epoch_deadline_offset = self.env.vmoffsets.ptr.vmruntime_limits_epoch_deadline(); + + // Load the current epoch value into `epoch_counter_var`. + self.masm.load_ptr( + self.masm.address_at_vmctx(u32::from(epoch_ptr_offset)), + writable!(epoch_counter_reg), + ); + + // `epoch_deadline_var` contains the address of the value, so we need + // to extract it. + self.masm.load( + self.masm.address_at_reg(epoch_counter_reg, 0), + writable!(epoch_counter_reg), + OperandSize::S64, + ); + + // Load the `VMRuntimeLimits`. + self.masm.load_ptr( + self.masm.address_at_vmctx(u32::from(runtime_limits_offset)), + writable!(epoch_deadline_reg), + ); + + self.masm.load( + self.masm + .address_at_reg(epoch_deadline_reg, u32::from(epoch_deadline_offset)), + writable!(epoch_deadline_reg), + // The deadline value is a u64. + OperandSize::S64, + ); + } + /// Increments the fuel consumed in `VMRuntimeLimits` by flushing /// `self.fuel_consumed` to memory. fn emit_fuel_increment(&mut self) { @@ -1032,17 +1133,17 @@ where let limits_offset = self.env.vmoffsets.ptr.vmctx_runtime_limits(); let fuel_offset = self.env.vmoffsets.ptr.vmruntime_limits_fuel_consumed(); - let limits_var = self.context.any_gpr(self.masm); + let limits_reg = self.context.any_gpr(self.masm); - // Load `VMRuntimeLimits` into the `limits_var` reg. + // Load `VMRuntimeLimits` into the `limits_reg` reg. self.masm.load_ptr( self.masm.address_at_vmctx(u32::from(limits_offset)), - writable!(limits_var), + writable!(limits_reg), ); // Load the fuel consumed at point into the scratch register. self.masm.load( - self.masm.address_at_reg(limits_var, u32::from(fuel_offset)), + self.masm.address_at_reg(limits_reg, u32::from(fuel_offset)), writable!(scratch!(M)), OperandSize::S64, ); @@ -1059,11 +1160,11 @@ where // Store the updated fuel consumed to `VMRuntimeLimits`. self.masm.store( scratch!(M).into(), - self.masm.address_at_reg(limits_var, u32::from(fuel_offset)), + self.masm.address_at_reg(limits_reg, u32::from(fuel_offset)), OperandSize::S64, ); - self.context.free_reg(limits_var); + self.context.free_reg(limits_reg); } /// Hook to handle fuel before visiting an operator. diff --git a/winch/codegen/src/isa/aarch64/abi.rs b/winch/codegen/src/isa/aarch64/abi.rs index bffa8697712e..242d2c92b822 100644 --- a/winch/codegen/src/isa/aarch64/abi.rs +++ b/winch/codegen/src/isa/aarch64/abi.rs @@ -48,7 +48,7 @@ impl ABI for Aarch64ABI { ) }); - ABISig::new(params, results) + ABISig::new(*call_conv, params, results) } fn abi_results(returns: &[WasmValType], call_conv: &CallingConvention) -> ABIResults { diff --git a/winch/codegen/src/isa/aarch64/masm.rs b/winch/codegen/src/isa/aarch64/masm.rs index 9be8a60f772a..76a81cea3c3c 100644 --- a/winch/codegen/src/isa/aarch64/masm.rs +++ b/winch/codegen/src/isa/aarch64/masm.rs @@ -2,7 +2,10 @@ use super::{abi::Aarch64ABI, address::Address, asm::Assembler, regs}; use crate::{ abi::local::LocalSlot, codegen::{ptr_type_from_ptr_size, CodeGenContext, Emission, FuncEnv}, - isa::reg::{writable, Reg, WritableReg}, + isa::{ + reg::{writable, Reg, WritableReg}, + CallingConvention, + }, masm::{ CalleeKind, DivKind, ExtendKind, FloatCmpKind, Imm as I, IntCmpKind, MacroAssembler as Masm, MulWideKind, OperandSize, RegImm, RemKind, RoundingMode, SPOffset, @@ -163,7 +166,7 @@ impl Masm for MacroAssembler { fn call( &mut self, _stack_args_size: u32, - _load_callee: impl FnMut(&mut Self) -> CalleeKind, + _load_callee: impl FnMut(&mut Self) -> (CalleeKind, CallingConvention), ) -> u32 { todo!() } diff --git a/winch/codegen/src/isa/aarch64/mod.rs b/winch/codegen/src/isa/aarch64/mod.rs index e54ffa0c9d4e..05ad67b6d121 100644 --- a/winch/codegen/src/isa/aarch64/mod.rs +++ b/winch/codegen/src/isa/aarch64/mod.rs @@ -160,9 +160,9 @@ impl TargetIsa for Aarch64 { use target_lexicon::*; match self.triple().operating_system { OperatingSystem::MacOSX { .. } - | OperatingSystem::Darwin - | OperatingSystem::Ios - | OperatingSystem::Tvos => { + | OperatingSystem::Darwin(_) + | OperatingSystem::IOS(_) + | OperatingSystem::TvOS(_) => { debug_assert_eq!(1 << 14, 0x4000); 14 } diff --git a/winch/codegen/src/isa/mod.rs b/winch/codegen/src/isa/mod.rs index 760a6bf00de7..7500f876856f 100644 --- a/winch/codegen/src/isa/mod.rs +++ b/winch/codegen/src/isa/mod.rs @@ -134,6 +134,17 @@ impl CallingConvention { } } +impl From for CallConv { + fn from(value: CallingConvention) -> Self { + match value { + CallingConvention::SystemV => Self::SystemV, + CallingConvention::AppleAarch64 => Self::AppleAarch64, + CallingConvention::Default => Self::Winch, + CallingConvention::WindowsFastcall => Self::WindowsFastcall, + } + } +} + /// A trait representing commonalities between the supported /// instruction set architectures. pub trait TargetIsa: Send + Sync { diff --git a/winch/codegen/src/isa/x64/abi.rs b/winch/codegen/src/isa/x64/abi.rs index 3450caca0867..de60ee1f5654 100644 --- a/winch/codegen/src/isa/x64/abi.rs +++ b/winch/codegen/src/isa/x64/abi.rs @@ -68,7 +68,7 @@ impl ABI for X64ABI { }, ); - ABISig::new(params, results) + ABISig::new(*call_conv, params, results) } fn abi_results(returns: &[WasmValType], call_conv: &CallingConvention) -> ABIResults { diff --git a/winch/codegen/src/isa/x64/asm.rs b/winch/codegen/src/isa/x64/asm.rs index fb17d811f659..1e76298226ba 100644 --- a/winch/codegen/src/isa/x64/asm.rs +++ b/winch/codegen/src/isa/x64/asm.rs @@ -1,7 +1,7 @@ //! Assembler library implementation for x64. use crate::{ - isa::reg::Reg, + isa::{reg::Reg, CallingConvention}, masm::{ DivKind, ExtendKind, IntCmpKind, MulWideKind, OperandSize, RemKind, RoundingMode, ShiftKind, }, @@ -23,7 +23,6 @@ use cranelift_codegen::{ encoding::rex::{encode_modrm, RexFlags}, settings as x64_settings, EmitInfo, EmitState, Inst, }, - CallConv, }, settings, CallInfo, Final, MachBuffer, MachBufferFinalized, MachInstEmit, MachInstEmitState, MachLabel, PatchRegion, RelocDistance, VCodeConstantData, VCodeConstants, Writable, @@ -1270,24 +1269,21 @@ impl Assembler { } /// Emit a call to an unknown location through a register. - pub fn call_with_reg(&mut self, callee: Reg) { + pub fn call_with_reg(&mut self, cc: CallingConvention, callee: Reg) { self.emit(Inst::CallUnknown { - info: Box::new(CallInfo::empty( - RegMem::reg(callee.into()), - CallConv::SystemV, - )), + info: Box::new(CallInfo::empty(RegMem::reg(callee.into()), cc.into())), }); } /// Emit a call to a locally defined function through an index. - pub fn call_with_name(&mut self, name: UserExternalNameRef) { + pub fn call_with_name(&mut self, cc: CallingConvention, name: UserExternalNameRef) { self.emit(Inst::CallKnown { - info: Box::new(CallInfo::empty(ExternalName::user(name), CallConv::SystemV)), + info: Box::new(CallInfo::empty(ExternalName::user(name), cc.into())), }); } /// Emit a call to a well-known libcall. - pub fn call_with_lib(&mut self, lib: LibCall, dst: Reg) { + pub fn call_with_lib(&mut self, cc: CallingConvention, lib: LibCall, dst: Reg) { let dest = ExternalName::LibCall(lib); // `use_colocated_libcalls` is never `true` from within Wasmtime, @@ -1303,7 +1299,7 @@ impl Assembler { offset: 0, distance: RelocDistance::Far, }); - self.call_with_reg(dst); + self.call_with_reg(cc, dst); } /// Emits a conditional jump to the given label. diff --git a/winch/codegen/src/isa/x64/masm.rs b/winch/codegen/src/isa/x64/masm.rs index 9937d165e9b9..6aa4ff79ea6a 100644 --- a/winch/codegen/src/isa/x64/masm.rs +++ b/winch/codegen/src/isa/x64/masm.rs @@ -20,7 +20,10 @@ use crate::{ masm::{SPOffset, StackSlot}, }; use crate::{ - isa::reg::{writable, Reg, RegClass, WritableReg}, + isa::{ + reg::{writable, Reg, RegClass, WritableReg}, + CallingConvention, + }, masm::CalleeKind, }; use cranelift_codegen::{ @@ -230,7 +233,7 @@ impl Masm for MacroAssembler { fn call( &mut self, stack_args_size: u32, - mut load_callee: impl FnMut(&mut Self) -> CalleeKind, + mut load_callee: impl FnMut(&mut Self) -> (CalleeKind, CallingConvention), ) -> u32 { let alignment: u32 = ::call_stack_align().into(); let addend: u32 = ::arg_base_offset().into(); @@ -238,11 +241,11 @@ impl Masm for MacroAssembler { let aligned_args_size = align_to(stack_args_size, alignment); let total_stack = delta + aligned_args_size; self.reserve_stack(total_stack); - let callee = load_callee(self); + let (callee, cc) = load_callee(self); match callee { - CalleeKind::Indirect(reg) => self.asm.call_with_reg(reg), - CalleeKind::Direct(idx) => self.asm.call_with_name(idx), - CalleeKind::LibCall(lib) => self.asm.call_with_lib(lib, regs::scratch()), + CalleeKind::Indirect(reg) => self.asm.call_with_reg(cc, reg), + CalleeKind::Direct(idx) => self.asm.call_with_name(cc, idx), + CalleeKind::LibCall(lib) => self.asm.call_with_lib(cc, lib, regs::scratch()), }; total_stack } diff --git a/winch/codegen/src/masm.rs b/winch/codegen/src/masm.rs index 1bd5a7a59b4e..da25d88c486a 100644 --- a/winch/codegen/src/masm.rs +++ b/winch/codegen/src/masm.rs @@ -1,6 +1,9 @@ use crate::abi::{self, align_to, scratch, LocalSlot}; use crate::codegen::{CodeGenContext, Emission, FuncEnv}; -use crate::isa::reg::{writable, Reg, WritableReg}; +use crate::isa::{ + reg::{writable, Reg, WritableReg}, + CallingConvention, +}; use cranelift_codegen::{ binemit::CodeOffset, ir::{Endianness, LibCall, MemFlags, RelSourceLoc, SourceLoc, UserExternalNameRef}, @@ -584,7 +587,11 @@ pub(crate) trait MacroAssembler { fn address_at_reg(&self, reg: Reg, offset: u32) -> Self::Address; /// Emit a function call to either a local or external function. - fn call(&mut self, stack_args_size: u32, f: impl FnMut(&mut Self) -> CalleeKind) -> u32; + fn call( + &mut self, + stack_args_size: u32, + f: impl FnMut(&mut Self) -> (CalleeKind, CallingConvention), + ) -> u32; /// Get stack pointer offset. fn sp_offset(&self) -> SPOffset; diff --git a/winch/codegen/src/visitor.rs b/winch/codegen/src/visitor.rs index 1fae5644330e..315c935bd842 100644 --- a/winch/codegen/src/visitor.rs +++ b/winch/codegen/src/visitor.rs @@ -1426,7 +1426,8 @@ where self.masm, &mut self.context, Callee::Builtin(builtin.clone()), - ) + ); + self.context.pop_and_free(self.masm); } fn visit_table_copy(&mut self, dst: u32, src: u32) { @@ -1442,7 +1443,8 @@ where self.masm, &mut self.context, Callee::Builtin(builtin), - ) + ); + self.context.pop_and_free(self.masm); } fn visit_table_get(&mut self, table: u32) { @@ -1491,7 +1493,7 @@ where self.masm, &mut self.context, Callee::Builtin(builtin.clone()), - ) + ); } fn visit_table_size(&mut self, table: u32) { @@ -1519,7 +1521,8 @@ where self.masm, &mut self.context, Callee::Builtin(builtin.clone()), - ) + ); + self.context.pop_and_free(self.masm); } fn visit_table_set(&mut self, table: u32) { @@ -1579,7 +1582,8 @@ where self.masm, &mut self.context, Callee::Builtin(builtin), - ) + ); + self.context.pop_and_free(self.masm); } fn visit_memory_copy(&mut self, dst_mem: u32, src_mem: u32) { @@ -1607,7 +1611,8 @@ where self.masm, &mut self.context, Callee::Builtin(builtin), - ) + ); + self.context.pop_and_free(self.masm); } fn visit_memory_fill(&mut self, mem: u32) { @@ -1624,7 +1629,8 @@ where self.masm, &mut self.context, Callee::Builtin(builtin), - ) + ); + self.context.pop_and_free(self.masm); } fn visit_memory_size(&mut self, mem: u32) { @@ -1713,10 +1719,8 @@ where &mut self.context, )); - // Emit fuel check right after binding the loop header. - if self.tunables.consume_fuel { - self.emit_fuel_check(); - } + self.maybe_emit_epoch_check(); + self.maybe_emit_fuel_check(); } fn visit_br(&mut self, depth: u32) {