소스 검색

Merged revisions 1274-1276,1279 via svnmerge from
http://[email protected]/svn/fpc/trunk

r1274 (florian)
* procedures containing nested procedures accessing their data can't be inlined, fixes ie in tcalfun8.pp


r1275 (florian)
* first ie of tb0468 fixed


r1276 (florian)
* hopefully final fix for the hinstance problem of libraries


r1279 (karoly)
* added SysResetFPU, which is required for MorphOS

git-svn-id: branches/fixes_2_0@1287 -

peter 20 년 전
부모
커밋
2bbc1dacab
4개의 변경된 파일11개의 추가작업 그리고 13개의 파일을 삭제
  1. 4 8
      compiler/ncgld.pas
  2. 2 0
      compiler/nld.pas
  3. 4 4
      rtl/win32/system.pp
  4. 1 1
      rtl/win32/wdllprt0.as

+ 4 - 8
compiler/ncgld.pas

@@ -62,7 +62,7 @@ implementation
       cpubase,parabase,
       tgobj,ncgutil,
       cgutils,cgobj,
-      ncgbas;
+      ncgbas,ncgflw;
 
 {*****************************************************************************
                              SecondLoad
@@ -359,14 +359,10 @@ implementation
                     end;
                end;
             typedconstsym :
-               begin
-                  location.reference.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
-               end;
+              location.reference.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
             labelsym :
-               begin
-                  location.reference.symbol:=objectlibrary.newasmsymbol(tlabelsym(symtableentry).mangledname,AB_EXTERNAL,AT_FUNCTION);
-               end;
-            else internalerror(4);
+              location.reference.symbol:=tcglabelnode((tlabelsym(symtableentry).code)).getasmlabel;
+            else internalerror(200510032);
          end;
       end;
 

+ 2 - 0
compiler/nld.pas

@@ -277,6 +277,8 @@ implementation
                        if assigned(left) then
                          internalerror(200309289);
                        left:=cloadparentfpnode.create(tprocdef(symtable.defowner));
+                       { we can't inline the referenced parent procedure }
+                       exclude(tprocdef(symtable.defowner).procoptions,po_inline);
                        { reference in nested procedures, variable needs to be in memory }
                        make_not_regable(self);
                      end;

+ 4 - 4
rtl/win32/system.pp

@@ -108,7 +108,7 @@ const
 implementation
 
 var
-  SysInstance : Longint;
+  SysInstance : Longint;public;
 
 {$ifdef i386}
 {$define HAS_RESOURCES}
@@ -959,7 +959,7 @@ procedure Win32Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
     setlength(dest, destlen-1);
     WideCharToMultiByte(CP_ACP, 0, source, len+1, @dest[1], destlen, nil, nil);
   end;
-  
+
 procedure Win32Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
   var
     destlen: SizeInt;
@@ -969,8 +969,8 @@ procedure Win32Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
     setlength(dest, destlen-1);
     MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, source, len+1, @dest[1], destlen);
   end;
-  
-  
+
+
 function Win32WideUpper(const s : WideString) : WideString;
   begin
     result:=s;

+ 1 - 1
rtl/win32/wdllprt0.as

@@ -15,7 +15,7 @@ _WinMainCRTStartup:
      pushl    %esi
      pushl    %edi
      movl     8(%ebp),%edi
-     movl     %edi,U_SYSTEM_SYSINSTANCE
+     movl     %edi,SysInstance
      movl     12(%ebp),%edi
      movl     %edi,U_SYSTEM_DLLREASON
      movl     16(%ebp),%edi