Browse Source

* fixed stupid copy/paste which turned softfloat always off
* fixed wince softfloat compiler proc. to be correctly named also when used outside the system unit

git-svn-id: trunk@966 -

florian 20 years ago
parent
commit
a53c9e2666

+ 4 - 4
compiler/arm/narmcnv.pas

@@ -89,17 +89,17 @@ implementation
                     if is_currency(left.resulttype.def) then
                     if is_currency(left.resulttype.def) then
                       left.resulttype := s64inttype;
                       left.resulttype := s64inttype;
                     if is_signed(left.resulttype.def) then
                     if is_signed(left.resulttype.def) then
-                      fname:='i64tod'
+                      fname:='I64TOD'
                     else
                     else
-                      fname:='ui64tod';
+                      fname:='UI64TOD';
                   end
                   end
                 else
                 else
                   { other integers are supposed to be 32 bit }
                   { other integers are supposed to be 32 bit }
                   begin
                   begin
                     if is_signed(left.resulttype.def) then
                     if is_signed(left.resulttype.def) then
-                      fname:='itod'
+                      fname:='ITOD'
                     else
                     else
-                      fname:='utod';
+                      fname:='UTOD';
                     firstpass(left);
                     firstpass(left);
                   end;
                   end;
                 result:=ccallnode.createintern(fname,ccallparanode.create(
                 result:=ccallnode.createintern(fname,ccallparanode.create(

+ 1 - 1
compiler/msg/errore.msg

@@ -1505,7 +1505,7 @@ cg_e_break_not_allowed=06044_E_BREAK not allowed
 cg_e_continue_not_allowed=06045_E_CONTINUE not allowed
 cg_e_continue_not_allowed=06045_E_CONTINUE not allowed
 % You're trying to use \var{continue} outside a loop construction.
 % You're trying to use \var{continue} outside a loop construction.
 % \end{description}
 % \end{description}
-cg_f_unknown_compiler=06046_F_Unknown compilerproc "$1". Check if you use the correct run time library.
+cg_f_unknown_compilerproc=06046_F_Unknown compilerproc "$1". Check if you use the correct run time library.
 % The compiler expects that the runtime library contains some subrountines. If you see this error
 % The compiler expects that the runtime library contains some subrountines. If you see this error
 % and you didn't mess with the runtime library, it's very likely that the runtime library
 % and you didn't mess with the runtime library, it's very likely that the runtime library
 % you're using doesn't match the used compiler. If you changed the runtime library this error means
 % you're using doesn't match the used compiler. If you changed the runtime library this error means

+ 1 - 1
compiler/msgidx.inc

@@ -411,7 +411,7 @@ const
   cg_e_localsize_too_big=06043;
   cg_e_localsize_too_big=06043;
   cg_e_break_not_allowed=06044;
   cg_e_break_not_allowed=06044;
   cg_e_continue_not_allowed=06045;
   cg_e_continue_not_allowed=06045;
-  cg_f_unknown_compiler=06046;
+  cg_f_unknown_compilerproc=06046;
   asmr_d_start_reading=07000;
   asmr_d_start_reading=07000;
   asmr_d_finish_reading=07001;
   asmr_d_finish_reading=07001;
   asmr_e_none_label_contain_at=07002;
   asmr_e_none_label_contain_at=07002;

+ 12 - 12
compiler/nadd.pas

@@ -1856,33 +1856,33 @@ implementation
           begin
           begin
             case nodetype of
             case nodetype of
               addn:
               addn:
-                procname:='add';
+                procname:='ADD';
               muln:
               muln:
-                procname:='mul';
+                procname:='MUL';
               subn:
               subn:
-                procname:='sub';
+                procname:='SUB';
               slashn:
               slashn:
-                procname:='div';
+                procname:='DIV';
               ltn:
               ltn:
-                procname:='lt';
+                procname:='LT';
               lten:
               lten:
-                procname:='le';
+                procname:='LE';
               gtn:
               gtn:
-                procname:='gt';
+                procname:='GT';
               gten:
               gten:
-                procname:='ge';
+                procname:='GE';
               equaln:
               equaln:
-                procname:='eq';
+                procname:='EQ';
               unequaln:
               unequaln:
-                procname:='ne';
+                procname:='NE';
               else
               else
                 CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),left.resulttype.def.typename,right.resulttype.def.typename);
                 CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),left.resulttype.def.typename,right.resulttype.def.typename);
             end;
             end;
             case tfloatdef(resulttype.def).typ of
             case tfloatdef(resulttype.def).typ of
               s32real:
               s32real:
