mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 13:59:29 +02:00
* fixed widestring range checking on win64 (mantis #10450, fix also
depends on r10505) git-svn-id: trunk@10506 -
This commit is contained in:
parent
a6b9b3e00a
commit
242b335531
@ -756,9 +756,19 @@ implementation
|
||||
paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc2);
|
||||
cg.a_param_const(current_asmdata.CurrAsmList,OS_INT,tordconstnode(right).value.svalue,paraloc2);
|
||||
href:=location.reference;
|
||||
dec(href.offset,sizeof(pint)-offsetdec);
|
||||
paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc1);
|
||||
cg.a_param_ref(current_asmdata.CurrAsmList,OS_INT,href,paraloc1);
|
||||
if not(tf_winlikewidestring in target_info.flags) or
|
||||
(tstringdef(left.resultdef).stringtype<>st_widestring) then
|
||||
begin
|
||||
dec(href.offset,sizeof(pint)-offsetdec);
|
||||
cg.a_param_ref(current_asmdata.CurrAsmList,OS_ADDR,href,paraloc1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ winlike widestrings have a 4 byte length }
|
||||
dec(href.offset,4-offsetdec);
|
||||
cg.a_param_ref(current_asmdata.CurrAsmList,OS_32,href,paraloc1);
|
||||
end;
|
||||
paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
|
||||
paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc2);
|
||||
cg.allocallcpuregisters(current_asmdata.CurrAsmList);
|
||||
@ -910,9 +920,22 @@ implementation
|
||||
cg.a_param_reg(current_asmdata.CurrAsmList,OS_INT,right.location.register,paraloc2);
|
||||
href:=location.reference;
|
||||
dec(href.offset,sizeof(pint)-offsetdec);
|
||||
//dec(href.offset,7);
|
||||
|
||||
href:=location.reference;
|
||||
paramanager.allocparaloc(current_asmdata.CurrAsmList,paraloc1);
|
||||
cg.a_param_ref(current_asmdata.CurrAsmList,OS_INT,href,paraloc1);
|
||||
if not(tf_winlikewidestring in target_info.flags) or
|
||||
(tstringdef(left.resultdef).stringtype<>st_widestring) then
|
||||
begin
|
||||
dec(href.offset,sizeof(pint)-offsetdec);
|
||||
cg.a_param_ref(current_asmdata.CurrAsmList,OS_ADDR,href,paraloc1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ winlike widestrings have a 4 byte length }
|
||||
dec(href.offset,4-offsetdec);
|
||||
cg.a_param_ref(current_asmdata.CurrAsmList,OS_32,href,paraloc1);
|
||||
end;
|
||||
|
||||
paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc1);
|
||||
paramanager.freeparaloc(current_asmdata.CurrAsmList,paraloc2);
|
||||
cg.allocallcpuregisters(current_asmdata.CurrAsmList);
|
||||
|
Loading…
Reference in New Issue
Block a user