From 632f43c4904564cbb8761b8f6bd737222096acc3 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 5 Feb 2015 21:22:39 +0000 Subject: [PATCH] * fix assembling with masm according to #25858 git-svn-id: trunk@29635 - --- compiler/ngenutil.pas | 2 +- compiler/x86/agx86int.pas | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/ngenutil.pas b/compiler/ngenutil.pas index 6b5a4169fd..fdcc154432 100644 --- a/compiler/ngenutil.pas +++ b/compiler/ngenutil.pas @@ -981,7 +981,7 @@ implementation { Valgrind usage } maybe_new_object_file(current_asmdata.asmlists[al_globals]); - new_section(current_asmdata.asmlists[al_globals],sec_data,'__fpc_valgrind',sizeof(boolean)); + new_section(current_asmdata.asmlists[al_globals],sec_data,'__fpc_valgrind',sizeof(pint)); current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('__fpc_valgrind',AT_DATA,sizeof(boolean))); current_asmdata.asmlists[al_globals].concat(Tai_const.create_8bit(byte(cs_gdb_valgrind in current_settings.globalswitches))); end; diff --git a/compiler/x86/agx86int.pas b/compiler/x86/agx86int.pas index 7fa866f232..6bf3a64dc3 100644 --- a/compiler/x86/agx86int.pas +++ b/compiler/x86/agx86int.pas @@ -231,6 +231,7 @@ implementation 1: result:='BYTE'; 2: result:='WORD'; 4: result:='DWORD'; + 0, 16: result:='PARA'; 256: result:='PAGE'; else @@ -821,8 +822,10 @@ implementation hp:=tai(hp.next); end; AsmWriteLn(#9'.386p'); +{$ifdef i8086} AsmWriteLn('DGROUP'#9'GROUP'#9'_BSS,_DATA'); AsmWriteLn(#9'ASSUME'#9'CS:_CODE,ES:DGROUP,DS:DGROUP,SS:DGROUP'); +{$endif i8086} { I was told that this isn't necesarry because } { the labels generated by FPC are unique (FK) } { AsmWriteLn(#9'LOCALS '+target_asm.labelprefix); } @@ -925,8 +928,10 @@ implementation begin AsmWriteLn(#9'LOCALS '+target_asm.labelprefix); end; +{$ifdef i8086} AsmWriteLn('DGROUP'#9'GROUP'#9'_BSS,_DATA'); AsmWriteLn(#9'ASSUME'#9'CS:_CODE,ES:DGROUP,DS:DGROUP,SS:DGROUP'); +{$endif i8086} AsmLn; end;