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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user