Fix MinGW compilation printing %lls, bug214

This commit is contained in:
Wilson Snyder
2010-02-01 09:28:53 -05:00
parent a41aefe77d
commit 8dca56521b
12 changed files with 62 additions and 26 deletions
+5 -5
View File
@@ -531,17 +531,17 @@ public:
}
for (int word=VL_WORDS_I(nodep->num().minWidth())-1; word>0; word--) {
// Only 32 bits - llx + long long here just to appease CPP format warning
ofp()->printf(",0x%08llx", (long long)(nodep->num().dataWord(word)));
ofp()->printf(",0x%08" VL_PRI64 "x", (long long)(nodep->num().dataWord(word)));
}
ofp()->printf(",0x%08llx)", (long long)(nodep->num().dataWord(0)));
ofp()->printf(",0x%08" VL_PRI64 "x)", (long long)(nodep->num().dataWord(0)));
} else if (nodep->isQuad()) {
vluint64_t num = nodep->toUQuad();
if (num<10) ofp()->printf("VL_ULL(%lld)", (long long)num);
else ofp()->printf("VL_ULL(0x%llx)", (long long)num);
if (num<10) ofp()->printf("VL_ULL(%" VL_PRI64 "d)", (long long)num);
else ofp()->printf("VL_ULL(0x%" VL_PRI64 "x)", (long long)num);
} else {
uint32_t num = nodep->toUInt();
if (num<10) puts(cvtToStr(num));
else ofp()->printf("0x%llx", (long long)num);
else ofp()->printf("0x%" VL_PRI64 "x", (long long)num);
//Unneeded-Causes %lx format warnings:
// if (!nodep->num().isSigned() && (num & (1UL<<31))) puts("U");
}