mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add some patterns for PIC PC-relative loads and stores.
llvm-svn: 37269
This commit is contained in:
parent
d173398eee
commit
8f484d16b0
@ -554,11 +554,50 @@ PseudoInst<(ops i32imm:$line, i32imm:$col, i32imm:$file),
|
||||
def PICADD : AXI1<(ops GPR:$dst, GPR:$a, pclabel:$cp, pred:$p),
|
||||
"$cp:\n\tadd$p $dst, pc, $a",
|
||||
[(set GPR:$dst, (ARMpic_add GPR:$a, imm:$cp))]>;
|
||||
let AddedComplexity = 10 in
|
||||
def PICLD : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
|
||||
let isLoad = 1, AddedComplexity = 10 in {
|
||||
def PICLD : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr$p $dst, $addr",
|
||||
[(set GPR:$dst, (load addrmodepc:$addr))]>;
|
||||
|
||||
def PICLDZH : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr${p}h $dst, $addr",
|
||||
[(set GPR:$dst, (zextloadi16 addrmodepc:$addr))]>;
|
||||
|
||||
def PICLDZB : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr${p}b $dst, $addr",
|
||||
[(set GPR:$dst, (zextloadi8 addrmodepc:$addr))]>;
|
||||
|
||||
def PICLDH : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr${p}h $dst, $addr",
|
||||
[(set GPR:$dst, (extloadi16 addrmodepc:$addr))]>;
|
||||
|
||||
def PICLDB : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr${p}b $dst, $addr",
|
||||
[(set GPR:$dst, (extloadi8 addrmodepc:$addr))]>;
|
||||
|
||||
def PICLDSH : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr${p}sh $dst, $addr",
|
||||
[(set GPR:$dst, (sextloadi16 addrmodepc:$addr))]>;
|
||||
|
||||
def PICLDSB : AXI2<(ops GPR:$dst, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tldr${p}sb $dst, $addr",
|
||||
[(set GPR:$dst, (sextloadi8 addrmodepc:$addr))]>;
|
||||
}
|
||||
let isStore = 1, AddedComplexity = 10 in {
|
||||
def PICSTR : AXI2<(ops GPR:$src, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tstr$p $src, $addr",
|
||||
[(store GPR:$src, addrmodepc:$addr)]>;
|
||||
|
||||
def PICSTRH : AXI2<(ops GPR:$src, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tstr${p}h $src, $addr",
|
||||
[(truncstorei16 GPR:$src, addrmodepc:$addr)]>;
|
||||
|
||||
def PICSTRB : AXI2<(ops GPR:$src, addrmodepc:$addr, pred:$p),
|
||||
"${addr:label}:\n\tstr${p}b $src, $addr",
|
||||
[(truncstorei8 GPR:$src, addrmodepc:$addr)]>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Control Flow Instructions.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user