changeset a7a428f403da in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=a7a428f403da
description:
        X86: Handle rotating right all the way around or more.

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/arch/x86/isa/microops/regop.isa |    7 ++++---

diffs (18 lines):

diff -r a32abe4e17e1 -r a7a428f403da src/arch/x86/isa/microops/regop.isa
--- a/src/arch/x86/isa/microops/regop.isa       Wed Aug 05 02:59:39 2009 -0700
+++ b/src/arch/x86/isa/microops/regop.isa       Wed Aug 05 03:00:03 2009 -0700
@@ -727,10 +727,11 @@
         code = '''
             uint8_t shiftAmt =
                 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
-            if(shiftAmt)
+            uint8_t realShiftAmt = shiftAmt % (dataSize * 8);
+            if(realShiftAmt)
             {
-                uint64_t top = psrc1 << (dataSize * 8 - shiftAmt);
-                uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt);
+                uint64_t top = psrc1 << (dataSize * 8 - realShiftAmt);
+                uint64_t bottom = bits(psrc1, dataSize * 8, realShiftAmt);
                 DestReg = merge(DestReg, top | bottom, dataSize);
             }
             else
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to