Răsfoiți Sursa

* merged netbsd, fpu-overflow from fixes branch

peter 24 ani în urmă
părinte
comite
45dab81414

+ 23 - 6
compiler/assemble.pas

@@ -216,8 +216,7 @@ Implementation
         DoPipe:=(cs_asm_pipe in aktglobalswitches) and
         DoPipe:=(cs_asm_pipe in aktglobalswitches) and
                 not(cs_asm_leave in aktglobalswitches)
                 not(cs_asm_leave in aktglobalswitches)
 {$ifdef i386}
 {$ifdef i386}
-                and ((aktoutputformat=as_i386_as) or
-                     (aktoutputformat=as_i386_asbsd));
+                and ((aktoutputformat=as_i386_as));
 {$endif i386}
 {$endif i386}
 {$ifdef m68k}
 {$ifdef m68k}
                 and ((aktoutputformat=as_m68k_as) or
                 and ((aktoutputformat=as_m68k_as) or
@@ -286,7 +285,14 @@ Implementation
         UtilExe  : string;
         UtilExe  : string;
       begin
       begin
         asfound:=false;
         asfound:=false;
-        UtilExe:=AddExtension(target_asm.asmbin,source_info.exeext);
+        if cs_link_on_target in aktglobalswitches then
+         begin
+           { If linking on target, don't add any path PM }
+           FindAssembler:=AddExtension(target_asm.asmbin,target_info.exeext);
+           exit;
+         end
+        else
+         UtilExe:=AddExtension(target_asm.asmbin,source_info.exeext);
         if lastas<>ord(target_asm.id) then
         if lastas<>ord(target_asm.id) then
          begin
          begin
            lastas:=ord(target_asm.id);
            lastas:=ord(target_asm.id);
@@ -370,8 +376,16 @@ Implementation
            Message1(exec_i_assembling,name);
            Message1(exec_i_assembling,name);
          end;
          end;
         s:=target_asm.asmcmd;
         s:=target_asm.asmcmd;
-        Replace(s,'$ASM',AsmFile);
-        Replace(s,'$OBJ',ObjFile);
+        if (cs_link_on_target in aktglobalswitches) then
+         begin
+           Replace(s,'$ASM',ScriptFixFileName(AsmFile));
+           Replace(s,'$OBJ',ScriptFixFileName(ObjFile));
+         end
+        else
+         begin
+           Replace(s,'$ASM',AsmFile);
+           Replace(s,'$OBJ',ObjFile);
+         end;
         if CallAssembler(FindAssembler,s) then
         if CallAssembler(FindAssembler,s) then
          RemoveAsm
          RemoveAsm
         else
         else
@@ -1536,7 +1550,10 @@ Implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.26  2001-08-30 20:57:09  peter
+  Revision 1.27  2001-09-17 21:29:10  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.26  2001/08/30 20:57:09  peter
     * asbsd merged
     * asbsd merged
 
 
   Revision 1.25  2001/08/30 19:43:50  peter
   Revision 1.25  2001/08/30 19:43:50  peter

+ 97 - 27
compiler/globals.pas

@@ -263,6 +263,8 @@ interface
     Function  ForceExtension(Const HStr,ext:String):String;
     Function  ForceExtension(Const HStr,ext:String):String;
     Function  FixPath(s:string;allowdot:boolean):string;
     Function  FixPath(s:string;allowdot:boolean):string;
     function  FixFileName(const s:string):string;
     function  FixFileName(const s:string):string;
+    function  TargetFixPath(s:string;allowdot:boolean):string;
+    function  TargetFixFileName(const s:string):string;
     procedure SplitBinCmd(const s:string;var bstr,cstr:string);
     procedure SplitBinCmd(const s:string;var bstr,cstr:string);
     function  FindFile(const f : string;path : string;var foundfile:string):boolean;
     function  FindFile(const f : string;path : string;var foundfile:string):boolean;
     function  FindExe(const bin:string;var foundfile:string):boolean;
     function  FindExe(const bin:string;var foundfile:string):boolean;
@@ -573,20 +575,19 @@ implementation
         { Fix separator }
         { Fix separator }
         for i:=1 to length(s) do
         for i:=1 to length(s) do
          if s[i] in ['/','\'] then
          if s[i] in ['/','\'] then
-          s[i]:=DirSep;
+          s[i]:=source_info.DirSep;
         { Fix ending / }
         { Fix ending / }
-        if (length(s)>0) and (s[length(s)]<>DirSep) and
+        if (length(s)>0) and (s[length(s)]<>source_info.DirSep) and
            (s[length(s)]<>':') then
            (s[length(s)]<>':') then
-         s:=s+DirSep;
+         s:=s+source_info.DirSep;
         { Remove ./ }
         { Remove ./ }
-        if (not allowdot) and (s='.'+DirSep) then
+        if (not allowdot) and (s='.'+source_info.DirSep) then
          s:='';
          s:='';
         { return }
         { return }
-{$ifdef unix}
-        FixPath:=s;
-{$else}
-        FixPath:=Lower(s);
-{$endif}
+        if source_info.files_case_relevent then
+         FixPath:=s
+        else
+         FixPath:=Lower(s);
       end;
       end;
 
 
 
 
@@ -594,26 +595,93 @@ implementation
      var
      var
        i      : longint;
        i      : longint;
      begin
      begin
-       for i:=length(s) downto 1 do
+       if source_info.files_case_relevent then
         begin
         begin
-          case s[i] of
-{$ifdef Unix}
-            '/','\' :
-              FixFileName[i]:='/';
-{$else Unix}
-           '/' :
-              FixFileName[i]:='\';
-           'A'..'Z' :
-              FixFileName[i]:=char(byte(s[i])+32);
-{$endif Unix}
-          else
-           FixFileName[i]:=s[i];
-          end;
+          for i:=1 to length(s) do
+           begin
+             case s[i] of
+               '/','\' :
+                 FixFileName[i]:=source_info.dirsep;
+               else
+                 FixFileName[i]:=s[i];
+             end;
+           end;
+        end
+       else
+        begin
+          for i:=1 to length(s) do
+           begin
+             case s[i] of
+               '/','\' :
+                  FixFileName[i]:=source_info.dirsep;
+               'A'..'Z' :
+                  FixFileName[i]:=char(byte(s[i])+32);
+                else
+                  FixFileName[i]:=s[i];
+             end;
+           end;
         end;
         end;
        FixFileName[0]:=s[0];
        FixFileName[0]:=s[0];
      end;
      end;
 
 
 
 
+    Function TargetFixPath(s:string;allowdot:boolean):string;
+      var
+        i : longint;
+      begin
+        { Fix separator }
+        for i:=1 to length(s) do
+         if s[i] in ['/','\'] then
+          s[i]:=target_info.DirSep;
+        { Fix ending / }
+        if (length(s)>0) and (s[length(s)]<>target_info.DirSep) and
+           (s[length(s)]<>':') then
+         s:=s+target_info.DirSep;
+        { Remove ./ }
+        if (not allowdot) and (s='.'+target_info.DirSep) then
+         s:='';
+        { return }
+        if target_info.files_case_relevent then
+         TargetFixPath:=s
+        else
+         TargetFixPath:=Lower(s);
+      end;
+
+
+   function TargetFixFileName(const s:string):string;
+     var
+       i      : longint;
+     begin
+       if target_info.files_case_relevent then
+        begin
+          for i:=1 to length(s) do
+           begin
+             case s[i] of
+               '/','\' :
+                 TargetFixFileName[i]:=target_info.dirsep;
+               else
+                 TargetFixFileName[i]:=s[i];
+             end;
+           end;
+        end
+       else
+        begin
+          for i:=1 to length(s) do
+           begin
+             case s[i] of
+               '/','\' :
+                  TargetFixFileName[i]:=target_info.dirsep;
+               'A'..'Z' :
+                  TargetFixFileName[i]:=char(byte(s[i])+32);
+                else
+                  TargetFixFileName[i]:=s[i];
+             end;
+           end;
+        end;
+       TargetFixFileName[0]:=s[0];
+     end;
+
+
    procedure SplitBinCmd(const s:string;var bstr,cstr:string);
    procedure SplitBinCmd(const s:string;var bstr,cstr:string);
      var
      var
        i : longint;
        i : longint;
@@ -626,7 +694,7 @@ implementation
         end
         end
        else
        else
         begin
         begin
-          bstr:='';
+          bstr:=s;
           cstr:='';
           cstr:='';
         end;
         end;
      end;
      end;
@@ -1284,7 +1352,7 @@ implementation
         initlocalswitches:=[cs_check_io];
         initlocalswitches:=[cs_check_io];
         initmoduleswitches:=[cs_extsyntax,cs_browser];
         initmoduleswitches:=[cs_extsyntax,cs_browser];
         initglobalswitches:=[cs_check_unit_name,cs_link_static];
         initglobalswitches:=[cs_check_unit_name,cs_link_static];
-        initoutputformat:=as_none;
+        initoutputformat:=target_asm.id;
         fillchar(initalignment,sizeof(talignmentinfo),0);
         fillchar(initalignment,sizeof(talignmentinfo),0);
 {$ifdef i386}
 {$ifdef i386}
         initoptprocessor:=Class386;
         initoptprocessor:=Class386;
@@ -1302,7 +1370,6 @@ implementation
         {$IFDEF testvarsets}
         {$IFDEF testvarsets}
          initsetalloc:=0;
          initsetalloc:=0;
         {$ENDIF}
         {$ENDIF}
-        initoutputformat:=as_m68k_as;
         initasmmode:=asmmode_m68k_mot;
         initasmmode:=asmmode_m68k_mot;
   {$endif m68k}
   {$endif m68k}
 {$endif i386}
 {$endif i386}
@@ -1333,7 +1400,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.41  2001-08-19 11:22:22  peter
+  Revision 1.42  2001-09-17 21:29:11  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.41  2001/08/19 11:22:22  peter
     * palmos support from v10 merged
     * palmos support from v10 merged
 
 
   Revision 1.40  2001/08/04 10:23:54  peter
   Revision 1.40  2001/08/04 10:23:54  peter

+ 5 - 2
compiler/globtype.pas

@@ -119,7 +119,7 @@ interface
          cs_asm_regalloc,cs_asm_tempalloc,
          cs_asm_regalloc,cs_asm_tempalloc,
          { linking }
          { linking }
          cs_link_extern,cs_link_static,cs_link_smart,cs_link_shared,cs_link_deffile,
          cs_link_extern,cs_link_static,cs_link_smart,cs_link_shared,cs_link_deffile,
-         cs_link_strip,cs_link_staticflag
+         cs_link_strip,cs_link_staticflag,cs_link_on_target
        );
        );
        tglobalswitches = set of tglobalswitch;
        tglobalswitches = set of tglobalswitch;
 
 
@@ -208,7 +208,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.14  2001-07-30 20:59:27  peter
+  Revision 1.15  2001-09-17 21:29:11  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.14  2001/07/30 20:59:27  peter
     * m68k updates from v10 merged
     * m68k updates from v10 merged
 
 
   Revision 1.13  2001/07/01 20:16:15  peter
   Revision 1.13  2001/07/01 20:16:15  peter

+ 6 - 3
compiler/htypechk.pas

@@ -452,8 +452,8 @@ implementation
 
 
          { error CGMessage, if more than 8 floating point }
          { error CGMessage, if more than 8 floating point }
          { registers are needed                         }
          { registers are needed                         }
-         if p.registersfpu>maxfpuregs then
-          CGMessage(cg_e_too_complex_expr);
+         { if p.registersfpu>maxfpuregs then
+          CGMessage(cg_e_too_complex_expr); now pushed if needed PM }
       end;
       end;
 
 
 {****************************************************************************
 {****************************************************************************
@@ -958,7 +958,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.34  2001-09-07 07:46:17  jonas
+  Revision 1.35  2001-09-17 21:29:11  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.34  2001/09/07 07:46:17  jonas
     * allow typecasting from child object types to parent object types (with
     * allow typecasting from child object types to parent object types (with
       different sizes)
       different sizes)
 
 

+ 7 - 40
compiler/i386/ag386att.pas

@@ -127,22 +127,6 @@ interface
          extended2str:='0d'+hs
          extended2str:='0d'+hs
       end;
       end;
 
 
-    type
-      pdouble = ^double;
-    function comp2str(d : bestreal) : string;
-      var
-        c  : comp;
-        dd : pdouble;
-      begin
-{$ifdef FPC}
-         c:=comp(d);
-{$else}
-         c:=d;
-{$endif}
-         dd:=pdouble(@c); { this makes a bitwise copy of c into a double }
-         comp2str:=double2str(dd^);
-      end;
-
 
 
     function getreferencestring(var ref : treference) : string;
     function getreferencestring(var ref : treference) : string;
     var
     var
@@ -585,7 +569,7 @@ interface
            ait_comp_64bit :
            ait_comp_64bit :
              begin
              begin
                if do_line then
                if do_line then
-                AsmWriteLn(target_asm.comment+comp2str(tai_comp_64bit(hp).value));
+                AsmWriteLn(target_asm.comment+extended2str(tai_comp_64bit(hp).value));
                AsmWrite(#9'.byte'#9);
                AsmWrite(#9'.byte'#9);
 {$ifdef FPC}
 {$ifdef FPC}
                co:=comp(tai_comp_64bit(hp).value);
                co:=comp(tai_comp_64bit(hp).value);
@@ -666,7 +650,7 @@ interface
                   AsmWrite('.globl'#9);
                   AsmWrite('.globl'#9);
                   AsmWriteLn(tai_symbol(hp).sym.name);
                   AsmWriteLn(tai_symbol(hp).sym.name);
                 end;
                 end;
-               if target_info.target=target_i386_linux then
+               if target_info.target in [target_i386_linux,target_i386_beos] then
                 begin
                 begin
                    AsmWrite(#9'.type'#9);
                    AsmWrite(#9'.type'#9);
                    AsmWrite(tai_symbol(hp).sym.name);
                    AsmWrite(tai_symbol(hp).sym.name);
@@ -691,7 +675,7 @@ interface
 
 
            ait_symbol_end :
            ait_symbol_end :
              begin
              begin
-               if target_info.target=target_i386_linux then
+               if target_info.target in [target_i386_linux,target_i386_beos] then
                 begin
                 begin
                   s:=target_asm.labelprefix+'e'+tostr(symendcount);
                   s:=target_asm.labelprefix+'e'+tostr(symendcount);
                   inc(symendcount);
                   inc(symendcount);
@@ -916,26 +900,6 @@ interface
               '.stab','.stabstr')
               '.stab','.stabstr')
           );
           );
 
 
-       as_i386_asbsd_info : tasminfo =
-          (
-            id           : as_i386_asbsd;
-            idtxt  : 'ASBSD';
-            asmbin : 'as';
-            asmcmd : '-o $OBJ $ASM';
-            supported_target : target_any;
-            outputbinary: false;
-            allowdirect : true;
-            externals : false;
-            needar : true;
-            labelprefix_only_inside_procedure : false;
-            labelprefix : 'L';
-            comment : '# ';
-            secnames : ('',
-              '.text','.data','.bss',
-              '','','','','','',
-              '.stab','.stabstr')
-          );
-
        as_i386_as_aout_info : tasminfo =
        as_i386_as_aout_info : tasminfo =
           (
           (
             id           : as_i386_as_aout;
             id           : as_i386_as_aout;
@@ -985,7 +949,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  2001-08-30 20:57:10  peter
+  Revision 1.11  2001-09-17 21:29:13  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.10  2001/08/30 20:57:10  peter
     * asbsd merged
     * asbsd merged
 
 
   Revision 1.9  2001/05/06 17:13:23  jonas
   Revision 1.9  2001/05/06 17:13:23  jonas

+ 28 - 8
compiler/i386/n386add.pas

@@ -267,7 +267,8 @@ interface
          usablecount : byte;
          usablecount : byte;
          hregister,hregister2 : tregister;
          hregister,hregister2 : tregister;
          noswap,popeax,popedx,
          noswap,popeax,popedx,
-         pushed,mboverflow,cmpop : boolean;
+         pushed,pushedfpu,
+         mboverflow,cmpop : boolean;
          op,op2 : tasmop;
          op,op2 : tasmop;
          resflags : tresflags;
          resflags : tresflags;
          otl,ofl : tasmlabel;
          otl,ofl : tasmlabel;
@@ -405,7 +406,7 @@ interface
                 (nodetype in
                 (nodetype in
                   [unequaln,ltn,lten,gtn,gten,equaln,xorn]) then
                   [unequaln,ltn,lten,gtn,gten,equaln,xorn]) then
                begin
                begin
-                 if left.nodetype=ordconstn then
+                 if left.nodetype in [ordconstn,realconstn] then
                   swapleftright;
                   swapleftright;
                  if left.location.loc=LOC_JUMP then
                  if left.location.loc=LOC_JUMP then
                    begin
                    begin
@@ -505,6 +506,10 @@ interface
 
 
               { are too few registers free? }
               { are too few registers free? }
               pushed:=maybe_push(right.registers32,self,is_64bitint(left.resulttype.def));
               pushed:=maybe_push(right.registers32,self,is_64bitint(left.resulttype.def));
+              if location.loc=LOC_FPU then
+                pushedfpu:=maybe_pushfpu(right.registersfpu,self)
+              else
+                pushedfpu:=false;
               secondpass(right);
               secondpass(right);
               if pushed then
               if pushed then
                 begin
                 begin
@@ -1498,10 +1503,10 @@ interface
                if (left.resulttype.def.deftype=floatdef) then
                if (left.resulttype.def.deftype=floatdef) then
                  begin
                  begin
                     { real constants to the right, but only if it
                     { real constants to the right, but only if it
-                      isn't on the FPU stack, i.e. 1.0 or 0.0! }
+                      isn't on the FPU stack, i.e. 1.0 or 0.0!
                     if (left.nodetype=realconstn) and
                     if (left.nodetype=realconstn) and
                       (left.location.loc<>LOC_FPU) then
                       (left.location.loc<>LOC_FPU) then
-                      swapleftright;
+                      swapleftright; obsolete, already swaped above PM }
                     cmpop:=false;
                     cmpop:=false;
                     case nodetype of
                     case nodetype of
                        addn : op:=A_FADDP;
                        addn : op:=A_FADDP;
@@ -1525,7 +1530,11 @@ interface
                               inc(fpuvaroffset);
                               inc(fpuvaroffset);
                             end
                             end
                          else
                          else
-                           floatload(tfloatdef(right.resulttype.def).typ,right.location.reference);
+                            begin
+                              floatload(tfloatdef(right.resulttype.def).typ,right.location.reference);
+                              if pushedfpu then
+                                ungetiftemp(right.location.reference);
+                            end;
                          if (left.location.loc<>LOC_FPU) then
                          if (left.location.loc<>LOC_FPU) then
                            begin
                            begin
                               if left.location.loc=LOC_CFPUREGISTER then
                               if left.location.loc=LOC_CFPUREGISTER then
@@ -1535,7 +1544,11 @@ interface
                                    inc(fpuvaroffset);
                                    inc(fpuvaroffset);
                                 end
                                 end
                               else
                               else
-                                floatload(tfloatdef(left.resulttype.def).typ,left.location.reference)
+                                begin
+                                  floatload(tfloatdef(left.resulttype.def).typ,left.location.reference);
+                                  if pushedfpu then
+                                     ungetiftemp(left.location.reference);
+                                end;
                            end
                            end
                          { left was on the stack => swap }
                          { left was on the stack => swap }
                          else
                          else
@@ -1554,7 +1567,11 @@ interface
                               inc(fpuvaroffset);
                               inc(fpuvaroffset);
                            end
                            end
                          else
                          else
-                           floatload(tfloatdef(left.resulttype.def).typ,left.location.reference)
+                           begin
+                             floatload(tfloatdef(left.resulttype.def).typ,left.location.reference);
+                             if pushedfpu then
+                              ungetiftemp(left.location.reference);
+                           end;
                       end
                       end
                     { fpu operands are always in the wrong order on the stack }
                     { fpu operands are always in the wrong order on the stack }
                     else
                     else
@@ -1844,7 +1861,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.23  2001-09-05 15:22:09  jonas
+  Revision 1.24  2001-09-17 21:29:13  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.23  2001/09/05 15:22:09  jonas
     * made multiplying, dividing and mod'ing of int64 and qword processor
     * made multiplying, dividing and mod'ing of int64 and qword processor
       independent with compilerprocs (+ small optimizations by using shift/and
       independent with compilerprocs (+ small optimizations by using shift/and
       where possible)
       where possible)

+ 29 - 4
compiler/i386/n386util.pas

@@ -29,7 +29,8 @@ interface
     uses
     uses
       symtype,node;
       symtype,node;
 
 
-    function  maybe_push(needed : byte;p : tnode;isint64 : boolean) : boolean;
+    function maybe_push(needed : byte;p : tnode;isint64 : boolean) : boolean;
+    function maybe_pushfpu(needed : byte;p : tnode) : boolean;
 {$ifdef TEMPS_NOT_PUSH}
 {$ifdef TEMPS_NOT_PUSH}
     function maybe_savetotemp(needed : byte;p : tnode;isint64 : boolean) : boolean;
     function maybe_savetotemp(needed : byte;p : tnode;isint64 : boolean) : boolean;
 {$endif TEMPS_NOT_PUSH}
 {$endif TEMPS_NOT_PUSH}
@@ -142,6 +143,24 @@ implementation
          maybe_push:=pushed;
          maybe_push:=pushed;
       end;
       end;
 
 
+
+     function maybe_pushfpu(needed : byte;p : tnode) : boolean;
+       begin
+         if needed>=maxfpuregs then
+           begin
+             if p.location.loc = LOC_FPU then
+               begin
+                 emit_to_mem(p.location,p.resulttype.def);
+                 maybe_pushfpu:=true;
+               end
+             else
+               maybe_pushfpu:=false;
+           end
+         else
+           maybe_pushfpu:=false;
+       end;
+
+
 {$ifdef TEMPS_NOT_PUSH}
 {$ifdef TEMPS_NOT_PUSH}
     function maybe_savetotemp(needed : byte;p : tnode;isint64 : boolean) : boolean;
     function maybe_savetotemp(needed : byte;p : tnode;isint64 : boolean) : boolean;
 
 
@@ -1218,12 +1237,15 @@ implementation
                internalerror(234234);
                internalerror(234234);
            end
            end
          else
          else
-           if (p.left.registers32<p.right.registers32) and
+           if ((p.location.loc=LOC_FPU) and
+               (p.right.registersfpu > p.left.registersfpu)) or
+              ((p.location.loc<>LOC_FPU) and
+               (p.left.registers32<p.right.registers32) and
            { the following check is appropriate, because all }
            { the following check is appropriate, because all }
            { 4 registers are rarely used and it is thereby   }
            { 4 registers are rarely used and it is thereby   }
            { achieved that the extra code is being dropped   }
            { achieved that the extra code is being dropped   }
            { by exchanging not commutative operators     }
            { by exchanging not commutative operators     }
-              (p.right.registers32<=4) then
+               (p.right.registers32<=4)) then
             begin
             begin
               hp:=p.left;
               hp:=p.left;
               p.left:=p.right;
               p.left:=p.right;
@@ -1510,7 +1532,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.20  2001-08-26 13:37:01  florian
+  Revision 1.21  2001-09-17 21:29:14  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.20  2001/08/26 13:37:01  florian
     * some cg reorganisation
     * some cg reorganisation
     * some PPC updates
     * some PPC updates
 
 

+ 5 - 2
compiler/i386/ra386int.pas

@@ -1814,7 +1814,7 @@ Begin
           if asmsym<>'' then
           if asmsym<>'' then
            begin
            begin
              if maxvalue<>longint($ffffffff) then
              if maxvalue<>longint($ffffffff) then
-               Message(asmr_w_const32bit_for_address);
+               Message1(asmr_w_const32bit_for_address,asmsym);
              ConcatConstSymbol(curlist,asmsym,value)
              ConcatConstSymbol(curlist,asmsym,value)
            end
            end
           else
           else
@@ -1964,7 +1964,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.17  2001-08-26 13:37:03  florian
+  Revision 1.18  2001-09-17 21:29:14  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.17  2001/08/26 13:37:03  florian
     * some cg reorganisation
     * some cg reorganisation
     * some PPC updates
     * some PPC updates
 
 

+ 18 - 8
compiler/link.pas

@@ -221,6 +221,12 @@ var
   FoundBin : string;
   FoundBin : string;
   UtilExe  : string;
   UtilExe  : string;
 begin
 begin
+  if cs_link_on_target in aktglobalswitches then
+    begin
+      { If linking on target, don't add any path PM }
+      FindUtil:=AddExtension(s,target_info.exeext);
+      exit;
+    end;
   UtilExe:=AddExtension(s,source_info.exeext);
   UtilExe:=AddExtension(s,source_info.exeext);
   FoundBin:='';
   FoundBin:='';
   Found:=false;
   Found:=false;
@@ -244,16 +250,17 @@ function TLinker.FindObjectFile(s:string;const unitpath:string) : string;
 var
 var
   found : boolean;
   found : boolean;
   foundfile : string;
   foundfile : string;
+  s1 : string;
 begin
 begin
   findobjectfile:='';
   findobjectfile:='';
   if s='' then
   if s='' then
    exit;
    exit;
   if pos('.',s)=0 then
   if pos('.',s)=0 then
    s:=s+target_info.objext;
    s:=s+target_info.objext;
-  s:=FixFileName(s);
-  if FileExists(s) then
+  s1:=FixFileName(s);
+  if FileExists(s1) then
    begin
    begin
-     Findobjectfile:=s;
+     Findobjectfile:=ScriptFixFileName(s);
      exit;
      exit;
    end;
    end;
   { find object file
   { find object file
@@ -278,7 +285,7 @@ begin
    found:=FindFile(s,exepath,foundfile);
    found:=FindFile(s,exepath,foundfile);
   if not(cs_link_extern in aktglobalswitches) and (not found) then
   if not(cs_link_extern in aktglobalswitches) and (not found) then
    Message1(exec_w_objfile_not_found,s);
    Message1(exec_w_objfile_not_found,s);
-  findobjectfile:=foundfile;
+  findobjectfile:=ScriptFixFileName(foundfile);
 end;
 end;
 
 
 
 
@@ -296,7 +303,7 @@ begin
   if FileExists(s) then
   if FileExists(s) then
    begin
    begin
      found:=true;
      found:=true;
-     FindLibraryFile:=s;
+     FindLibraryFile:=ScriptFixFileName(s);
      exit;
      exit;
    end;
    end;
   { find libary
   { find libary
@@ -311,7 +318,7 @@ begin
    found:=librarysearchpath.FindFile(s,foundfile);
    found:=librarysearchpath.FindFile(s,foundfile);
   if (not found) then
   if (not found) then
    found:=FindFile(s,exepath,foundfile);
    found:=FindFile(s,exepath,foundfile);
-  findlibraryfile:=foundfile;
+  findlibraryfile:=ScriptFixFileName(foundfile);
 end;
 end;
 
 
 
 
@@ -423,7 +430,7 @@ begin
   smartpath:=current_module.outputpath^+FixPath(FixFileName(current_module.modulename^)+target_info.smartext,false);
   smartpath:=current_module.outputpath^+FixPath(FixFileName(current_module.modulename^)+target_info.smartext,false);
   SplitBinCmd(target_ar.arcmd,binstr,cmdstr);
   SplitBinCmd(target_ar.arcmd,binstr,cmdstr);
   Replace(cmdstr,'$LIB',current_module.staticlibfilename^);
   Replace(cmdstr,'$LIB',current_module.staticlibfilename^);
-  Replace(cmdstr,'$FILES',FixFileName(smartpath+current_module.asmprefix^+'*'+target_info.objext));
+  Replace(cmdstr,'$FILES',ScriptFixFileName(smartpath+current_module.asmprefix^+'*'+target_info.objext));
   success:=DoExec(FindUtil(binstr),cmdstr,false,true);
   success:=DoExec(FindUtil(binstr),cmdstr,false,true);
 { Clean up }
 { Clean up }
   if not(cs_asm_leave in aktglobalswitches) then
   if not(cs_asm_leave in aktglobalswitches) then
@@ -485,7 +492,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.22  2001-08-30 20:13:53  peter
+  Revision 1.23  2001-09-17 21:29:11  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.22  2001/08/30 20:13:53  peter
     * rtti/init table updates
     * rtti/init table updates
     * rttisym for reusable global rtti/init info
     * rttisym for reusable global rtti/init info
     * support published for interfaces
     * support published for interfaces

+ 4 - 2
compiler/msg/errore.msg

@@ -1533,7 +1533,7 @@ asmr_e_68020_mode_required=07097_E_68020 mode required
 #
 #
 # Assembler/binary writers
 # Assembler/binary writers
 #
 #
-# 08013 is the last used one
+# 08015 is the last used one
 #
 #
 asmw_f_too_many_asm_files=08000_F_Too many assembler files
 asmw_f_too_many_asm_files=08000_F_Too many assembler files
 asmw_f_assembler_output_not_supported=08001_F_Selected assembler output not supported
 asmw_f_assembler_output_not_supported=08001_F_Selected assembler output not supported
@@ -1549,7 +1549,9 @@ asmw_e_immediate_or_reference_expected=08010_E_Asm: Immediate or reference expec
 asmw_e_value_exceeds_bounds=08011_E_Asm: $1 value exceeds bounds $2
 asmw_e_value_exceeds_bounds=08011_E_Asm: $1 value exceeds bounds $2
 asmw_e_short_jmp_out_of_range=08012_E_Asm: Short jump is out of range $1
 asmw_e_short_jmp_out_of_range=08012_E_Asm: Short jump is out of range $1
 asmw_e_undefined_label=08013_E_Asm: Undefined label $1
 asmw_e_undefined_label=08013_E_Asm: Undefined label $1
-asmw_e_duplicate_label=08014_E_Asm: Duplicate label $1
+asmw_e_comp_not_supported=08014_E_Asm: Comp type not supported for this target
+asmw_e_extended_not_supported=08015_E_Asm: Extended type not supported for this target
+asmw_e_duplicate_label=08016_E_Asm: Duplicate label $1
 
 
 #
 #
 # Executing linker/assembler
 # Executing linker/assembler

+ 5 - 3
compiler/msgidx.inc

@@ -488,7 +488,9 @@ const
   asmw_e_value_exceeds_bounds=08011;
   asmw_e_value_exceeds_bounds=08011;
   asmw_e_short_jmp_out_of_range=08012;
   asmw_e_short_jmp_out_of_range=08012;
   asmw_e_undefined_label=08013;
   asmw_e_undefined_label=08013;
-  asmw_e_duplicate_label=08014;
+  asmw_e_comp_not_supported=08014;
+  asmw_e_extended_not_supported=08015;
+  asmw_e_duplicate_label=08016;
   exec_w_source_os_redefined=09000;
   exec_w_source_os_redefined=09000;
   exec_i_assembling_pipe=09001;
   exec_i_assembling_pipe=09001;
   exec_d_cant_create_asmfile=09002;
   exec_d_cant_create_asmfile=09002;
@@ -597,9 +599,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 33390;
+  MsgTxtSize = 33500;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
-    17,61,180,38,41,41,98,15,35,42,
+    17,61,180,38,41,41,98,17,35,42,
     30,1,1,1,1,1,1,1,1,1
     30,1,1,1,1,1,1,1,1,1
   );
   );

+ 99 - 96
compiler/msgtxt.inc

@@ -533,290 +533,293 @@ const msgtxt : array[0..000139,1..240] of char=(
   '08011_E_Asm: $1 value exceeds bounds $2'#000+
   '08011_E_Asm: $1 value exceeds bounds $2'#000+
   '08012_E_Asm: Short jump is out of range ','$1'#000+
   '08012_E_Asm: Short jump is out of range ','$1'#000+
   '08013_E_Asm: Undefined label $1'#000+
   '08013_E_Asm: Undefined label $1'#000+
-  '08014_E_Asm: Duplicate label $1'#000+
+  '08014_E_Asm: Comp type not supported for this target'#000+
+  '08015_E_Asm: Extended type not supported for this target'#000+
+  '08016_E_Asm: Duplicate label $1'#000+
   '09000_W_Source operating system redefined'#000+
   '09000_W_Source operating system redefined'#000+
-  '09001_I_Assembling (pipe) $1'#000+
+  '09001_I_Assembling (p','ipe) $1'#000+
   '09002_E_Can'#039't create assember file: $1'#000+
   '09002_E_Can'#039't create assember file: $1'#000+
   '09003_E_Can'#039't create object file: $1'#000+
   '09003_E_Can'#039't create object file: $1'#000+
-  '09004_E_Can'#039't create archi','ve file: $1'#000+
+  '09004_E_Can'#039't create archive file: $1'#000+
   '09005_E_Assembler $1 not found, switching to external assembling'#000+
   '09005_E_Assembler $1 not found, switching to external assembling'#000+
   '09006_T_Using assembler: $1'#000+
   '09006_T_Using assembler: $1'#000+
-  '09007_E_Error while assembling exitcode $1'#000+
+  '09007_E_Error while assem','bling exitcode $1'#000+
   '09008_E_Can'#039't call the assembler, error $1 switching to external a'+
   '09008_E_Can'#039't call the assembler, error $1 switching to external a'+
   'ssembling'#000+
   'ssembling'#000+
-  '09009_I_Assembli','ng $1'#000+
+  '09009_I_Assembling $1'#000+
   '09010_I_Assembling smartlink $1'#000+
   '09010_I_Assembling smartlink $1'#000+
   '09011_W_Object $1 not found, Linking may fail !'#000+
   '09011_W_Object $1 not found, Linking may fail !'#000+
-  '09012_W_Library $1 not found, Linking may fail !'#000+
+  '09012_W_Library $1 not found, Linking may fa','il !'#000+
   '09013_E_Error while linking'#000+
   '09013_E_Error while linking'#000+
   '09014_E_Can'#039't call the linker, switching to external linking'#000+
   '09014_E_Can'#039't call the linker, switching to external linking'#000+
-  '09015_I_Linking ','$1'#000+
+  '09015_I_Linking $1'#000+
   '09016_E_Util $1 not found, switching to external linking'#000+
   '09016_E_Util $1 not found, switching to external linking'#000+
   '09017_T_Using util $1'#000+
   '09017_T_Using util $1'#000+
   '09018_E_Creation of Executables not supported'#000+
   '09018_E_Creation of Executables not supported'#000+
-  '09019_E_Creation of Dynamic/Shared Libraries not supported'#000+
+  '09','019_E_Creation of Dynamic/Shared Libraries not supported'#000+
   '09020_I_Closing script $1'#000+
   '09020_I_Closing script $1'#000+
-  '09021_E_resource compiler n','ot found, switching to external mode'#000+
+  '09021_E_resource compiler not found, switching to external mode'#000+
   '09022_I_Compiling resource $1'#000+
   '09022_I_Compiling resource $1'#000+
-  '09023_T_unit $1 can'#039't be static linked, switching to smart linking'+
-  #000+
+  '09023_T_unit $1 can'#039't be static linked, switching to smart link','i'+
+  'ng'#000+
   '09024_T_unit $1 can'#039't be smart linked, switching to static linking'+
   '09024_T_unit $1 can'#039't be smart linked, switching to static linking'+
   #000+
   #000+
-  '09025_T_unit $1 can'#039't be shared linked,',' switching to static link'+
-  'ing'#000+
+  '09025_T_unit $1 can'#039't be shared linked, switching to static linkin'+
+  'g'#000+
   '09026_E_unit $1 can'#039't be smart or static linked'#000+
   '09026_E_unit $1 can'#039't be smart or static linked'#000+
   '09027_E_unit $1 can'#039't be shared or static linked'#000+
   '09027_E_unit $1 can'#039't be shared or static linked'#000+
-  '09028_F_Can'#039't post process executable $1'#000+
+  '0902','8_F_Can'#039't post process executable $1'#000+
   '09029_F_Can'#039't open executable $1'#000+
   '09029_F_Can'#039't open executable $1'#000+
   '09030_X_Size of Code: $1 bytes'#000+
   '09030_X_Size of Code: $1 bytes'#000+
-  '09031_X_S','ize of initialized data: $1 bytes'#000+
+  '09031_X_Size of initialized data: $1 bytes'#000+
   '09032_X_Size of uninitialized data: $1 bytes'#000+
   '09032_X_Size of uninitialized data: $1 bytes'#000+
   '09033_X_Stack space reserved: $1 bytes'#000+
   '09033_X_Stack space reserved: $1 bytes'#000+
-  '09034_X_Stack space commited: $1 bytes'#000+
+  '09034_X_Stac','k space commited: $1 bytes'#000+
   '10000_T_Unitsearch: $1'#000+
   '10000_T_Unitsearch: $1'#000+
   '10001_T_PPU Loading $1'#000+
   '10001_T_PPU Loading $1'#000+
   '10002_U_PPU Name: $1'#000+
   '10002_U_PPU Name: $1'#000+
-  '10003_U_PPU Flag','s: $1'#000+
+  '10003_U_PPU Flags: $1'#000+
   '10004_U_PPU Crc: $1'#000+
   '10004_U_PPU Crc: $1'#000+
   '10005_U_PPU Time: $1'#000+
   '10005_U_PPU Time: $1'#000+
   '10006_U_PPU File too short'#000+
   '10006_U_PPU File too short'#000+
   '10007_U_PPU Invalid Header (no PPU at the begin)'#000+
   '10007_U_PPU Invalid Header (no PPU at the begin)'#000+
-  '10008_U_PPU Invalid Version $1'#000+
+  '10008_U','_PPU Invalid Version $1'#000+
   '10009_U_PPU is compiled for an other processor'#000+
   '10009_U_PPU is compiled for an other processor'#000+
-  '10010_U_PPU is compiled for an other ta','rget'#000+
+  '10010_U_PPU is compiled for an other target'#000+
   '10011_U_PPU Source: $1'#000+
   '10011_U_PPU Source: $1'#000+
   '10012_U_Writing $1'#000+
   '10012_U_Writing $1'#000+
   '10013_F_Can'#039't Write PPU-File'#000+
   '10013_F_Can'#039't Write PPU-File'#000+
   '10014_F_Error reading PPU-File'#000+
   '10014_F_Error reading PPU-File'#000+
-  '10015_F_unexpected end of PPU-File'#000+
+  '10015_F_unexpected end ','of PPU-File'#000+
   '10016_F_Invalid PPU-File entry: $1'#000+
   '10016_F_Invalid PPU-File entry: $1'#000+
   '10017_F_PPU Dbx count problem'#000+
   '10017_F_PPU Dbx count problem'#000+
   '10018_E_Illegal unit name: $1'#000+
   '10018_E_Illegal unit name: $1'#000+
-  '100','19_F_Too much units'#000+
+  '10019_F_Too much units'#000+
   '10020_F_Circular unit reference between $1 and $2'#000+
   '10020_F_Circular unit reference between $1 and $2'#000+
   '10021_F_Can'#039't compile unit $1, no sources available'#000+
   '10021_F_Can'#039't compile unit $1, no sources available'#000+
-  '10022_F_Can'#039't find unit $1'#000+
+  '10022_F_','Can'#039't find unit $1'#000+
   '10023_W_Unit $1 was not found but $2 exists'#000+
   '10023_W_Unit $1 was not found but $2 exists'#000+
   '10024_F_Unit $1 searched but $2 found'#000+
   '10024_F_Unit $1 searched but $2 found'#000+
-  '10025_W_C','ompiling the system unit requires the -Us switch'#000+
+  '10025_W_Compiling the system unit requires the -Us switch'#000+
   '10026_F_There were $1 errors compiling module, stopping'#000+
   '10026_F_There were $1 errors compiling module, stopping'#000+
-  '10027_U_Load from $1 ($2) unit $3'#000+
+  '10027_U_Load from $1 ($2)',' unit $3'#000+
   '10028_U_Recompiling $1, checksum changed for $2'#000+
   '10028_U_Recompiling $1, checksum changed for $2'#000+
   '10029_U_Recompiling $1, source found only'#000+
   '10029_U_Recompiling $1, source found only'#000+
-  '10030_U_Rec','ompiling unit, static lib is older than ppufile'#000+
+  '10030_U_Recompiling unit, static lib is older than ppufile'#000+
   '10031_U_Recompiling unit, shared lib is older than ppufile'#000+
   '10031_U_Recompiling unit, shared lib is older than ppufile'#000+
-  '10032_U_Recompiling unit, obj and asm are older than ppufile'#000+
+  '10032_U_Recompiling uni','t, obj and asm are older than ppufile'#000+
   '10033_U_Recompiling unit, obj is older than asm'#000+
   '10033_U_Recompiling unit, obj is older than asm'#000+
-  '10034_U_Parsing interfac','e of $1'#000+
+  '10034_U_Parsing interface of $1'#000+
   '10035_U_Parsing implementation of $1'#000+
   '10035_U_Parsing implementation of $1'#000+
   '10036_U_Second load for unit $1'#000+
   '10036_U_Second load for unit $1'#000+
   '10037_U_PPU Check file $1 time $2'#000+
   '10037_U_PPU Check file $1 time $2'#000+
-  '10038_H_Conditional $1 was not set at startup in last compilation of $'+
-  '2'#000+
-  '10039_H_Conditional $1 was set at startup in last compila','tion of $2'#000+
+  '10038_H_Conditional',' $1 was not set at startup in last compilation of'+
+  ' $2'#000+
+  '10039_H_Conditional $1 was set at startup in last compilation of $2'#000+
   '10040_W_Can'#039't recompile unit $1, but found modifed include files'#000+
   '10040_W_Can'#039't recompile unit $1, but found modifed include files'#000+
   '10041_H_File $1 is newer than Release PPU file $2'#000+
   '10041_H_File $1 is newer than Release PPU file $2'#000+
-  '11000_$1 [options] <inputfile> [options]'#000+
+  '1100','0_$1 [options] <inputfile> [options]'#000+
   '11001_W_Only one source file supported'#000+
   '11001_W_Only one source file supported'#000+
-  '11002_W_DEF file can be created on','ly for OS/2'#000+
+  '11002_W_DEF file can be created only for OS/2'#000+
   '11003_E_nested response files are not supported'#000+
   '11003_E_nested response files are not supported'#000+
   '11004_F_No source file name in command line'#000+
   '11004_F_No source file name in command line'#000+
-  '11005_N_No option inside $1 config file'#000+
+  '11005_N_No option inside $','1 config file'#000+
   '11006_E_Illegal parameter: $1'#000+
   '11006_E_Illegal parameter: $1'#000+
   '11007_H_-? writes help pages'#000+
   '11007_H_-? writes help pages'#000+
-  '11008_F_Too many config files nested'#000,
+  '11008_F_Too many config files nested'#000+
   '11009_F_Unable to open file $1'#000+
   '11009_F_Unable to open file $1'#000+
   '11010_D_Reading further options from $1'#000+
   '11010_D_Reading further options from $1'#000+
   '11011_W_Target is already set to: $1'#000+
   '11011_W_Target is already set to: $1'#000+
-  '11012_W_Shared libs not supported on DOS platform, reverting to static'+
-  #000+
+  '11012_W_Shared libs no','t supported on DOS platform, reverting to stat'+
+  'ic'#000+
   '11013_F_too many IF(N)DEFs'#000+
   '11013_F_too many IF(N)DEFs'#000+
   '11014_F_too many ENDIFs'#000+
   '11014_F_too many ENDIFs'#000+
-  '11015_F_op','en conditional at the end of the file'#000+
+  '11015_F_open conditional at the end of the file'#000+
   '11016_W_Debug information generation is not supported by this executab'+
   '11016_W_Debug information generation is not supported by this executab'+
   'le'#000+
   'le'#000+
-  '11017_H_Try recompiling with -dGDB'#000+
+  '11017_H_Try recompi','ling with -dGDB'#000+
   '11018_E_You are using the obsolete switch $1'#000+
   '11018_E_You are using the obsolete switch $1'#000+
-  '11019_E_You are using the obsolete switch $1, ple','ase use $2'#000+
+  '11019_E_You are using the obsolete switch $1, please use $2'#000+
   '11020_N_Switching assembler to default source writing assembler'#000+
   '11020_N_Switching assembler to default source writing assembler'#000+
-  '11021_W_Assembler output selected "$1" is not compatible with "$2"'#000+
+  '11021_W_Assembler output selected "$1" is not compatibl','e with "$2"'#000+
   '11022_W_"$1" assembler use forced'#000+
   '11022_W_"$1" assembler use forced'#000+
   '11026_T_Reading options from file $1'#000+
   '11026_T_Reading options from file $1'#000+
-  '11027_T_Reading options fro','m environment $1'#000+
+  '11027_T_Reading options from environment $1'#000+
   '11028_D_Handling option "$1"'#000+
   '11028_D_Handling option "$1"'#000+
   '11029__*** press enter ***'#000+
   '11029__*** press enter ***'#000+
-  '11023_Free Pascal Compiler version $FPCVER [$FPCDATE] for $FPCTARGET'#010+
+  '11023_Free Pascal Compiler version $FPCVER [$FPCDATE] for',' $FPCTARGET'+
+  #010+
   'Copyright (c) 1993-2000 by Florian Klaempfl'#000+
   'Copyright (c) 1993-2000 by Florian Klaempfl'#000+
   '11024_Free Pascal Compiler version $FPCVER'#010+
   '11024_Free Pascal Compiler version $FPCVER'#010+
   #010+
   #010+
-  'Compiler D','ate  : $FPCDATE'#010+
+  'Compiler Date  : $FPCDATE'#010+
   'Compiler Target: $FPCTARGET'#010+
   'Compiler Target: $FPCTARGET'#010+
   #010+
   #010+
   'Supported targets:'#010+
   'Supported targets:'#010+
   '  $OSTARGETS'#010+
   '  $OSTARGETS'#010+
   #010+
   #010+
-  'This program comes under the GNU General Public Licence'#010+
+  'This program comes under the GNU General Public Lice','nce'#010+
   'For more information read COPYING.FPC'#010+
   'For more information read COPYING.FPC'#010+
   #010+
   #010+
   'Report bugs,suggestions etc to:'#010+
   'Report bugs,suggestions etc to:'#010+
-  '                 bugrep@freepascal.','org'#000+
+  '                 [email protected]'#000+
   '11025_**0*_put + after a boolean switch option to enable it, - to disa'+
   '11025_**0*_put + after a boolean switch option to enable it, - to disa'+
   'ble it'#010+
   'ble it'#010+
-  '**1a_the compiler doesn'#039't delete the generated assembler file'#010+
+  '**1a_the compiler doesn'#039't delete the generated as','sembler file'#010+
   '**2al_list sourcecode lines in assembler file'#010+
   '**2al_list sourcecode lines in assembler file'#010+
-  '**2ar_list register allocation/release info in asse','mbler file'#010+
+  '**2ar_list register allocation/release info in assembler file'#010+
   '**2at_list temp allocation/release info in assembler file'#010+
   '**2at_list temp allocation/release info in assembler file'#010+
   '**1b_generate browser info'#010+
   '**1b_generate browser info'#010+
   '**2bl_generate local symbol info'#010+
   '**2bl_generate local symbol info'#010+
-  '**1B_build all modules'#010+
+  '*','*1B_build all modules'#010+
   '**1C<x>_code generation options:'#010+
   '**1C<x>_code generation options:'#010+
   '**2CD_create also dynamic library (not supported)'#010+
   '**2CD_create also dynamic library (not supported)'#010+
-  '**2Ch','<n>_<n> bytes heap (between 1023 and 67107840)'#010+
+  '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#010+
   '**2Ci_IO-checking'#010+
   '**2Ci_IO-checking'#010+
   '**2Cn_omit linking stage'#010+
   '**2Cn_omit linking stage'#010+
-  '**2Co_check overflow of integer operations'#010+
+  '**2Co_check overflow of integer operatio','ns'#010+
   '**2Cr_range checking'#010+
   '**2Cr_range checking'#010+
   '**2Cs<n>_set stack size to <n>'#010+
   '**2Cs<n>_set stack size to <n>'#010+
   '**2Ct_stack checking'#010+
   '**2Ct_stack checking'#010+
-  '**2CX_create also smartlinked libr','ary'#010+
+  '**2CX_create also smartlinked library'#010+
   '**1d<x>_defines the symbol <x>'#010+
   '**1d<x>_defines the symbol <x>'#010+
   '*O1D_generate a DEF file'#010+
   '*O1D_generate a DEF file'#010+
   '*O2Dd<x>_set description to <x>'#010+
   '*O2Dd<x>_set description to <x>'#010+
   '*O2Dw_PM application'#010+
   '*O2Dw_PM application'#010+
-  '**1e<x>_set path to executable'#010+
+  '**1e<x>_set path ','to executable'#010+
   '**1E_same as -Cn'#010+
   '**1E_same as -Cn'#010+
   '**1F<x>_set file names and paths:'#010+
   '**1F<x>_set file names and paths:'#010+
-  '**2FD<x>_sets the directory where to search f','or compiler utilities'#010+
+  '**2FD<x>_sets the directory where to search for compiler utilities'#010+
   '**2Fe<x>_redirect error output to <x>'#010+
   '**2Fe<x>_redirect error output to <x>'#010+
   '**2FE<x>_set exe/unit output path to <x>'#010+
   '**2FE<x>_set exe/unit output path to <x>'#010+
-  '**2Fi<x>_adds <x> to include path'#010+
+  '**2Fi<x>_adds <x> to include ','path'#010+
   '**2Fl<x>_adds <x> to library path'#010+
   '**2Fl<x>_adds <x> to library path'#010+
   '*L2FL<x>_uses <x> as dynamic linker'#010+
   '*L2FL<x>_uses <x> as dynamic linker'#010+
   '**2Fo<x>_adds <x> to object path'#010+
   '**2Fo<x>_adds <x> to object path'#010+
-  '**','2Fr<x>_load error message file <x>'#010+
+  '**2Fr<x>_load error message file <x>'#010+
   '**2Fu<x>_adds <x> to unit path'#010+
   '**2Fu<x>_adds <x> to unit path'#010+
   '**2FU<x>_set unit output path to <x>, overrides -FE'#010+
   '**2FU<x>_set unit output path to <x>, overrides -FE'#010+
-  '*g1g_generate debugger information:'#010+
+  '*g1g_generat','e debugger information:'#010+
   '*g2gg_use gsym'#010+
   '*g2gg_use gsym'#010+
   '*g2gd_use dbx'#010+
   '*g2gd_use dbx'#010+
   '*g2gh_use heap trace unit (for memory leak debugging)'#010+
   '*g2gh_use heap trace unit (for memory leak debugging)'#010+
-  '*g2','gl_use line info unit to show more info for backtraces'#010+
+  '*g2gl_use line info unit to show more info for backtraces'#010+
   '*g2gc_generate checks for pointers'#010+
   '*g2gc_generate checks for pointers'#010+
   '**1i_information'#010+
   '**1i_information'#010+
-  '**2iD_return compiler date'#010+
+  '**2iD_return compiler d','ate'#010+
   '**2iV_return compiler version'#010+
   '**2iV_return compiler version'#010+
   '**2iSO_return compiler OS'#010+
   '**2iSO_return compiler OS'#010+
   '**2iSP_return compiler processor'#010+
   '**2iSP_return compiler processor'#010+
-  '**2iTO_return tar','get OS'#010+
+  '**2iTO_return target OS'#010+
   '**2iTP_return target processor'#010+
   '**2iTP_return target processor'#010+
   '**1I<x>_adds <x> to include path'#010+
   '**1I<x>_adds <x> to include path'#010+
   '**1k<x>_Pass <x> to the linker'#010+
   '**1k<x>_Pass <x> to the linker'#010+
   '**1l_write logo'#010+
   '**1l_write logo'#010+
-  '**1n_don'#039't read the default config file'#010+
+  '**1n_don'#039't r','ead the default config file'#010+
   '**1o<x>_change the name of the executable produced to <x>'#010+
   '**1o<x>_change the name of the executable produced to <x>'#010+
-  '**1pg_generate profile c','ode for gprof (defines FPC_PROFILE)'#010+
+  '**1pg_generate profile code for gprof (defines FPC_PROFILE)'#010+
   '*L1P_use pipes instead of creating temporary assembler files'#010+
   '*L1P_use pipes instead of creating temporary assembler files'#010+
   '**1S<x>_syntax options:'#010+
   '**1S<x>_syntax options:'#010+
-  '**2S2_switch some Delphi 2 extensions on'#010+
+  '**2S2_swi','tch some Delphi 2 extensions on'#010+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#010+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#010+
-  '**2Sa_include assertion code','.'#010+
+  '**2Sa_include assertion code.'#010+
   '**2Sd_tries to be Delphi compatible'#010+
   '**2Sd_tries to be Delphi compatible'#010+
   '**2Se<x>_compiler stops after the <x> errors (default is 1)'#010+
   '**2Se<x>_compiler stops after the <x> errors (default is 1)'#010+
   '**2Sg_allow LABEL and GOTO'#010+
   '**2Sg_allow LABEL and GOTO'#010+
-  '**2Sh_Use ansistrings'#010+
+  '**2Sh','_Use ansistrings'#010+
   '**2Si_support C++ styled INLINE'#010+
   '**2Si_support C++ styled INLINE'#010+
   '**2Sm_support macros like C (global)'#010+
   '**2Sm_support macros like C (global)'#010+
-  '**2So_tries to be TP/BP ','7.0 compatible'#010+
+  '**2So_tries to be TP/BP 7.0 compatible'#010+
   '**2Sp_tries to be gpc compatible'#010+
   '**2Sp_tries to be gpc compatible'#010+
   '**2Ss_constructor name must be init (destructor must be done)'#010+
   '**2Ss_constructor name must be init (destructor must be done)'#010+
-  '**2St_allow static keyword in objects'#010+
+  '**2St_allow static k','eyword in objects'#010+
   '**1s_don'#039't call assembler and linker (only with -a)'#010+
   '**1s_don'#039't call assembler and linker (only with -a)'#010+
   '**1u<x>_undefines the symbol <x>'#010+
   '**1u<x>_undefines the symbol <x>'#010+
-  '**1U_un','it options:'#010+
+  '**1U_unit options:'#010+
   '**2Un_don'#039't check the unit name'#010+
   '**2Un_don'#039't check the unit name'#010+
   '**2Ur_generate release unit files'#010+
   '**2Ur_generate release unit files'#010+
   '**2Us_compile a system unit'#010+
   '**2Us_compile a system unit'#010+
-  '**1v<x>_Be verbose. <x> is a combination of the following letters:'#010+
+  '**1v<x>_Be verbose. <x> ','is a combination of the following letters:'#010+
   '**2*_e : Show errors (default)       d : Show debug info'#010+
   '**2*_e : Show errors (default)       d : Show debug info'#010+
-  '**2*_w : S','how warnings               u : Show unit info'#010+
+  '**2*_w : Show warnings               u : Show unit info'#010+
   '**2*_n : Show notes                  t : Show tried/used files'#010+
   '**2*_n : Show notes                  t : Show tried/used files'#010+
-  '**2*_h : Show hints                  m : Show defined macros'#010+
+  '**2*_h : Show hints  ','                m : Show defined macros'#010+
   '**2*_i : Show general info           p : Show compiled procedures'#010+
   '**2*_i : Show general info           p : Show compiled procedures'#010+
-  '**2*','_l : Show linenumbers            c : Show conditionals'#010+
+  '**2*_l : Show linenumbers            c : Show conditionals'#010+
   '**2*_a : Show everything             0 : Show nothing (except errors)'#010+
   '**2*_a : Show everything             0 : Show nothing (except errors)'#010+
-  '**2*_b : Show all procedure          r : Rhide/GCC compatibility mode'#010+
-  '**2*_    declarations if an error    x : Exec','utable info (Win32 only'+
-  ')'#010+
+  '**2*_','b : Show all procedure          r : Rhide/GCC compatibility mod'+
+  'e'#010+
+  '**2*_    declarations if an error    x : Executable info (Win32 only)'#010+
   '**2*_    occurs'#010+
   '**2*_    occurs'#010+
   '**1X_executable options:'#010+
   '**1X_executable options:'#010+
   '*L2Xc_link with the c library'#010+
   '*L2Xc_link with the c library'#010+
-  '**2Xs_strip all symbols from executable'#010+
+  '**2Xs_strip all symbols from execu','table'#010+
   '**2XD_try to link dynamic          (defines FPC_LINK_DYNAMIC)'#010+
   '**2XD_try to link dynamic          (defines FPC_LINK_DYNAMIC)'#010+
-  '**2XS_try to link static (default) (define','s FPC_LINK_STATIC)'#010+
+  '**2XS_try to link static (default) (defines FPC_LINK_STATIC)'#010+
   '**2XX_try to link smart            (defines FPC_LINK_SMART)'#010+
   '**2XX_try to link smart            (defines FPC_LINK_SMART)'#010+
   '**0*_Processor specific options:'#010+
   '**0*_Processor specific options:'#010+
-  '3*1A<x>_output format:'#010+
+  '3*1A<x>_output for','mat:'#010+
   '3*2Aas_assemble using GNU AS'#010+
   '3*2Aas_assemble using GNU AS'#010+
   '3*2Aasaout_assemble using GNU AS for aout (Go32v1)'#010+
   '3*2Aasaout_assemble using GNU AS for aout (Go32v1)'#010+
-  '3*2Anasmcoff_coff (Go32v2',') file using Nasm'#010+
+  '3*2Anasmcoff_coff (Go32v2) file using Nasm'#010+
   '3*2Anasmelf_elf32 (Linux) file using Nasm'#010+
   '3*2Anasmelf_elf32 (Linux) file using Nasm'#010+
   '3*2Anasmobj_obj file using Nasm'#010+
   '3*2Anasmobj_obj file using Nasm'#010+
-  '3*2Amasm_obj file using Masm (Microsoft)'#010+
+  '3*2Amasm_obj file using Masm (Microsof','t)'#010+
   '3*2Atasm_obj file using Tasm (Borland)'#010+
   '3*2Atasm_obj file using Tasm (Borland)'#010+
   '3*2Acoff_coff (Go32v2) using internal writer'#010+
   '3*2Acoff_coff (Go32v2) using internal writer'#010+
-  '3*2Apecoff_pecoff (Win3','2) using internal writer'#010+
+  '3*2Apecoff_pecoff (Win32) using internal writer'#010+
   '3*1R<x>_assembler reading style:'#010+
   '3*1R<x>_assembler reading style:'#010+
   '3*2Ratt_read AT&T style assembler'#010+
   '3*2Ratt_read AT&T style assembler'#010+
   '3*2Rintel_read Intel style assembler'#010+
   '3*2Rintel_read Intel style assembler'#010+
-  '3*2Rdirect_copy assembler text directly to assembler file'#010+
+  '3','*2Rdirect_copy assembler text directly to assembler file'#010+
   '3*1O<x>_optimizations:'#010+
   '3*1O<x>_optimizations:'#010+
   '3*2Og_generate smaller code'#010+
   '3*2Og_generate smaller code'#010+
-  '3*','2OG_generate faster code (default)'#010+
+  '3*2OG_generate faster code (default)'#010+
   '3*2Or_keep certain variables in registers'#010+
   '3*2Or_keep certain variables in registers'#010+
   '3*2Ou_enable uncertain optimizations (see docs)'#010+
   '3*2Ou_enable uncertain optimizations (see docs)'#010+
-  '3*2O1_level 1 optimizations (quick optimizations)'#010+
+  '3*2O1','_level 1 optimizations (quick optimizations)'#010+
   '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#010+
   '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#010+
-  '3*2O3_le','vel 3 optimizations (-O2 repeatedly, max 5 times)'#010+
+  '3*2O3_level 3 optimizations (-O2 repeatedly, max 5 times)'#010+
   '3*2Op<x>_target processor:'#010+
   '3*2Op<x>_target processor:'#010+
   '3*3Op1_set target processor to 386/486'#010+
   '3*3Op1_set target processor to 386/486'#010+
-  '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#010+
+  '3*3Op2_set tar','get processor to Pentium/PentiumMMX (tm)'#010+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#010+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#010+
-  '3*1T<x>_Target ','operating system:'#010+
+  '3*1T<x>_Target operating system:'#010+
   '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#010+
   '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#010+
   '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#010+
   '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#010+
-  '3*2TLINUX_Linux'#010+
+  '3*2TLINUX_Linux'#010,
   '3*2Tnetware_Novell Netware Module (experimental)'#010+
   '3*2Tnetware_Novell Netware Module (experimental)'#010+
   '3*2TOS2_OS/2 2.x'#010+
   '3*2TOS2_OS/2 2.x'#010+
   '3*2TSUNOS_SunOS/Solaris'#010+
   '3*2TSUNOS_SunOS/Solaris'#010+
-  '3*2TWin32_Windows 32',' Bit'#010+
+  '3*2TWin32_Windows 32 Bit'#010+
   '3*1W<x>_Win32 target options'#010+
   '3*1W<x>_Win32 target options'#010+
   '3*2WB<x>_Set Image base to Hexadecimal <x> value'#010+
   '3*2WB<x>_Set Image base to Hexadecimal <x> value'#010+
   '3*2WC_Specify console type application'#010+
   '3*2WC_Specify console type application'#010+
-  '3*2WD_Use DEFFILE to export functions of DLL or EXE'#010+
+  '3*2WD_Us','e DEFFILE to export functions of DLL or EXE'#010+
   '3*2WF_Specify full-screen type application (OS/2 only)'#010+
   '3*2WF_Specify full-screen type application (OS/2 only)'#010+
-  '3*2WG_Speci','fy graphic type application'#010+
+  '3*2WG_Specify graphic type application'#010+
   '3*2WN_Do not generate relocation code (necessary for debugging)'#010+
   '3*2WN_Do not generate relocation code (necessary for debugging)'#010+
   '3*2WR_Generate relocation code'#010+
   '3*2WR_Generate relocation code'#010+
-  '6*1A<x>_output format'#010+
+  '6*1A<x>','_output format'#010+
   '6*2Aas_Unix o-file using GNU AS'#010+
   '6*2Aas_Unix o-file using GNU AS'#010+
   '6*2Agas_GNU Motorola assembler'#010+
   '6*2Agas_GNU Motorola assembler'#010+
   '6*2Amit_MIT Syntax (old GAS)'#010+
   '6*2Amit_MIT Syntax (old GAS)'#010+
-  '6*2','Amot_Standard Motorola assembler'#010+
+  '6*2Amot_Standard Motorola assembler'#010+
   '6*1O_optimizations:'#010+
   '6*1O_optimizations:'#010+
   '6*2Oa_turn on the optimizer'#010+
   '6*2Oa_turn on the optimizer'#010+
   '6*2Og_generate smaller code'#010+
   '6*2Og_generate smaller code'#010+
-  '6*2OG_generate faster code (default)'#010+
+  '6*2OG_generate faster',' code (default)'#010+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#010+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#010+
   '6*2O2_set target processor to a MC68020+'#010+
   '6*2O2_set target processor to a MC68020+'#010+
-  '6*1R<x>_assem','bler reading style:'#010+
+  '6*1R<x>_assembler reading style:'#010+
   '6*2RMOT_read motorola style assembler'#010+
   '6*2RMOT_read motorola style assembler'#010+
   '6*1T<x>_Target operating system:'#010+
   '6*1T<x>_Target operating system:'#010+
   '6*2TAMIGA_Commodore Amiga'#010+
   '6*2TAMIGA_Commodore Amiga'#010+
-  '6*2TATARI_Atari ST/STe/TT'#010+
+  '6*2TATARI_Ata','ri ST/STe/TT'#010+
   '6*2TMACOS_Macintosh m68k'#010+
   '6*2TMACOS_Macintosh m68k'#010+
   '6*2TLINUX_Linux-68k'#010+
   '6*2TLINUX_Linux-68k'#010+
   '6*2TPALMOS_PalmOS'#010+
   '6*2TPALMOS_PalmOS'#010+
   '**1*_'#010+
   '**1*_'#010+
   '**1?_shows this help'#010+
   '**1?_shows this help'#010+
-  '**1h_sh','ows this help without waiting'#000
+  '**1h_shows this help without waiting'#000
 );
 );

+ 6 - 1
compiler/ncon.pas

@@ -332,6 +332,8 @@ implementation
       begin
       begin
          result:=nil;
          result:=nil;
          location.loc:=LOC_MEM;
          location.loc:=LOC_MEM;
+         { needs to be loaded into an FPU register }
+         registersfpu:=1;
       end;
       end;
 
 
     function trealconstnode.docompare(p: tnode): boolean;
     function trealconstnode.docompare(p: tnode): boolean;
@@ -662,7 +664,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.22  2001-09-02 21:12:06  peter
+  Revision 1.23  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.22  2001/09/02 21:12:06  peter
     * move class of definitions into type section for delphi
     * move class of definitions into type section for delphi
 
 
   Revision 1.21  2001/08/26 13:36:40  florian
   Revision 1.21  2001/08/26 13:36:40  florian

+ 14 - 10
compiler/ninl.pas

@@ -1046,7 +1046,7 @@ implementation
          p1,hpp    : tnode;
          p1,hpp    : tnode;
          frac_para,
          frac_para,
          length_para : tnode;
          length_para : tnode;
-         isreal,
+         isreal,oneisreal,
          iswrite,
          iswrite,
          file_is_typed : boolean;
          file_is_typed : boolean;
       label
       label
@@ -2131,7 +2131,7 @@ implementation
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,1);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2141,7 +2141,7 @@ implementation
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,1);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2151,7 +2151,7 @@ implementation
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,2);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2160,13 +2160,14 @@ implementation
          in_pi:
          in_pi:
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
+             registersfpu:=1;
            end;
            end;
 
 
          in_abs_extended:
          in_abs_extended:
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,1);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2176,7 +2177,7 @@ implementation
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,1);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2186,7 +2187,7 @@ implementation
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,1);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2196,7 +2197,7 @@ implementation
            begin
            begin
              location.loc:=LOC_FPU;
              location.loc:=LOC_FPU;
              registers32:=left.registers32;
              registers32:=left.registers32;
-             registersfpu:=left.registersfpu;
+             registersfpu:=max(left.registersfpu,2);
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
              registersmmx:=left.registersmmx;
              registersmmx:=left.registersmmx;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -2250,7 +2251,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.58  2001-09-05 15:19:43  jonas
+  Revision 1.59  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.58  2001/09/05 15:19:43  jonas
     * the result of high/low nodes wasn't always resulttypepassed
     * the result of high/low nodes wasn't always resulttypepassed
 
 
   Revision 1.57  2001/09/04 14:32:45  jonas
   Revision 1.57  2001/09/04 14:32:45  jonas
@@ -2276,7 +2280,7 @@ end.
   Revision 1.54  2001/08/28 13:24:46  jonas
   Revision 1.54  2001/08/28 13:24:46  jonas
     + compilerproc implementation of most string-related type conversions
     + compilerproc implementation of most string-related type conversions
     - removed all code from the compiler which has been replaced by
     - removed all code from the compiler which has been replaced by
-      compilerproc implementations (using {$ifdef hascompilerproc} is not
+      compilerproc implementations (using $ifdef hascompilerproc is not
       necessary in the compiler)
       necessary in the compiler)
 
 
   Revision 1.53  2001/08/27 11:04:41  jonas
   Revision 1.53  2001/08/27 11:04:41  jonas

+ 7 - 4
compiler/ogcoff.pas

@@ -264,7 +264,7 @@ implementation
                Flags:=$60000020
                Flags:=$60000020
               else
               else
                Flags:=$20;
                Flags:=$20;
-              Aalign:=4;
+              Aalign:=16;
             end;
             end;
           sec_data :
           sec_data :
             begin
             begin
@@ -272,7 +272,7 @@ implementation
                Flags:=$c0300040
                Flags:=$c0300040
               else
               else
                Flags:=$40;
                Flags:=$40;
-              Aalign:=4;
+              Aalign:=16;
             end;
             end;
           sec_bss :
           sec_bss :
             begin
             begin
@@ -280,7 +280,7 @@ implementation
                Flags:=$c0300080
                Flags:=$c0300080
               else
               else
                Flags:=$80;
                Flags:=$80;
-              Aalign:=4;
+              Aalign:=16;
             end;
             end;
           sec_idata2,
           sec_idata2,
           sec_idata4,
           sec_idata4,
@@ -1167,7 +1167,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.15  2001-05-06 17:13:23  jonas
+  Revision 1.16  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.15  2001/05/06 17:13:23  jonas
     * completed incomplete typed constant records
     * completed incomplete typed constant records
 
 
   Revision 1.14  2001/05/04 19:50:58  peter
   Revision 1.14  2001/05/04 19:50:58  peter

+ 26 - 6
compiler/options.pas

@@ -681,10 +681,25 @@ begin
                     else
                     else
                       include(initglobalswitches,cs_asm_pipe);
                       include(initglobalswitches,cs_asm_pipe);
 {$endif Unix}
 {$endif Unix}
-              's' : if UnsetBool(More, 0) then
-                      initglobalswitches:=initglobalswitches-[cs_asm_extern,cs_link_extern]
-                    else
-                      initglobalswitches:=initglobalswitches+[cs_asm_extern,cs_link_extern];
+              's' :
+                    begin
+                      if UnsetBool(More, 0) then
+                        begin
+                          initglobalswitches:=initglobalswitches-[cs_asm_extern,cs_link_extern];
+                          if more<>'' then
+                            IllegalPara(opt);
+                        end
+                      else
+                        begin
+                          initglobalswitches:=initglobalswitches+[cs_asm_extern,cs_link_extern];
+                          if more='h' then
+                            initglobalswitches:=initglobalswitches-[cs_link_on_target]
+                          else if more='t' then
+                            initglobalswitches:=initglobalswitches+[cs_link_on_target]
+                          else if more<>'' then
+                            IllegalPara(opt);
+                        end;
+                    end;
               'S' : begin
               'S' : begin
                       if more[1]='I' then
                       if more[1]='I' then
                         begin
                         begin
@@ -1475,7 +1490,9 @@ begin
   { FIXME: this overrides possible explicit command line emulation setting,
   { FIXME: this overrides possible explicit command line emulation setting,
     but this isn't supported yet anyhow PM }
     but this isn't supported yet anyhow PM }
   if (target_info.target in [target_m68k_netbsd,target_m68k_linux]) then
   if (target_info.target in [target_m68k_netbsd,target_m68k_linux]) then
-   exclude(initmoduleswitches,cs_fp_emulation);
+   exclude(initmoduleswitches,cs_fp_emulation)
+  else
+   def_symbol('M68K_FPU_EMULATED');
 {$endif m68k}
 {$endif m68k}
 
 
 { write logo if set }
 { write logo if set }
@@ -1603,7 +1620,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.59  2001-09-12 12:46:54  marco
+  Revision 1.60  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.59  2001/09/12 12:46:54  marco
    * fix from peter
    * fix from peter
 
 
   Revision 1.58  2001/08/30 20:57:09  peter
   Revision 1.58  2001/08/30 20:57:09  peter

+ 28 - 5
compiler/ptconst.pas

@@ -43,7 +43,7 @@ implementation
 {$endif Delphi}
 {$endif Delphi}
        globtype,systems,tokens,cpuinfo,
        globtype,systems,tokens,cpuinfo,
        cutils,globals,widestr,scanner,
        cutils,globals,widestr,scanner,
-       symconst,symbase,symdef,aasm,types,verbose,
+       symconst,symbase,symdef,aasm,cpuasm,types,verbose,
        { pass 1 }
        { pass 1 }
        node,pass_1,
        node,pass_1,
        nmat,nadd,ncal,nmem,nset,ncnv,ninl,ncon,nld,nflw,
        nmat,nadd,ncal,nmem,nset,ncnv,ninl,ncon,nld,nflw,
@@ -63,6 +63,7 @@ implementation
          len,base  : longint;
          len,base  : longint;
          p,hp,hpstart : tnode;
          p,hp,hpstart : tnode;
          i,j,l,offset,
          i,j,l,offset,
+         varalign,
          strlength : longint;
          strlength : longint;
          curconstsegment : TAAsmoutput;
          curconstsegment : TAAsmoutput;
          ll        : tasmlabel;
          ll        : tasmlabel;
@@ -177,9 +178,22 @@ implementation
                       begin
                       begin
                          if is_constintnode(p) then
                          if is_constintnode(p) then
                            begin
                            begin
-                              {!!!!! hmmm, we can write yet only consts til 2^32-1 :( (FK) }
-                              curconstSegment.concat(Tai_const.Create_32bit(tordconstnode(p).value));
-                              curconstSegment.concat(Tai_const.Create_32bit(0));
+                              if target_info.endian = endian_little then
+                                begin
+                                  curconstSegment.concat(Tai_const.Create_32bit(tordconstnode(p).value));
+                                  if (tordconstnode(p).value<0) and (torddef(t.def).typ = s64bit) then
+                                    curconstSegment.concat(Tai_const.Create_32bit(-1))
+                                  else
+                                    curconstSegment.concat(Tai_const.Create_32bit(0));
+                                end
+                              else
+                                begin
+                                  if (tordconstnode(p).value<0) and (torddef(t.def).typ = s64bit) then
+                                    curconstSegment.concat(Tai_const.Create_32bit(-1))
+                                  else
+                                    curconstSegment.concat(Tai_const.Create_32bit(0));
+                                  curconstSegment.concat(Tai_const.Create_32bit(tordconstnode(p).value));
+                                end;
                            end
                            end
                          else
                          else
                            Message(cg_e_illegal_expression);
                            Message(cg_e_illegal_expression);
@@ -266,6 +280,12 @@ implementation
                   begin
                   begin
                     getdatalabel(ll);
                     getdatalabel(ll);
                     curconstSegment.concat(Tai_const_symbol.Create(ll));
                     curconstSegment.concat(Tai_const_symbol.Create(ll));
+                    if p.nodetype=stringconstn then
+                     varalign:=size_2_align(tstringconstnode(p).len)
+                    else
+                     varalign:=0;
+                    varalign:=used_align(varalign,aktalignment.varalignmin,aktalignment.varalignmax);
+                    Consts.concat(Tai_align.Create(varalign));
                     Consts.concat(Tai_label.Create(ll));
                     Consts.concat(Tai_label.Create(ll));
                     if p.nodetype=stringconstn then
                     if p.nodetype=stringconstn then
                       begin
                       begin
@@ -925,7 +945,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.32  2001-09-02 21:18:28  peter
+  Revision 1.33  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.32  2001/09/02 21:18:28  peter
     * split constsym.value in valueord,valueordptr,valueptr. The valueordptr
     * split constsym.value in valueord,valueordptr,valueptr. The valueordptr
       is used for holding target platform pointer values. As those can be
       is used for holding target platform pointer values. As those can be
       bigger than the source platform.
       bigger than the source platform.

+ 40 - 5
compiler/script.pas

@@ -86,6 +86,7 @@ type
 var
 var
   AsmRes : TAsmScript;
   AsmRes : TAsmScript;
 
 
+Function ScriptFixFileName(const s:string):string;
 Procedure GenerateAsmRes(const st : string);
 Procedure GenerateAsmRes(const st : string);
 
 
 
 
@@ -99,9 +100,21 @@ uses
     Unix,
     Unix,
   {$endif}
   {$endif}
 {$endif}
 {$endif}
-  globals,systems;
+  globtype,globals,systems;
 
 
 
 
+{****************************************************************************
+                                   Helpers
+****************************************************************************}
+
+    Function ScriptFixFileName(const s:string):string;
+     begin
+       if cs_link_on_target in aktglobalswitches then
+         ScriptFixFileName:=TargetFixFileName(s)
+       else
+         ScriptFixFileName:=FixFileName(s);
+     end;
+
 {****************************************************************************
 {****************************************************************************
                                   TScript
                                   TScript
 ****************************************************************************}
 ****************************************************************************}
@@ -116,7 +129,10 @@ end;
 
 
 constructor TScript.CreateExec(const s:string);
 constructor TScript.CreateExec(const s:string);
 begin
 begin
-  fn:=FixFileName(s)+target_info.scriptext;
+  if cs_link_on_target in aktglobalswitches then
+    fn:=FixFileName(s)+target_info.scriptext
+  else
+    fn:=FixFileName(s)+source_info.scriptext;
   executable:=true;
   executable:=true;
   data:=TStringList.Create;
   data:=TStringList.Create;
 end;
 end;
@@ -249,7 +265,10 @@ begin
      Add('echo Assembling $THEFILE');
      Add('echo Assembling $THEFILE');
    end;
    end;
   Add(command+' '+Options);
   Add(command+' '+Options);
+  { There is a problem here,
+    as allways return with a non zero error value PM  }
   Add('if error');
   Add('if error');
+  Add('why');
   Add('skip asmend');
   Add('skip asmend');
   Add('endif');
   Add('endif');
 end;
 end;
@@ -285,9 +304,11 @@ Procedure TAsmScriptAmiga.WriteToDisk;
 Begin
 Begin
   Add('skip end');
   Add('skip end');
   Add('lab asmend');
   Add('lab asmend');
+  Add('why');
   Add('echo An error occured while assembling $THEFILE');
   Add('echo An error occured while assembling $THEFILE');
   Add('skip end');
   Add('skip end');
   Add('lab linkend');
   Add('lab linkend');
+  Add('why');
   Add('echo An error occured while linking $THEFILE');
   Add('echo An error occured while linking $THEFILE');
   Add('lab end');
   Add('lab end');
   inherited WriteToDisk;
   inherited WriteToDisk;
@@ -346,8 +367,14 @@ end;
 
 
 
 
 Procedure GenerateAsmRes(const st : string);
 Procedure GenerateAsmRes(const st : string);
+var
+  scripttyp : tscripttype;
 begin
 begin
-  case target_info.script of
+  if cs_link_on_target in aktglobalswitches then
+    scripttyp := target_info.script
+  else
+    scripttyp := source_info.script;
+  case scripttyp of
     script_unix :
     script_unix :
       AsmRes:=TAsmScriptUnix.Create(st);
       AsmRes:=TAsmScriptUnix.Create(st);
     script_dos :
     script_dos :
@@ -373,7 +400,12 @@ begin
   if s<>'' then
   if s<>'' then
    begin
    begin
      if not(s[1] in ['a'..'z','A'..'Z','/','\','.']) then
      if not(s[1] in ['a'..'z','A'..'Z','/','\','.']) then
-      inherited Add('.'+DirSep+s)
+      begin
+        if cs_link_on_target in aktglobalswitches then
+          inherited Add('.'+target_info.DirSep+s)
+        else
+          inherited Add('.'+source_info.DirSep+s);
+      end
      else
      else
       inherited Add(s);
       inherited Add(s);
    end;
    end;
@@ -382,7 +414,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  2001-08-07 18:44:09  peter
+  Revision 1.13  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.12  2001/08/07 18:44:09  peter
     * made script target indepedent
     * made script target indepedent
 
 
   Revision 1.11  2001/07/30 20:59:27  peter
   Revision 1.11  2001/07/30 20:59:27  peter

+ 15 - 4
compiler/symdef.pas

@@ -2995,7 +2995,11 @@ implementation
       begin
       begin
          if assigned(rettype.def) and
          if assigned(rettype.def) and
             (rettype.def.deftype=floatdef) then
             (rettype.def.deftype=floatdef) then
-           fpu_used:=2;
+{$ifdef FAST_FPU}
+           fpu_used:=3;
+{$else : not FAST_FPU, i.e. SAFE_FPU}
+           fpu_used:={2}maxfpuregs;
+{$endif FAST_FPU}
       end;
       end;
 
 
 
 
@@ -3835,7 +3839,11 @@ implementation
          { a more secure way would be
          { a more secure way would be
            to allways store in a temp }
            to allways store in a temp }
          if is_fpu(rettype.def) then
          if is_fpu(rettype.def) then
-           fpu_used:=2
+{$ifdef FAST_FPU}
+           fpu_used:=3
+{$else : not FAST_FPU, i.e. SAFE_FPU}
+           fpu_used:={2}maxfpuregs
+{$endif FAST_FPU}
          else
          else
            fpu_used:=0;
            fpu_used:=0;
          inherited write(ppufile);
          inherited write(ppufile);
@@ -3969,7 +3977,7 @@ implementation
            s:='<procedure variable type of function'+demangled_paras+
            s:='<procedure variable type of function'+demangled_paras+
              ':'+rettype.def.gettypename
              ':'+rettype.def.gettypename
          else
          else
-           s:='<procedure variable type of procedure';
+           s:='<procedure variable type of procedure'+demangled_paras;
          if po_methodpointer in procoptions then
          if po_methodpointer in procoptions then
            s := s+' of object';
            s := s+' of object';
          gettypename := s+';'+proccalloption2str+'>';
          gettypename := s+';'+proccalloption2str+'>';
@@ -5408,7 +5416,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.49  2001-09-10 10:26:27  jonas
+  Revision 1.50  2001-09-17 21:29:12  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.49  2001/09/10 10:26:27  jonas
     * fixed web bug 1593
     * fixed web bug 1593
     * writing of procvar headers is more complete (mention var/const/out for
     * writing of procvar headers is more complete (mention var/const/out for
       paras, add "of object" if applicable)
       paras, add "of object" if applicable)

+ 13 - 4
compiler/systems.pas

@@ -52,6 +52,10 @@ interface
             ,asmmode_powerpc_direct
             ,asmmode_powerpc_direct
        );
        );
 
 
+       { IMPORTANT NOTE:
+         the integer value of this enum is stored in PPU
+         files to recognize the target, so if you add new targets
+         allways add them at end PM }
        ttarget = (target_none,
        ttarget = (target_none,
             target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
             target_i386_GO32V1,target_i386_GO32V2,target_i386_linux,
               target_i386_OS2,target_i386_Win32,target_i386_freebsd,
               target_i386_OS2,target_i386_Win32,target_i386_freebsd,
@@ -64,7 +68,7 @@ interface
        );
        );
 
 
        tasm = (as_none
        tasm = (as_none
-            ,as_i386_as,as_i386_asbsd,as_i386_as_aout,as_i386_asw,
+            ,as_i386_as,as_i386_as_aout,as_i386_asw,
               as_i386_nasmcoff,as_i386_nasmwin32,
               as_i386_nasmcoff,as_i386_nasmwin32,
               as_i386_nasmelf,as_i386_nasmobj,
               as_i386_nasmelf,as_i386_nasmobj,
               as_i386_tasm,as_i386_masm,
               as_i386_tasm,as_i386_masm,
@@ -93,7 +97,7 @@ interface
             ,res_gnu_windres,res_emxbind
             ,res_gnu_windres,res_emxbind
        );
        );
 
 
-       tscript = (script_none
+       tscripttype = (script_none
             ,script_dos,script_unix,script_amiga
             ,script_dos,script_unix,script_amiga
        );
        );
 
 
@@ -185,13 +189,15 @@ interface
           sharedlibprefix : string[4];
           sharedlibprefix : string[4];
           Cprefix      : string[2];
           Cprefix      : string[2];
           newline      : string[2];
           newline      : string[2];
+          dirsep       : char;
+          files_case_relevent : boolean;
           assem        : tasm;
           assem        : tasm;
           assemextern  : tasm; { external assembler, used by -a }
           assemextern  : tasm; { external assembler, used by -a }
           link         : tld;
           link         : tld;
           linkextern   : tld;  { external linker, used by -s }
           linkextern   : tld;  { external linker, used by -s }
           ar           : tar;
           ar           : tar;
           res          : tres;
           res          : tres;
-          script       : tscript;
+          script       : tscripttype;
           endian       : tendian;
           endian       : tendian;
           alignment    : talignmentinfo;
           alignment    : talignmentinfo;
           size_of_pointer : byte;
           size_of_pointer : byte;
@@ -641,7 +647,10 @@ finalization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.25  2001-08-30 20:57:10  peter
+  Revision 1.26  2001-09-17 21:29:13  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.25  2001/08/30 20:57:10  peter
     * asbsd merged
     * asbsd merged
 
 
   Revision 1.24  2001/08/19 11:22:24  peter
   Revision 1.24  2001/08/19 11:22:24  peter

+ 6 - 1
compiler/targets/t_amiga.pas

@@ -68,6 +68,8 @@ implementation
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_m68k_as;
             assem        : as_m68k_as;
             assemextern  : as_m68k_as;
             assemextern  : as_m68k_as;
             link         : ld_m68k_amiga;
             link         : ld_m68k_amiga;
@@ -94,7 +96,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2001-08-07 18:47:15  peter
+  Revision 1.5  2001-09-17 21:29:15  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.4  2001/08/07 18:47:15  peter
     * merged netbsd start
     * merged netbsd start
     * profile for win32
     * profile for win32
 
 

+ 6 - 1
compiler/targets/t_atari.pas

@@ -68,6 +68,8 @@ implementation
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_m68k_as;
             assem        : as_m68k_as;
             assemextern  : as_m68k_as;
             assemextern  : as_m68k_as;
             link         : ld_m68k_atari;
             link         : ld_m68k_atari;
@@ -94,7 +96,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2001-08-07 18:47:15  peter
+  Revision 1.5  2001-09-17 21:29:15  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.4  2001/08/07 18:47:15  peter
     * merged netbsd start
     * merged netbsd start
     * profile for win32
     * profile for win32
 
 

+ 6 - 1
compiler/targets/t_beos.pas

@@ -466,6 +466,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_i386_as;
             assem        : as_i386_as;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_beos;
             link         : ld_i386_beos;
@@ -511,7 +513,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2001-08-12 17:57:07  peter
+  Revision 1.7  2001-09-17 21:29:15  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.6  2001/08/12 17:57:07  peter
     * under development flag for targets
     * under development flag for targets
 
 
   Revision 1.5  2001/08/07 18:47:15  peter
   Revision 1.5  2001/08/07 18:47:15  peter

+ 60 - 15
compiler/targets/t_fbsd.pas

@@ -56,7 +56,8 @@ implementation
     tlinkerfreebsd=class(tlinker)
     tlinkerfreebsd=class(tlinker)
     private
     private
       Glibc2,
       Glibc2,
-      Glibc21 : boolean;
+      Glibc21,
+      LdSupportsNoResponseFile : boolean;
       Function  WriteResponseFile(isdll:boolean) : Boolean;
       Function  WriteResponseFile(isdll:boolean) : Boolean;
     public
     public
       constructor Create;override;
       constructor Create;override;
@@ -197,9 +198,25 @@ procedure TLinkerFreeBSD.SetDefaultInfo;
 begin
 begin
   Glibc2:=false;
   Glibc2:=false;
   Glibc21:=false;
   Glibc21:=false;
+{$ifdef NETBSD}
+{$ifdef M68K}
+  LdSupportsNoResponseFile:=true;
+{$else : not M68K}
+  LdSupportsNoResponseFile:=false;
+{$endif M68K}
+{$else : not NETBSD}
+  LdSupportsNoResponseFile:=false;
+{$endif NETBSD}
   with Info do
   with Info do
    begin
    begin
-     ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $RES';
+     if LdSupportsNoResponseFile then
+       begin
+         ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE `cat $RES`';
+         { We need external linking to interpret the `cat $RES` PM }
+         include(aktglobalswitches,cs_link_extern);
+       end
+     else
+       ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $RES';
      DllCmd[1]:='ld $OPT -shared -L. -o $EXE $RES';
      DllCmd[1]:='ld $OPT -shared -L. -o $EXE $RES';
      DllCmd[2]:='strip --strip-unneeded $EXE';
      DllCmd[2]:='strip --strip-unneeded $EXE';
      { first try glibc2 }
      { first try glibc2 }
@@ -269,17 +286,24 @@ begin
   HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
   HPath:=TStringListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
-     LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
+     if LdSupportsNoResponseFile then
+       LinkRes.Add('-L'+HPath.Str)
+     else
+       LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
      HPath:=TStringListItem(HPath.Next);
      HPath:=TStringListItem(HPath.Next);
    end;
    end;
   HPath:=TStringListItem(LibrarySearchPath.First);
   HPath:=TStringListItem(LibrarySearchPath.First);
   while assigned(HPath) do
   while assigned(HPath) do
    begin
    begin
-     LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
+     if LdSupportsNoResponseFile then
+       LinkRes.Add('-L'+HPath.Str)
+     else
+       LinkRes.Add('SEARCH_DIR('+HPath.Str+')');
      HPath:=TStringListItem(HPath.Next);
      HPath:=TStringListItem(HPath.Next);
    end;
    end;
 
 
-  LinkRes.Add('INPUT(');
+  if not LdSupportsNoResponseFile then
+    LinkRes.Add('INPUT(');
   { add objectfiles, start with prt0 always }
   { add objectfiles, start with prt0 always }
   if prtobj<>'' then
   if prtobj<>'' then
    LinkRes.AddFileName(FindObjectFile(prtobj,''));
    LinkRes.AddFileName(FindObjectFile(prtobj,''));
@@ -298,25 +322,29 @@ begin
      if s<>'' then
      if s<>'' then
       LinkRes.AddFileName(s);
       LinkRes.AddFileName(s);
    end;
    end;
-  LinkRes.Add(')');
+  if not LdSupportsNoResponseFile then
+   LinkRes.Add(')');
 
 
   { Write staticlibraries }
   { Write staticlibraries }
   if not StaticLibFiles.Empty then
   if not StaticLibFiles.Empty then
    begin
    begin
-     LinkRes.Add('GROUP(');
+     if not LdSupportsNoResponseFile then
+       LinkRes.Add('GROUP(');
      While not StaticLibFiles.Empty do
      While not StaticLibFiles.Empty do
       begin
       begin
         S:=StaticLibFiles.GetFirst;
         S:=StaticLibFiles.GetFirst;
         LinkRes.AddFileName(s)
         LinkRes.AddFileName(s)
       end;
       end;
-     LinkRes.Add(')');
+     if not LdSupportsNoResponseFile then
+       LinkRes.Add(')');
    end;
    end;
 
 
   { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
   { Write sharedlibraries like -l<lib>, also add the needed dynamic linker
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
     here to be sure that it gets linked this is needed for glibc2 systems (PFV) }
   if not SharedLibFiles.Empty then
   if not SharedLibFiles.Empty then
    begin
    begin
-     LinkRes.Add('INPUT(');
+     if not LdSupportsNoResponseFile then
+       LinkRes.Add('INPUT(');
      While not SharedLibFiles.Empty do
      While not SharedLibFiles.Empty do
       begin
       begin
         S:=SharedLibFiles.GetFirst;
         S:=SharedLibFiles.GetFirst;
@@ -341,7 +369,8 @@ begin
       LinkRes.Add('-lgcc');
       LinkRes.Add('-lgcc');
      if linkdynamic and (Info.DynamicLinker<>'') then
      if linkdynamic and (Info.DynamicLinker<>'') then
       LinkRes.AddFileName(Info.DynamicLinker);
       LinkRes.AddFileName(Info.DynamicLinker);
-     LinkRes.Add(')');
+     if not LdSupportsNoResponseFile then
+       LinkRes.Add(')');
    end;
    end;
   { objects which must be at the end }
   { objects which must be at the end }
   if linklibc then
   if linklibc then
@@ -380,7 +409,14 @@ begin
   StripStr:='';
   StripStr:='';
   DynLinkStr:='';
   DynLinkStr:='';
   if (cs_link_staticflag in aktglobalswitches) then
   if (cs_link_staticflag in aktglobalswitches) then
-   StaticStr:='-static';
+    begin
+      if (target_info.target=target_m68k_netbsd) and
+         ((cs_link_on_target in aktglobalswitches) or
+          (target_info.target=source_info.target)) then
+        StaticStr:='-Bstatic'
+      else
+        StaticStr:='-static';
+    end;
   if (cs_link_strip in aktglobalswitches) then
   if (cs_link_strip in aktglobalswitches) then
    StripStr:='-s';
    StripStr:='-s';
   If (cs_profile in aktmoduleswitches) or
   If (cs_profile in aktmoduleswitches) or
@@ -477,6 +513,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_i386_elf32;
             assem        : as_i386_elf32;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_freebsd;
             link         : ld_i386_freebsd;
@@ -536,9 +574,11 @@ end;
             resobjext    : '.or';
             resobjext    : '.or';
             staticlibprefix : 'libp';
             staticlibprefix : 'libp';
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
-            Cprefix      : '';
+            Cprefix      : '_';
             newline      : #10;
             newline      : #10;
-            assem        : as_i386_elf32;
+            dirsep       : '/';
+            files_case_relevent : true;
+            assem        : as_i386_as;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_freebsd;
             link         : ld_i386_freebsd;
             linkextern   : ld_i386_freebsd;
             linkextern   : ld_i386_freebsd;
@@ -602,7 +642,9 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
-            assem        : as_m68k_as;
+            dirsep       : '/';
+            files_case_relevent : true;
+            assem        : as_m68k_asbsd;
             assemextern  : as_m68k_as;
             assemextern  : as_m68k_as;
             link         : ld_m68k_freebsd;
             link         : ld_m68k_freebsd;
             linkextern   : ld_m68k_freebsd;
             linkextern   : ld_m68k_freebsd;
@@ -656,7 +698,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  2001-08-12 17:57:07  peter
+  Revision 1.11  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.10  2001/08/12 17:57:07  peter
     * under development flag for targets
     * under development flag for targets
 
 
   Revision 1.9  2001/08/07 18:47:15  peter
   Revision 1.9  2001/08/07 18:47:15  peter

+ 6 - 1
compiler/targets/t_go32v1.pas

@@ -219,6 +219,8 @@ end;
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13#10;
             newline      : #13#10;
+            dirsep       : '\';
+            files_case_relevent : false;
             assem        : as_i386_as;
             assem        : as_i386_as;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_go32v1;
             link         : ld_i386_go32v1;
@@ -260,7 +262,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2001-08-19 11:22:24  peter
+  Revision 1.10  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.9  2001/08/19 11:22:24  peter
     * palmos support from v10 merged
     * palmos support from v10 merged
 
 
   Revision 1.8  2001/08/07 18:47:15  peter
   Revision 1.8  2001/08/07 18:47:15  peter

+ 6 - 1
compiler/targets/t_go32v2.pas

@@ -383,6 +383,8 @@ end;
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13#10;
             newline      : #13#10;
+            dirsep       : '\';
+            files_case_relevent : false;
             assem        : as_i386_coff;
             assem        : as_i386_coff;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_go32v2;
             link         : ld_i386_go32v2;
@@ -424,7 +426,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.12  2001-08-30 20:08:23  peter
+  Revision 1.13  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.12  2001/08/30 20:08:23  peter
     * create script.res and use link.res for commandline
     * create script.res and use link.res for commandline
 
 
   Revision 1.11  2001/08/19 11:22:24  peter
   Revision 1.11  2001/08/19 11:22:24  peter

+ 12 - 1
compiler/targets/t_linux.pas

@@ -503,6 +503,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_i386_elf32;
             assem        : as_i386_elf32;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_linux;
             link         : ld_i386_linux;
@@ -567,6 +569,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_m68k_as;
             assem        : as_m68k_as;
             assemextern  : as_m68k_as;
             assemextern  : as_m68k_as;
             link         : ld_m68k_linux;
             link         : ld_m68k_linux;
@@ -617,6 +621,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_powerpc_as;
             assem        : as_powerpc_as;
             assemsrc     : as_powerpc_as;
             assemsrc     : as_powerpc_as;
             ar           : ar_powerpc_ar;
             ar           : ar_powerpc_ar;
@@ -665,6 +671,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_alpha_as;
             assem        : as_alpha_as;
             assemextern  : as_alpha_as;
             assemextern  : as_alpha_as;
             link         : ld_alpha_linux;
             link         : ld_alpha_linux;
@@ -715,7 +723,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.11  2001-08-07 18:47:15  peter
+  Revision 1.12  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.11  2001/08/07 18:47:15  peter
     * merged netbsd start
     * merged netbsd start
     * profile for win32
     * profile for win32
 
 

+ 6 - 1
compiler/targets/t_macos.pas

@@ -69,6 +69,8 @@ implementation
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13;
             newline      : #13;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_m68k_mpw;
             assem        : as_m68k_mpw;
             assemextern  : as_m68k_mpw;
             assemextern  : as_m68k_mpw;
             link         : ld_m68k_mac;
             link         : ld_m68k_mac;
@@ -152,7 +154,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2001-08-07 18:47:15  peter
+  Revision 1.5  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.4  2001/08/07 18:47:15  peter
     * merged netbsd start
     * merged netbsd start
     * profile for win32
     * profile for win32
 
 

+ 6 - 1
compiler/targets/t_nwm.pas

@@ -483,6 +483,8 @@ end;
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #13#10;
             newline      : #13#10;
+            dirsep       : '\';
+            files_case_relevent : false;
             assem        : as_i386_elf32;
             assem        : as_i386_elf32;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_netware;
             link         : ld_i386_netware;
@@ -526,7 +528,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2001-08-07 18:47:15  peter
+  Revision 1.10  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.9  2001/08/07 18:47:15  peter
     * merged netbsd start
     * merged netbsd start
     * profile for win32
     * profile for win32
 
 

+ 6 - 1
compiler/targets/t_os2.pas

@@ -541,6 +541,8 @@ end;
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13#10;
             newline      : #13#10;
+            dirsep       : '\';
+            files_case_relevent : false;
             assem        : as_i386_as_aout;
             assem        : as_i386_as_aout;
             assemextern  : as_i386_as_aout;
             assemextern  : as_i386_as_aout;
             link         : ld_i386_os2;
             link         : ld_i386_os2;
@@ -584,7 +586,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2001-08-07 18:47:15  peter
+  Revision 1.10  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.9  2001/08/07 18:47:15  peter
     * merged netbsd start
     * merged netbsd start
     * profile for win32
     * profile for win32
 
 

+ 6 - 1
compiler/targets/t_palmos.pas

@@ -235,6 +235,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_m68k_as;
             assem        : as_m68k_as;
             assemextern  : as_m68k_as;
             assemextern  : as_m68k_as;
             link         : ld_m68k_palmos;
             link         : ld_m68k_palmos;
@@ -263,7 +265,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.5  2001-08-19 11:22:24  peter
+  Revision 1.6  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.5  2001/08/19 11:22:24  peter
     * palmos support from v10 merged
     * palmos support from v10 merged
 
 
   Revision 1.4  2001/08/07 18:47:15  peter
   Revision 1.4  2001/08/07 18:47:15  peter

+ 6 - 1
compiler/targets/t_sunos.pas

@@ -506,6 +506,8 @@ end;
             sharedlibprefix : 'lib';
             sharedlibprefix : 'lib';
             Cprefix      : '';
             Cprefix      : '';
             newline      : #10;
             newline      : #10;
+            dirsep       : '/';
+            files_case_relevent : true;
             assem        : as_i386_as;
             assem        : as_i386_as;
             assemextern  : as_i386_as;
             assemextern  : as_i386_as;
             link         : ld_i386_sunos;
             link         : ld_i386_sunos;
@@ -549,7 +551,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  2001-08-12 17:57:07  peter
+  Revision 1.11  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.10  2001/08/12 17:57:07  peter
     * under development flag for targets
     * under development flag for targets
 
 
   Revision 1.9  2001/08/07 18:47:15  peter
   Revision 1.9  2001/08/07 18:47:15  peter

+ 6 - 1
compiler/targets/t_win32.pas

@@ -1477,6 +1477,8 @@ function tDLLScannerWin32.scan(const binname:string):longbool;
             sharedlibprefix : '';
             sharedlibprefix : '';
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13#10;
             newline      : #13#10;
+            dirsep       : '\';
+            files_case_relevent : false;
             assem        : as_i386_pecoff;
             assem        : as_i386_pecoff;
             assemextern  : as_i386_asw;
             assemextern  : as_i386_asw;
             link         : ld_i386_win32;
             link         : ld_i386_win32;
@@ -1523,7 +1525,10 @@ initialization
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.16  2001-09-13 14:47:19  michael
+  Revision 1.17  2001-09-17 21:29:16  peter
+    * merged netbsd, fpu-overflow from fixes branch
+
+  Revision 1.16  2001/09/13 14:47:19  michael
   + Committed patch from peter
   + Committed patch from peter
 
 
   Revision 1.15  2001/08/07 18:47:15  peter
   Revision 1.15  2001/08/07 18:47:15  peter