diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:10 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:10 -0500 |
commit | 1ada9d48802ad2bccb1c1d9269797778198038fd (patch) | |
tree | b58db35e23497bd563e4125fb62598735424f42b /src/arch/arm/isa/formats/data.isa | |
parent | 3caa75d53aa9c04b238aeae281983d8b73754e98 (diff) | |
download | gem5-1ada9d48802ad2bccb1c1d9269797778198038fd.tar.xz |
ARM: Make sure some undefined thumb32 instructions fault.
Diffstat (limited to 'src/arch/arm/isa/formats/data.isa')
-rw-r--r-- | src/arch/arm/isa/formats/data.isa | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa index 9f0952a62..6fb698e75 100644 --- a/src/arch/arm/isa/formats/data.isa +++ b/src/arch/arm/isa/formats/data.isa @@ -579,6 +579,9 @@ def format Thumb32DataProcReg() {{ const uint32_t op1 = bits(machInst, 23, 20); const IntRegIndex rn = (IntRegIndex)(uint32_t)bits(machInst, 19, 16); const uint32_t op2 = bits(machInst, 7, 4); + if (bits(machInst, 15, 12) != 0xf) { + return new Unknown(machInst); + } if (bits(op1, 3) != 1) { if (op2 == 0) { IntRegIndex rd = (IntRegIndex)(uint32_t)bits(machInst, 11, 8); @@ -609,8 +612,9 @@ def format Thumb32DataProcReg() {{ return new MovRegRegCc(machInst, rd, INTREG_ZERO, rn, rm, ROR); } - } - { + } else if (bits(op2, 3) == 0) { + return new Unknown(machInst); + } else { const IntRegIndex rd = (IntRegIndex)(uint32_t)bits(machInst, 11, 8); const IntRegIndex rm = |