Browse Source

* fixed the defines of OS_PAIR and OS_SPAIR for cpus with 16-bit or 8-bit ALU

git-svn-id: branches/i8086@23797 -
nickysn 12 years ago
parent
commit
8d6017348a
1 changed files with 13 additions and 3 deletions
  1. 13 3
      compiler/cgbase.pas

+ 13 - 3
compiler/cgbase.pas

@@ -294,17 +294,27 @@ interface
        tvarregable2tcgloc : array[tvarregable] of tcgloc = (LOC_VOID,
        tvarregable2tcgloc : array[tvarregable] of tcgloc = (LOC_VOID,
           LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER,LOC_CREGISTER);
           LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER,LOC_CREGISTER);
 
 
-{$ifdef cpu64bitalu}
+{$if defined(cpu64bitalu)}
        { operand size describing an unsigned value in a pair of int registers }
        { operand size describing an unsigned value in a pair of int registers }
        OS_PAIR = OS_128;
        OS_PAIR = OS_128;
        { operand size describing an signed value in a pair of int registers }
        { operand size describing an signed value in a pair of int registers }
        OS_SPAIR = OS_S128;
        OS_SPAIR = OS_S128;
-{$else cpu64bitalu}
+{$elseif defined(cpu32bitalu)}
        { operand size describing an unsigned value in a pair of int registers }
        { operand size describing an unsigned value in a pair of int registers }
        OS_PAIR = OS_64;
        OS_PAIR = OS_64;
        { operand size describing an signed value in a pair of int registers }
        { operand size describing an signed value in a pair of int registers }
        OS_SPAIR = OS_S64;
        OS_SPAIR = OS_S64;
-{$endif cpu64bitalu}
+{$elseif defined(cpu16bitalu)}
+       { operand size describing an unsigned value in a pair of int registers }
+       OS_PAIR = OS_32;
+       { operand size describing an signed value in a pair of int registers }
+       OS_SPAIR = OS_S32;
+{$elseif defined(cpu8bitalu)}
+       { operand size describing an unsigned value in a pair of int registers }
+       OS_PAIR = OS_16;
+       { operand size describing an signed value in a pair of int registers }
+       OS_SPAIR = OS_S16;
+{$endif}
 
 
        { Table to convert tcgsize variables to the correspondending
        { Table to convert tcgsize variables to the correspondending
          unsigned types }
          unsigned types }