File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
llvm/lib/Target/LoongArch Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ bool LoongArchPreRAExpandPseudo::expandPcalau12iInstPair(
131
131
bool LoongArchPreRAExpandPseudo::expandLoadAddressPcrel (
132
132
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
133
133
MachineBasicBlock::iterator &NextMBBI) {
134
+ // Code Sequence:
135
+ // pcalau12i $rd, %pc_hi20(sym)
136
+ // addi.w/d $rd, $rd, %pc_lo12(sym)
134
137
MachineFunction *MF = MBB.getParent ();
135
138
const auto &STI = MF->getSubtarget <LoongArchSubtarget>();
136
139
unsigned SecondOpcode = STI.is64Bit () ? LoongArch::ADDI_D : LoongArch::ADDI_W;
@@ -141,6 +144,9 @@ bool LoongArchPreRAExpandPseudo::expandLoadAddressPcrel(
141
144
bool LoongArchPreRAExpandPseudo::expandLoadAddressGot (
142
145
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
143
146
MachineBasicBlock::iterator &NextMBBI) {
147
+ // Code Sequence:
148
+ // pcalau12i $rd, %got_pc_hi20(sym)
149
+ // ld.w/d $rd, $rd, %got_pc_lo12(sym)
144
150
MachineFunction *MF = MBB.getParent ();
145
151
const auto &STI = MF->getSubtarget <LoongArchSubtarget>();
146
152
unsigned SecondOpcode = STI.is64Bit () ? LoongArch::LD_D : LoongArch::LD_W;
You can’t perform that action at this time.
0 commit comments