diff --git a/compiler/mips/cpugas.pas b/compiler/mips/cpugas.pas index 3396028bf2..b295f3229b 100644 --- a/compiler/mips/cpugas.pas +++ b/compiler/mips/cpugas.pas @@ -35,6 +35,7 @@ unit cpugas; constructor CreateWithWriter(info: pasminfo; wr: TExternalAssemblerOutputFile; freewriter, smart: boolean); override; {# Constructs the command line for calling the assembler } function MakeCmdLine: TCmdStr; override; + procedure WriteExtraHeader; override; end; TMIPSInstrWriter = class(TCPUInstrWriter) @@ -88,6 +89,15 @@ unit cpugas; // Replace(result,'$ARCH','-march=pic32mx -mtune=pic32mx'); end; + procedure TMIPSGNUAssembler.WriteExtraHeader; + var + i : longint; + begin + if not (cs_asm_pre_binutils_2_25 in current_settings.globalswitches) then + writer.AsmWriteln(#9'.module nomips16'); + end; + + {****************************************************************************} { Helper routines for Instruction Writer } {****************************************************************************}