[llvm-commits] [llvm] r169764 - /llvm/trunk/test/MC/ELF/relax-all-flag.s
Eli Bendersky
eliben at google.com
Mon Dec 10 12:36:01 PST 2012
Author: eliben
Date: Mon Dec 10 14:36:01 2012
New Revision: 169764
URL: http://llvm.org/viewvc/llvm-project?rev=169764&view=rev
Log:
Add a test for explicitly exercising the mc-relax-all flag.
Added:
llvm/trunk/test/MC/ELF/relax-all-flag.s
Added: llvm/trunk/test/MC/ELF/relax-all-flag.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/relax-all-flag.s?rev=169764&view=auto
==============================================================================
--- llvm/trunk/test/MC/ELF/relax-all-flag.s (added)
+++ llvm/trunk/test/MC/ELF/relax-all-flag.s Mon Dec 10 14:36:01 2012
@@ -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
+
More information about the llvm-commits
mailing list