aboutsummaryrefslogtreecommitdiff
path: root/test/Scripts/common_dump.py
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-08-04 17:00:11 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-08-04 17:00:11 +0000
commit5c4e52e49648c196f629b8623b4aca7e4c0080e3 (patch)
tree9d7c370b45a13b39ee42b7a6b1722ff18eaf75c0 /test/Scripts/common_dump.py
parent1203486d92bb1f9a82533ff0a4572d5a23fb5f9a (diff)
Fix the bitwidth of the remaining fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Scripts/common_dump.py')
-rw-r--r--test/Scripts/common_dump.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Scripts/common_dump.py b/test/Scripts/common_dump.py
index cd0c493451..fd58993c05 100644
--- a/test/Scripts/common_dump.py
+++ b/test/Scripts/common_dump.py
@@ -31,7 +31,7 @@ def dataToHexUnified(d):
return ''.join(bytes).strip()
-def HexDump(val, numBits=32):
+def HexDump(valPair):
"""
1. do not print 'L'
2. Handle negatives and large numbers by mod (2^numBits)
@@ -40,6 +40,7 @@ def HexDump(val, numBits=32):
4. Do print 0x Why?
so that they can be easily distinguished using sed/rx
"""
+ val, numBits = valPair
assert 0 <= val < (1 << numBits)
val = val & (( 1 << numBits) - 1)