On Wed, May 18, 2011 at 4:17 PM, Julien Grall <julien.gr...@gmail.com> wrote: > On Tue, May 17, 2011 at 9:57 PM, Blue Swirl <blauwir...@gmail.com> wrote: >> On Tue, May 17, 2011 at 6:32 PM, Julien Grall <julien.gr...@gmail.com> wrote: >>> Fix TA0_SHUTDOWN feature >> >> But what would be the bug? > > We try to add RTEMS's support on leon platform for QEMU. RTEMS uses > software trap 0 for various syscall. > The current implementation of TA0_SHUTDOWN breaks the RTEMS boot. > >> No, this would actually be just opposite to how QEMU works. >> Performance comes from doing more work at translation time in order to >> save time during executing the generated code. > > I agree, this solution slows down the execution, but I didn't find > another solution to fix this bug.
You should retain the feature check in translate.c but add a leon specific helper in place of helper_shutdown, which can check for psret. It would be also possible to generate code for the psret check if the helper overhead were an issue.