diff options
| -rw-r--r-- | recipes-devtools/clang/clang/0017-llvm-AARCH64-Add-support-for-.dword-directives.patch | 57 | ||||
| -rw-r--r-- | recipes-devtools/clang/common.inc | 1 |
2 files changed, 58 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 | |||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 0d9445a..65589f9 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
| @@ -25,6 +25,7 @@ SRC_URI = "\ | |||
| 25 | file://0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ | 25 | file://0014-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch \ |
| 26 | file://0015-compiler-rt-Disable-tsan-on-OE-glibc.patch \ | 26 | file://0015-compiler-rt-Disable-tsan-on-OE-glibc.patch \ |
| 27 | file://0016-clang-Append-libunwind-to-compiler-rt-for-linking.patch \ | 27 | file://0016-clang-Append-libunwind-to-compiler-rt-for-linking.patch \ |
| 28 | file://0017-llvm-AARCH64-Add-support-for-.dword-directives.patch \ | ||
| 28 | " | 29 | " |
| 29 | 30 | ||
| 30 | # Fallback to no-PIE if not set | 31 | # Fallback to no-PIE if not set |
