summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa/formats/data.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:10 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:10 -0500
commit1ada9d48802ad2bccb1c1d9269797778198038fd (patch)
treeb58db35e23497bd563e4125fb62598735424f42b /src/arch/arm/isa/formats/data.isa
parent3caa75d53aa9c04b238aeae281983d8b73754e98 (diff)
downloadgem5-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.isa8
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 =