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.
This commit is contained in:
Damien George
2018-02-24 23:10:20 +11:00
parent 7dfa56e40e
commit c0bcf00ed1
5 changed files with 7 additions and 12 deletions

View File

@@ -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