From 9920e3ffef82cef34b75cb4588040e136c1f12ca Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 6 Jan 1999 12:23:29 +0000 Subject: [PATCH] * str(...) for ansi/long and widestrings fixed --- compiler/cg386inl.pas | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/compiler/cg386inl.pas b/compiler/cg386inl.pas index 484921702f..c67abe4558 100644 --- a/compiler/cg386inl.pas +++ b/compiler/cg386inl.pas @@ -431,6 +431,7 @@ implementation hp,node : ptree; dummycoll : tdefcoll; is_real,has_length : boolean; + procedureprefix : string; begin pushusedregisters(pushed,$ff); @@ -455,6 +456,19 @@ implementation dummycoll.data:=openshortstringdef else dummycoll.data:=hp^.resulttype; + case pstringdef(hp^.resulttype)^.string_typ of + st_widestring: + procedureprefix:='FPC_STRWIDE_'; + + st_ansistring: + procedureprefix:='FPC_STRANSI_'; + + st_shortstring: + procedureprefix:='FPC_STR_'; + + st_longstring: + procedureprefix:='FPC_STRLONG_'; + end; secondcallparan(hp,@dummycoll,false,false,0); if codegenerror then exit; @@ -516,20 +530,20 @@ implementation exit; if is_real then - emitcall('FPC_STR_'+float_name[pfloatdef(hp^.resulttype)^.typ],true) + emitcall(procedureprefix++float_name[pfloatdef(hp^.resulttype)^.typ],true) else case porddef(hp^.resulttype)^.typ of u32bit: - emitcall('FPC_STR_CARDINAL',true); + emitcall(procedureprefix+'CARDINAL',true); u64bit: - emitcall('FPC_STR_QWORD',true); + emitcall(procedureprefix+'QWORD',true); s64bitint: - emitcall('FPC_STR_INT64',true); + emitcall(procedureprefix+'INT64',true); else - emitcall('FPC_STR_LONGINT',true); + emitcall(procedureprefix+'LONGINT',true); end; popusedregisters(pushed); end; @@ -990,7 +1004,10 @@ implementation end. { $Log$ - Revision 1.22 1998-12-11 23:36:07 florian + Revision 1.23 1999-01-06 12:23:29 florian + * str(...) for ansi/long and widestrings fixed + + Revision 1.22 1998/12/11 23:36:07 florian + again more stuff for int64/qword: - comparision operators - code generation for: str, read(ln), write(ln)