summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-16 22:06:40 +0000
committerdim <dim@FreeBSD.org>2015-05-16 22:06:40 +0000
commit7de2980d9db755517d2f28f19f0f2c623b147e9a (patch)
treeaa8c90d8bf45707cf7ba057e67464c4769f1739a /contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff
parentc5245aadbbe5796d58c966d6d6209a110f78dbe1 (diff)
downloadFreeBSD-src-7de2980d9db755517d2f28f19f0f2c623b147e9a.zip
FreeBSD-src-7de2980d9db755517d2f28f19f0f2c623b147e9a.tar.gz
Bring the contrib/llvm/patches directory up-to-date.
MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. Additionally: * Remove the clang patch corresponding to r263619, as ARM EABI hard-float support was never MFC'd. * Add clang patch corresponding to r279302.
Diffstat (limited to 'contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff')
-rw-r--r--contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff216
1 files changed, 216 insertions, 0 deletions
diff --git a/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff b/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff
index 40dd5bd..e5baca0 100644
--- a/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff
+++ b/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff
@@ -1,3 +1,14 @@
+Pull in r200383 from upstream llvm trunk (by David Majnemer):
+
+ MC: Reorganize macro MC test along dialect lines
+
+ This commit seeks to do two things:
+ - Run the surfeit of tests under the Darwin dialect. This ends up
+ affecting tests which assumed that spaces could deliminate arguments.
+ - The GAS dialect tests should limit their surface area to things that
+ could plausibly work under GAS. For example, Darwin style arguments
+ have no business being in such a test.
+
Pull in r201784 from upstream llvm trunk (by Benjamin Kramer):
AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets.
@@ -53,3 +64,208 @@ Index: test/MC/AsmParser/exprs.s
.macro check_expr
.if ($0) != ($1)
+Index: test/MC/AsmParser/macros.s (deleted)
+===================================================================
+Index: test/MC/AsmParser/macros-darwin.s
+===================================================================
+--- test/MC/AsmParser/macros-darwin.s
++++ test/MC/AsmParser/macros-darwin.s
+@@ -1,9 +1,97 @@
+-// RUN: llvm-mc -triple i386-apple-darwin10 %s | FileCheck %s
++// RUN: not llvm-mc -triple i386-apple-darwin10 %s 2> %t.err | FileCheck %s
++// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err
+
+-.macro test1
++.macro .test0
++.macrobody0
++.endmacro
++.macro .test1
++.test0
++.endmacro
++
++.test1
++// CHECK-ERRORS: <instantiation>:1:1: error: unknown directive
++// CHECK-ERRORS-NEXT: macrobody0
++// CHECK-ERRORS-NEXT: ^
++// CHECK-ERRORS: <instantiation>:1:1: note: while in macro instantiation
++// CHECK-ERRORS-NEXT: .test0
++// CHECK-ERRORS-NEXT: ^
++// CHECK-ERRORS: 11:1: note: while in macro instantiation
++// CHECK-ERRORS-NEXT: .test1
++// CHECK-ERRORS-NEXT: ^
++
++.macro test2
++.byte $0
++.endmacro
++// CHECK: .byte 10
++test2 10
++
++.macro test3
+ .globl "$0 $1 $2 $$3 $n"
+ .endmacro
+
+ // CHECK: .globl "1 23 $3 2"
+-test1 1, 2 3
++test3 1, 2 3
+
++// CHECK: .globl "1 (23) $3 2"
++test3 1, (2 3)
++
++// CHECK: .globl "12 $3 1"
++test3 1 2
++
++.macro test4
++.globl "$0 -- $1"
++.endmacro
++
++// CHECK: .globl "(ab)(,)) -- (cd)"
++test4 (a b)(,)),(cd)
++
++// CHECK: .globl "(ab)(,)) -- (cd)"
++test4 (a b)(,)),(cd)
++
++.macro test5 _a
++.globl "\_a"
++.endm
++
++// CHECK: .globl zed1
++test5 zed1
++
++.macro test6 $a
++.globl "\$a"
++.endm
++
++// CHECK: .globl zed2
++test6 zed2
++
++.macro test7 .a
++.globl "\.a"
++.endm
++
++// CHECK: .globl zed3
++test7 zed3
++
++.macro test8 _a, _b, _c
++.globl "\_a,\_b,\_c"
++.endmacro
++
++.macro test9 _a _b _c
++.globl "\_a \_b \_c"
++.endmacro
++
++// CHECK: .globl "a,b,c"
++test8 a, b, c
++// CHECK: .globl "%1,%2,%3"
++test8 %1, %2, %3 #a comment
++// CHECK: .globl "x-y,z,1"
++test8 x - y, z, 1
++// CHECK: .globl "1 2 3"
++test9 1, 2,3
++
++test8 1,2 3
++// CHECK-ERRORS: error: macro argument '_c' is missing
++// CHECK-ERRORS-NEXT: test8 1,2 3
++// CHECK-ERRORS-NEXT: ^
++
++test8 1 2, 3
++// CHECK-ERRORS: error: macro argument '_c' is missing
++// CHECK-ERRORS-NEXT:test8 1 2, 3
++// CHECK-ERRORS-NEXT: ^
+Index: test/MC/AsmParser/macros-gas.s
+===================================================================
+--- test/MC/AsmParser/macros-gas.s
++++ test/MC/AsmParser/macros-gas.s
+@@ -0,0 +1,93 @@
++// RUN: not llvm-mc -triple i386-linux-gnu %s 2> %t.err | FileCheck %s
++// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err
++
++.macro .test0
++.macrobody0
++.endm
++.macro .test1
++.test0
++.endm
++
++.test1
++// CHECK-ERRORS: <instantiation>:1:1: error: unknown directive
++// CHECK-ERRORS-NEXT: macrobody0
++// CHECK-ERRORS-NEXT: ^
++// CHECK-ERRORS: <instantiation>:1:1: note: while in macro instantiation
++// CHECK-ERRORS-NEXT: .test0
++// CHECK-ERRORS-NEXT: ^
++// CHECK-ERRORS: 11:1: note: while in macro instantiation
++// CHECK-ERRORS-NEXT: .test1
++// CHECK-ERRORS-NEXT: ^
++
++.macro test2 _a
++.byte \_a
++.endm
++// CHECK: .byte 10
++test2 10
++
++.macro test3 _a _b _c
++.ascii "\_a \_b \_c \\_c"
++.endm
++
++// CHECK: .ascii "1 2 3 \003"
++test3 1, 2, 3
++
++// FIXME: test3 1, 2 3 should be treated like test 1, 2, 3
++
++// FIXME: remove the n argument from the remaining test3 examples
++// CHECK: .ascii "1 (23) n \n"
++test3 1, (2 3), n
++
++// CHECK: .ascii "1 (23) n \n"
++test3 1 (2 3) n
++
++// CHECK: .ascii "1 2 n \n"
++test3 1 2 n
++
++.macro test5 _a
++.globl \_a
++.endm
++
++// CHECK: .globl zed1
++test5 zed1
++
++.macro test6 $a
++.globl \$a
++.endm
++
++// CHECK: .globl zed2
++test6 zed2
++
++.macro test7 .a
++.globl \.a
++.endm
++
++// CHECK: .globl zed3
++test7 zed3
++
++.macro test8 _a, _b, _c
++.ascii "\_a,\_b,\_c"
++.endm
++
++.macro test9 _a _b _c
++.ascii "\_a \_b \_c"
++.endm
++
++// CHECK: .ascii "a,b,c"
++test8 a, b, c
++// CHECK: .ascii "%1,%2,%3"
++test8 %1 %2 %3 #a comment
++// CHECK: .ascii "x-y,z,1"
++test8 x - y z 1
++// CHECK: .ascii "1 2 3"
++test9 1, 2,3
++
++test8 1,2 3
++// CHECK-ERRORS: error: macro argument '_c' is missing
++// CHECK-ERRORS-NEXT: test8 1,2 3
++// CHECK-ERRORS-NEXT: ^
++
++test8 1 2, 3
++// CHECK-ERRORS: error: expected ' ' for macro argument separator
++// CHECK-ERRORS-NEXT:test8 1 2, 3
++// CHECK-ERRORS-NEXT: ^
OpenPOWER on IntegriCloud