target-xtensa: don't generate dead code to access invalid SRs
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 21 Jul 2013 03:54:37 +0000 (07:54 +0400)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 29 Jul 2013 14:35:45 +0000 (18:35 +0400)
commit0857a06ef784783887e756d4b7b5f874512c506c
tree8bdbac6dbc0b077ca60a2414bd9fda423b9e9590
parentaaa2ebc567619474d219017785b46ddc9295fffa
target-xtensa: don't generate dead code to access invalid SRs

This fixes the following test failure caused by access to undefined SR:

    qemu-system-xtensa -M sim -cpu dc232b -nographic -semihosting  -kernel ./test_sr.tst
    QEMU 1.4.50 monitor - type 'help' for more information
    (qemu) QEMU 1.4.50 monitor - type 'help' for more information
    (qemu) qemu-system-xtensa: tcg/tcg.c:1673: temp_save: Assertion `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
target-xtensa/translate.c