* fixed allocation of register before release in second_cstring_to_pchar

This commit is contained in:
Jonas Maebe 2001-07-16 13:19:08 +00:00
parent eb586d5025
commit acb4dca7fb

View File

@ -355,11 +355,12 @@ implementation
begin
clear_location(location);
location.loc:=LOC_REGISTER;
location.register:=getregister32;
case tstringdef(left.resulttype.def).string_typ of
st_shortstring :
begin
inc(left.location.reference.offset);
del_reference(left.location.reference);
location.register:=getregister32;
emit_ref_reg(A_LEA,S_L,newreference(left.location.reference),
location.register);
end;
@ -374,9 +375,13 @@ implementation
emit_ref_reg(A_LEA,S_L,hr,location.register);
end
else
begin
del_reference(left.location.reference);
location.register:=getregister32;
emit_ref_reg(A_MOV,S_L,newreference(left.location.reference),
location.register);
end;
end;
st_longstring:
begin
{!!!!!!!}
@ -393,11 +398,15 @@ implementation
emit_ref_reg(A_LEA,S_L,hr,location.register);
end
else
begin
del_reference(left.location.reference);
location.register:=getregister32;
emit_ref_reg(A_MOV,S_L,newreference(left.location.reference),
location.register);
end;
end;
end;
end;
procedure ti386typeconvnode.second_string_to_chararray;
@ -1414,7 +1423,10 @@ begin
end.
{
$Log$
Revision 1.16 2001-07-08 21:00:17 peter
Revision 1.17 2001-07-16 13:19:08 jonas
* fixed allocation of register before release in second_cstring_to_pchar
Revision 1.16 2001/07/08 21:00:17 peter
* various widestring updates, it works now mostly without charset
mapping supported