require64;
-if(RS2 == 0 || sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1)
+if(RS2 == 0 || (sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1))
RD = sreg_t(RS1) < 0 ? INT64_MIN : INT64_MAX;
else
RD = sreg_t(RS1) / sreg_t(RS2);
-if(int32_t(RS2) == 0 || int32_t(RS1) == INT32_MIN && int32_t(RS2) == -1)
+if(int32_t(RS2) == 0 || (int32_t(RS1) == INT32_MIN && int32_t(RS2) == -1))
RD = sext32(int32_t(RS1) < 0 ? INT32_MIN : INT32_MAX);
else
RD = sext32(int32_t(RS1)/int32_t(RS2));
require64;
-if(RS2 == 0 || sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1)
+if(RS2 == 0 || (sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1))
RD = 0;
else
RD = sreg_t(RS1) % sreg_t(RS2);
-if(int32_t(RS2) == 0 || int32_t(RS1) == INT32_MIN && int32_t(RS2) == -1)
+if(int32_t(RS2) == 0 || (int32_t(RS1) == INT32_MIN && int32_t(RS2) == -1))
RD = 0;
else
RD = sext32(int32_t(RS1) % int32_t(RS2));
#include <sys/mman.h>
#include <map>
#include <iostream>
+#include <climits>
sim_t::sim_t(int _nprocs, size_t _memsz, appserver_link_t* _applink)
: applink(_applink),