Use WRITE instead of MOV for stack pointer init
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
bb6bcc8b5f
commit
ffc243d528
|
@ -3,6 +3,6 @@
|
|||
.constant rrcc_ENTRYPOINT @__init
|
||||
|
||||
__init:
|
||||
MOV rrcc_STACK_POINTER, rrcc_STACK_START_IMM ; Reset Stack pointer to its starting position
|
||||
WRITE rrcc_STACK_POINTER, rrcc_STACK_START ; Reset Stack pointer to its starting position
|
||||
CALL @entrypoint ; Calls user-defined entrypoint
|
||||
END ; Stops execution if it ever returns
|
|
@ -28,9 +28,6 @@ int main(int argc, char *argv[]) {
|
|||
linker.addVariable("rrcc_STACK_START",
|
||||
{Token(Token::Type::RegisterLocation, std::to_string(Instruction::Stack::stackRegisterStart),
|
||||
Instruction::Stack::stackRegisterStart)});
|
||||
linker.addVariable("rrcc_STACK_START_IMM",
|
||||
{Token(Token::Type::Immediate, std::to_string(Instruction::Stack::stackRegisterStart),
|
||||
Instruction::Stack::stackRegisterStart)});
|
||||
linker.addVariable("rrcc_STACK_POINTER", {Token(Token::Type::RegisterLocation,
|
||||
std::to_string(Instruction::Stack::stackOffsetRegisterAddress),
|
||||
Instruction::Stack::stackOffsetRegisterAddress)});
|
||||
|
|
Loading…
Reference in a new issue