Fix clang 3.8 warnings

This commit is contained in:
Wilson Snyder 2017-09-18 20:05:56 -04:00
parent b06a329466
commit ce16f7689d
3 changed files with 11 additions and 9 deletions

View File

@ -182,7 +182,9 @@ sub run {
warn "%Error: $command\n";
}
if ($status & 127) {
if (($status & 127) == 8 || ($status & 127) == 11) { # SIGFPA or SIGSEGV
if (($status & 127) == 4 # SIGILL
|| ($status & 127) == 8 # SIGFPA
|| ($status & 127) == 11) { # SIGSEGV
warn "%Error: Verilator internal fault, sorry. Consider trying --debug --gdbbt\n" if !$Debug;
} elsif (($status & 127) == 6) { # SIGABRT
warn "%Error: Verilator aborted. Consider trying --debug --gdbbt\n" if !$Debug;

View File

@ -308,7 +308,7 @@ WDataOutP VL_POW_WWQ(int obits, int lbits, int rbits, WDataOutP owp, WDataInP lw
WData rhsw[2]; VL_SET_WQ(rhsw, rhs);
return VL_POW_WWW(obits,lbits,rbits,owp,lwp,rhsw);
}
QData VL_POW_QQW(int obits, int, int rbits, QData lhs, WDataInP rwp) {
QData VL_POW_QQW(int, int, int rbits, QData lhs, WDataInP rwp) {
// Skip check for rhs == 0, as short-circuit doesn't save time
if (VL_UNLIKELY(lhs==0)) return 0;
QData power = lhs;

View File

@ -88,11 +88,11 @@ extern "C" {
//======================================================================
unsigned char dpii_f_bit (unsigned char i) { return SV_MASK(1) & ~i; }
svBitVecVal dpii_f_bit8 (const svBitVecVal *i) { return SV_MASK(8) & ~*i; }
svBitVecVal dpii_f_bit9 (const svBitVecVal *i) { return SV_MASK(9) & ~*i; }
svBitVecVal dpii_f_bit16(const svBitVecVal *i) { return SV_MASK(16) & ~*i; }
svBitVecVal dpii_f_bit17(const svBitVecVal *i) { return SV_MASK(17) & ~*i; }
unsigned char dpii_f_bit (unsigned char i) { return VL_MASK_I(1) & ~i; }
svBitVecVal dpii_f_bit8 (const svBitVecVal *i) { return VL_MASK_I(8) & ~*i; }
svBitVecVal dpii_f_bit9 (const svBitVecVal *i) { return VL_MASK_I(9) & ~*i; }
svBitVecVal dpii_f_bit16(const svBitVecVal *i) { return VL_MASK_I(16) & ~*i; }
svBitVecVal dpii_f_bit17(const svBitVecVal *i) { return VL_MASK_I(17) & ~*i; }
svBitVecVal dpii_f_bit32(const svBitVecVal *i) { return ~*i; }
long long dpii_f_bit33(const svBitVecVal *i) { return ((1ULL<<33)-1) & ~((long long)(i[1])<<32ULL | i[0]); }
long long dpii_f_bit64(const svBitVecVal *i) { return ~((long long)(i[1])<<32ULL | i[0]); }
@ -106,7 +106,7 @@ const char* dpii_f_string (const char* i) { return i; }
double dpii_f_real (double i) { return i+1.5; }
float dpii_f_shortreal(float i) { return i+1.5; }
void dpii_v_bit (unsigned char i, unsigned char *o) { *o = SV_MASK(1) & ~i; }
void dpii_v_bit (unsigned char i, unsigned char *o) { *o = VL_MASK_I(1) & ~i; }
void dpii_v_int (int i, int *o) { *o = ~i; }
void dpii_v_uint (unsigned int i, unsigned int *o) { *o = ~i; }
void dpii_v_byte (char i, char *o) { *o = ~i; }
@ -139,7 +139,7 @@ void dpii_v_bit64(const svBitVecVal* i, svBitVecVal* o) {
void dpii_v_bit95(const svBitVecVal* i, svBitVecVal* o) {
o[0] = ~i[0];
o[1] = ~i[1];
o[2] = SV_MASK(95-64) & ~i[2];
o[2] = VL_MASK_I(95-64) & ~i[2];
}
void dpii_v_bit96(const svBitVecVal* i, svBitVecVal* o) {
o[0] = ~i[0];