Browse Source

* set expectloc correctly for enumdef comparisons on small CPUs

git-svn-id: branches/z80@45040 -
nickysn 5 years ago
parent
commit
4ae5b81bff
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/nadd.pas

+ 4 - 1
compiler/nadd.pas

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