summaryrefslogtreecommitdiff
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
commit7ff24c877750a24507afb87eebe14cd1df40a5fa (patch)
tree775f0f7a5831adf4215db96d468af1950808a7b5
parenta37b6b6bce6b0aa04de270b756d624fd9c3afad2 (diff)
downloadgem5-7ff24c877750a24507afb87eebe14cd1df40a5fa.tar.xz
ARM: Decode the bfi and bfc instructions.
-rw-r--r--src/arch/arm/isa/formats/data.isa19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa
index 8d6baa289..9f0952a62 100644
--- a/src/arch/arm/isa/formats/data.isa
+++ b/src/arch/arm/isa/formats/data.isa
@@ -61,10 +61,12 @@ def format ArmMiscMedia() {{
return new Sbfx(machInst, ra, rn, lsb, msb);
}
} else if (bits(op2, 1, 0) == 0x0 && bits(op1, 2, 1) == 0x2) {
+ const uint32_t lsb = bits(machInst, 11, 7);
+ const uint32_t msb = bits(machInst, 20, 16);
if (rn == 0xf) {
- return new WarnUnimplemented("bfc", machInst);
+ return new Bfc(machInst, ra, ra, lsb, msb);
} else {
- return new WarnUnimplemented("bfi", machInst);
+ return new Bfi(machInst, ra, rn, lsb, msb);
}
}
return new Unknown(machInst);
@@ -1247,10 +1249,15 @@ def format Thumb32DataProcPlainBin() {{
return new Sbfx(machInst, rd, rn, lsb, msb);
}
case 0x16:
- if (rn == 0xf) {
- return new WarnUnimplemented("bfc", machInst);
- } else {
- return new WarnUnimplemented("bfi", machInst);
+ {
+ const uint32_t lsb = bits(machInst, 7, 6) |
+ (bits(machInst, 14, 12) << 2);
+ const uint32_t msb = bits(machInst, 4, 0);
+ if (rn == 0xf) {
+ return new Bfc(machInst, rd, rd, lsb, msb);
+ } else {
+ return new Bfi(machInst, rd, rn, lsb, msb);
+ }
}
case 0x1a:
if (!(bits(machInst, 14, 12) || bits(machInst, 7, 6))) {