Ver Fonte

+ also add x86-64 as cpu type (gcc compatibility)

florian há 1 ano atrás
pai
commit
ac6dc582be
2 ficheiros alterados com 5 adições e 0 exclusões
  1. 1 0
      compiler/x86/agx86nsm.pas
  2. 4 0
      compiler/x86_64/cpuinfo.pas

+ 1 - 0
compiler/x86/agx86nsm.pas

@@ -108,6 +108,7 @@ interface
 {$if defined(x86_64)}
         'ia64',        // cpu_none
         'x64',         // cpu_athlon64
+        'x64',         // cpu_x86_64
         'x64',         // cpu_x86_64_v1
         'ia64',        // cpu_core_i
         'ia64',        // cpu_x86_64_v2

+ 4 - 0
compiler/x86_64/cpuinfo.pas

@@ -45,6 +45,7 @@ Type
 
    tcputype =
       (cpu_none,
+       cpu_x86_64,
        cpu_x86_64_v1,
        cpu_athlon64,
        cpu_x86_64_v2,
@@ -132,6 +133,7 @@ Const
 
    cputypestr : array[tcputype] of string[16] = ('',
      'ATHLON64',
+     'X86-64',
      'X86-64-V1',
      'COREI',
      'X86-64-V2',
@@ -265,6 +267,7 @@ type
    cpu_capabilities : array[tcputype] of set of tcpuflags = (
      { cpu_none      } [],
      { Athlon64      } cpu_x86_64_v1_flags,
+     { cpu_x86_64    } cpu_x86_64_v1_flags,
      { cpu_x86_64_v1 } cpu_x86_64_v1_flags,
      { cpu_core_i    } cpu_x86_64_v1_flags+[CPUX86_HAS_POPCNT],
      { cpu_x86_64_v2 } cpu_x86_64_v2_flags,
@@ -310,6 +313,7 @@ type
    cpu_optimization_hints : array[TCPUType] of set of TCPUOptimizeFlags = (
       { cpu_none      } [],
       { cpu_Athlon64  } [CPUX86_HINT_FAST_BT_REG_IMM,CPUX86_HINT_FAST_BTX_REG_IMM,CPUX86_HINT_FAST_XCHG,CPUX86_HINT_FAST_3COMP_ADDR],
+      { cpu_x86_64    } [CPUX86_HINT_FAST_BT_REG_IMM,CPUX86_HINT_FAST_BTX_REG_IMM,CPUX86_HINT_FAST_XCHG,CPUX86_HINT_FAST_3COMP_ADDR],
       { cpu_x86_64_v1 } [CPUX86_HINT_FAST_BT_REG_IMM,CPUX86_HINT_FAST_BTX_REG_IMM,CPUX86_HINT_FAST_XCHG,CPUX86_HINT_FAST_3COMP_ADDR],
       { cpu_core_i    } [CPUX86_HINT_FAST_BT_REG_IMM,CPUX86_HINT_FAST_BTX_REG_IMM,CPUX86_HINT_FAST_XCHG,CPUX86_HINT_FAST_3COMP_ADDR],
       { cpu_x86_64_v2 } [CPUX86_HINT_FAST_BT_REG_IMM,CPUX86_HINT_FAST_BTX_REG_IMM,CPUX86_HINT_FAST_XCHG,CPUX86_HINT_FAST_3COMP_ADDR],