arch-power: Implement mcrxr
authorBoris Shingarov <shingarov@labware.com>
Sun, 8 Nov 2020 18:42:47 +0000 (13:42 -0500)
committerBoris Shingarov <shingarov@gmail.com>
Tue, 10 Nov 2020 15:23:14 +0000 (15:23 +0000)
Implement the mcrxr instruction (Move to Condition Register from XER
X-form) as defined on p.132 of the green-cloth book:
The contents of XER<0:3> are copied into the Condition Register field
designated by BF.  XER<0:3> are set to zero.

Change-Id: I82ae3d98e1eaf9182e90c0c86afe0f13d4a052e4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37295
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Boris Shingarov <shingarov@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/power/isa/decoder.isa

index 475ddcc009c4f97fdd5fe00b8ec87c794dd91a4f..f32861b0fb3cf480fc1a39cffb36403d2bcf9757 100644 (file)
@@ -278,6 +278,10 @@ decode OPCODE default Unknown::unknown() {
                 0x100: mtlr({{ LR = Rs; }});
                 0x120: mtctr({{ CTR = Rs; }});
             }
+            512: mcrxr({{
+                CR = insertCRField(CR, BF, XER<31:28>);
+                XER = XER<27:0>;
+                }});
         }
 
         // All loads with an index register. The non-update versions