Chun-Chen TK Hsu has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/19028

Change subject: arm: Fix decoding of CRC32 instructions in thumb32
......................................................................

arm: Fix decoding of CRC32 instructions in thumb32

The CRC32 and CRC32C instructions are incorrectly decoded in thumb32
mode according to the latest manual:
https://developer.arm.com/docs/ddi0597/latest/top-level-encodings-for-t32/16-bit#dpint_2r

Change-Id: I9c6684f1ec7fe14d3b4cdf13f117a9819e046578
Signed-off-by: Chun-Chen TK Hsu
---
M src/arch/arm/isa/formats/data.isa
1 file changed, 9 insertions(+), 0 deletions(-)



diff --git a/src/arch/arm/isa/formats/data.isa b/src/arch/arm/isa/formats/data.isa
index cff3d22..aaa0d34 100644
--- a/src/arch/arm/isa/formats/data.isa
+++ b/src/arch/arm/isa/formats/data.isa
@@ -830,6 +830,15 @@
                         return new Clz(machInst, rd, rm);
                     }
                     break;
+                }
+            } else if (bits(op1, 3, 2) == 0x3 && bits(op2, 3, 2) == 0x2) {
+                const uint32_t op1 = bits(machInst, 22, 20);
+                const uint32_t op2 = bits(machInst, 5, 4);
+                const IntRegIndex rd =
+                    (IntRegIndex)(uint32_t)bits(machInst, 11, 8);
+                const IntRegIndex rm =
+                    (IntRegIndex)(uint32_t)bits(machInst, 3, 0);
+                switch (op1) {
                   case 0x4:
                     switch (op2) {
                       case 0x0:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/19028
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I9c6684f1ec7fe14d3b4cdf13f117a9819e046578
Gerrit-Change-Number: 19028
Gerrit-PatchSet: 1
Gerrit-Owner: Chun-Chen TK Hsu <chunchen...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to