-if(RS2 == 0)
+sreg_t lhs = sext_xprlen(RS1);
+sreg_t rhs = sext_xprlen(RS2);
+if(rhs == 0)
RD = UINT64_MAX;
-else if(sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1)
- RD = RS1;
+else if(lhs == INT64_MIN && rhs == -1)
+ RD = lhs;
else
- RD = sext_xprlen(sext_xprlen(RS1) / sext_xprlen(RS2));
+ RD = sext_xprlen(lhs / rhs);
-if(RS2 == 0)
+reg_t lhs = zext_xprlen(RS1);
+reg_t rhs = zext_xprlen(RS2);
+if(rhs == 0)
RD = UINT64_MAX;
else
- RD = sext_xprlen(zext_xprlen(RS1) / zext_xprlen(RS2));
+ RD = sext_xprlen(lhs / rhs);
require_xpr64;
-if(zext32(RS2) == 0)
+reg_t lhs = zext32(RS1);
+reg_t rhs = zext32(RS2);
+if(rhs == 0)
RD = UINT64_MAX;
else
- RD = sext32(zext32(RS1) / zext32(RS2));
+ RD = sext32(lhs / rhs);
require_xpr64;
-if(int32_t(RS2) == 0)
+sreg_t lhs = sext32(RS1);
+sreg_t rhs = sext32(RS2);
+if(rhs == 0)
RD = UINT64_MAX;
-else if(int32_t(RS1) == INT32_MIN && int32_t(RS2) == -1)
- RD = RS1;
else
- RD = sext32(int32_t(RS1) / int32_t(RS2));
+ RD = sext32(lhs / rhs);
-if(RS2 == 0)
- RD = RS1;
-else if(sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1)
+sreg_t lhs = sext_xprlen(RS1);
+sreg_t rhs = sext_xprlen(RS2);
+if(rhs == 0)
+ RD = lhs;
+else if(lhs == INT64_MIN && rhs == -1)
RD = 0;
else
- RD = sext_xprlen(sext_xprlen(RS1) % sext_xprlen(RS2));
+ RD = sext_xprlen(lhs % rhs);
-if(RS2 == 0)
- RD = RS1;
+reg_t lhs = zext_xprlen(RS1);
+reg_t rhs = zext_xprlen(RS2);
+if(rhs == 0)
+ RD = lhs;
else
- RD = sext_xprlen(zext_xprlen(RS1) % zext_xprlen(RS2));
+ RD = sext_xprlen(lhs % rhs);
require_xpr64;
-if(zext_xprlen(RS2) == 0)
- RD = RS1;
+reg_t lhs = zext32(RS1);
+reg_t rhs = zext32(RS2);
+if(rhs == 0)
+ RD = lhs;
else
- RD = sext32(zext_xprlen(RS1) % zext_xprlen(RS2));
+ RD = sext32(lhs % rhs);
require_xpr64;
-if(int32_t(RS2) == 0)
- RD = RS1;
-else if(int32_t(RS1) == INT32_MIN && int32_t(RS2) == -1)
- RD = 0;
+sreg_t lhs = sext32(RS1);
+sreg_t rhs = sext32(RS2);
+if(rhs == 0)
+ RD = lhs;
else
- RD = sext32(int32_t(RS1) % int32_t(RS2));
+ RD = sext32(lhs % rhs);