Browse Source

* arm thumb knows only positively growing stacks

git-svn-id: trunk@24000 -
florian 12 years ago
parent
commit
b231c049c9
1 changed files with 7 additions and 0 deletions
  1. 7 0
      compiler/psub.pas

+ 7 - 0
compiler/psub.pas

@@ -116,6 +116,9 @@ implementation
        optcse,optloop
        optcse,optloop
 {$if defined(arm) or defined(avr) or defined(fpc_compiler_has_fixup_jmps)}
 {$if defined(arm) or defined(avr) or defined(fpc_compiler_has_fixup_jmps)}
        ,aasmcpu
        ,aasmcpu
+{$endif arm}
+{$if defined(arm)}
+       ,cpuinfo
 {$endif arm}
 {$endif arm}
        {$ifndef NOOPT}
        {$ifndef NOOPT}
          {$ifdef i386}
          {$ifdef i386}
@@ -999,6 +1002,10 @@ implementation
         framepointer:=NR_STACK_POINTER_REG;
         framepointer:=NR_STACK_POINTER_REG;
         tg.direction:=1;
         tg.direction:=1;
 {$endif MIPS}
 {$endif MIPS}
+{$ifdef ARM}
+        if current_settings.cputype in cpu_thumb then
+          tg.direction:=1;
+{$endif ARM}
         { set the start offset to the start of the temp area in the stack }
         { set the start offset to the start of the temp area in the stack }
         set_first_temp_offset;
         set_first_temp_offset;
       end;
       end;