<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in lib.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>b112bb85 - Migrate winch-codegen to `wasmtime_environ::error` (#12297)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#b112bb85</link>
        <description>Migrate winch-codegen to `wasmtime_environ::error` (#12297)

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Fri, 09 Jan 2026 19:20:48 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>2c1e1155 - winch(aarch64): Simplify constant handling, part 1/N (#10888)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#2c1e1155</link>
        <description>winch(aarch64): Simplify constant handling, part 1/N (#10888)* winch(aarch64): implify constant handling, part 1/NThis commit is the first step toward simplifying constant handling,particularly for the aarch64 backend.The main highlights in this patch are:* Introduction of `ConstantPool` implemenetation on top of Cranlift  primitives. The implemettaion is identical to the existing for x64,  however, it&apos;s abstracted so that it can be easily consumed from any  existing backend.* Usage of the constant pool from aarch64, which simplifies the  loading of constants, particularly floating point constants.The main motivation behind this change is to _eventually_ detach theimplicit usage of the scatch register from constant loading as much aspossible, reducing the possibility of subtle bugs (like the onedescribed in https://github.com/bytecodealliance/wasmtime/pull/10829).Note that I have a work-in-progress branch from where all thesechanges are cherry picked from, to make everything easier to review.A side effect of this change, is the improvement to the codegeneration involving floating point constants. Prior to this change,multiple moves were involved, with this patch, at most 1 move isrequired and at worst one load is required.* Update disassembly tests* Apply refactored constant handling on top of shared float min/max implementation* `fmt`

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Mon, 02 Jun 2025 23:38:29 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>9e3c8640 - winch: move reason for ignoring dead code (#10710)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#9e3c8640</link>
        <description>winch: move reason for ignoring dead code (#10710)This removes a clippy warning when running:```RUSTFLAGS=&apos;-D warnings&apos; cargo clippy --workspace --exclude test-programs```

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Fri, 02 May 2025 18:43:47 +0000</pubDate>
        <dc:creator>Andrew Brown &lt;andrew.brown@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>7a66c39a - Remove some `#![expect(clippy::allow_attributes_without_reason)]` (#10661)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#7a66c39a</link>
        <description>Remove some `#![expect(clippy::allow_attributes_without_reason)]` (#10661)Clean up some crates by migrating from `#[allow]` to `#[expect]`(ideally) or `#[allow]`-with-reason

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Wed, 23 Apr 2025 21:07:33 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>45b60bd6 - Start using `#[expect]` instead of `#[allow]` (#9696)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#45b60bd6</link>
        <description>Start using `#[expect]` instead of `#[allow]` (#9696)* Start using `#[expect]` instead of `#[allow]`In Rust 1.81, our new MSRV, a new feature was added to Rust to use`#[expect]` to control lint levels. This new lint annotation willsilence a lint but will itself cause a lint if it doesn&apos;t actuallysilence anything. This is quite useful to ensure that annotations don&apos;tget stale over time.Another feature is the ability to use a `reason` directive on theattribute with a string explaining why the attribute is there. Thisstring is then rendered in compiler messages if a warning or errorhappens.This commit migrates applies a few changes across the workspace:* Some `#[allow]` are changed to `#[expect]` with a `reason`.* Some `#[allow]` have a `reason` added if the lint conditionally fires  (mostly related to macros).* Some `#[allow]` are removed since the lint doesn&apos;t actually fire.* The workspace configures `clippy::allow_attributes_without_reason = &apos;warn&apos;`  as a &quot;ratchet&quot; to prevent future regressions.* Many crates are annotated to allow `allow_attributes_without_reason`  during this transitionary period.The end-state is that all crates should use`#[expect(..., reason = &quot;...&quot;)]` for any lint that unconditionally firesbut is expected. The `#[allow(..., reason = &quot;...&quot;)]` lint should be usedfor conditionally firing lints, primarily in macro-related code.The `allow_attributes_without_reason = &apos;warn&apos;` level is intended to bepermanent but the transitionary`#[expect(clippy::allow_attributes_without_reason)]` crate annotationsto go away over time.* Fix adapter buildprtest:full* Fix one-core build of icache coherence* Use `allow` for missing_docsWork around rust-lang/rust#130021 which was fixed in Rust 1.83 and isn&apos;tfixed for our MSRV at this time.* More MSRV compat

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Mon, 02 Dec 2024 17:19:20 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>d69ba34e - winch: Switch to using cranelift for all trampolines (#8109)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#d69ba34e</link>
        <description>winch: Switch to using cranelift for all trampolines (#8109)* Switch winch over to using cranelift for all trampolines* Fix unused code warnings* Fix unused code warningsprtest:full

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Thu, 21 Mar 2024 17:59:43 +0000</pubDate>
        <dc:creator>Trevor Elliott &lt;telliott@fastly.com&gt;</dc:creator>
    </item>
<item>
        <title>4f47f3ec - winch: Add a subset of known libcalls and improve call emission (#7228)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#4f47f3ec</link>
        <description>winch: Add a subset of known libcalls and improve call emission (#7228)* winch: Add known a subset of known libcalls and improve call emissionThis change is a follow up to:- https://github.com/bytecodealliance/wasmtime/pull/7155- https://github.com/bytecodealliance/wasmtime/pull/7035One of the objectives of this change is to make it easy to emitfunction calls at the MacroAssembler layer, for cases in which it&apos;schallenging to know ahead-of-time if a particular functionality can beachieved natively (e.g. rounding and SSE4.2).  The original implementationof function call emission, made this objective difficult to achieve andit was also difficult to reason about.I decided to simplify the overall approach to function calls as part ofthis PR; in essence, the `call` module now exposes a single function`FnCall::emit` which is reponsible of gathtering the dependencies andorchestrating the emission of the call. This new approach deliberatelyavoids holding any state regarding the function call for simplicity.This change also standardizes the usage of `Callee` as the mainentrypoint for function call emission, as of this change 4 `Callee`types exist (`Local`, `Builtin`, `Import`, `FuncRef`), each callee kindis mappable to a `CalleeKind` which is the materialized version ofa callee which Cranelift understands.This change also moves the creation of the `BuiltinFunctions` to the`ISA` level given that they can be safely used accross multiple functioncompilations.Finally, this change also introduces support for some of the&quot;well-known&quot; libcalls and hooks those libcalls at the`MacroAssembler::float_round` callsite.--prtest:full* Review comments* Remove unnecessary `into_iter`* Fix remaining lifetime parameter names

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Fri, 13 Oct 2023 18:57:49 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>92024ad1 - Function references (#5288)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#92024ad1</link>
        <description>Function references (#5288)* Make wasmtime-types type check* Make wasmtime-environ type check.* Make wasmtime-runtime type check* Make cranelift-wasm type check* Make wasmtime-cranelift type check* Make wasmtime type check* Make wasmtime-wast type check* Make testsuite compile* Address Luna&apos;s comments* Restore compatibility with effect-handlers/wasm-tools#func-ref-2* Add function refs feature flag; support testing* Provide function references support in helpers- Always support Index in blocktypes- Support Index as table type by pretending to be Func- Etc* Implement ref.as_non_null* Add br_on_null* Update Cargo.lock to use wasm-tools with peekThis will ultimately be reverted when we refer towasm-tools#function-references, which doesn&apos;t have peek, but does have typeannotations on CallRef* Add call_ref* Support typed function references in ref.null* Implement br_on_non_null* Remove extraneous flag; default func refs false* Use IndirectCallToNull trap code for call_ref* Factor common call_indirect / call_ref into a fn* Remove copypasta clippy attribute / format* Add a some more tests for typed table instructionsThere certainly need to be many more, but this at least catches the bugs fixedin the next commit* Fix missing typed cases for table_grow, table_fill* Document trap code; remove answered question* Mark wasm-tools to wasmtime reftype infallible* Fix reversed conditional* Scope externref/funcref shorthands within WasmRefType* Merge with upstream* Make wasmtime compile again* Fix warnings* Remove Bot from the type algebra* Fix table tests.`wast::Cranelift::spec::function_references::table``wast::Cranelift::spec::function_references::table_pooling`* Fix table{get,set} tests.```wast::Cranelift::misc::function_references::table_getwast::Cranelift::misc::function_references::table_get_poolingwast::Cranelift::misc::function_references::table_setwast::Cranelift::misc::function_references::table_set_pooling```* Insert subtype check to fix local_get tests.```wast::Cranelift::spec::function_references::local_getwast::Cranelift::spec::function_references::local_get_pooling```* Fix compilation of `br_on_non_null`.The branch destinations were the other way round... :-)Fixes the following test failures:```wast::Cranelift::spec::function_references::br_on_non_nullwast::Cranelift::spec::function_references::br_on_non_null_pooling```* Fix ref_as_non_null tests.The test was failing due to the wrong error message being printed. Asper upstream folks&apos; suggest we were using the trap code`IndirectCallToNull`, but it produces an unexpected error message.This commit reinstates the `NullReference` trap code. It produces theexpected error message. We will have to chat with the maintainersupstream about how to handle these &quot;test failures&quot;.Fixes the following test failures:```wast::Cranelift::spec::function_references::ref_as_non_nullwast::Cranelift::spec::function_references::ref_as_non_null_pooling```* Fix a call_ref regression.* Fix global tests.Extend `is_matching_assert_invalid_error_message` to circumvent the textual error message failure.Fixes the following test failures:```wast::Cranelift::spec::function_references::globalwast::Cranelift::spec::function_references::global_pooling```* Cargo update* Update* Spell out some cases in match_val* Disgusting hack to subvert limitations of type reconstruction.In the function `wasmtime::values::Val::ty()` attempts to reconstructthe type of its underlying value purely based on the shape of thevalue. With function references proposal this sort of reconstructionis no longer complete as a source reference type may have beennullable. Nullability is not inferrable by looking at the shape of theruntime object alone.Consequently, the runtime cannot reconstruct the type for`Val::FuncRef` and `Val::ExternRef` by looking at their respectiveshapes.* Address workflows comments.* null reference =&gt; null_reference for CLIF parsing compliance.* Delete duplicate-loads-dynamic-memory-egraph (again)* Idiomatic code change.* Nullability subtyping + fix non-null storage check.This commit removes the `hacky_eq` check in `func.rs`. Instead it isreplaced by a subtype check. This subtype check occurs in`externals.rs` too.This commit also fixes a bug. Previously, it was possible to store anull reference into a non-null table cell. I have added to new testcases for this bug: one for funcrefs and another for externrefs.* Trigger unimplemented for typed function references. Format values.rs* run cargo fmt* Explicitly match on HeapType::Extern.* Address cranelift-related feedback* Remove PartialEq,Eq from ValType, RefType, HeapType.* Pin wasmparser to a fairly recent commit.* Run cargo fmt* Ignore tail call tests.* Remove garbage* Revert changes to wasmtime public API.* Run cargo fmt* Get more CI passing (#19)* Undo Cargo.lock changes* Fix build of cranelift tests* Implement link-time matches relation. Disable tests failing due to lack of public API support.* Run cargo fmt* Run cargo fmt* Initial implementation of eager table initialization* Tidy up eager table initialisation* Cargo fmt* Ignore type-equivalence test* Replace TODOs with descriptive comments.* Various changes found during review (#21)* Clarify a commentThis isn&apos;t only used for null references* Resolve a TODO in local initDon&apos;t initialize non-nullable locals to null, instead skipinitialization entirely and wasm validation will ensure it&apos;s alwaysinitialized in the scope where it&apos;s used.* Clarify a comment and skipping the null check.* Remove a stray comment* Change representation of `WasmHeapType`Use a `SignatureIndex` instead of a `u32` which while not 100% correctshould be more correct. This additionally renames the `Index` variant to`TypedFunc` to leave space for future types which aren&apos;t functions tonot all go into an `Index` variant.This required updates to Winch because `wasmtime_environ` types can nolonger be converted back to their `wasmparser` equivalents. Additionallythis means that all type translation needs to go through some form ofcontext to resolve indices which is now encapsulated in a `TypeConvert`trait implemented in various locations.* Refactor table initializationReduce some duplication and simplify some data structures to have a moredirect form of table initialization and a bit more graceful handling ofelement-initialized tables. Additionally element-initialize tables arenow treated the same as if there&apos;s a large element segment initializingthem.* Clean up some unrelated chagnes* Simplify Table bindings slightly* Remove a no-longer-needed TODO* Add a FIXME for `SignatureIndex` in `WasmHeapType`* Add a FIXME for panicking on exposing function-references types* Fix a warning on nightly* Fix tests for winch and cranelift* Cargo fmt* Fix arity mismatch in aarch64/abi---------Co-authored-by: Daniel Hillerstr&#246;m &lt;daniel.hillerstrom@ed.ac.uk&gt;Co-authored-by: Daniel Hillerstr&#246;m &lt;daniel.hillerstrom@huawei.com&gt;Co-authored-by: Alex Crichton &lt;alex@alexcrichton.com&gt;

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Fri, 26 May 2023 15:26:00 +0000</pubDate>
        <dc:creator>Luna P-C &lt;CosineP@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>afde47c2 - winch: Drop `FuncEnv` trait (#6443)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#afde47c2</link>
        <description>winch: Drop `FuncEnv` trait (#6443)This commit is a small cleanup to drop the usage of the `FuncEnv` trait.In https://github.com/bytecodealliance/wasmtime/pull/6358, we agreed onmaking `winch-codegen` directly depend on `wasmtime-environ`.Introducing a direct relatioship between `winch-codegen` and`wasmtime-environ` means that the `FuncEnv` trait is no longer servingits original purpose, and we can drop the usage of the trait and use thetypes exposed from `winch-codegen` directly instead.Even though this change drops the `FuncEnv` trait, it still keepsa `FuncEnv` struct, which is used during code generation.

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Wed, 24 May 2023 17:32:20 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>20c58362 - winch: Implement new trampolines (#6358)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#20c58362</link>
        <description>winch: Implement new trampolines (#6358)* winch: Implement new trampolinesThis change is a follow-up tohttps://github.com/bytecodealliance/wasmtime/pull/6262, in which the newtrampolines, described [here](https://github.com/bytecodealliance/rfcs/blob/main/accepted/tail-calls.md#new-trampolines-and-vmcallercheckedanyfunc-changes),were introduced to Wasmtime.This change, focuses on the `array-to-wasm`,`native-to-wasm` and `wasm-to-native` trampolines to restore Winch&apos;sworking state prior to the introduction of the new trampolines. It&apos;sworth noting that the new approach for trampolines make it easier to supportthe `TypedFunc` API in Winch. Prior to the introduction of the newtrampolines, it was not obvious how to approach it.This change also introduces a pinned register that will hold the`VMContext` pointer, which is loaded in the `*-to-wasm`  trampolines;the `VMContext`  register is a pre-requisite to this change to supportthe `wasm-to-native` trampolines.Lastly, with the introduction of the `VMContext` register and the`wasm-to-native` trampolines, this change also introduces support forcalling function imports, which is a variation of the already existingcalls to locally defined functions.The other notable piece of this change aside from the trampolines is`winch-codegen`&apos;s dependency on `wasmtime-environ`. Winch is so closelytied to the concepts exposed by the wasmtime crates that it makes senseto tie them together, even though the separation provides someadvantages like easier testing in some cases, in the long run, there&apos;sprobably going to be less need to test Winch in isolation and ratherwe&apos;d rely more on integration style tests which require all of Wasmtimepieces anyway (fuzzing, spec tests, etc).This change doesn&apos;t update the  existing implmenetation of`winch_codegen::FuncEnv`, but the intention is to update that part afterthis change.prtest:full* tests: Ignore miri in Winch integration tests* Remove hardcoded alignment and addend

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Tue, 16 May 2023 17:32:04 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>3a92aa3d - winch: Initial integration with wasmtime (#6119)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#3a92aa3d</link>
        <description>winch: Initial integration with wasmtime (#6119)* Adding in trampoline compiling method for ISA* Adding support for indirect call to memory address* Refactoring frame to externalize defined locals, so it removes WASM depedencies in trampoline case* Adding initial version of trampoline for testing* Refactoring trampoline to be re-used by other architectures* Initial wiring for winch with wasmtime* Add a Wasmtime CLI option to select `winch`This is effectively an option to select the `Strategy` enumeration.* Implement `Compiler::compile_function` for WinchHook this into the `TargetIsa::compile_function` hook as well. Currentlythis doesn&apos;t take into account `Tunables`, but that&apos;s left as a TODO forlater.* Filling out Winch append_code method* Adding back in changes from previous branchMost of these are a WIP. It&apos;s missing trampolines for x64, but a basicone exists for aarch64. It&apos;s missing the handling of arguments thatexist on the stack.It currently imports `cranelift_wasm::WasmFuncType` since it&apos;s what&apos;spassed to the `Compiler` trait. It&apos;s a bit awkward to use in the`winch_codegen` crate since it mostly operates on `wasmparser` types.I&apos;ve had to hack in a conversion to get things working. Long term, I&apos;mnot sure it&apos;s wise to rely on this type but it seems like it&apos;s easier onthe Cranelift side when creating the stub IR.* Small API changes to make integration easier* Adding in new FuncEnv, only a stub for now* Removing unneeded parts of the old PoC, and refactoring trampoline code* Moving FuncEnv into a separate file* More comments for trampolines* Adding in winch integration tests for first pass* Using new addressing method to fix stack pointer error* Adding test for stack arguments* Only run tests on x86 for now, it&apos;s more complete for winch* Add in missing documentation after rebase* Updating based on feedback in draft PR* Fixing formatting on doc comment for argv register* Running formatting* Lock updates, and turning on winch feature flags during tests* Updating configuration with comments to no longer gate Strategy enum* Using the winch-environ FuncEnv, but it required changing the sig* Proper comment formatting* Removing wasmtime-winch from dev-dependencies, adding the winch feature makes this not necessary* Update doc attr to include winch check* Adding winch feature to doc generation, which seems to fix the feature error in CI* Add the `component-model` feature to the cargo doc invocation in CITo match the metadata used by the docs.rs invocation when building docs.* Add a comment clarifying the usage of `component-model` for docs.rs* Correctly order wasmtime-winch and winch-environ in the publish script* Ensure x86 test dependencies are included in cfg(target_arch)* Further constrain Winch tests to x86_64 _and_ unix---------Co-authored-by: Alex Crichton &lt;alex@alexcrichton.com&gt;Co-authored-by: Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Wed, 05 Apr 2023 00:32:40 +0000</pubDate>
        <dc:creator>Kevin Rizzo &lt;32458485+KevinRizzoTO@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>80bfb350 - winch: Introduce `winch-environ` (#6017)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#80bfb350</link>
        <description>winch: Introduce `winch-environ` (#6017)This commit introduces the `winch-environ` crate. This crate&apos;s responsibility isto provide a shared implementatation of the `winch_codegen::FuncEnv` trait,which is Winch&apos;s function compilation environment, used to resolve module andruntime specific information needed by the code generation, such as resolvingall the details about a callee in a WebAssembly module, or resolving specificinformation from the `VMContext`.As of this change, the implementation only includes the necessary pieces toresolve a function callee in a WebAssembly module. The idea is to evolve the`winch_codegen::FuncEnv` trait as we evolve Winch&apos;s code generation.

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Tue, 14 Mar 2023 19:59:15 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>94b51cdb - winch: Use cranelift-codegen x64 backend for emission. (#5581)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#94b51cdb</link>
        <description>winch: Use cranelift-codegen x64 backend for emission. (#5581)This change substitutes the string based emission mechanism withcranelift-codegen&apos;s x64 backend.This change _does not_:* Introduce new functionality in terms of supported instructions.* Change the semantics of the assembler/macroassembler in terms of the logic toemit instructions.The most notable differences between this change and the previous version are:* Handling of shared flags and ISA-specific flags, which for now are left withthe default value.* Simplification of instruction emission per operand size: previously theassembler defined different methods depending on the operand size (e.g. `mov`for 64 bits, and `movl` for 32 bits). This change updates such approach so thateach assembler method takes an operand size as a parameter, reducing duplicationand making the code more concise and easier to integrate with the x64&apos;s `Inst` enum.* Introduction of a disassembler for testing purposes.As of this change, Winch generates the following code for the following testprograms:```wat(module  (export &quot;main&quot; (func $main))  (func $main (result i32)        (i32.const 10)        (i32.const 20)        i32.add        ))``````asm   0:	55                   	push	rbp   1:	48 89 e5             	mov	rbp, rsp   4:	b8 0a 00 00 00       	mov	eax, 0xa   9:	83 c0 14             	add	eax, 0x14   c:	5d                   	pop	rbp   d:	c3                   	ret``````wat(module  (export &quot;main&quot; (func $main))  (func $main (result i32)        (local $foo i32)    (local $bar i32)        (i32.const 10)    (local.set $foo)        (i32.const 20)    (local.set $bar)        (local.get $foo)        (local.get $bar)        i32.add        ))``````asm   0:	55                   	push	rbp   1:	48 89 e5             	mov	rbp, rsp   4:	48 83 ec 08          	sub	rsp, 8   8:	48 c7 04 24 00 00 00 00	mov	qword ptr [rsp], 0  10:	b8 0a 00 00 00       	mov	eax, 0xa  15:	89 44 24 04          	mov	dword ptr [rsp + 4], eax  19:	b8 14 00 00 00       	mov	eax, 0x14  1e:	89 04 24             	mov	dword ptr [rsp], eax  21:	8b 04 24             	mov	eax, dword ptr [rsp]  24:	8b 4c 24 04          	mov	ecx, dword ptr [rsp + 4]  28:	01 c1                	add	ecx, eax  2a:	48 89 c8             	mov	rax, rcx  2d:	48 83 c4 08          	add	rsp, 8  31:	5d                   	pop	rbp  32:	c3                   	ret``````wat(module  (export &quot;main&quot; (func $main))  (func $main (param i32) (param i32) (result i32)        (local.get 0)        (local.get 1)        i32.add        ))``````asm   0:	55                   	push	rbp   1:	48 89 e5             	mov	rbp, rsp   4:	48 83 ec 08          	sub	rsp, 8   8:	89 7c 24 04          	mov	dword ptr [rsp + 4], edi   c:	89 34 24             	mov	dword ptr [rsp], esi   f:	8b 04 24             	mov	eax, dword ptr [rsp]  12:	8b 4c 24 04          	mov	ecx, dword ptr [rsp + 4]  16:	01 c1                	add	ecx, eax  18:	48 89 c8             	mov	rax, rcx  1b:	48 83 c4 08          	add	rsp, 8  1f:	5d                   	pop	rbp  20:	c3                   	ret```

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Wed, 18 Jan 2023 11:58:13 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>835abbcd - Initial skeleton for Winch (#4907)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/lib.rs#835abbcd</link>
        <description>Initial skeleton for Winch (#4907)* Initial skeleton for WinchThis commit introduces the initial skeleton for Winch, the &quot;baseline&quot;compiler.This skeleton contains mostly setup code for the ISA, ABI, registers,and compilation environment abstractions. It also includes thecalculation of function local slots.As of this commit, the structure of these abstractions looks like thefollowing:                        +------------------------+                        |                        v     +----------+     +-----+     +-----------+-----+-----------------+     | Compiler | --&gt; | ISA | --&gt; | Registers | ABI | Compilation Env |     +----------+     +-----+     +-----------+-----+-----------------+                        |                              ^                        +------------------------------+* Compilation environment will hold a reference to the function data* Add basic documentation to the ABI trait* Enable x86 and arm64 in cranelift-codegen* Add reg_name function for x64* Introduce the concept of a MacroAssembler and AssemblerThis commit introduces the concept of a MacroAsesembler andAssembler. The MacroAssembler trait will provide a high enoughinterface across architectures so that each ISA implementation can use their own low-levelAssembler implementation to fulfill the interface. Each Assembler willprovide a 1-1 mapping to each ISA instruction.As of this commit, only a partial debug implementation is provided forthe x64 Assembler.* Add a newtype over PRegAdds a newtype `Reg` over regalloc2::PReg; this ensures that Winchwill operate only on the concept of `Reg`. This change is temporaryuntil we have the necessary machinery to share a common Regabstraction via `cranelift_asm`* Improvements to local calcuation- Add `LocalSlot::addressed_from_sp`- Use `u32` for local slot and local sizes calculation* Add helper methods to ABIArgAdds helper methods to retrieve register and type information from the argument* Make locals_size public in frame* Improve x64 register naming depending on size* Add new methods to the masm interfaceThis commit introduces the ability for the MacroAssembler to reservestack space, get the address of a given local and perform a stackstore based on the concept of `Operand`s.There are several motivating factors to introduce the concept of anOperand:- Make the translation between Winch and Cranelift easier;- Make dispatching from the MacroAssembler to the underlying Assembler- easier by minimizing the amount of functions that we need to define- in order to satisfy the store/load combinationsThis commit also introduces the concept of a memory address, whichessentially describes the addressing modes; as of this commit only oneaddressing mode is supported. We&apos;ll also need to verify that thisstructure will play nicely with arm64.* Blank masm implementation for arm64* Implementation of reserve_stack, local_address, store and fp_offsetfor x64* Implement function prologue and argument register spilling* Add structopt and wat* Fix debug instruction formatting* Make TargetISA trait publicly accessible* Modify the MacroAssembler finalize siganture to return a slice of strings* Introduce a simple CLI for WinchTo be able to compile Wasm programs with Winch independently. Mostlymeant for testing / debugging* Fix bug in x64 assembler mov_rm* Remove unused import* Move the stack slot calculation to the FrameThis commit moves the calculation of the stack slots to the framehandler abstraction and also includes the calculation of the limitsfor the function defined locals, which will be used to zero the localsthat are not associated to function arguments* Add i32 and i64 constructors to local slots* Introduce the concept of DefinedLocalsRangeThis commit introduces `DefinedLocalsRange` to track the stack offsetat which the function-defined locals start and end; this is later usedto zero-out that stack region* Add constructors for int and float registers* Add a placeholder stack implementation* Add a regset abstraction to track register availabilityAdds a bit set abstraction to track register availability for registerallocation.The bit set has no specific knowledge about physical registers, itworks on the register&apos;s hardware encoding as the source of truth.Each RegSet is expected to be created with the universe of allocatableregisters per ISA when starting the compilation of a particular function.* Add an abstraction over register and immediateThis is meant to be used as the source for stores.* Add a way to zero local slots and an initial skeletion of regallocThis commit introduces `zero_local_slots` to the MacroAssembler; whichensures that function defined locals are zeroed out when starting thefunction body.The algorithm divides the defined function locals stack rangeinto 8 byte slots and stores a zero at each address. This processrelies on register allocation if the amount of slots that need to beinitialized is greater than 1. In such case, the next availableregister is requested to the register set and it&apos;s used to store a 0,which is then stored at every local slot* Update to wasmparser 0.92* Correctly track if the regset has registers available* Add a result entry to the ABI signatureThis commuit introduces ABIResult as part of the ABISignature;this struct will track how function results are stored; initially itwill consiste of a single register that will be requested to theregister allocator at the end of the function; potentially causing a spill* Move zero local slots and add more granular methods to the masmThis commit removes zeroing local slots from the MacroAssembler andinstead adds more granular methods to it (e.g `zero`, `add`).This allows for better code sharing since most of the work done by thealgorithm for zeroing slots will be the same in all targets, exceptfor the binary emissions pieces, which is what gets delegated to the masm* Use wasmparser&apos;s visitor API and add initial support for const and addThis commit adds initial support for the I32Const and I32instructions; this involves adding a minimum for registerallocation. Note that some regalloc pieces are still incomplete, sincefor the current set of supported instructions they are not needed.* Make the ty field public in Local* Add scratch_reg to the abi* Add a method to get a particular local from the Frame* Split the compilation environment abstractionThis commit splits the compilation environment into two more conciseabstractions:1. CodeGen: the main abstraction for code generation2. CodeGenContext: abstraction that shares the common pieces forcompilation; these pieces are shared between the code generator andthe register allocator* Add `push` and `load` to the MacroAssembler* Remove dead code warnings for unused paths* Map ISA features to cranelift-codegen ISA features* Apply formatting* Fix Cargo.toml after a bad rebase* Add component-compiler feature* Use clap instead of structopt* Add winch to publish.rs script* Minor formatting* Add tests to RegSet and fix two bugs when freeing and checking forregister availability* Add tests to Stack* Free source register after a non-constant i32 add* Improve comments- Remove unneeded comments- And improve some of the TODO items* Update default features* Drop the ABI generic param and pass the word_size information directlyTo avoid dealing with dead code warnings this commit passes the wordsize information directly, since it&apos;s the only piece of informationneeded from the ABI by Codegen until now* Remove dead codeThis piece of code will be put back once we start integrating Winchwith Wasmtime* Remove unused enum variantThis variant doesn&apos;t get constructed; it should be added back once abackend is added and not enabled by default or when Winch getsintegrated into Wasmtime* Fix unused code in regset tests* Update spec testsuite* Switch the visitor pattern for a simpler operator matchThis commit removes the usage of wasmparser&apos;s visitor pattern andinstead defaults to a simpler operator matching approach. This removesthe complexity of having to define all the visitor trait functions at once.* Use wasmparser&apos;s Visitor trait with a different macro strategyThis commit puts back wasmparser&apos;s Visitor trait, with a sigle;simpler macro, only used for unsupported operators.* Restructure WinchThis commit restuructures Winch&apos;s parts. It divides the initialapproach into three main crates: `winch-codegen`,`wasmtime-winch` and `winch-tools`.`wasmtime-winch` is reponsible for the Wasmtime-Winch integration.`winch-codegen` is solely responsible for code generation.`winch-tools` is CLI tool to compile Wasm programs, mainly for testing purposes.* Refactor zero local slotsThis commit moves the logic of zeroing local slots from the codegenmodule into a method with a default implementation in theMacroAssembler trait: `zero_mem_range`.The refactored implementation is very similar to the previousimplementation with the only differencethat it doesn&apos;t allocates a general-purpose register; it instead usesthe register allocator to retrieve the scratch register and uses thisregister to unroll the series of zero stores.* Tie the codegen creation to the ISA ABIThis commit makes the relationship between the ISA ABI and the codegenexplicit. This allows us to pass down ABI-specific bit and pieces tothe codegeneration. In this case the only concrete piece that we needis the ABI word size.* Mark winch as publishable directory* Revamp winch docsThis commit ensures that all the code comments in Winch are compliantwith the syle used in the rest of Wasmtime&apos;s codebase.It also imptoves, generally the quality of the comments in some modules.* Panic when using multi-value when the target is aarch64Similar to x64, this commit ensures that the abi signature of thecurrent function doesn&apos;t use multi-value returns* Document the usage of directives* Use endianness instead of endianess in the ISA trait* Introduce a three-argument form in the MacroAssemblerThis commit introduces the usage of three-argument form for theMacroAssembler interface. This allows for a natural mapping forarchitectures like aarch64. In the case of x64, the implementation cansimply restrict the implementation asserting for equality in two ofthe arguments of defaulting to a differnt set of instructions.As of this commit, the implementation of `add` panics if thedestination and the first source arguments are not equal; internallythe x64 assembler implementation will ensure that all the allowedcombinations of `add` are satisfied. The reason for panicking and notemitting a `mov` followed by an `add` for example is simply because registerallocation happens right before calling `add`, which ensures anyregister-to-register moves, if needed.This implementation will evolve in the future and this panic will belifted if needed.* Improve the documentation for the MacroAssembler.Documents the usage of three-arg form and the intention around thehigh-level interface.* Format comments in remaining modules* Clean up Cargo.toml for winch piecesThis commit adds missing fields to each of Winch&apos;s Cargo.toml.* Use `ModuleTranslation::get_types()` to derive the function type* Assert that start range is always word-size aligned

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/lib.rs</description>
        <pubDate>Fri, 28 Oct 2022 21:19:34 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
