[PATCH] D91420: [PowerPC][PCRelative] Add new seudo instructions for PCRel TLS to fix R2 clobber issue
Baptiste Saleil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 08:45:43 PST 2020
bsaleil added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1322
+ Defs = [X0,X2,X4,X5,X6,X7,X8,X9,X10,X11,X12,LR8,CTR8,CR0,CR1,CR5,CR6,CR7] in
+def GETtlsldADDRPCREL : PPCEmitTimePseudo<(outs g8rc:$rD), (ins g8rc:$reg, tlsgd:$sym),
+ "#GETtlsldADDRPCREL",
----------------
Some of these pseudo-instruction definitions are the same. Could you refactor this code to use a common definition so we can define the pseudo-instructions with something like:
```
let Defs = [X0,X2,X4,X5,X6,X7,X8,X9,X10,X11,X12,LR8,CTR8,CR0,CR1,CR5,CR6,CR7], Size = 8 in
def GETtlsADDRPCREL: GETtlsADDRPseudo<"#GETtlsADDRPCREL">
let Defs = [X0,X4,X5,X6,X7,X8,X9,X10,X11,X12,LR8,CTR8,CR0,CR1,CR5,CR6,CR7] in
def GETtlsldADDR : GETtlsADDRPseudo<"#GETtlsldADDR">;
let Defs = [X0,X2,X4,X5,X6,X7,X8,X9,X10,X11,X12,LR8,CTR8,CR0,CR1,CR5,CR6,CR7] in
def GETtlsldADDRPCRel : GETtlsADDRPseudo<"#GETtlsldADDRPCREL">;
...```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91420/new/
https://reviews.llvm.org/D91420
More information about the llvm-commits
mailing list