aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ELF/no-fixup.s
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-18 05:07:45 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-18 05:07:45 +0000
commit54f08852f6c45a1165295d66bd072e2d1da7a6d1 (patch)
tree102d0c56e012dd8503669c18891f2f0a7c7eb949 /test/MC/ELF/no-fixup.s
parent3f037ef2f52769e0ee9b038177242611fe19d547 (diff)
downloadexternal_llvm-54f08852f6c45a1165295d66bd072e2d1da7a6d1.zip
external_llvm-54f08852f6c45a1165295d66bd072e2d1da7a6d1.tar.gz
external_llvm-54f08852f6c45a1165295d66bd072e2d1da7a6d1.tar.bz2
Add a test that shows that we produce no fixups when computing the difference
of two symbols in the same fragment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ELF/no-fixup.s')
-rw-r--r--test/MC/ELF/no-fixup.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/MC/ELF/no-fixup.s b/test/MC/ELF/no-fixup.s
new file mode 100644
index 0000000..6e719bc
--- /dev/null
+++ b/test/MC/ELF/no-fixup.s
@@ -0,0 +1,16 @@
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t -stats 2>%t.out
+// RUN: FileCheck --input-file=%t.out %s
+
+// Test that we create no fixups for this file since "a" and "b" are in the
+// same fragment.
+
+// CHECK: assembler - Number of assembler layout and relaxation steps
+// CHECK-NEXT: assembler - Number of emitted assembler fragments
+// CHECK-NEXT: assembler - Number of emitted object file bytes
+// CHECK-NEXT: assembler - Number of fragment layouts
+// CHECK-NEXT: mcexpr - Number of MCExpr evaluations
+
+a:
+ nop
+b:
+ .long b - a