diff options
author | Damien George <damien.p.george@gmail.com> | 2018-02-24 23:10:20 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-02-24 23:10:20 +1100 |
commit | c0bcf00ed100181a532240d904395de11addcd33 (patch) | |
tree | 0b706563c9c5f74a5912abe4878def2e06fcdbd3 /py/asmarm.c | |
parent | 7dfa56e40e9c343cbf4a1726a4babecc69a6b732 (diff) |
py/asm*.c: Remove unnecessary check for num_locals<0 in asm entry func.
All callers of the asm entry function guarantee that num_locals>=0, so no
need to add an explicit check for it. Use an assertion instead.
Also, the signature of asm_x86_entry is changed to match the other asm
entry functions.
Diffstat (limited to 'py/asmarm.c')
-rw-r--r-- | py/asmarm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/py/asmarm.c b/py/asmarm.c index 552fdfb34..1a8923bc2 100644 --- a/py/asmarm.c +++ b/py/asmarm.c @@ -150,10 +150,7 @@ void asm_arm_bkpt(asm_arm_t *as) { // | low address | high address in RAM void asm_arm_entry(asm_arm_t *as, int num_locals) { - - if (num_locals < 0) { - num_locals = 0; - } + assert(num_locals >= 0); as->stack_adjust = 0; as->push_reglist = 1 << ASM_ARM_REG_R1 |