mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Completely remove UVM32_STACK_PROTECTION unless enabled (requires manually changing crt0.S), as this saves 16 bytes on every .bin
This commit is contained in:
parent
c1399fbe86
commit
173d5056a5
17 changed files with 6 additions and 5 deletions
|
|
@ -273,8 +273,8 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter)
|
|||
case UVM32_SYSCALL_HALT:
|
||||
setStatus(vmst, UVM32_STATUS_ENDED);
|
||||
break;
|
||||
case UVM32_SYSCALL_STACKPROTECT: {
|
||||
#ifdef UVM32_STACK_PROTECTION
|
||||
case UVM32_SYSCALL_STACKPROTECT: {
|
||||
// don't allow errant code to change it once set
|
||||
if (vmst->_stack_canary == (uint8_t *)NULL) {
|
||||
uint32_t param0 = vmst->_core.regs[10]; // a0
|
||||
|
|
@ -295,8 +295,8 @@ uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter)
|
|||
*vmst->_stack_canary = STACK_CANARY_VALUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
#endif
|
||||
default:
|
||||
// user defined syscalls
|
||||
vmst->_ioevt.typ = UVM32_EVT_SYSCALL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue