projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9727b1b
)
Ruby: Fix Set::print for 32-bit hosts
author
Andreas Hansson
<andreas.hansson@arm.com>
Fri, 23 Mar 2012 10:54:25 +0000
(06:54 -0400)
committer
Andreas Hansson
<andreas.hansson@arm.com>
Fri, 23 Mar 2012 10:54:25 +0000
(06:54 -0400)
This patch fixes a compilation error caused by a length mismatch on
32-bit hosts. The ifdef and sprintf is replaced by a csprintf.
src/mem/ruby/common/Set.cc
patch
|
blob
|
history
diff --git
a/src/mem/ruby/common/Set.cc
b/src/mem/ruby/common/Set.cc
index 12d0b2a2106eeb1b5d06e712c18b4591c4cf3b85..afa606c56289a64ce1143e15872e908f3e60a003 100644
(file)
--- a/
src/mem/ruby/common/Set.cc
+++ b/
src/mem/ruby/common/Set.cc
@@
-352,13
+352,9
@@
Set::print(std::ostream& out) const
}
char buff[24];
- out << "[Set (" << m_nSize << ")
0x
";
+ out << "[Set (" << m_nSize << ")";
for (int i = m_nArrayLen - 1; i >= 0; i--) {
-#ifdef _LP64
- sprintf(buff,"0x %016llX ", (long long)m_p_nArray[i]);
-#else
- sprintf(buff,"%08X ", m_p_nArray[i]);
-#endif // __32BITS__
+ csprintf(buff," 0x%08X", m_p_nArray[i]);
out << buff;
}
out << " ]";