mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 13:10:32 +02:00
* with node corrected for objects
* small bugs for SUPPORT_MMX fixed
This commit is contained in:
parent
ad8d0efb52
commit
f08a7114ae
@ -34,7 +34,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
cobjects,verbose,globals,
|
cobjects,verbose,globals,
|
||||||
symtable,aasm,i386,
|
symtable,aasm,i386,
|
||||||
cgi386,cgai386,tgeni386,hcodegen;
|
types,cgi386,cgai386,tgeni386,hcodegen;
|
||||||
|
|
||||||
procedure secondmoddiv(var p : ptree);
|
procedure secondmoddiv(var p : ptree);
|
||||||
|
|
||||||
@ -385,7 +385,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 1998-06-01 16:50:18 peter
|
Revision 1.2 1998-06-02 17:02:59 pierre
|
||||||
|
* with node corrected for objects
|
||||||
|
* small bugs for SUPPORT_MMX fixed
|
||||||
|
|
||||||
|
Revision 1.1 1998/06/01 16:50:18 peter
|
||||||
+ boolean -> ord conversion
|
+ boolean -> ord conversion
|
||||||
* fixed ord -> boolean conversion
|
* fixed ord -> boolean conversion
|
||||||
|
|
||||||
|
@ -1534,17 +1534,18 @@ implementation
|
|||||||
inc(pushedparasize,8); { was missing !!! (PM) }
|
inc(pushedparasize,8); { was missing !!! (PM) }
|
||||||
exprasmlist^.concat(new(pai386,op_const_reg(
|
exprasmlist^.concat(new(pai386,op_const_reg(
|
||||||
A_SUB,S_L,8,R_ESP)));
|
A_SUB,S_L,8,R_ESP)));
|
||||||
if inlined then
|
if inlined then
|
||||||
begin
|
begin
|
||||||
r:=new_reference(procinfo.framepointer,para_offset-pushedparasize);
|
r:=new_reference(procinfo.framepointer,para_offset-pushedparasize);
|
||||||
exprasmlist^.concat(new(pai386,op_reg_ref(A_MOVQ,S_NO,
|
exprasmlist^.concat(new(pai386,op_reg_ref(A_MOVQ,S_NO,
|
||||||
p^.left^.location.register,r)));
|
p^.left^.location.register,r)));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
r:=new_reference(R_ESP,0);
|
r:=new_reference(R_ESP,0);
|
||||||
exprasmlist^.concat(new(pai386,op_reg_ref(
|
exprasmlist^.concat(new(pai386,op_reg_ref(
|
||||||
A_MOVQ,S_NO,p^.left^.location.register,r)));
|
A_MOVQ,S_NO,p^.left^.location.register,r)));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
{$endif SUPPORT_MMX}
|
{$endif SUPPORT_MMX}
|
||||||
end;
|
end;
|
||||||
@ -4716,6 +4717,7 @@ do_jmp:
|
|||||||
inlineexitcode:=new(paasmoutput,init);
|
inlineexitcode:=new(paasmoutput,init);
|
||||||
proc_names.init;
|
proc_names.init;
|
||||||
para_size:=p^.para_size;
|
para_size:=p^.para_size;
|
||||||
|
make_global:=false; { to avoid warning }
|
||||||
genentrycode(inlineentrycode,proc_names,make_global,
|
genentrycode(inlineentrycode,proc_names,make_global,
|
||||||
0,para_size,nostackframe,true);
|
0,para_size,nostackframe,true);
|
||||||
exprasmlist^.concatlist(inlineentrycode);
|
exprasmlist^.concatlist(inlineentrycode);
|
||||||
@ -5057,7 +5059,11 @@ do_jmp:
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.29 1998-06-01 16:50:18 peter
|
Revision 1.30 1998-06-02 17:03:00 pierre
|
||||||
|
* with node corrected for objects
|
||||||
|
* small bugs for SUPPORT_MMX fixed
|
||||||
|
|
||||||
|
Revision 1.29 1998/06/01 16:50:18 peter
|
||||||
+ boolean -> ord conversion
|
+ boolean -> ord conversion
|
||||||
* fixed ord -> boolean conversion
|
* fixed ord -> boolean conversion
|
||||||
|
|
||||||
|
@ -3123,7 +3123,8 @@ unit pass_1;
|
|||||||
|
|
||||||
p^.procdefinition:=procs^.data;
|
p^.procdefinition:=procs^.data;
|
||||||
p^.resulttype:=procs^.data^.retdef;
|
p^.resulttype:=procs^.data^.retdef;
|
||||||
p^.symtableproc:=p^.procdefinition^.owner;
|
{ big error for with statements
|
||||||
|
p^.symtableproc:=p^.procdefinition^.owner; }
|
||||||
p^.location.loc:=LOC_MEM;
|
p^.location.loc:=LOC_MEM;
|
||||||
{$ifdef CHAINPROCSYMS}
|
{$ifdef CHAINPROCSYMS}
|
||||||
{ object with method read;
|
{ object with method read;
|
||||||
@ -3394,6 +3395,12 @@ unit pass_1;
|
|||||||
store_valid:=must_be_valid;
|
store_valid:=must_be_valid;
|
||||||
store_count_ref:=count_ref;
|
store_count_ref:=count_ref;
|
||||||
count_ref:=false;
|
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,
|
||||||
|
in_reset_typedfile,in_rewrite_typedfile]) then
|
||||||
|
must_be_valid:=true
|
||||||
|
else
|
||||||
|
must_be_valid:=false;
|
||||||
{ if we handle writeln; p^.left contains no valid address }
|
{ if we handle writeln; p^.left contains no valid address }
|
||||||
if assigned(p^.left) then
|
if assigned(p^.left) then
|
||||||
begin
|
begin
|
||||||
@ -3408,11 +3415,6 @@ unit pass_1;
|
|||||||
{$endif SUPPORT_MMX}
|
{$endif SUPPORT_MMX}
|
||||||
set_location(p^.location,p^.left^.location);
|
set_location(p^.location,p^.left^.location);
|
||||||
end;
|
end;
|
||||||
if not (p^.inlinenumber in [in_read_x,in_readln_x,in_sizeof_x,
|
|
||||||
in_typeof_x,in_ord_x,
|
|
||||||
in_reset_typedfile,in_rewrite_typedfile]) then
|
|
||||||
must_be_valid:=true
|
|
||||||
else must_be_valid:=false;
|
|
||||||
case p^.inlinenumber of
|
case p^.inlinenumber of
|
||||||
in_lo_word,in_hi_word:
|
in_lo_word,in_hi_word:
|
||||||
begin
|
begin
|
||||||
@ -3734,9 +3736,9 @@ unit pass_1;
|
|||||||
count_ref:=true;
|
count_ref:=true;
|
||||||
p^.left^.right:=nil;
|
p^.left^.right:=nil;
|
||||||
firstcallparan(p^.left,nil);
|
firstcallparan(p^.left,nil);
|
||||||
p^.left^.right:=hp;
|
|
||||||
must_be_valid:=true;
|
must_be_valid:=true;
|
||||||
firstcallparan(p^.left,nil);
|
p^.left^.right:=hp;
|
||||||
|
firstcallparan(p^.left^.right,nil);
|
||||||
hp:=p^.left;
|
hp:=p^.left;
|
||||||
isreal:=false;
|
isreal:=false;
|
||||||
{ valid string ? }
|
{ valid string ? }
|
||||||
@ -4919,7 +4921,43 @@ unit pass_1;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.23 1998-06-01 16:50:20 peter
|
Revision 1.24 1998-06-02 17:03:01 pierre
|
||||||
|
* with node corrected for objects
|
||||||
|
* small bugs for SUPPORT_MMX fixed
|
||||||
|
|
||||||
|
<<<<<<< PASS_1.pas
|
||||||
|
Revision 1.22 1998/05/28 17:26:49 peter
|
||||||
|
* fixed -R switch, it didn't work after my previous akt/init patch
|
||||||
|
* fixed bugs 110,130,136
|
||||||
|
|
||||||
|
Revision 1.21 1998/05/25 17:11:41 pierre
|
||||||
|
* firstpasscount bug fixed
|
||||||
|
now all is already set correctly the first time
|
||||||
|
under EXTDEBUG try -gp to skip all other firstpasses
|
||||||
|
it works !!
|
||||||
|
* small bug fixes
|
||||||
|
- for smallsets with -dTESTSMALLSET
|
||||||
|
- some warnings removed (by correcting code !)
|
||||||
|
|
||||||
|
Revision 1.20 1998/05/23 01:21:17 peter
|
||||||
|
+ aktasmmode, aktoptprocessor, aktoutputformat
|
||||||
|
+ smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
|
||||||
|
+ $LIBNAME to set the library name where the unit will be put in
|
||||||
|
* splitted cgi386 a bit (codeseg to large for bp7)
|
||||||
|
* nasm, tasm works again. nasm moved to ag386nsm.pas
|
||||||
|
|
||||||
|
Revision 1.19 1998/05/20 09:42:34 pierre
|
||||||
|
+ UseTokenInfo now default
|
||||||
|
* unit in interface uses and implementation uses gives error now
|
||||||
|
* only one error for unknown symbol (uses lastsymknown boolean)
|
||||||
|
the problem came from the label code !
|
||||||
|
+ first inlined procedures and function work
|
||||||
|
(warning there might be allowed cases were the result is still wrong !!)
|
||||||
|
* UseBrower updated gives a global list of all position of all used symbols
|
||||||
|
with switch -gb
|
||||||
|
|
||||||
|
=======
|
||||||
|
Revision 1.23 1998/06/01 16:50:20 peter
|
||||||
+ boolean -> ord conversion
|
+ boolean -> ord conversion
|
||||||
* fixed ord -> boolean conversion
|
* fixed ord -> boolean conversion
|
||||||
|
|
||||||
@ -4953,6 +4991,7 @@ end.
|
|||||||
* UseBrower updated gives a global list of all position of all used symbols
|
* UseBrower updated gives a global list of all position of all used symbols
|
||||||
with switch -gb
|
with switch -gb
|
||||||
|
|
||||||
|
>>>>>>> h:/cvs/compiler/PASS_1.pas
|
||||||
Revision 1.18 1998/05/11 13:07:55 peter
|
Revision 1.18 1998/05/11 13:07:55 peter
|
||||||
+ $ifdef NEWPPU for the new ppuformat
|
+ $ifdef NEWPPU for the new ppuformat
|
||||||
+ $define GDB not longer required
|
+ $define GDB not longer required
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
$Id$
|
$Id$
|
||||||
Copyright (c) 1998 by Florian Klaempfl
|
Copyright (c) 1998 by Florian Klaempfl
|
||||||
|
|
||||||
@ -1071,6 +1071,13 @@ unit pexpr;
|
|||||||
p1^.resulttype:=pd;
|
p1^.resulttype:=pd;
|
||||||
srsymtable:=pobjectdef(pd)^.publicsyms;
|
srsymtable:=pobjectdef(pd)^.publicsyms;
|
||||||
sym:=pvarsym(srsymtable^.search(pattern));
|
sym:=pvarsym(srsymtable^.search(pattern));
|
||||||
|
{ search also in inherited methods }
|
||||||
|
while sym=nil do
|
||||||
|
begin
|
||||||
|
pd:=pobjectdef(pd)^.childof;
|
||||||
|
srsymtable:=pobjectdef(pd)^.publicsyms;
|
||||||
|
sym:=pvarsym(srsymtable^.search(pattern));
|
||||||
|
end;
|
||||||
consume(ID);
|
consume(ID);
|
||||||
do_member_read(sym,p1,pd,again);
|
do_member_read(sym,p1,pd,again);
|
||||||
end
|
end
|
||||||
@ -1745,7 +1752,11 @@ unit pexpr;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.21 1998-05-27 19:45:05 peter
|
Revision 1.22 1998-06-02 17:03:03 pierre
|
||||||
|
* with node corrected for objects
|
||||||
|
* small bugs for SUPPORT_MMX fixed
|
||||||
|
|
||||||
|
Revision 1.21 1998/05/27 19:45:05 peter
|
||||||
* symtable.pas splitted into includefiles
|
* symtable.pas splitted into includefiles
|
||||||
* symtable adapted for $ifdef NEWPPU
|
* symtable adapted for $ifdef NEWPPU
|
||||||
|
|
||||||
|
@ -350,6 +350,7 @@ unit pstatmnt;
|
|||||||
case p^.resulttype^.deftype of
|
case p^.resulttype^.deftype of
|
||||||
objectdef : begin
|
objectdef : begin
|
||||||
obj:=pobjectdef(p^.resulttype);
|
obj:=pobjectdef(p^.resulttype);
|
||||||
|
{ this creates the stack in the wrong order !!
|
||||||
levelcount:=0;
|
levelcount:=0;
|
||||||
while assigned(obj) do
|
while assigned(obj) do
|
||||||
begin
|
begin
|
||||||
@ -360,7 +361,23 @@ unit pstatmnt;
|
|||||||
symtablestack:=withsymtable;
|
symtablestack:=withsymtable;
|
||||||
obj:=obj^.childof;
|
obj:=obj^.childof;
|
||||||
inc(levelcount);
|
inc(levelcount);
|
||||||
|
end; }
|
||||||
|
|
||||||
|
withsymtable:=new(psymtable,init(symtable.withsymtable));
|
||||||
|
withsymtable^.root:=obj^.publicsyms^.root;
|
||||||
|
symtab:=withsymtable;
|
||||||
|
levelcount:=1;
|
||||||
|
obj:=obj^.childof;
|
||||||
|
while assigned(obj) do
|
||||||
|
begin
|
||||||
|
symtab^.next:=new(psymtable,init(symtable.withsymtable));
|
||||||
|
symtab:=symtab^.next;
|
||||||
|
symtab^.root:=obj^.publicsyms^.root;
|
||||||
|
obj:=obj^.childof;
|
||||||
|
inc(levelcount);
|
||||||
end;
|
end;
|
||||||
|
symtab^.next:=symtablestack;
|
||||||
|
symtablestack:=withsymtable;
|
||||||
end;
|
end;
|
||||||
recorddef : begin
|
recorddef : begin
|
||||||
symtab:=precdef(p^.resulttype)^.symtable;
|
symtab:=precdef(p^.resulttype)^.symtable;
|
||||||
@ -1121,7 +1138,35 @@ unit pstatmnt;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.15 1998-05-30 14:31:06 peter
|
Revision 1.16 1998-06-02 17:03:04 pierre
|
||||||
|
* with node corrected for objects
|
||||||
|
* small bugs for SUPPORT_MMX fixed
|
||||||
|
|
||||||
|
<<<<<<< PSTATMNT.pas
|
||||||
|
Revision 1.14 1998/05/29 09:58:14 pierre
|
||||||
|
* OPR_REGISTER for 1 arg was missing in ratti386.pas
|
||||||
|
(probably a merging problem)
|
||||||
|
* errors at start of line were lost
|
||||||
|
|
||||||
|
Revision 1.13 1998/05/28 17:26:50 peter
|
||||||
|
* fixed -R switch, it didn't work after my previous akt/init patch
|
||||||
|
* fixed bugs 110,130,136
|
||||||
|
|
||||||
|
Revision 1.12 1998/05/21 19:33:33 peter
|
||||||
|
+ better procedure directive handling and only one table
|
||||||
|
|
||||||
|
Revision 1.11 1998/05/20 09:42:35 pierre
|
||||||
|
+ UseTokenInfo now default
|
||||||
|
* unit in interface uses and implementation uses gives error now
|
||||||
|
* only one error for unknown symbol (uses lastsymknown boolean)
|
||||||
|
the problem came from the label code !
|
||||||
|
+ first inlined procedures and function work
|
||||||
|
(warning there might be allowed cases were the result is still wrong !!)
|
||||||
|
* UseBrower updated gives a global list of all position of all used symbols
|
||||||
|
with switch -gb
|
||||||
|
|
||||||
|
=======
|
||||||
|
Revision 1.15 1998/05/30 14:31:06 peter
|
||||||
+ $ASMMODE
|
+ $ASMMODE
|
||||||
|
|
||||||
Revision 1.14 1998/05/29 09:58:14 pierre
|
Revision 1.14 1998/05/29 09:58:14 pierre
|
||||||
@ -1146,6 +1191,7 @@ end.
|
|||||||
* UseBrower updated gives a global list of all position of all used symbols
|
* UseBrower updated gives a global list of all position of all used symbols
|
||||||
with switch -gb
|
with switch -gb
|
||||||
|
|
||||||
|
>>>>>>> h:/cvs/compiler/PSTATMNT.pas
|
||||||
Revision 1.10 1998/05/11 13:07:56 peter
|
Revision 1.10 1998/05/11 13:07:56 peter
|
||||||
+ $ifdef NEWPPU for the new ppuformat
|
+ $ifdef NEWPPU for the new ppuformat
|
||||||
+ $define GDB not longer required
|
+ $define GDB not longer required
|
||||||
|
Loading…
Reference in New Issue
Block a user