Commit 159f36638898f4ea671b7f56707dc6f1ec9681d4
1 parent
ba9a74da
ARM undefined instruction execution (Jason Wessel)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1938 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
9 additions
and
0 deletions
target-arm/translate.c
... | ... | @@ -1589,6 +1589,15 @@ static void disas_arm_insn(CPUState * env, DisasContext *s) |
1589 | 1589 | case 0x5: |
1590 | 1590 | case 0x6: |
1591 | 1591 | case 0x7: |
1592 | + /* Check for undefined extension instructions | |
1593 | + * per the ARM Bible IE: | |
1594 | + * xxxx 0111 1111 xxxx xxxx xxxx 1111 xxxx | |
1595 | + */ | |
1596 | + sh = (0xf << 20) | (0xf << 4); | |
1597 | + if (op1 == 0x7 && ((insn & sh) == sh)) | |
1598 | + { | |
1599 | + goto illegal_op; | |
1600 | + } | |
1592 | 1601 | /* load/store byte/word */ |
1593 | 1602 | rn = (insn >> 16) & 0xf; |
1594 | 1603 | rd = (insn >> 12) & 0xf; | ... | ... |