-                procname:=procname+'s';
+                procname:=procname+'S';
               s64real:
               s64real:
-                procname:=procname+'d';
+                procname:=procname+'D';
               {!!! not yet implemented
               {!!! not yet implemented
               s128real:
               s128real:
               }
               }

+ 2 - 2
compiler/ncal.pas

@@ -795,8 +795,8 @@ type
                searchsym(upper(name),srsym,symowner);
                searchsym(upper(name),srsym,symowner);
            end;
            end;
          if not assigned(srsym) or
          if not assigned(srsym) or
-            (srsym.typ <> procsym) then
-           Message1(cg_f_unknown_compiler,name);
+            (srsym.typ<>procsym) then
+           Message1(cg_f_unknown_compilerproc,name);
          self.create(params,tprocsym(srsym),symowner,nil,[]);
          self.create(params,tprocsym(srsym),symowner,nil,[]);
        end;
        end;
 
 

+ 2 - 2
compiler/ncnv.pas

@@ -1865,14 +1865,14 @@ implementation
                   s32real:
                   s32real:
                     case tfloatdef(resulttype.def).typ of
                     case tfloatdef(resulttype.def).typ of
                       s64real:
                       s64real:
-                        result:=ccallnode.createintern('stod',ccallparanode.create(left,nil));
+                        result:=ccallnode.createintern('STOD',ccallparanode.create(left,nil));
                       else
                       else
                         internalerror(2005082704);
                         internalerror(2005082704);
                     end;
                     end;
                   s64real:
                   s64real:
                     case tfloatdef(resulttype.def).typ of
                     case tfloatdef(resulttype.def).typ of
                       s32real:
                       s32real:
-                        result:=ccallnode.createintern('dtos',ccallparanode.create(left,nil));
+                        result:=ccallnode.createintern('DTOS',ccallparanode.create(left,nil));
                       else
                       else
                         internalerror(2005082703);
                         internalerror(2005082703);
                     end;
                     end;

+ 1 - 1
compiler/ninl.pas

@@ -41,7 +41,7 @@ interface
           function det_resulttype:tnode;override;
           function det_resulttype:tnode;override;
           function docompare(p: tnode): boolean; override;
           function docompare(p: tnode): boolean; override;
           { All the following routines currently
           { All the following routines currently
-            call compilerproc's, unless they are
+            call compilerprocs, unless they are
             overriden in which case, the code
             overriden in which case, the code
             generator handles them.
             generator handles them.
           }
           }

+ 2 - 2
compiler/nmat.pas

@@ -678,9 +678,9 @@ implementation
               begin
               begin
                 case tfloatdef(resulttype.def).typ of
                 case tfloatdef(resulttype.def).typ of
                   s32real:
                   s32real:
-                    procname:='negs';
+                    procname:='NEGS';
                   s64real:
                   s64real:
-                    procname:='negd';
+                    procname:='NEGD';
                   {!!! not yet implemented
                   {!!! not yet implemented
                   s128real:
                   s128real:
                   }
                   }

+ 1 - 1
compiler/options.pas

@@ -2102,7 +2102,7 @@ begin
 
 
   { force fpu emulation on arm/wince }
   { force fpu emulation on arm/wince }
   if target_info.system=system_arm_wince then
   if target_info.system=system_arm_wince then
