From 5d5228b6b8eadef99631ea6ac4aebcd129ab0407 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Thu, 28 Aug 2008 21:16:44 -0700 Subject: [PATCH] Minor improvements to expression debug prints. --- design_dump.cc | 2 ++ pform_dump.cc | 3 +++ verinum.cc | 12 ++++++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/design_dump.cc b/design_dump.cc index 1af627745..82f1f35bf 100644 --- a/design_dump.cc +++ b/design_dump.cc @@ -1015,6 +1015,8 @@ void NetScope::dump(ostream&o) const ; pp != parameters.end() ; pp ++) { o << " parameter "; + o << pp->second.type << " "; + if ((*pp).second.signed_flag) o << "signed "; diff --git a/pform_dump.cc b/pform_dump.cc index 3dae41844..729a30819 100644 --- a/pform_dump.cc +++ b/pform_dump.cc @@ -283,6 +283,9 @@ void PEBinary::dump(ostream&out) const case 'N': out << "!=="; break; + case 'p': + out << "**"; + break; case 'R': out << ">>>"; break; diff --git a/verinum.cc b/verinum.cc index b4f20f32e..76c3fb75d 100644 --- a/verinum.cc +++ b/verinum.cc @@ -691,11 +691,15 @@ ostream& operator<< (ostream&o, const verinum&v) verinum::V trim_left = v.get(v.len()-1); unsigned idx; - for (idx = v.len()-1; idx > 0; idx -= 1) - if (trim_left != v.get(idx-1)) - break; + if (v.has_sign()) { + for (idx = v.len()-1; idx > 0; idx -= 1) + if (trim_left != v.get(idx-1)) + break; - o << trim_left; + o << trim_left; + } else { + idx = v.len(); + } while (idx > 0) { o << v.get(idx-1);