mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
Define base class for WrapperPICPat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146081 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7398bf01c2
commit
20aa12ae5c
@ -973,15 +973,15 @@ def : Pat<(add CPURegs:$hi, (MipsTprelLo tglobaltlsaddr:$lo)),
|
||||
(ADDiu CPURegs:$hi, tglobaltlsaddr:$lo)>;
|
||||
|
||||
// wrapper_pic
|
||||
class WrapperPICPat<SDNode node>:
|
||||
class WrapperPICPat<SDNode node, Instruction ADDiuOp, Register GPReg>:
|
||||
Pat<(MipsWrapperPIC node:$in),
|
||||
(ADDiu GP, node:$in)>;
|
||||
(ADDiuOp GPReg, node:$in)>;
|
||||
|
||||
def : WrapperPICPat<tglobaladdr>;
|
||||
def : WrapperPICPat<tconstpool>;
|
||||
def : WrapperPICPat<texternalsym>;
|
||||
def : WrapperPICPat<tblockaddress>;
|
||||
def : WrapperPICPat<tjumptable>;
|
||||
def : WrapperPICPat<tglobaladdr, ADDiu, GP>;
|
||||
def : WrapperPICPat<tconstpool, ADDiu, GP>;
|
||||
def : WrapperPICPat<texternalsym, ADDiu, GP>;
|
||||
def : WrapperPICPat<tblockaddress, ADDiu, GP>;
|
||||
def : WrapperPICPat<tjumptable, ADDiu, GP>;
|
||||
|
||||
// Mips does not have "not", so we expand our way
|
||||
def : Pat<(not CPURegs:$in),
|
||||
|
Loading…
Reference in New Issue
Block a user