This is an archive of the discontinued LLVM Phabricator instance.

Change llvm-objdump to default to print hex immediates by default
ClosedPublic

Authored by colinl on Apr 4 2016, 12:53 PM.

Details

Summary

I think by default people disassembling want to view hex immediates rather than decimal.

This patch changes this default and in order to minimize test changes, we add --print-imm-hex=false to any lit tests with llvm-objdump that are written for non-hex immediates.

Diff Detail

Repository
rL LLVM

Event Timeline

colinl updated this revision to Diff 52605.Apr 4 2016, 12:53 PM
colinl retitled this revision from to Change llvm-objdump to default to print hex immediates by default.
colinl updated this object.
colinl set the repository for this revision to rL LLVM.
colinl added a subscriber: llvm-commits.
majnemer edited edge metadata.Apr 4 2016, 1:26 PM
majnemer added a subscriber: majnemer.

With this patch, is the default behavior equivalent to GNU objdump?

colinl added a comment.Apr 4 2016, 1:38 PM

Yes, GNU objdump does hex.

401006:       a1 00 a0 41 00          mov    0x41a000,%eax
40100b:       85 c0                   test   %eax,%eax
40100d:       74 01                   je     0x401010
This revision was automatically updated to reflect the committed changes.