diff options
author | Eli Bendersky <eliben@google.com> | 2012-12-10 20:36:01 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2012-12-10 20:36:01 +0000 |
commit | e1dee8a06e93f38f81f09887361045367a810436 (patch) | |
tree | e7e5b22aaf4089fabf92bda80fb76b1bb4cb01ba /test/MC/ELF/relax-all-flag.s | |
parent | f43e3fdb4ffddff6f71b5597c813c43e1e206564 (diff) | |
download | llvm-e1dee8a06e93f38f81f09887361045367a810436.tar.gz llvm-e1dee8a06e93f38f81f09887361045367a810436.tar.bz2 llvm-e1dee8a06e93f38f81f09887361045367a810436.tar.xz |
Add a test for explicitly exercising the mc-relax-all flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF/relax-all-flag.s')
-rw-r--r-- | test/MC/ELF/relax-all-flag.s | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/MC/ELF/relax-all-flag.s b/test/MC/ELF/relax-all-flag.s new file mode 100644 index 0000000000..4c1c78c392 --- /dev/null +++ b/test/MC/ELF/relax-all-flag.s @@ -0,0 +1,19 @@ +// By default, the jmp here does not need relaxation (so the 0xeb opdoce can be +// used). +// However, with -mc-relax-all passed to MC, all jumps are relaxed and we +// expect to see a different instruction. + +// RUN: llvm-mc -filetype=obj -mc-relax-all -triple x86_64-pc-linux-gnu %s -o - \ +// RUN: | llvm-objdump -disassemble - | FileCheck -check-prefix=RELAXALL %s + +// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - \ +// RUN: | llvm-objdump -disassemble - | FileCheck %s + +.text +foo: + mov %rax, %rax + jmp foo + +// RELAXALL: 3: e9 +// CHECK: 3: eb + |