diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-08-04 13:00:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-08-04 13:00:24 +0000 |
commit | d7c9b63b583ac05fc03c9a242c1bb8f12d27acf0 (patch) | |
tree | d0caa0cd9ff4ef8770b2674b3a6d556a8226b47e /test/Scripts/common_dump.py | |
parent | f42e9b2491e3a2152bba5c08f50e60edcb67fce8 (diff) |
Print all the bits in the addend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Scripts/common_dump.py')
-rw-r--r-- | test/Scripts/common_dump.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Scripts/common_dump.py b/test/Scripts/common_dump.py index 3d69c3fb27..cd0c493451 100644 --- a/test/Scripts/common_dump.py +++ b/test/Scripts/common_dump.py @@ -40,7 +40,8 @@ def HexDump(val, numBits=32): 4. Do print 0x Why? so that they can be easily distinguished using sed/rx """ + assert 0 <= val < (1 << numBits) + val = val & (( 1 << numBits) - 1) newFmt = "0x%0" + "%d" % (numBits / 4) + "x" return newFmt % val - |