mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fix display constanting of neg quads. Part of previous checkin
git-svn-id: file://localhost/svn/verilator/trunk/verilator@939 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
+2
-3
@@ -464,11 +464,10 @@ vluint64_t V3Number::asQuad() const {
|
||||
}
|
||||
|
||||
vlsint64_t V3Number::asSQuad() const {
|
||||
if (width()<=32) return ((vlsint64_t)(asSInt()));
|
||||
vluint64_t v = asQuad();
|
||||
vluint64_t signExtend = (-(v & (1UL<<(width()-1))));
|
||||
vluint64_t signExtend = (-(v & (VL_ULL(1)<<(width()-1))));
|
||||
vluint64_t extended = v | signExtend;
|
||||
return (vlsint32_t)(extended);
|
||||
return (vlsint64_t)(extended);
|
||||
}
|
||||
|
||||
uint32_t V3Number::asHash() const {
|
||||
|
||||
Reference in New Issue
Block a user