Browse Source

* set expectloc correctly for enumdef comparisons on small CPUs

git-svn-id: branches/z80@45040 -
nickysn 5 năm trước cách đây
mục cha
commit
4ae5b81bff
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      compiler/nadd.pas

+ 4 - 1
compiler/nadd.pas

@@ -4201,7 +4201,10 @@ implementation
 
          else if (ld.typ=enumdef) then
            begin
-              expectloc:=LOC_FLAGS;
+              if tenumdef(ld).size>sizeof(aint) then
+                expectloc:=LOC_JUMP
+              else
+                expectloc:=LOC_FLAGS;
            end
 
 {$ifdef SUPPORT_MMX}