Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winch: Simplify the MacroAssembler and Assembler interfaces #6841

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

saulecabrera
Copy link
Member

This commit prepares for the introduction of float support to Winch. Initially, I intended to include this change as part of the original change supporting floats, but that change is already sizable enough.

This modification simplifies the Assembler and MacroAssembler interfaces, as well as the interaction and responsibilities between them, by:

  • Eliminating the Operand abstraction, which didn't offer a substantial benefit over simply using the MacroAssembler's RegImm and Address abstractions as operands where necessary. This approach also reduces the number of conversions required prior to emission.

  • Shifting the instruction dispatch responsibility solely to the MacroAssembler, rather than having this responsibility shared across both abstractions. This was always the original intention behind the MacroAssembler. As a result, function definitions at the Assembler layer become simpler.

This change also introduces richer type information for immediates, which results in better instruction selection in some cases, and it's also needed to support floats.

This commit prepares for the introduction of float support to Winch. Initially,
I intended to include this change as part of the original change supporting
floats, but that change is already sizable enough.

This modification simplifies the Assembler and MacroAssembler interfaces, as
well as the interaction and responsibilities between them, by:

* Eliminating the `Operand` abstraction, which didn't offer a substantial
benefit over simply using the MacroAssembler's `RegImm` and `Address`
abstractions as operands where necessary. This approach also reduces the number
of conversions required prior to emission.

* Shifting the instruction dispatch responsibility solely to the MacroAssembler,
rather than having this responsibility shared across both abstractions. This was
always the original intention behind the MacroAssembler. As a result, function
definitions at the Assembler layer become simpler.

This change also introduces richer type information for immediates, which
results in better instruction selection in some cases, and it's also needed to
support floats.
@saulecabrera saulecabrera requested a review from cfallin August 11, 2023 19:55
@saulecabrera saulecabrera requested a review from a team as a code owner August 11, 2023 19:55
@saulecabrera saulecabrera removed the request for review from a team August 11, 2023 19:56
@github-actions github-actions bot added the winch Winch issues or pull requests label Aug 11, 2023
@github-actions
Copy link

Subscribe to Label Action

cc @saulecabrera

This issue or pull request has been labeled: "winch"

Thus the following users have been cc'd because of the following labels:

  • saulecabrera: winch

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cfallin cfallin added this pull request to the merge queue Aug 15, 2023
Merged via the queue into bytecodealliance:main with commit d58cf09 Aug 15, 2023
eduardomourar pushed a commit to eduardomourar/wasmtime that referenced this pull request Aug 18, 2023
…alliance#6841)

This commit prepares for the introduction of float support to Winch. Initially,
I intended to include this change as part of the original change supporting
floats, but that change is already sizable enough.

This modification simplifies the Assembler and MacroAssembler interfaces, as
well as the interaction and responsibilities between them, by:

* Eliminating the `Operand` abstraction, which didn't offer a substantial
benefit over simply using the MacroAssembler's `RegImm` and `Address`
abstractions as operands where necessary. This approach also reduces the number
of conversions required prior to emission.

* Shifting the instruction dispatch responsibility solely to the MacroAssembler,
rather than having this responsibility shared across both abstractions. This was
always the original intention behind the MacroAssembler. As a result, function
definitions at the Assembler layer become simpler.

This change also introduces richer type information for immediates, which
results in better instruction selection in some cases, and it's also needed to
support floats.
geekbeast pushed a commit to geekbeast/wasmtime that referenced this pull request Aug 18, 2023
…time into feature/wasi-nn-preview-2

* 'feature/wasi-nn-preview-2' of github.com:geekbeast/wasmtime:
  Memcheck for Wasm guests in Wasmtime (bytecodealliance#6820)
  CI: upgrade to qemu 8.0.4. (bytecodealliance#6849)
  Sync wasi-cli with wit definitions in standards repo  (bytecodealliance#6806)
  Rename `preview2::preview2` to `preview2::host` (bytecodealliance#6847)
  winch: Simplify the MacroAssembler and Assembler interfaces (bytecodealliance#6841)
  There are no files in `preview1` other than `mod.rs` (bytecodealliance#6845)
  Update stdio on Unix to fall back to worker threads (bytecodealliance#6833)
  Update RELEASES.md (bytecodealliance#6838)
  Minor documentation updates to docs/WASI-tutorial.md (bytecodealliance#6839)
  Add support for vector in DataValueExt::int() (bytecodealliance#6844)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
winch Winch issues or pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants