-
Notifications
You must be signed in to change notification settings - Fork 85
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
Bunch of small fixes #56
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,18 @@ | |
|
||
#include <spr-defs.h> | ||
|
||
#define EXCEPTION_STACK_SIZE (4*32) | ||
/* | ||
* OR1K Architecture has a 128 byte "red zone" after the stack that can not be | ||
* touched by exception handlers. GCC uses this red zone for locals and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not just GCC, any ABI-compliant compiler (e.g. Clang) can use it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I change this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "The red zone is used for". That's its only purpose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, technically you could use it for anything your heart desires... Maybe I should just remove the |
||
* temps without needing to change the stack pointer. | ||
*/ | ||
#define OR1K_RED_ZONE_SIZE 128 | ||
|
||
/* | ||
* We need 4 bytes (32 bits) * 32 registers space on the stack to save all the | ||
* registers. | ||
*/ | ||
#define EXCEPTION_STACK_SIZE ((4*32) + OR1K_RED_ZONE_SIZE) | ||
|
||
#define HANDLE_EXCEPTION ; \ | ||
l.addi r1, r1, -EXCEPTION_STACK_SIZE ; \ | ||
|
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.
Shouldn't this be merged with the
bios.elf
rule?