* exception patch of Romio nevertheless the excpetion handling

needs some corections regarding register saving
  * gettempansistring is again a procedure
This commit is contained in:
florian 1999-09-26 13:26:01 +00:00
parent bd4d132c5b
commit d6c22004f4
8 changed files with 80 additions and 28 deletions

View File

@ -168,8 +168,8 @@ implementation
still used for the push (PFV) }
clear_location(p^.location);
p^.location.loc:=LOC_MEM;
if gettempansistringreference(p^.location.reference) then
decrstringref(cansistringdef,p^.location.reference);
gettempansistringreference(p^.location.reference);
decrstringref(cansistringdef,p^.location.reference);
{ release used registers }
del_location(p^.right^.location);
del_location(p^.left^.location);
@ -2142,7 +2142,12 @@ implementation
end.
{
$Log$
Revision 1.79 1999-09-21 20:53:21 florian
Revision 1.80 1999-09-26 13:26:01 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.79 1999/09/21 20:53:21 florian
* fixed 1/s problem from mailing list
Revision 1.78 1999/09/07 07:52:19 peter

View File

@ -1044,8 +1044,8 @@ implementation
begin
hregister:=getexplicitregister32(R_EAX);
emit_reg_reg(A_MOV,S_L,R_EAX,hregister);
if gettempansistringreference(hr) then
decrstringref(p^.resulttype,hr);
gettempansistringreference(hr);
decrstringref(p^.resulttype,hr);
emit_reg_ref(A_MOV,S_L,hregister,
newreference(hr));
ungetregister32(hregister);
@ -1217,7 +1217,12 @@ implementation
end.
{
$Log$
Revision 1.104 1999-09-16 11:34:46 pierre
Revision 1.105 1999-09-26 13:26:02 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.104 1999/09/16 11:34:46 pierre
* typo correction
Revision 1.103 1999/09/07 07:54:23 peter

View File

@ -408,8 +408,8 @@ implementation
begin
clear_location(pto^.location);
pto^.location.loc:=LOC_REFERENCE;
if gettempansistringreference(pto^.location.reference) then
decrstringref(cansistringdef,pto^.location.reference);
gettempansistringreference(pto^.location.reference);
decrstringref(cansistringdef,pto^.location.reference);
pushusedregisters(pushed,$ff);
emit_push_lea_loc(pfrom^.location,true);
emit_push_lea_loc(pto^.location,false);
@ -584,8 +584,8 @@ implementation
end;
st_ansistring :
begin
if gettempansistringreference(pto^.location.reference) then
decrstringref(cansistringdef,pto^.location.reference);
gettempansistringreference(pto^.location.reference);
decrstringref(cansistringdef,pto^.location.reference);
release_loc(pfrom^.location);
pushusedregisters(pushed,$ff);
push_int(l);
@ -630,8 +630,8 @@ implementation
end;
st_ansistring :
begin
if gettempansistringreference(pto^.location.reference) then
decrstringref(cansistringdef,pto^.location.reference);
gettempansistringreference(pto^.location.reference);
decrstringref(cansistringdef,pto^.location.reference);
release_loc(pfrom^.location);
pushusedregisters(pushed,$ff);
emit_pushw_loc(pfrom^.location);
@ -1210,8 +1210,8 @@ implementation
st_ansistring:
begin
pto^.location.loc:=LOC_REFERENCE;
if gettempansistringreference(pto^.location.reference) then
decrstringref(cansistringdef,pto^.location.reference);
gettempansistringreference(pto^.location.reference);
decrstringref(cansistringdef,pto^.location.reference);
case pfrom^.location.loc of
LOC_REFERENCE,LOC_MEM:
begin
@ -1455,7 +1455,12 @@ implementation
end.
{
$Log$
Revision 1.87 1999-09-23 21:20:37 peter
Revision 1.88 1999-09-26 13:26:04 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.87 1999/09/23 21:20:37 peter
* fixed temp allocation for short->ansi
Revision 1.86 1999/09/01 09:42:13 peter

View File

@ -628,9 +628,12 @@ do_jmp:
maybe_loadesi;
secondpass(p^.t1);
emitcall('FPC_POPOBJECTSTACK');
maybe_loadesi;
end
else
emitcall('FPC_RERAISE');
{ reraise doesn't need a maybe_loadesi because it never }
{ returns (FK) }
emitlab(endexceptlabel);
freelabel(exceptlabel);
freelabel(doexceptlabel);
@ -808,7 +811,12 @@ do_jmp:
end.
{
$Log$
Revision 1.50 1999-09-20 16:35:43 peter
Revision 1.51 1999-09-26 13:26:05 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.50 1999/09/20 16:35:43 peter
* restored old alignment, saves 40k on ppc386
Revision 1.49 1999/09/15 20:35:37 florian

View File

@ -414,8 +414,10 @@ implementation
floatdef :
begin
emitcall(rdwrprefix[doread]+'FLOAT');
{
if pfloatdef(p^.resulttype)^.typ<>f32bit then
inc(fpuvaroffset);
dec(fpuvaroffset);
}
if doread then
StoreDirectFuncResult(hp^.left);
end;
@ -1404,7 +1406,12 @@ implementation
end.
{
$Log$
Revision 1.71 1999-09-16 07:52:37 pierre
Revision 1.72 1999-09-26 13:26:05 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.71 1999/09/16 07:52:37 pierre
* FLDPI must increment fpuvaroffset
Revision 1.70 1999/09/15 20:35:38 florian

View File

@ -86,8 +86,8 @@ implementation
hregister:=getexplicitregister32(R_EAX);
emit_reg_reg(A_MOV,S_L,R_EAX,hregister);
if gettempansistringreference(hr) then
decrstringref(p^.resulttype,hr);
gettempansistringreference(hr);
decrstringref(p^.resulttype,hr);
emit_reg_ref(A_MOV,S_L,hregister,
newreference(hr));
ungetregister32(hregister);
@ -986,7 +986,12 @@ implementation
end.
{
$Log$
Revision 1.86 1999-09-16 07:56:46 pierre
Revision 1.87 1999-09-26 13:26:06 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.86 1999/09/16 07:56:46 pierre
* double del_reference removed
Revision 1.85 1999/09/12 08:48:03 florian

View File

@ -3063,7 +3063,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
exprasmlist^.insert(new(pai_align,init_op(16,$90)))
else
if not(cs_littlesize in aktglobalswitches) then
exprasmlist^.insert(new(pai_align,init_op(4,$90)));
exprasmlist^.insert(new(pai_align,init_op(16,$90)));
end;
exprasmlist:=oldexprasmlist;
end;
@ -3359,7 +3359,12 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
end.
{
$Log$
Revision 1.45 1999-09-20 16:35:43 peter
Revision 1.46 1999-09-26 13:26:07 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.45 1999/09/20 16:35:43 peter
* restored old alignment, saves 40k on ppc386
Revision 1.44 1999/09/16 07:58:14 pierre

View File

@ -70,7 +70,7 @@ unit temp_gen;
function istemp(const ref : treference) : boolean;
procedure ungetiftemp(const ref : treference);
function ungetiftempansi(const ref : treference) : boolean;
function gettempansistringreference(var ref : treference):boolean;
procedure gettempansistringreference(var ref : treference);
implementation
@ -282,7 +282,7 @@ unit temp_gen;
end;
function gettempansistringreference(var ref : treference):boolean;
procedure gettempansistringreference(var ref : treference);
var
foundslot,tl : ptemprecord;
begin
@ -310,7 +310,12 @@ unit temp_gen;
ref.offset:=foundslot^.pos;
{ we're reusing an old slot then set the function result to true
so that we can call a decr_ansistr }
{ we never know if a slot was used previously:
imagine a loop: in the first run the slot wasn't used
while in later runs it is reused (FK)
gettempansistringreference:=true;
}
end
else
begin
@ -319,8 +324,10 @@ unit temp_gen;
templist^.posinfo:=aktfilepos;
{$endif}
templist^.temptype:=tt_ansistring;
{ set result to false, we don't need an decr_ansistr }
gettempansistringreference:=true;
{ set result to false, we don't need an decr_ansistr
gettempansistringreference:=true;
Not necessary, the above (FK)
}
end;
exprasmlist^.concat(new(paitempalloc,alloc(ref.offset,target_os.size_of_pointer)));
end;
@ -520,7 +527,12 @@ begin
end.
{
$Log$
Revision 1.35 1999-09-16 11:34:59 pierre
Revision 1.36 1999-09-26 13:26:08 florian
* exception patch of Romio nevertheless the excpetion handling
needs some corections regarding register saving
* gettempansistring is again a procedure
Revision 1.35 1999/09/16 11:34:59 pierre
* typo correction
Revision 1.34 1999/08/04 00:23:46 florian