Explorar o código

* Outgoing parameters on stack do not need to inhibit stack frame optimization on targets with fixed stack, because there they do not modify stack pointer in the middle of routine.

git-svn-id: trunk@25488 -
sergei %!s(int64=12) %!d(string=hai) anos
pai
achega
1bd43f0ea1
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      compiler/psub.pas

+ 3 - 2
compiler/psub.pas

@@ -972,7 +972,7 @@ implementation
                 exception below)
                 exception below)
               - no exceptions are used
               - no exceptions are used
               - no pushes are used/esp modifications, could be:
               - no pushes are used/esp modifications, could be:
-                * outgoing parameters on the stack
+                * outgoing parameters on the stack on non-fixed stack target
                 * incoming parameters on the stack
                 * incoming parameters on the stack
                 * open arrays
                 * open arrays
               - no inline assembler
               - no inline assembler
@@ -997,8 +997,9 @@ implementation
                 not(cs_generate_stackframes in current_settings.localswitches) and
                 not(cs_generate_stackframes in current_settings.localswitches) and
                 not(cs_profile in current_settings.moduleswitches) and
                 not(cs_profile in current_settings.moduleswitches) and
                 not(po_assembler in procdef.procoptions) and
                 not(po_assembler in procdef.procoptions) and
+                not ((pi_has_stackparameter in flags) and (not paramanager.use_fixed_stack)) and
                 ((flags*([pi_has_assembler_block,pi_is_assembler,
                 ((flags*([pi_has_assembler_block,pi_is_assembler,
-                        pi_has_stackparameter,pi_needs_stackframe]+
+                        pi_needs_stackframe]+
                         exception_flags[(target_info.cpu=cpu_i386)
                         exception_flags[(target_info.cpu=cpu_i386)
 {$ifndef DISABLE_WIN64_SEH}
 {$ifndef DISABLE_WIN64_SEH}
                         or (target_info.system=system_x86_64_win64)
                         or (target_info.system=system_x86_64_win64)