From 93db828b7d9de49a5e270b2684cf33c7cba6dd0b Mon Sep 17 00:00:00 2001 From: jonas Date: Mon, 24 Dec 2018 22:10:02 +0000 Subject: * make the size parameter of thlcgobj.location_force_mmregscalar() a var-parameter, as the size sometimes gets changed in this routine and high level code generators don't use the location.size but the def git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@40633 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/hlcgobj.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/hlcgobj.pas') diff --git a/compiler/hlcgobj.pas b/compiler/hlcgobj.pas index c9604043c5..4b1521e27b 100644 --- a/compiler/hlcgobj.pas +++ b/compiler/hlcgobj.pas @@ -575,7 +575,7 @@ unit hlcgobj; procedure location_force_reg(list:TAsmList;var l:tlocation;src_size,dst_size:tdef;maybeconst:boolean);virtual; procedure location_force_fpureg(list:TAsmList;var l: tlocation;size: tdef;maybeconst:boolean);virtual; procedure location_force_mem(list:TAsmList;var l:tlocation;size:tdef);virtual; - procedure location_force_mmregscalar(list:TAsmList;var l: tlocation;size:tdef;maybeconst:boolean);virtual; + procedure location_force_mmregscalar(list:TAsmList;var l: tlocation;var size:tdef;maybeconst:boolean);virtual; // procedure location_force_mmreg(list:TAsmList;var l: tlocation;size:tdef;maybeconst:boolean);virtual;abstract; { Retrieve the location of the data pointed to in location l, when the location is @@ -4100,7 +4100,7 @@ implementation end; end; - procedure thlcgobj.location_force_mmregscalar(list: TAsmList; var l: tlocation; size: tdef; maybeconst: boolean); + procedure thlcgobj.location_force_mmregscalar(list: TAsmList; var l: tlocation; var size: tdef; maybeconst: boolean); var reg : tregister; href : treference; @@ -4145,6 +4145,7 @@ implementation l.size:=def_cgsize(newsize); location_freetemp(list,l); location_reset(l,LOC_MMREGISTER,l.size); + size:=newsize; l.register:=reg; end; end; -- cgit v1.2.1