summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa/formats
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:07 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:07 -0500
commit00baeb742d8ff3f735466131253bf457664ecc6b (patch)
tree802d60b395cd242710ddd683ac9f7809e6e63bd8 /src/arch/arm/isa/formats
parent8f566e5ee3d9e3236cced1d56c11d7f3ea4ab351 (diff)
downloadgem5-00baeb742d8ff3f735466131253bf457664ecc6b.tar.xz
ARM: Decode the usad8 and usada8 instructions.
Diffstat (limited to 'src/arch/arm/isa/formats')
-rw-r--r--src/arch/arm/isa/formats/data.isa16
-rw-r--r--src/arch/arm/isa/formats/mult.isa4
2 files changed, 18 insertions, 2 deletions
diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa
index 2efd9c18f..7679aa355 100644
--- a/src/arch/arm/isa/formats/data.isa
+++ b/src/arch/arm/isa/formats/data.isa
@@ -35,6 +35,22 @@
//
// Authors: Gabe Black
+def format ArmUsad() {{
+ decode_block = '''
+ {
+ const IntRegIndex rd = (IntRegIndex)(uint32_t)bits(machInst, 19, 16);
+ const IntRegIndex rn = (IntRegIndex)(uint32_t)bits(machInst, 3, 0);
+ const IntRegIndex rm = (IntRegIndex)(uint32_t)bits(machInst, 11, 8);
+ const IntRegIndex ra = (IntRegIndex)(uint32_t)bits(machInst, 15, 12);
+ if (ra == 0xf) {
+ return new Usad8(machInst, rd, rn, rm);
+ } else {
+ return new Usada8(machInst, rd, rn, rm, ra);
+ }
+ }
+ '''
+}};
+
def format ArmDataProcReg() {{
pclr = '''
return new %(className)ssRegPclr(machInst, %(dest)s,
diff --git a/src/arch/arm/isa/formats/mult.isa b/src/arch/arm/isa/formats/mult.isa
index 653abefdb..bd101374a 100644
--- a/src/arch/arm/isa/formats/mult.isa
+++ b/src/arch/arm/isa/formats/mult.isa
@@ -267,9 +267,9 @@ def format Thumb32MulMulAccAndAbsDiff() {{
if (op2 != 0x0) {
return new Unknown(machInst);
} else if (ra == 0xf) {
- return new WarnUnimplemented("usada8", machInst);
+ return new Usad8(machInst, rd, rn, rm);
} else {
- return new WarnUnimplemented("usad8", machInst);
+ return new Usada8(machInst, rd, rn, rm, ra);
}
}
}