llvm-project/clang/lib/Basic
David Candler a59bffb576 [ARM] Add support for the s,j,x,N,O inline asm constraints
A number of inline assembly constraints are currently supported by LLVM, but rejected as invalid by Clang:

Target independent constraints:

s: An integer constant, but allowing only relocatable values

ARM specific constraints:

j: An immediate integer between 0 and 65535 (valid for MOVW)
x: A 32, 64, or 128-bit floating-point/SIMD register: s0-s15, d0-d7, or q0-q3
N: An immediate integer between 0 and 31 (Thumb1 only)
O: An immediate integer which is a multiple of 4 between -508 and 508. (Thumb1 only)

This patch adds support to Clang for the missing constraints along with some checks to ensure that the constraints are used with the correct target and Thumb mode, and that immediates are within valid ranges (at least where possible). The constraints are already implemented in LLVM, but just a couple of minor corrections to checks (V8M Baseline includes MOVW so should work with 'j', 'N' and 'O' shouldn't be valid in Thumb2) so that Clang and LLVM are in line with each other and the documentation.

Differential Revision: https://reviews.llvm.org/D65863

Change-Id: I18076619e319bac35fbb60f590c069145c9d9a0a
llvm-svn: 371079
2019-09-05 15:17:25 +00:00
..
Targets [ARM] Add support for the s,j,x,N,O inline asm constraints 2019-09-05 15:17:25 +00:00
Attributes.cpp Introduce the _Clang scoped attribute token. 2018-11-09 17:19:45 +00:00
Builtins.cpp [OpenCL] Support pipe keyword in C++ mode 2019-05-22 13:12:20 +00:00
CMakeLists.txt Improve behavior in the case of stack exhaustion. 2019-08-26 18:18:07 +00:00
CharInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeGenOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cuda.cpp [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012 2019-07-11 17:50:09 +00:00
Diagnostic.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
DiagnosticIDs.cpp Use a unique_ptr instead of manual memory management for CustomDiagInfo 2019-07-15 17:20:34 +00:00
DiagnosticOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileManager.cpp Introduce a DirectoryEntryRef that stores both a reference and an 2019-08-31 01:26:04 +00:00
FileSystemStatCache.cpp [FileSystemStatCache] Return std::error_code from stat cache methods 2019-04-16 17:34:26 +00:00
FixedPoint.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
IdentifierTable.cpp [Sema][ObjC] Fix a -Wformat false positive with localizedStringForKey 2019-08-14 16:57:11 +00:00
LangOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LangStandards.cpp Move LangStandard*, InputKind::Language to Basic 2019-08-05 13:59:26 +00:00
Module.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
ObjCRuntime.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OpenMPKinds.cpp [OPENMP5.0]Add support for device_type clause in declare target 2019-08-23 16:11:14 +00:00
OperatorPrecedence.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerBlacklist.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerSpecialCaseList.cpp [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC. 2019-03-01 10:05:15 +00:00
Sanitizers.cpp Tweak r355278 for compatibility with gcc 6 and earlier. 2019-03-02 21:55:36 +00:00
SourceLocation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SourceManager.cpp ASTReader: Bypass overridden files when reading PCHs 2019-08-30 22:59:25 +00:00
Stack.cpp [msvc] Add necessary #include to make compiler intrinsics available. 2019-08-26 18:33:15 +00:00
TargetInfo.cpp Add SVE opaque built-in types 2019-08-09 08:52:54 +00:00
Targets.cpp [RISCV] Add FreeBSD targets 2019-08-01 13:14:30 +00:00
Targets.h De-templatize non-dependent VS macro logic, NFC 2019-07-09 20:57:28 +00:00
TokenKinds.cpp Use switch instead of series of comparisons 2019-08-03 16:32:49 +00:00
Version.cpp This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. 2019-07-13 06:27:35 +00:00
Warnings.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayInstr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayLists.cpp Fix file headers. NFC 2019-03-01 06:49:51 +00:00