Bläddra i källkod

Merged revisions 3337,3339 via svnmerge from
http://[email protected]/svn/fpc/trunk

........
r3337 | florian | 2006-04-26 20:12:22 +0200 (Wed, 26 Apr 2006) | 2 lines

* fixed internal error with int64 comparisations

........
r3339 | florian | 2006-04-26 20:46:38 +0200 (Wed, 26 Apr 2006) | 2 lines

* avoid crash when multiple references to one text symbol entry are used

........

git-svn-id: branches/fixes_2_0@3821 -

peter 19 år sedan
förälder
incheckning
dc06295b9a
2 ändrade filer med 19 tillägg och 1 borttagningar
  1. 3 1
      compiler/arm/aasmcpu.pas
  2. 16 0
      compiler/arm/narmadd.pas

+ 3 - 1
compiler/arm/aasmcpu.pas

@@ -469,7 +469,9 @@ implementation
                       begin
                         { pc relative symbol? }
                         curdatatai:=tai(taicpu(curtai).oper[curop]^.ref^.symboldata);
-                        if assigned(curdatatai) then
+                        if assigned(curdatatai) and
+                          { move only if we're at the first reference of a label }
+                          (taicpu(curtai).oper[curop]^.ref^.offset=0) then
                           begin
                             { if yes, insert till next symbol }
                             repeat

+ 16 - 0
compiler/arm/narmadd.pas

@@ -33,6 +33,7 @@ interface
        private
           function  GetResFlags(unsigned:Boolean):TResFlags;
        protected
+          function pass_1 : tnode;override;
           procedure second_addfloat;override;
           procedure second_cmpfloat;override;
           procedure second_cmpordinal;override;
@@ -300,6 +301,21 @@ interface
       end;
 
 
+    function tarmaddnode.pass_1 : tnode;
+      begin
+        result:=inherited pass_1;
+
+        { handling boolean expressions }
+        if not(assigned(result)) and
+           (
+             not(is_boolean(left.resulttype.def)) or
+             not(is_boolean(right.resulttype.def)) or
+             is_dynamic_array(left.resulttype.def)
+           ) then
+          expectloc:=LOC_FLAGS;
+      end;
+
+
     procedure tarmaddnode.second_cmpordinal;
       var
         unsigned : boolean;