diff options
Diffstat (limited to 'gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp b/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp index 4d554583dc7..1ce8f07092b 100644 --- a/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp +++ b/gnu/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp @@ -28,12 +28,19 @@ MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple) { PointerSize = CalleeSaveStackSlotSize = 8; } + // FIXME: This condition isn't quite right but it's the best we can do until + // this object can identify the ABI. It will misbehave when using O32 + // on a mips64*-* triple. + if ((TheTriple.getArch() == Triple::mipsel) || + (TheTriple.getArch() == Triple::mips)) { + PrivateGlobalPrefix = "$"; + PrivateLabelPrefix = "$"; + } + AlignmentIsInBytes = false; Data16bitsDirective = "\t.2byte\t"; Data32bitsDirective = "\t.4byte\t"; Data64bitsDirective = "\t.8byte\t"; - PrivateGlobalPrefix = "$"; - PrivateLabelPrefix = "$"; CommentString = "#"; ZeroDirective = "\t.space\t"; GPRel32Directive = "\t.gpword\t"; @@ -42,4 +49,9 @@ MipsMCAsmInfo::MipsMCAsmInfo(const Triple &TheTriple) { SupportsDebugInformation = true; ExceptionsType = ExceptionHandling::DwarfCFI; DwarfRegNumForCFI = true; + + // Enable IAS by default for O32. + if (TheTriple.getArch() == Triple::mips || + TheTriple.getArch() == Triple::mipsel) + UseIntegratedAssembler = true; } |
