*** entry.S 2015-02-23 11:55:49.209507374 +0000 --- entry.S.new 2015-02-23 11:55:42.525460005 +0000 *************** *** 348,355 **** * The LP register should point to the location where the called function * should return. [note that MAKE_SYS_CALL uses label 1] */ /* See if the system call number is valid */ addi r11, r12, -__NR_syscalls; ! bgei r11,5f; /* Figure out which function to use for this system call. */ /* Note Microblaze barrel shift is optional, so don't rely on it */ add r12, r12, r12; /* convert num -> ptr */ --- 348,356 ---- * The LP register should point to the location where the called function * should return. [note that MAKE_SYS_CALL uses label 1] */ /* See if the system call number is valid */ + blti r12, 5f; addi r11, r12, -__NR_syscalls; ! bgei r11, 5f; /* Figure out which function to use for this system call. */ /* Note Microblaze barrel shift is optional, so don't rely on it */ add r12, r12, r12; /* convert num -> ptr */ *************** *** 375,381 **** /* The syscall number is invalid, return an error. */ 5: ! rtsd r15, 8; /* looks like a normal subroutine return */ addi r3, r0, -ENOSYS; /* Entry point used to return from a syscall/trap */ --- 376,382 ---- /* The syscall number is invalid, return an error. */ 5: ! brad ret_from_trap; /* Go to cleanup routine */ addi r3, r0, -ENOSYS; /* Entry point used to return from a syscall/trap */