Sandipan Das has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/16622

Change subject: arch-power: Add fixed-point doubleword arithmetic divide instructions
......................................................................

arch-power: Add fixed-point doubleword arithmetic divide instructions

This adds the following arithmetic instructions:
  * Divide Doubleword (divd[o][.])
  * Divide Doubleword Unsigned (divdu[o][.])

Change-Id: Iedfa46ee482201a25dbc195ac5cb7f5f5e83c29b
Signed-off-by: Sandipan Das <[email protected]>
---
M src/arch/power/isa/decoder.isa
1 file changed, 24 insertions(+), 0 deletions(-)



diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa
index b849862..828d150 100644
--- a/src/arch/power/isa/decoder.isa
+++ b/src/arch/power/isa/decoder.isa
@@ -721,6 +721,30 @@
                     }
                 }},
                 true);
+
+                489: divd({{
+                    int64_t src1 = Ra_sd;
+                    int64_t src2 = Rb_sd;
+                    if ((src1 != INT64_MIN || src2 != -1) && src2 != 0) {
+                        Rt = src1 / src2;
+                    } else {
+                        Rt = 0;
+                        setOV = true;
+                    }
+                }},
+                true);
+
+                457: divdu({{
+                    uint64_t src1 = Ra;
+                    uint64_t src2 = Rb;
+                    if (src2 != 0) {
+                        Rt = src1 / src2;
+                    } else {
+                        Rt = 0;
+                        setOV = true;
+                    }
+                }},
+                true);
             }

             default: decode XFX_XO {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16622
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: Iedfa46ee482201a25dbc195ac5cb7f5f5e83c29b
Gerrit-Change-Number: 16622
Gerrit-PatchSet: 1
Gerrit-Owner: Sandipan Das <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to