mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
[ARM] Handle the inline asm constraint type 'o'
This means "memory with offset" and requires very little plumbing to get working. This fixes PR25317. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251280 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6f975c928c
commit
82ace96a30
@ -3924,6 +3924,7 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID,
|
||||
// be an immediate and not a memory constraint.
|
||||
// Fallthrough.
|
||||
case InlineAsm::Constraint_m:
|
||||
case InlineAsm::Constraint_o:
|
||||
case InlineAsm::Constraint_Q:
|
||||
case InlineAsm::Constraint_Um:
|
||||
case InlineAsm::Constraint_Un:
|
||||
|
@ -348,6 +348,8 @@ namespace llvm {
|
||||
getInlineAsmMemConstraint(StringRef ConstraintCode) const override {
|
||||
if (ConstraintCode == "Q")
|
||||
return InlineAsm::Constraint_Q;
|
||||
else if (ConstraintCode == "o")
|
||||
return InlineAsm::Constraint_o;
|
||||
else if (ConstraintCode.size() == 2) {
|
||||
if (ConstraintCode[0] == 'U') {
|
||||
switch(ConstraintCode[1]) {
|
||||
|
11
test/CodeGen/ARM/pr25317.ll
Normal file
11
test/CodeGen/ARM/pr25317.ll
Normal file
@ -0,0 +1,11 @@
|
||||
; RUN: llc < %s | FileCheck %s
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv7--linux-gnueabihf"
|
||||
|
||||
; CHECK-LABEL: f:
|
||||
; CHECK: str lr, [r0]
|
||||
define void @f(i32* %p) {
|
||||
call void asm sideeffect "str lr, $0", "=*o"(i32* %p)
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user