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 | 69c67d3b183a79f5a71bf6bcb48ab23b5e8d7259 (patch) | |
tree | 80c1c07208d510a6285b3d7bb92735dda1644c8a /llvm/test/Scripts/common_dump.py | |
parent | 2755e07e1ee6f3bd46e866158c8768558b2c1299 (diff) | |
download | bcm5719-llvm-69c67d3b183a79f5a71bf6bcb48ab23b5e8d7259.tar.gz bcm5719-llvm-69c67d3b183a79f5a71bf6bcb48ab23b5e8d7259.zip |
Print all the bits in the addend.
llvm-svn: 136867
Diffstat (limited to 'llvm/test/Scripts/common_dump.py')
-rw-r--r-- | llvm/test/Scripts/common_dump.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/test/Scripts/common_dump.py b/llvm/test/Scripts/common_dump.py index 3d69c3fb27f..cd0c493451e 100644 --- a/llvm/test/Scripts/common_dump.py +++ b/llvm/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 - |