소스 검색

+ define FPC_ABI_WIN64 for systems that use the Win64 ABI (currently it's only x86_64-win64, but there are also x86_64-nativent and x86_64-uefi as potential targets)

Sven/Sarah Barth 3 일 전
부모
커밋
436c3049b9
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      compiler/options.pas
  2. 3 0
      compiler/systems.pas

+ 4 - 0
compiler/options.pas

@@ -4563,6 +4563,10 @@ procedure read_arguments(cmd:TCmdStr);
         undef_system_macro('FPC_ABI_'+abiinfo[abi].name);
       def_system_macro('FPC_ABI_'+abiinfo[target_info.abi].name);
 
+      { this is not a switchable ABI in the sense of tabi, but it's an ABI
+        nevertheless }
+      if target_info.system in systems_win64_abi then
+        def_system_macro('FPC_ABI_WIN64');
 
       { Define FPC_ABI_EABI in addition to FPC_ABI_EABIHF on EABI VFP hardfloat
         systems since most code needs to behave the same on both}

+ 3 - 0
compiler/systems.pas

@@ -472,6 +472,9 @@ interface
 
        systems_support_uf2 = [system_arm_embedded,system_avr_embedded,system_mipsel_embedded,system_xtensa_embedded];
 
+       { x86_64 systems that use the Win64 ABI instead of the SysV one }
+       systems_win64_abi = [system_x86_64_win64];
+
        { all internal COFF writers }
        asms_int_coff = [as_arm_pecoffwince,as_x86_64_pecoff,as_i386_pecoffwince,
                         as_i386_pecoffwdosx,as_i386_pecoff,as_i386_coff];