+ better code for type conversation longint/dword to real type

This commit is contained in:
florian 1998-09-03 17:39:03 +00:00
parent 36a555ead1
commit 6ca0a4d19b
4 changed files with 36 additions and 8 deletions

View File

@ -647,10 +647,12 @@ implementation
var
r : preference;
hregister : tregister;
begin
{ for u32bit a solution is to push $0 and to load a comp }
{ does this first, it destroys maybe EDI }
hregister:=R_EDI;
if porddef(p^.left^.resulttype)^.typ=u32bit then
push_int(0);
if (p^.left^.location.loc=LOC_REGISTER) or
@ -661,7 +663,8 @@ implementation
u8bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_BL,p^.left^.location.register,R_EDI)));
s16bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVSX,S_WL,p^.left^.location.register,R_EDI)));
u16bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOVZX,S_WL,p^.left^.location.register,R_EDI)));
u32bit,s32bit : exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,S_L,p^.left^.location.register,R_EDI)));
u32bit,s32bit:
hregister:=p^.left^.location.register
end;
ungetregister(p^.left^.location.register);
end
@ -678,7 +681,7 @@ implementation
del_reference(p^.left^.location.reference);
ungetiftemp(p^.left^.location.reference);
end;
exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,R_EDI)));
exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,hregister)));
r:=new_reference(R_ESP,0);
if porddef(p^.left^.resulttype)^.typ=u32bit then
exprasmlist^.concat(new(pai386,op_ref(A_FILD,S_IQ,r)))
@ -1249,7 +1252,10 @@ implementation
end.
{
$Log$
Revision 1.15 1998-09-03 16:24:50 florian
Revision 1.16 1998-09-03 17:39:03 florian
+ better code for type conversation longint/dword to real type
Revision 1.15 1998/09/03 16:24:50 florian
* bug of type conversation from dword to real fixed
* bug fix of Jonas applied

View File

@ -68,7 +68,8 @@ uses
{$ifdef linux}
,linux
{$endif}
,dos;
,dos
,win_targ;
{$ifndef linux}
Procedure Shell(command:string);
@ -424,6 +425,8 @@ begin
end;
DoExec(bindbin,s,false,false);
end;
if target_info.target=target_Win32 then
win_targ.postprocessexecutable;
{Remove ReponseFile}
if (success) and not(cs_link_extern in aktglobalswitches) then
RemoveFile(LinkResName);
@ -488,7 +491,10 @@ end;
end.
{
$Log$
Revision 1.22 1998-09-01 09:01:00 peter
Revision 1.23 1998-09-03 17:39:04 florian
+ better code for type conversation longint/dword to real type
Revision 1.22 1998/09/01 09:01:00 peter
+ glibc2 support
Revision 1.21 1998/08/31 12:26:26 peter

View File

@ -183,7 +183,8 @@ unit Ra386dir;
{$ifdef TESTGLOBALVAR}
getsym(upper(hs),false);
sym:=srsym;
if assigned(sym) and (sym^.owner^.symtabletype in [unitsymtable,globalsymtable,staticsymtable]) then
if assigned(sym) and (sym^.owner^.symtabletype in [unitsymtable,
globalsymtable,staticsymtable]) then
begin
if (sym^.typ = varsym) or (sym^.typ = typedconstsym) then
begin
@ -261,7 +262,10 @@ unit Ra386dir;
end.
{
$Log$
Revision 1.6 1998-09-03 17:08:47 pierre
Revision 1.7 1998-09-03 17:39:05 florian
+ better code for type conversation longint/dword to real type
Revision 1.6 1998/09/03 17:08:47 pierre
* better lines for stabs
(no scroll back to if before else part
no return to case line at jump outside case)

View File

@ -35,6 +35,9 @@ unit win_targ;
procedure generatelib;virtual;
end;
{ sets some flags of the executable }
procedure postprocessexecutable;
implementation
uses
@ -176,10 +179,19 @@ unit win_targ;
end;
end;
procedure postprocessexecutable;
begin
end;
end.
{
$Log$
Revision 1.6 1998-08-10 14:50:38 peter
Revision 1.7 1998-09-03 17:39:06 florian
+ better code for type conversation longint/dword to real type
Revision 1.6 1998/08/10 14:50:38 peter
+ localswitches, moduleswitches, globalswitches splitting
Revision 1.5 1998/06/10 10:43:18 peter