From fa3ee68004bf8ec244b4633c95bece6bd2a42a96 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 20 Mar 2018 21:55:01 +0000 Subject: [PATCH] =?UTF-8?q?o=20patch=20by=20D=C3=A1vid=20Pethes:=20Fixes?= =?UTF-8?q?=20for=20compilation=20with=20nasm=202.10=20and=20higher=20on?= =?UTF-8?q?=20Win64:=20=20=20*=20disable=20generation=20of=20RVA=20and=20S?= =?UTF-8?q?ECREL32=20symbols=20(according=20to=20comment=20in=20taiconst?= =?UTF-8?q?=5Ftype,=20they=20are=20win32=20only)=20=20=20*=20use=20lowerca?= =?UTF-8?q?se=20cpu=20names=20(it=20was=20changed=20from=20case-insensitiv?= =?UTF-8?q?e=20names=20sometime=20after=202.10)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: trunk@38579 - --- compiler/x86/agx86nsm.pas | 51 ++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/compiler/x86/agx86nsm.pas b/compiler/x86/agx86nsm.pas index b1aba1d7ed..8343eb37e0 100644 --- a/compiler/x86/agx86nsm.pas +++ b/compiler/x86/agx86nsm.pas @@ -82,37 +82,38 @@ interface {$i r8086nasm.inc} {$endif} ); + { nasm 2.13 expects lowercase cpu names } nasm_cpu_name : array[tcputype] of string = ( {$if defined(x86_64)} - 'IA64', // cpu_none, - 'X64', // cpu_athlon64, - 'IA64', // cpu_core_i, - 'IA64', // cpu_core_avx, - 'IA64' // cpu_core_avx2 + 'ia64', // cpu_none, + 'x64', // cpu_athlon64, + 'ia64', // cpu_core_i, + 'ia64', // cpu_core_avx, + 'ia64' // cpu_core_avx2 {$elseif defined(i386)} - 'IA64', // cpu_none, + 'ia64', // cpu_none, '386', // cpu_386, '486', // cpu_486, - 'PENTIUM', // cpu_Pentium, - 'P2', // cpu_Pentium2, - 'P3', // cpu_Pentium3, - 'P4', // cpu_Pentium4, - 'P4', // cpu_PentiumM, - 'IA64', // cpu_core_i, - 'IA64', // cpu_core_avx, - 'IA64' // cpu_core_avx2 + 'pentium', // cpu_Pentium, + 'p2', // cpu_Pentium2, + 'p3', // cpu_Pentium3, + 'p4', // cpu_Pentium4, + 'p4', // cpu_PentiumM, + 'ia64', // cpu_core_i, + 'ia64', // cpu_core_avx, + 'ia64' // cpu_core_avx2 {$elseif defined(i8086)} - 'IA64', // cpu_none + 'ia64', // cpu_none '8086', // cpu_8086 '186', // cpu_186 '286', // cpu_286 '386', // cpu_386 '486', // cpu_486 - 'PENTIUM', // cpu_Pentium - 'P2', // cpu_Pentium2 - 'P3', // cpu_Pentium3 - 'P4', // cpu_Pentium4 - 'P4' // cpu_PentiumM + 'pentium', // cpu_Pentium + 'p2', // cpu_Pentium2 + 'p3', // cpu_Pentium3 + 'p4', // cpu_Pentium4 + 'p4' // cpu_PentiumM {$endif} ); @@ -782,12 +783,18 @@ interface aitconst_fardataseg: writer.AsmWriteLn(#9'DW'#9+current_module.modulename^+'_DATA'); {$endif i8086} +{$ifdef x86_64} + aitconst_rva_symbol, + aitconst_secrel32_symbol: ; +{$endif x86_64} +{$ifdef i386} + aitconst_rva_symbol, + aitconst_secrel32_symbol, +{$endif i386} aitconst_64bit, aitconst_32bit, aitconst_16bit, aitconst_8bit, - aitconst_rva_symbol, - aitconst_secrel32_symbol, aitconst_16bit_unaligned, aitconst_32bit_unaligned, aitconst_64bit_unaligned: