diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-01-31 13:25:54 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-01-31 20:11:09 -0800 |
commit | 8f4d1ca8e2ddec3dd2dbfb924ee44fae8ce20ac4 (patch) | |
tree | d09e2745fb6fb4a64d74e87a69afadaab82912b7 /recipes-devtools/clang/clang | |
parent | 11fe47dbfed41218df9f6c5e4f4e75bee0c4ad77 (diff) | |
download | meta-clang-8f4d1ca8e2ddec3dd2dbfb924ee44fae8ce20ac4.tar.gz |
llvm: Add .dword support for aarch64 MC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools/clang/clang')
-rw-r--r-- | recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch b/recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch new file mode 100644 index 0000000..4ac102d --- /dev/null +++ b/recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 2c85adc50b677e9094932828aa7a51affde892fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 31 Jan 2019 10:53:22 -0800 | ||
4 | Subject: [PATCH] llvm: [AARCH64] Add support for .dword directives | ||
5 | |||
6 | This directives is supported in GNU assembler, Add support via addAliasForDirective. | ||
7 | Add a testcase to check for data directives | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | .../AArch64/AsmParser/AArch64AsmParser.cpp | 3 ++- | ||
12 | llvm/test/MC/AArch64/data-directives-invalid.s | 16 ++++++++++++++++ | ||
13 | 2 files changed, 18 insertions(+), 1 deletion(-) | ||
14 | create mode 100644 llvm/test/MC/AArch64/data-directives-invalid.s | ||
15 | |||
16 | diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | ||
17 | index 6cc9b67e4d2..c43b9827cbd 100644 | ||
18 | --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | ||
19 | +++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp | ||
20 | @@ -244,10 +244,11 @@ public: | ||
21 | |||
22 | // Alias .hword/.word/xword to the target-independent .2byte/.4byte/.8byte | ||
23 | // directives as they have the same form and semantics: | ||
24 | - /// ::= (.hword | .word | .xword ) [ expression (, expression)* ] | ||
25 | + /// ::= (.hword | .word | .xword | .dword ) [ expression (, expression)* ] | ||
26 | Parser.addAliasForDirective(".hword", ".2byte"); | ||
27 | Parser.addAliasForDirective(".word", ".4byte"); | ||
28 | Parser.addAliasForDirective(".xword", ".8byte"); | ||
29 | + Parser.addAliasForDirective(".dword", ".8byte"); | ||
30 | |||
31 | // Initialize the set of available features. | ||
32 | setAvailableFeatures(ComputeAvailableFeatures(getSTI().getFeatureBits())); | ||
33 | diff --git a/llvm/test/MC/AArch64/data-directives-invalid.s b/llvm/test/MC/AArch64/data-directives-invalid.s | ||
34 | new file mode 100644 | ||
35 | index 00000000000..7b59a2e60fa | ||
36 | --- /dev/null | ||
37 | +++ b/llvm/test/MC/AArch64/data-directives-invalid.s | ||
38 | @@ -0,0 +1,16 @@ | ||
39 | +# RUN: not llvm-mc -triple aarch64 < %s 2>&1 | FileCheck %s | ||
40 | + | ||
41 | +# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.hword' directive | ||
42 | +.hword 0xffffa | ||
43 | +# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.2byte' directive | ||
44 | +.2byte 0xffffa | ||
45 | +# CHECK: [[@LINE+1]]:7: error: out of range literal value in '.word' directive | ||
46 | +.word 0xffffffffa | ||
47 | +# CHECK: [[@LINE+1]]:8: error: out of range literal value in '.4byte' directive | ||
48 | +.4byte 0xffffffffa | ||
49 | +# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.dword' directive | ||
50 | +.dword 0xffffffffffffffffa | ||
51 | +# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.xword' directive | ||
52 | +.xword 0xffffffffffffffffa | ||
53 | +# CHECK: [[@LINE+1]]:8: error: literal value out of range for directive in '.8byte' directive | ||
54 | +.8byte 0xffffffffffffffffa | ||
55 | -- | ||
56 | 2.20.1 | ||
57 | |||