@@ -127,6 +127,24 @@ M68kSubtarget &M68kSubtarget::initializeSubtargetDependencies(
127127// ---------------------+------------+------------+------------+-------------
128128// data global big* | pc-rel | @GOTPCREL | absolute | @GOTPCREL
129129// ---------------------+------------+------------+------------+-------------
130+ // | Large |
131+ // +-------------------------+
132+ // | Static | PIC |
133+ // ---------------------+------------+------------+
134+ // branch | pc-rel | pc-rel |
135+ // ---------------------+------------+------------+
136+ // call global | @PLT | @PLT |
137+ // ---------------------+------------+------------+
138+ // call internal | pc-rel | pc-rel |
139+ // ---------------------+------------+------------+
140+ // data local | absolute | @GOTOFF |
141+ // ---------------------+------------+------------+
142+ // data local big* | absolute | @GOTOFF |
143+ // ---------------------+------------+------------+
144+ // data global | absolute | @GOTPCREL |
145+ // ---------------------+------------+------------+
146+ // data global big* | absolute | @GOTPCREL |
147+ // ---------------------+------------+------------+
130148//
131149// * Big data potentially cannot be reached within 16 bit offset and requires
132150// special handling for old(x00 and x10) CPUs. Normally these symbols go into
@@ -171,6 +189,13 @@ M68kSubtarget::classifyLocalReference(const GlobalValue *GV) const {
171189 return M68kII::MO_ABSOLUTE_ADDRESS;
172190 }
173191 }
192+ case CodeModel::Large: {
193+ if (isPositionIndependent ()) {
194+ return M68kII::MO_GOTOFF;
195+ } else {
196+ return M68kII::MO_ABSOLUTE_ADDRESS;
197+ }
198+ }
174199 }
175200}
176201
@@ -212,6 +237,12 @@ unsigned char M68kSubtarget::classifyGlobalReference(const GlobalValue *GV,
212237
213238 return M68kII::MO_ABSOLUTE_ADDRESS;
214239 }
240+ case CodeModel::Large: {
241+ if (isPositionIndependent ())
242+ return M68kII::MO_GOTPCREL;
243+
244+ return M68kII::MO_ABSOLUTE_ADDRESS;
245+ }
215246 }
216247}
217248
0 commit comments