瀏覽代碼

* fix assembling with masm according to #25858

git-svn-id: trunk@29635 -
florian 10 年之前
父節點
當前提交
632f43c490
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 1 1
      compiler/ngenutil.pas
  2. 5 0
      compiler/x86/agx86int.pas

+ 1 - 1
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;

+ 5 - 0
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;