mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 12:50:30 +02:00
* removed temp defines
This commit is contained in:
parent
ebd738f2f5
commit
248826aa81
@ -2091,9 +2091,12 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.68 1999-07-02 12:18:46 jonas
|
||||
* released setconstnot (changed to {$ifndef nosetconstnot})
|
||||
* released shlmul (changed to {$ifndef no shlmul})
|
||||
Revision 1.69 1999-07-05 20:13:06 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.68 1999/07/02 12:18:46 jonas
|
||||
* released setconstnot (changed to $ifndef nosetconstnot)
|
||||
* released shlmul (changed to $ifndef no shlmul)
|
||||
|
||||
Revision 1.67 1999/06/14 17:47:45 peter
|
||||
* merged
|
||||
|
@ -593,7 +593,7 @@ implementation
|
||||
|
||||
var
|
||||
r : preference;
|
||||
hregister,hregister2 : tregister;
|
||||
hregister : tregister;
|
||||
l1,l2 : pasmlabel;
|
||||
|
||||
begin
|
||||
@ -1392,7 +1392,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.77 1999-07-04 16:37:08 florian
|
||||
Revision 1.78 1999-07-05 20:13:07 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.77 1999/07/04 16:37:08 florian
|
||||
+ qword/int64 -> floating point type cast
|
||||
|
||||
Revision 1.76 1999/06/28 22:29:10 florian
|
||||
|
@ -26,9 +26,6 @@ interface
|
||||
uses
|
||||
tree;
|
||||
|
||||
{$define SMALLSETORD}
|
||||
|
||||
|
||||
procedure secondrealconst(var p : ptree);
|
||||
procedure secondfixconst(var p : ptree);
|
||||
procedure secondordconst(var p : ptree);
|
||||
@ -300,7 +297,6 @@ implementation
|
||||
i : longint;
|
||||
neededtyp : tait;
|
||||
begin
|
||||
{$ifdef SMALLSETORD}
|
||||
{ small sets are loaded as constants }
|
||||
if psetdef(p^.resulttype)^.settype=smallset then
|
||||
begin
|
||||
@ -309,7 +305,6 @@ implementation
|
||||
p^.location.reference.offset:=plongint(p^.value_set)^;
|
||||
exit;
|
||||
end;
|
||||
{$endif}
|
||||
if psetdef(p^.resulttype)^.settype=smallset then
|
||||
neededtyp:=ait_const_32bit
|
||||
else
|
||||
@ -406,7 +401,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.36 1999-05-27 19:44:10 peter
|
||||
Revision 1.37 1999-07-05 20:13:08 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.36 1999/05/27 19:44:10 peter
|
||||
* removed oldasm
|
||||
* plabel -> pasmlabel
|
||||
* -a switches to source writing automaticly
|
||||
|
@ -186,7 +186,7 @@ implementation
|
||||
getlabel(l3);
|
||||
|
||||
{ could we spare the first comparison ? }
|
||||
omitfirstcomp:=false;
|
||||
omitfirstcomp:=false;
|
||||
if p^.right^.treetype=ordconstn then
|
||||
if p^.left^.right^.treetype=ordconstn then
|
||||
omitfirstcomp:=(p^.backward and (p^.left^.right^.value>=p^.right^.value))
|
||||
@ -195,10 +195,9 @@ implementation
|
||||
{ only calculate reference }
|
||||
cleartempgen;
|
||||
secondpass(p^.t2);
|
||||
{$ifndef OLDFORVER}
|
||||
hs:=p^.t2^.resulttype^.size;
|
||||
cmp32:=getregister32;
|
||||
case hs of
|
||||
case hs of
|
||||
1 : begin
|
||||
opsize:=S_B;
|
||||
cmpreg:=reg32toreg8(cmp32);
|
||||
@ -212,10 +211,6 @@ implementation
|
||||
cmpreg:=cmp32;
|
||||
end;
|
||||
end;
|
||||
(*
|
||||
if not(simple_loadn) then
|
||||
CGMessage(cg_e_illegal_count_var);
|
||||
already done in firstfor !! *)
|
||||
|
||||
{ first set the to value
|
||||
because the count var can be in the expression !! }
|
||||
@ -237,51 +232,13 @@ implementation
|
||||
else
|
||||
concatcopy(p^.right^.location.reference,temp1,hs,false,false);
|
||||
end
|
||||
else temptovalue:=false;
|
||||
{$endif OLDFORVER}
|
||||
else
|
||||
temptovalue:=false;
|
||||
|
||||
{ produce start assignment }
|
||||
cleartempgen;
|
||||
secondpass(p^.left);
|
||||
count_var_is_signed:=is_signed(porddef(p^.t2^.resulttype));
|
||||
{$ifdef OLDFORVER}
|
||||
hs:=p^.t2^.resulttype^.size;
|
||||
cmp32:=getregister32;
|
||||
case hs of
|
||||
1 : begin
|
||||
opsize:=S_B;
|
||||
cmpreg:=reg32toreg8(cmp32);
|
||||
end;
|
||||
2 : begin
|
||||
opsize:=S_W;
|
||||
cmpreg:=reg32toreg16(cmp32);
|
||||
end;
|
||||
4 : begin
|
||||
opsize:=S_L;
|
||||
cmpreg:=cmp32;
|
||||
end;
|
||||
end;
|
||||
cleartempgen;
|
||||
secondpass(p^.right);
|
||||
{ calculate pointer value and check if changeable and if so }
|
||||
{ load into temporary variable }
|
||||
if p^.right^.treetype<>ordconstn then
|
||||
begin
|
||||
temp1.symbol:=nil;
|
||||
gettempofsizereference(hs,temp1);
|
||||
temptovalue:=true;
|
||||
if (p^.right^.location.loc=LOC_REGISTER) or
|
||||
(p^.right^.location.loc=LOC_CREGISTER) then
|
||||
begin
|
||||
exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,opsize,p^.right^.location.register,
|
||||
newreference(temp1))));
|
||||
end
|
||||
else
|
||||
concatcopy(p^.right^.location.reference,temp1,hs,false,false);
|
||||
end
|
||||
else temptovalue:=false;
|
||||
|
||||
{$endif OLDFORVER}
|
||||
if temptovalue then
|
||||
begin
|
||||
if p^.t2^.location.loc=LOC_CREGISTER then
|
||||
@ -349,7 +306,7 @@ implementation
|
||||
4 : opsize:=S_L;
|
||||
end;
|
||||
|
||||
{ produce comparison and the corresponding }
|
||||
{ produce comparison and the corresponding }
|
||||
{ jump }
|
||||
if temptovalue then
|
||||
begin
|
||||
@ -396,10 +353,10 @@ implementation
|
||||
if p^.t2^.location.loc=LOC_CREGISTER then
|
||||
exprasmlist^.concat(new(pai386,op_reg(hop,opsize,p^.t2^.location.register)))
|
||||
else
|
||||
exprasmlist^.concat(new(pai386,op_ref(hop,opsize,newreference(p^.t2^.location.reference))));
|
||||
exprasmlist^.concat(new(pai386,op_ref(hop,opsize,newreference(p^.t2^.location.reference))));
|
||||
emitjmp(C_None,l3);
|
||||
|
||||
{ this is the break label: }
|
||||
{ this is the break label: }
|
||||
emitlab(aktbreaklabel);
|
||||
ungetregister32(cmp32);
|
||||
|
||||
@ -795,7 +752,10 @@ do_jmp:
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.40 1999-06-14 00:43:35 peter
|
||||
Revision 1.41 1999-07-05 20:13:09 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.40 1999/06/14 00:43:35 peter
|
||||
* merged
|
||||
|
||||
Revision 1.39.2.1 1999/06/14 00:39:29 peter
|
||||
|
@ -620,10 +620,8 @@ implementation
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
|
||||
{$IfnDef OLDVAL}
|
||||
|
||||
Procedure Handle_Val;
|
||||
|
||||
var
|
||||
hp,node, code_para, dest_para : ptree;
|
||||
hreg,hreg2: TRegister;
|
||||
@ -832,7 +830,6 @@ implementation
|
||||
disposetree(dest_para);
|
||||
UnGetIfTemp(hr);
|
||||
end;
|
||||
{$EndIf OLDVAL}
|
||||
|
||||
var
|
||||
r : preference;
|
||||
@ -1227,12 +1224,10 @@ implementation
|
||||
handle_str;
|
||||
maybe_loadesi;
|
||||
end;
|
||||
{$IfnDef OLDVAL}
|
||||
in_val_x :
|
||||
Begin
|
||||
handle_val;
|
||||
End;
|
||||
{$EndIf OLDVAL}
|
||||
in_include_x_y,
|
||||
in_exclude_x_y:
|
||||
begin
|
||||
@ -1318,7 +1313,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.61 1999-07-03 14:14:27 florian
|
||||
Revision 1.62 1999-07-05 20:13:10 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.61 1999/07/03 14:14:27 florian
|
||||
+ start of val(int64/qword)
|
||||
* longbool, wordbool constants weren't written, fixed
|
||||
|
||||
|
@ -218,24 +218,6 @@ implementation
|
||||
simple_loadn:=false;
|
||||
if hregister=R_NO then
|
||||
hregister:=getregister32;
|
||||
{$ifdef OLDHIGH}
|
||||
if is_open_array(pvarsym(p^.symtableentry)^.definition) or
|
||||
is_open_string(pvarsym(p^.symtableentry)^.definition) then
|
||||
begin
|
||||
if (p^.location.reference.base=procinfo.framepointer) then
|
||||
begin
|
||||
highframepointer:=p^.location.reference.base;
|
||||
highoffset:=p^.location.reference.offset;
|
||||
end
|
||||
else
|
||||
begin
|
||||
highframepointer:=R_EDI;
|
||||
highoffset:=p^.location.reference.offset;
|
||||
exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,S_L,
|
||||
p^.location.reference.base,R_EDI)));
|
||||
end;
|
||||
end;
|
||||
{$endif}
|
||||
if p^.location.loc=LOC_CREGISTER then
|
||||
begin
|
||||
exprasmlist^.concat(new(pai386,op_reg_reg(A_MOV,S_L,
|
||||
@ -852,7 +834,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.62 1999-06-30 15:43:18 florian
|
||||
Revision 1.63 1999-07-05 20:13:12 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.62 1999/06/30 15:43:18 florian
|
||||
* two bugs regarding method variables fixed
|
||||
- if you take in a method the address of another method
|
||||
don't need self anymore
|
||||
|
@ -74,12 +74,6 @@ unit cgai386;
|
||||
procedure finalize(t : pdef;const ref : treference);
|
||||
procedure decrstringref(t : pdef;const ref : treference);
|
||||
|
||||
{$ifdef unused}
|
||||
procedure copyansistring(const dref,sref : treference);
|
||||
procedure copyansistringtoshortstring(const dref,sref : treference;len : longint);
|
||||
procedure copyshortstringtoansistring(const dref,sref : treference);
|
||||
{$endif}
|
||||
|
||||
function maybe_push(needed : byte;p : ptree;isint64 : boolean) : boolean;
|
||||
procedure push_int(l : longint);
|
||||
procedure emit_push_mem(const ref : treference);
|
||||
@ -285,7 +279,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
end;
|
||||
ai^.is_jmp:=true;
|
||||
exprasmlist^.concat(ai);
|
||||
end;
|
||||
end;
|
||||
{$endif nojmpfix}
|
||||
|
||||
procedure emit_flag2reg(flag:tresflags;hregister:tregister);
|
||||
@ -757,65 +751,18 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
ungetiftemp(p^.right^.location.reference);
|
||||
end;
|
||||
|
||||
{$ifdef unused}
|
||||
procedure copyansistring(const dref,sref : treference);
|
||||
var
|
||||
pushed : tpushed;
|
||||
begin
|
||||
pushusedregisters(pushed,$ff);
|
||||
emitpushreferenceaddr(dref);
|
||||
emitpushreferenceaddr(sref);
|
||||
{ should we cut to the length specified in the declaration ?? }
|
||||
emitcall('FPC_ANSISTR_ASSIGN');
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
|
||||
|
||||
procedure copyansistringtoshortstring(const dref,sref : treference;len : longint);
|
||||
var
|
||||
pushed : tpushed;
|
||||
begin
|
||||
pushusedregisters(pushed,$ff);
|
||||
emitpushreferenceaddr(dref);
|
||||
emit_push_mem(sref);
|
||||
push_int(len);
|
||||
{ should we cut to the length specified in the declaration ?? }
|
||||
emitcall('FPC_ANSISTR_TO_SHORTSTR_COPY');
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
|
||||
|
||||
procedure copyshortstringtoansistring(const dref,sref : treference);
|
||||
var
|
||||
pushed : tpushed;
|
||||
begin
|
||||
pushusedregisters(pushed,$ff);
|
||||
emitpushreferenceaddr(dref);
|
||||
emit_push_mem(sref);
|
||||
{push_int(len);}
|
||||
{ should we cut to the length specified in the declaration ?? }
|
||||
emitcall('FPC_SHORTSTR_TO_ANSISTR_COPY');
|
||||
maybe_loadesi;
|
||||
popusedregisters(pushed);
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
Emit Push Functions
|
||||
*****************************************************************************}
|
||||
|
||||
function maybe_push(needed : byte;p : ptree;isint64 : boolean) : boolean;
|
||||
|
||||
var
|
||||
pushed : boolean;
|
||||
{hregister : tregister; }
|
||||
{$ifdef TEMPS_NOT_PUSH}
|
||||
href : treference;
|
||||
{$endif TEMPS_NOT_PUSH}
|
||||
|
||||
begin
|
||||
if needed>usablereg32 then
|
||||
begin
|
||||
@ -923,6 +870,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
end;
|
||||
{$endif TEMPS_NOT_PUSH}
|
||||
|
||||
|
||||
procedure push_int(l : longint);
|
||||
begin
|
||||
if (l = 0) and
|
||||
@ -966,12 +914,6 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
begin
|
||||
{ push_int(ref.offset)}
|
||||
gettempofsizereference(4,href);
|
||||
{$ifndef NO_TESTGETTEMP}
|
||||
{ ungetiftemp does not check if is_immediate is set }
|
||||
{ so this should work }
|
||||
{ the temptoremove list is currently disabled }
|
||||
{!!!!!!! addtemptodestroy(s32bitdef,href); }
|
||||
{$endif NO_TESTGETTEMP}
|
||||
exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,S_L,ref.offset,newreference(href))));
|
||||
emitpushreferenceaddr(href);
|
||||
del_reference(href);
|
||||
@ -3112,7 +3054,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 1999-07-05 11:56:56 jonas
|
||||
Revision 1.12 1999-07-05 20:13:13 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.11 1999/07/05 11:56:56 jonas
|
||||
* merged
|
||||
|
||||
Revision 1.5.2.4 1999/07/04 23:55:52 jonas
|
||||
|
@ -982,22 +982,8 @@ begin
|
||||
def_symbol('VER'+version_nr+'_'+release_nr+'_'+patch_nr);
|
||||
|
||||
{ Temporary defines, until things settle down }
|
||||
{$ifdef TESTOBJEXT}
|
||||
def_symbol('FPC_TESTOBJEXT');
|
||||
{$endif def TESTOBJEXT}
|
||||
{$IfnDef OLDVAL}
|
||||
def_symbol('VALINTERNCOMPILED');
|
||||
{$EndIf OLDVAL}
|
||||
def_symbol('NEWATT');
|
||||
def_symbol('NOSTRANSI'); { use SHORTSTR,ANSISTR etc. }
|
||||
{$ifndef OLDREAD}
|
||||
def_symbol('NEWREADINT'); { use SHORTSTR,ANSISTR etc. }
|
||||
{$endif}
|
||||
def_symbol('HASFINALIZE');
|
||||
def_symbol('INTERNALADDR');
|
||||
def_symbol('NEWWRITEARRAY');
|
||||
def_symbol('INTERNDOUBLE');
|
||||
def_symbol('INT64');
|
||||
|
||||
{ some stuff for TP compatibility }
|
||||
{$ifdef i386}
|
||||
def_symbol('CPU86');
|
||||
@ -1153,7 +1139,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1999-07-03 00:29:54 peter
|
||||
Revision 1.4 1999-07-05 20:13:14 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.3 1999/07/03 00:29:54 peter
|
||||
* new link writing to the ppu, one .ppu is needed for all link types,
|
||||
static (.o) is now always created also when smartlinking is used
|
||||
|
||||
|
@ -453,7 +453,6 @@ unit pexpr;
|
||||
pd:=voiddef;
|
||||
end;
|
||||
|
||||
{$IfnDef OLDVAL}
|
||||
in_val_x:
|
||||
Begin
|
||||
consume(LKLAMMER);
|
||||
@ -473,7 +472,6 @@ unit pexpr;
|
||||
statement_syssym := p2;
|
||||
pd := voiddef;
|
||||
End;
|
||||
{$EndIf OLDVAL}
|
||||
|
||||
in_include_x_y,
|
||||
in_exclude_x_y :
|
||||
@ -2044,7 +2042,10 @@ unit pexpr;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.118 1999-07-01 21:33:57 peter
|
||||
Revision 1.119 1999-07-05 20:13:16 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.118 1999/07/01 21:33:57 peter
|
||||
* merged
|
||||
|
||||
Revision 1.117 1999/06/30 15:43:20 florian
|
||||
|
@ -63,9 +63,7 @@ begin
|
||||
p^.insert(new(psyssym,init('INC',in_inc_x)));
|
||||
p^.insert(new(psyssym,init('STR',in_str_x_string)));
|
||||
p^.insert(new(psyssym,init('ASSERT',in_assert_x_y)));
|
||||
{$IfnDef OLDVAL}
|
||||
p^.insert(new(psyssym,init('VAL',in_val_x)));
|
||||
{$EndIf OLDVAL}
|
||||
p^.insert(new(psyssym,init('ADDR',in_addr_x)));
|
||||
end;
|
||||
|
||||
@ -240,7 +238,10 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.24 1999-07-01 15:49:20 florian
|
||||
Revision 1.25 1999-07-05 20:13:17 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.24 1999/07/01 15:49:20 florian
|
||||
* int64/qword type release
|
||||
+ lo/hi for int64/qword
|
||||
|
||||
|
@ -105,10 +105,7 @@ implementation
|
||||
store_count_ref:=count_ref;
|
||||
count_ref:=false;
|
||||
if not (p^.inlinenumber in [in_read_x,in_readln_x,in_sizeof_x,
|
||||
in_typeof_x,in_ord_x,in_str_x_string,
|
||||
{$IfnDef OLDVAL}
|
||||
in_val_x,
|
||||
{$EndIf OLDVAL}
|
||||
in_typeof_x,in_ord_x,in_str_x_string,in_val_x,
|
||||
in_reset_typedfile,in_rewrite_typedfile]) then
|
||||
must_be_valid:=true
|
||||
else
|
||||
@ -871,7 +868,6 @@ implementation
|
||||
left_right_max(p);
|
||||
end;
|
||||
|
||||
{$IfnDef OLDVAL}
|
||||
in_val_x :
|
||||
begin
|
||||
procinfo.flags:=procinfo.flags or pi_do_call;
|
||||
@ -952,7 +948,6 @@ implementation
|
||||
else
|
||||
inc(p^.registers32,1);
|
||||
end;
|
||||
{$EndIf OLDVAL}
|
||||
|
||||
in_include_x_y,
|
||||
in_exclude_x_y:
|
||||
@ -1121,7 +1116,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.39 1999-07-03 14:14:31 florian
|
||||
Revision 1.40 1999-07-05 20:13:18 peter
|
||||
* removed temp defines
|
||||
|
||||
Revision 1.39 1999/07/03 14:14:31 florian
|
||||
+ start of val(int64/qword)
|
||||
* longbool, wordbool constants weren't written, fixed
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user