Skip to content

wasm2c: Add segue option to make exclusive use of the segment register#2458

Merged
shravanrn merged 1 commit into
WebAssembly:mainfrom
PLSysSec:segue-freeseg
Sep 19, 2024
Merged

wasm2c: Add segue option to make exclusive use of the segment register#2458
shravanrn merged 1 commit into
WebAssembly:mainfrom
PLSysSec:segue-freeseg

Conversation

@shravanrn

@shravanrn shravanrn commented Sep 6, 2024

Copy link
Copy Markdown
Collaborator

The 3rd of the 3 PRs needed for production Linux Segue support (i.e., use x86 segment registers to refer to the Wasm heap for single-memory Wasm modules). This PR adds an option for applications to tell wasm2c that it has exclusive use of the gs register for this purpose and need not save and restore it on each use --- something that is particularly expensive on pre-Ivybridge CPUs which requires syscalls to set segment registers.

@shravanrn shravanrn requested review from keithw and sbc100 September 6, 2024 22:49
@shravanrn

Copy link
Copy Markdown
Collaborator Author

@sbc100 Please have a look when you have the chance. This should be the last segue commit prior to us deploying in Firefox.

Comment thread test/wasm2c/minimal.txt Outdated

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm % minor comments.

Comment thread .github/workflows/build.yml
Comment thread wasm2c/wasm-rt-impl.c Outdated
@shravanrn shravanrn enabled auto-merge (rebase) September 19, 2024 00:10
@shravanrn shravanrn merged commit 1c2b5bf into WebAssembly:main Sep 19, 2024
@shravanrn shravanrn deleted the segue-freeseg branch September 19, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants