Skip to content

Conversation

@rdunnington
Copy link
Owner

No description provided.

* This change makes V128 operations treat stack values as 2 separate F64 values instead of taking
  up a single stack slot. The definition and instance still treat V128 types as single values, but
  the VM implementation and stack ops treat them as 2.
* Smaller stack values have 2 advantages:
	1. Speeding up the memcpy bottleneck when returning values from a function
	2. Better cache coherency, fitting more stack space into a single cache line
* Ops that previously operated on generic values, such as local ops, global ops, select, etc have
  been split into default (8-byte) and V128 (16 byte) versions that know the sizes of the stack
  values they need to manipulate.
* Local indices, number of params, and number of return values now all have a fixup step where the
  values are adjusted according to the number of values a ValType occupies, where V128 values take
  2, and the rest take 1.
@rdunnington rdunnington enabled auto-merge (squash) August 2, 2025 18:15
@rdunnington
Copy link
Owner Author

Closes #72

@rdunnington rdunnington merged commit 5a9ce62 into main Aug 3, 2025
6 checks passed
@rdunnington rdunnington deleted the smallstack branch August 3, 2025 05:52
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.

2 participants