diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2016-03-17 10:43:36 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2016-03-17 10:43:36 +0000 |
commit | 58ee875296e1f32d561f5cde1a9bcc8383c032c9 (patch) | |
tree | 314a15cfe548de017d435915c4678db5ba052970 /llvm/test | |
parent | d65377da7808928963bc1685dd5eb510039fa068 (diff) | |
download | bcm5719-llvm-58ee875296e1f32d561f5cde1a9bcc8383c032c9.tar.gz bcm5719-llvm-58ee875296e1f32d561f5cde1a9bcc8383c032c9.zip |
[mips] Use `formatImm` call to print immediate value in the `MipsInstPrinter`
That allows, for example, to print hex-formatted immediates using
llvm-objdump --print-imm-hex command line option.
Differential Revision: http://reviews.llvm.org/D18195
llvm-svn: 263704
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/MC/Mips/hex-immediates.s | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/MC/Mips/hex-immediates.s b/llvm/test/MC/Mips/hex-immediates.s new file mode 100644 index 00000000000..7bf6f71266e --- /dev/null +++ b/llvm/test/MC/Mips/hex-immediates.s @@ -0,0 +1,11 @@ +# RUN: llvm-mc -filetype=obj %s -triple=mips-unknown-linux \ +# RUN: | llvm-objdump -d --print-imm-hex - | FileCheck %s + +# CHECK: jal 0x20 +# CHECK: addiu $sp, $sp, -0x20 +# CHECK: sw $2, 0x10($fp) + +jal 32 +addiu $sp, $sp, -32 +sw $2, 16($fp) +lui $2, 2 |