From 4202343033bca31dda930e60a57a1398eba2b11e Mon Sep 17 00:00:00 2001 From: sergei Date: Wed, 4 Jun 2014 00:26:44 +0000 Subject: [PATCH] * MIPS: emit ".set nomips16" and ".set noreorder" directives for procedures declared as "assembler nostackframe", as it is done for regular procedures. Handwritten assembler routines typically utilize delay slots, and it is desirable that assembler does not mess it up. git-svn-id: trunk@27847 - --- compiler/mips/cgcpu.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/mips/cgcpu.pas b/compiler/mips/cgcpu.pas index 8b86afcfbd..8073fc6e25 100644 --- a/compiler/mips/cgcpu.pas +++ b/compiler/mips/cgcpu.pas @@ -1199,7 +1199,11 @@ begin a_reg_alloc(list,NR_STACK_POINTER_REG); if nostackframe then - exit; + begin + list.concat(taicpu.op_none(A_P_SET_NOMIPS16)); + list.concat(taicpu.op_none(A_P_SET_NOREORDER)); + exit; + end; if (pi_needs_stackframe in current_procinfo.flags) then a_reg_alloc(list,NR_FRAME_POINTER_REG);