diff options
author | Jack Carter <jack.carter@imgtec.com> | 2013-03-04 21:36:11 +0000 |
---|---|---|
committer | Jack Carter <jack.carter@imgtec.com> | 2013-03-04 21:36:11 +0000 |
commit | d2ab6d371e2bb93ced857041b9173ad50bbcbfcd (patch) | |
tree | a811bd2a1bcbd4b4eb24275add0eca6dd5d5d880 | |
parent | 1c1508b37bc2a9419b2e22beef9e788eb74203f4 (diff) |
Mips specific inline assembler constraint 'R'
'R' An address that can be sued in a non-macro load or store.
This patch includes a positive test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176453 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Basic/Targets.cpp | 3 | ||||
-rw-r--r-- | test/CodeGen/mips-constraint-regs.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index c63ccce9ca..9ff4ac08ee 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -4486,6 +4486,9 @@ public: case 'x': // hilo register pair Info.setAllowsRegister(); return true; + case 'R': // An address tha can be used in a non-macro load or store + Info.setAllowsMemory(); + return true; } } diff --git a/test/CodeGen/mips-constraint-regs.c b/test/CodeGen/mips-constraint-regs.c index c42a888fcf..0d533f5fc7 100644 --- a/test/CodeGen/mips-constraint-regs.c +++ b/test/CodeGen/mips-constraint-regs.c @@ -2,9 +2,7 @@ // RUN: | FileCheck %s // This checks that the frontend will accept inline asm constraints -// c', 'l' and 'x'. Semantic checking will happen in the -// llvm backend. Any bad constraint letters will cause the frontend to -// error out. +// c', 'l' and 'x'. int main() { |