<?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 regset.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>d36d4708 - winch(arm64): fpu arithmetics (add, sub, mul, div, min, max) and regalloc (#8365)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/regset.rs#d36d4708</link>
        <description>winch(arm64): fpu arithmetics (add, sub, mul, div, min, max) and regalloc (#8365)* winch(arm64): fpu arithmetics (add, sub, mul, div, min, max)Signed-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;* disas: add fpu test cases (add)Signed-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;* winch(arm64): regalloc for fpuSigned-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;* disas: add fpu test cases (add64)Signed-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;* disas: add fpu test casesSigned-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;* Apply suggestions from code reviewCo-authored-by: Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;* Apply suggestions from code reviewCo-authored-by: Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;* add todo for f32 movSigned-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;---------Signed-off-by: Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;Co-authored-by: Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/regset.rs</description>
        <pubDate>Mon, 15 Apr 2024 19:42:28 +0000</pubDate>
        <dc:creator>Edoardo Vacchi &lt;evacchi@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>4b288ba8 - winch(x64): Call indirect (#7100)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/regset.rs#4b288ba8</link>
        <description>winch(x64): Call indirect (#7100)* winch(x64): Call indirectThis change adds support for the `call_indirect` instruction to Winch.Libcalls are a pre-requisite for supporting `call_indirect` in order tolazily initialy funcrefs. This change adds support for libcalls toWinch by introducing a `BuiltinFunctions` struct similar to Cranelift&apos;s`BuiltinFunctionSignatures` struct.In general, libcalls are handled like any other function call, with theonly difference that given that not all the information to fulfill thefunction call might be known up-front, control is given to the callerfor finalizing the call.The introduction of function references also involves dealing withpointer-sized loads and stores, so this change also adds the requiredfunctionality to `FuncEnv` and `MacroAssembler` to be pointer aware,making it straight forward to derive an `OperandSize` or `WasmType` fromthe target&apos;s pointer size.Finally, given the complexity of the call_indirect instrunction, thischange bundles an improvement to the register allocator, allowing it totrack the allocatable vs non-allocatable registers, this is done toavoid any mistakes when allocating/de-allocating registers that are notalloctable.--prtest:full* Address review comments* Fix typos* Better documentation for `new_unchecked`* Introduce `max` for `BitSet`* Make allocatable property `u64`* winch(calls): Overhaul `FnCall`This commit simplifies `FnCall`&apos;s interface making its usage moreuniform throughout the compiler. In summary, this change:* Avoids side effects in the `FnCall::new` constructor, and also makes  it the only constructor.* Exposes `FnCall::save_live_registers` and  `FnCall::calculate_call_stack_space` to calculate the stack space  consumed by the call and so that the caller can decide which one to  use at callsites depending on their use-case.* tests: Fix regset tests

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/regset.rs</description>
        <pubDate>Fri, 29 Sep 2023 16:59:40 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>2da108df - winch: Add support for parametric instructions (#6912)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/regset.rs#2da108df</link>
        <description>winch: Add support for parametric instructions (#6912)* winch: Add support for parametric instructionsThis commit introduces support for the drop and select instructions.Additionally, it refactors the CodeGenContext::drop_last implementation,enhancing flexibility for callers to determine the handling of elements to bedropped. This refactoring simplifies scenarios where a Memory entry is at thetop of the stack.* refactor: Use `cmov` instead of local control flow

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/regset.rs</description>
        <pubDate>Fri, 25 Aug 2023 17:57:07 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>14b39bc2 - winch: Initial support for floats (#6860)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/regset.rs#14b39bc2</link>
        <description>winch: Initial support for floats (#6860)* winch: Initial support for floatsThis change introuduces the necessary building blocks to support floats inWinch as well as support for both `f32.const` and `f64.const` instructions.To achieve support for floats, this change adds several key enhancements to thecompiler:* Constant pool: A constant pool is implemented, at the Assembler level, using the machinery  exposed by Cranelift&apos;s `VCode` and `MachBuffer`. Float immediates are stored  using their bit representation in the value stack, and whenever they are  used at the MacroAssembler level they are added to the constant  pool, from that point on, they are referenced through a `Constant` addressing  mode, which gets translated to a RIP-relative addressing mode during emission.* More precise value tagging: aside from immediates, from which the type can  be easily inferred, all the other value stack entries (`Memory`, `Reg`, and `Local`) are  modified to explicitly contain a WebAssembly type. This allows for better  instruction selection.--prtest:full* fix: Account for relative sp position when pushing float regsThis was an oversight of the initial implementation. When pushing floatregisters, always return an address that is relative to the current position ofthe stack pointer, essentially storing to (%rsp). The previous implementationaccounted for static addresses, which is not correct.* fix: Introduce `stack_arg_slot_size_for_type`To correctly calculate the stack argument slot sizes, instead of overallocatingfor `word_bytes`, since for `f32` floating points we only need to worry aboutloading/storing 4 bytes.* fix: Correctly type the result register.The previous version wrongly typed the register as a general purpose register.* refactor: Re-write `add_constants` through `add_constant`* docs: Replace old comment* chore: Rust fmt* refactor: Index regset per register classThis commit implements `std::ops::{Index, IndexMut}` for `RegSet` to index eachof the bitsets by class. This reduces boilerplate and repetition throuhg thecode generation context, register allocator and register set.* refactor: Correctly size callee saved registersTo comply with the expectation of the underlying architecture: for example inAarch64, only the low 64 bits of VRegs are callee saved (the D-view) and in the`fastcall` calling convention it&apos;s expected that the callee saves the entire 128bits of the register xmm6-xmm15.This change also fixes the the stores/loads of callee saved float registers in thefastcall calling convention, as in the previous implementation only the low 64bits were saved/restored.* docs: Add comment regarding typed-based spills

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/regset.rs</description>
        <pubDate>Wed, 23 Aug 2023 10:44:35 +0000</pubDate>
        <dc:creator>Sa&#250;l Cabrera &lt;saulecabrera@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>af4d94c8 - winch(x64): Initial implementation for function calls (#6067)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/winch/codegen/src/regset.rs#af4d94c8</link>
        <description>winch(x64): Initial implementation for function calls (#6067)* winch(x64): Initial implementation for function callsThis change adds the main building blocks for calling locally definedfunctions. Support for function imports will be added iteratively after thischange lands and once trampolines are supported.To support function calls, this change introduces the following functionality tothe MacroAssembler:* `pop` to pop the machine stack into a given register, which in the case ofthis change, translates to the x64 pop instruction.* `call` to a emit a call to locally defined functions.* `address_from_sp` to construct memory addresses with the SP as a base.* `free_stack` to emit the necessary instrunctions to claim stack space.The heavy lifting of setting up and emitting the function call is done throughthe implementation of `FnCall`.* Fix spill behaviour in function calls and add more documentationThis commits adds a more detailed documentation to the `call.rs` module.It also fixes a couple of bugs, mainly:* The previous commit didn&apos;t account for memory addresses used as arguments forthe function call, any memory entry in the value stack used as a functionargument should be tracked and then used to claim that memory when the functioncall ends. We could `pop` and do this implicitly, but we can also track thisdown and emit a single instruction to decrement the stack pointer, which willresult in better code.* Introduce a differentiator between addresses relative or absolute to the stackpointer. When passing arguments in the stack -- assuming that SP at that pointis aligned for the function call -- we should store the arguments relative tothe absolute position of the stack pointer and when addressing a memory entry inthe Wasm value stack, we should use an address relative to the offset and theposition of the stack pointer.* Simplify tracking of the stack space needed for emitting a function call

            List of files:
            /wasmtime-44.0.1/winch/codegen/src/regset.rs</description>
        <pubDate>Tue, 28 Mar 2023 18:30:31 +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/regset.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/regset.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>
