Skip to content

Commit 9b553d7

Browse files
committed
[Xtensa] Add support of the mcmodel option.
For large mcmodel always emit contsant pool just before code.
1 parent d8fe3d0 commit 9b553d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/Xtensa/XtensaSubtarget.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ static cl::opt<bool> TextSectionLiterals("mtext-section-literals",
2929

3030
bool XtensaSubtarget::useTextSectionLiterals() const
3131
{
32+
// If code model is large then always place literals in
33+
// test section.
34+
if (TLInfo.getTargetMachine().getCodeModel() == CodeModel::Large)
35+
return true;
36+
3237
return TextSectionLiterals;
3338
}
3439

0 commit comments

Comments
 (0)