Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
Show First 20 Lines • Show All 804 Lines • ▼ Show 20 Lines | |||||
defm : StPat<truncstorei8, ST_B, GPR, GRLenVT>; | defm : StPat<truncstorei8, ST_B, GPR, GRLenVT>; | ||||
defm : StPat<truncstorei16, ST_H, GPR, GRLenVT>; | defm : StPat<truncstorei16, ST_H, GPR, GRLenVT>; | ||||
defm : StPat<store, ST_W, GPR, i32>, Requires<[IsLA32]>; | defm : StPat<store, ST_W, GPR, i32>, Requires<[IsLA32]>; | ||||
let Predicates = [IsLA64] in { | let Predicates = [IsLA64] in { | ||||
defm : StPat<truncstorei32, ST_W, GPR, i64>; | defm : StPat<truncstorei32, ST_W, GPR, i64>; | ||||
defm : StPat<store, ST_D, GPR, i64>; | defm : StPat<store, ST_D, GPR, i64>; | ||||
} // Predicates = [IsLA64] | } // Predicates = [IsLA64] | ||||
/// Atomic loads and stores | |||||
def : Pat<(atomic_fence timm, timm), (DBAR 0)>; | |||||
defm : LdPat<atomic_load_8, LD_B>; | |||||
defm : LdPat<atomic_load_16, LD_H>; | |||||
defm : LdPat<atomic_load_32, LD_W>; | |||||
defm : StPat<atomic_store_8, ST_B, GPR, GRLenVT>; | |||||
defm : StPat<atomic_store_16, ST_H, GPR, GRLenVT>; | |||||
defm : StPat<atomic_store_32, ST_W, GPR, i32>, Requires<[IsLA32]>; | |||||
let Predicates = [IsLA64] in { | |||||
defm : LdPat<atomic_load_64, LD_D>; | |||||
defm : StPat<atomic_store_32, ST_W, GPR, i64>; | |||||
defm : StPat<atomic_store_64, ST_D, GPR, i64>; | |||||
} // Predicates = [IsLA64] | |||||
/// Other pseudo-instructions | /// Other pseudo-instructions | ||||
// Pessimistically assume the stack pointer will be clobbered | // Pessimistically assume the stack pointer will be clobbered | ||||
let Defs = [R3], Uses = [R3] in { | let Defs = [R3], Uses = [R3] in { | ||||
def ADJCALLSTACKDOWN : Pseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), | def ADJCALLSTACKDOWN : Pseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), | ||||
[(callseq_start timm:$amt1, timm:$amt2)]>; | [(callseq_start timm:$amt1, timm:$amt2)]>; | ||||
def ADJCALLSTACKUP : Pseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), | def ADJCALLSTACKUP : Pseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), | ||||
[(callseq_end timm:$amt1, timm:$amt2)]>; | [(callseq_end timm:$amt1, timm:$amt2)]>; | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |