Yet another even worse ISA fanfiction from yours truly
Aaah, I didn't realize that sign was important there.
Yet another even worse ISA fanfiction from yours truly
@robryk I mean accessing memory past the end of stack (+ maybe a couple extra bytes in the red zone) is already illegal by the rules in most ABIs anyway no?
Yet another even worse ISA fanfiction from yours truly
@koakuma so what's the additional weakening of the mem model here?
Yet another even worse ISA fanfiction from yours truly
@robryk In traditional processors, if you were to do something like
SP -= something
store XX -> [SP]
SP += something
load [SP-something] -> YY
Even though it is formally illegal, it is still guaranteed that XX = YY; in my model that guarantee would be lost
Yet another even worse ISA fanfiction from yours truly
@koakuma ah, so raising the stack pointer in some sense invalidates the part of the stack that's not legal to access. Thanks, that makes sense.
Yet another even worse ISA fanfiction from yours truly
@robryk Exactly, function calls is one of them, however that is not problematic because they are usually done in this manner:
caller:
stst %arg -> [%st+ARG_OFFSET]
call callee
callee:
adjst -EXTRA_SPACE
ldst [%st+EXTRA_SPACE+ARG_OFFSET] -> %arg
And this would still be legal since the callee load doesn't load any region past ST - the only problematic case is if you try to load anything past ST (i.e ST - something)