diff options
author | Lewis Revill <lewis.revill@embecosm.com> | 2019-08-16 10:23:56 +0000 |
---|---|---|
committer | Lewis Revill <lewis.revill@embecosm.com> | 2019-08-16 10:23:56 +0000 |
commit | 1653ebee3f04f0591a0f31017cdd5059828ef6e5 (patch) | |
tree | b777ed4c3460678ed2e281150dcc331ce10bd2e8 /clang/lib | |
parent | 8b593480d33f8e8f5c4ec1f921a2c692bd0b7f45 (diff) | |
download | bcm5719-llvm-1653ebee3f04f0591a0f31017cdd5059828ef6e5.tar.gz bcm5719-llvm-1653ebee3f04f0591a0f31017cdd5059828ef6e5.zip |
[RISCV] Add inline asm constraint A for RISC-V
This allows the constraint A to be used in inline asm for RISC-V, which
allows an address held in a register to be used.
This patch adds the minimal amount of code required to get operands with
the right constraints to compile.
Differential Revision: https://reviews.llvm.org/D54295
llvm-svn: 369093
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Basic/Targets/RISCV.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/RISCV.cpp b/clang/lib/Basic/Targets/RISCV.cpp index a634ba69f3c..d1166d90df4 100644 --- a/clang/lib/Basic/Targets/RISCV.cpp +++ b/clang/lib/Basic/Targets/RISCV.cpp @@ -75,6 +75,10 @@ bool RISCVTargetInfo::validateAsmConstraint( // A floating-point register. Info.setAllowsRegister(); return true; + case 'A': + // An address that is held in a general-purpose register. + Info.setAllowsMemory(); + return true; } } |