-
Notifications
You must be signed in to change notification settings - Fork 87
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
Memory write xor execute #617
Conversation
0, // The value is meaningless since fetch was out-of-bounds | ||
)), | ||
)?; | ||
if pc < self.registers[RegId::IS] || pc >= self.registers[RegId::SSP] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about the solution to update all places where we modify $pc
. But it also works=)
I don't know how it affects the performance, but we can try to optimize it later=)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all jmp opcodes use the same inner fn, so it would be an easy place to centralize that logic.
Hmm, it is a huge breaking change for any bytecode that doesn't return from the execution=) |
Closes #616. Closes #564.
This PR makes attempting to execute opcodes outside
$is..$ssp
range panic withMemoryNotExecutable
error. It also separatesErrorFlag
intoInvalidFlags
andInvalidInstruction
, which make more sense. Then finally it fixes some tests that incorrectly assumed that any of these were equivalent, and some that had even weirder misconceptions.