-    exclude(initmoduleswitches,cs_fp_emulation);
+    include(initmoduleswitches,cs_fp_emulation);
 
 
 {$ifdef x86_64}
 {$ifdef x86_64}
   {$warning HACK: turn off smartlinking}
   {$warning HACK: turn off smartlinking}

+ 5 - 5
compiler/pmodules.pas

@@ -271,13 +271,13 @@ implementation
 {$endif}
 {$endif}
 
 
     Procedure InsertResourceInfo;
     Procedure InsertResourceInfo;
-    
+
     var
     var
       hp           : tused_unit;
       hp           : tused_unit;
       found        : Boolean;
       found        : Boolean;
       I            : Integer;
       I            : Integer;
       ResourceInfo : taasmoutput;
       ResourceInfo : taasmoutput;
-      
+
     begin
     begin
       if target_res.id=res_elf then
       if target_res.id=res_elf then
         begin
         begin
@@ -299,7 +299,7 @@ implementation
 {$else EXTERNALRESPTRS}
 {$else EXTERNALRESPTRS}
           new_section(ResourceInfo,sec_fpc,'resptrs',4);
           new_section(ResourceInfo,sec_fpc,'resptrs',4);
           ResourceInfo.concat(Tai_symbol.Createname_global('FPC_RESSYMBOL',AT_DATA,0));
           ResourceInfo.concat(Tai_symbol.Createname_global('FPC_RESSYMBOL',AT_DATA,0));
-          For I:=1 to 32 do 
+          For I:=1 to 32 do
             ResourceInfo.Concat(Tai_const.Create_32bit(0));
             ResourceInfo.Concat(Tai_const.Create_32bit(0));
 {$endif EXTERNALRESPTRS}
 {$endif EXTERNALRESPTRS}
           end
           end
@@ -502,7 +502,7 @@ implementation
              AddUnit('CMem');
              AddUnit('CMem');
 {$ifdef cpufpemu}
 {$ifdef cpufpemu}
            { Floating point emulation unit? }
            { Floating point emulation unit? }
-           if (cs_fp_emulation in aktmoduleswitches) then
+           if (cs_fp_emulation in aktmoduleswitches) and not(target_info.system in system_wince) then
              AddUnit('SoftFpu');
              AddUnit('SoftFpu');
 {$endif cpufpemu}
 {$endif cpufpemu}
          end;
          end;
@@ -1638,7 +1638,7 @@ implementation
          insertinitfinaltable;
          insertinitfinaltable;
          insertmemorysizes;
          insertmemorysizes;
          { Insert symbol to resource info }
          { Insert symbol to resource info }
-         
+
          InsertResourceInfo;
          InsertResourceInfo;
 
 
          { create dwarf debuginfo }
          { create dwarf debuginfo }

+ 2 - 1
rtl/wince/system.pp

@@ -99,6 +99,8 @@ function CreateFile(lpFileName:pchar; dwDesiredAccess:DWORD; dwShareMode:DWORD;
 function CreateDirectory(name : pointer;sec : pointer) : longbool; stdcall;
 function CreateDirectory(name : pointer;sec : pointer) : longbool; stdcall;
 function RemoveDirectory(name:pointer):longbool; stdcall;
 function RemoveDirectory(name:pointer):longbool; stdcall;
 
 
+
+{ the external directive isn't really necessary here because it is overriden by external (FK) }
 function addd(d1,d2 : double) : double; compilerproc;
 function addd(d1,d2 : double) : double; compilerproc;
    cdecl;external 'coredll' name '__addd';
    cdecl;external 'coredll' name '__addd';
 
 
@@ -147,7 +149,6 @@ function utod(i : dword) : double; compilerproc;
 function itod(i : longint) : double; compilerproc;
 function itod(i : longint) : double; compilerproc;
    cdecl;external 'coredll' name '__itod';
    cdecl;external 'coredll' name '__itod';
 
 
-
 function ui64tod(i : qword) : double; compilerproc;
 function ui64tod(i : qword) : double; compilerproc;
    cdecl;external 'coredll' name '__u64tod';
    cdecl;external 'coredll' name '__u64tod';