Require LACE_STACK=1
to use non-standard 'stack' instruction set extension
#49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PUSH
,POP
,CALL
, andRET
instructions will now cause both an assembler error and a runtime panic if used without enabling the stack extension.The stack extension can be enabled by setting the environment variable
LACE_STACK=1
.Example:
If ran with
lace run stack.asm
, this program will fail to assemble, with the following error:If ran with
LACE_STACK=1 lace run stack.asm
, the program will assemble and run correctly.If a program assembled (with the stack extension enabled), is then separately ran (without the extension enabled), the runtime will print the following error, and immediately halt: