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:08 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:08 -0500
commit2e717558e230c79ca8a8f8eb1b20364a89551e4d (patch)
tree0aa5946ec789d22b9c1355ccc267d23c0bfaadbf /src/arch/arm/isa/formats/data.isa
parent09cc401848a7ee4540639ab8a05b40a4e1a7ee0a (diff)
downloadgem5-2e717558e230c79ca8a8f8eb1b20364a89551e4d.tar.xz
ARM: Decode miscellaneous arm mode media instructions.
Diffstat (limited to 'src/arch/arm/isa/formats/data.isa')
-rw-r--r--src/arch/arm/isa/formats/data.isa33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa
index 03f94075c..dee377658 100644
--- a/src/arch/arm/isa/formats/data.isa
+++ b/src/arch/arm/isa/formats/data.isa
@@ -35,18 +35,37 @@
//
// Authors: Gabe Black
-def format ArmUsad() {{
+def format ArmMiscMedia() {{
decode_block = '''
{
- const IntRegIndex rd = (IntRegIndex)(uint32_t)bits(machInst, 19, 16);
+ const uint32_t op1 = bits(machInst, 22, 20);
+ const uint32_t op2 = bits(machInst, 7, 5);
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);
+ if (op1 == 0 && op2 == 0) {
+ const IntRegIndex rd =
+ (IntRegIndex)(uint32_t)bits(machInst, 19, 16);
+ const IntRegIndex rm =
+ (IntRegIndex)(uint32_t)bits(machInst, 11, 8);
+ if (ra == 0xf) {
+ return new Usad8(machInst, rd, rn, rm);
+ } else {
+ return new Usada8(machInst, rd, rn, rm, ra);
+ }
+ } else if (bits(op2, 1, 0) == 0x2) {
+ if (bits(op1, 2, 1) == 0x3) {
+ return new WarnUnimplemented("ubfx", machInst);
+ } else if (bits(op1, 2, 1) == 0x1) {
+ return new WarnUnimplemented("sbfx", machInst);
+ }
+ } else if (bits(op2, 1, 0) == 0x0 && bits(op1, 2, 1) == 0x2) {
+ if (rn == 0xf) {
+ return new WarnUnimplemented("bfc", machInst);
+ } else {
+ return new WarnUnimplemented("bfi", machInst);
+ }
}
+ return new Unknown(machInst);
}
'''
}};