Fix default CPU for assembler blocks (init_settings.asmcputype) to be the same as init_settings.cputype

git-svn-id: trunk@33612 -
This commit is contained in:
pierre 2016-05-02 11:57:22 +00:00
parent eabcabe329
commit e1814305bd
2 changed files with 12 additions and 1 deletions

View File

@ -493,7 +493,11 @@ interface
{$ifdef i8086}
cputype : cpu_8086;
optimizecputype : cpu_8086;
asmcputype : cpu_8086;
{ Use cpu_none by default,
because using cpu_8086 by default means
that we reject any instruction above bare 8086 instruction set
for all assembler code PM }
asmcputype : cpu_none;
fputype : fpu_x87;
{$endif i8086}
{$endif not GENERIC_CPU}

View File

@ -3913,6 +3913,13 @@ begin
{ now we can define cpu and fpu type }
def_system_macro('CPU'+Cputypestr[init_settings.cputype]);
{ Use init_settings cpu type for asm cpu type,
if asmcputype is cpu_none,
at least as long as there is no explicit
option to set it on command line PM }
if init_settings.asmcputype = cpu_none then
init_settings.asmcputype:=init_settings.cputype;
def_system_macro('FPU'+fputypestr[init_settings.fputype]);
{$ifdef llvm}