diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-04-27 19:18:55 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-04-27 19:18:55 +0000 |
commit | 66a4ad5f5c4a2c103b3da134066e306bcbfcc8e3 (patch) | |
tree | 02b8fbeec294130be83297e8ee2c8c712e5fe6f4 /compiler | |
parent | f9ca5d8f00458ce20a87ea343474b9948d437957 (diff) | |
download | fpc-66a4ad5f5c4a2c103b3da134066e306bcbfcc8e3.tar.gz |
* removed temppos field again from parameter locations: they're not allocated
by the temp manager of the current procedure
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@38858 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/arm/cgcpu.pas | 8 | ||||
-rw-r--r-- | compiler/avr/cgcpu.pas | 4 | ||||
-rw-r--r-- | compiler/cgobj.pas | 20 | ||||
-rw-r--r-- | compiler/hlcgobj.pas | 16 | ||||
-rw-r--r-- | compiler/i386/hlcgcpu.pas | 6 | ||||
-rw-r--r-- | compiler/i8086/cgcpu.pas | 8 | ||||
-rw-r--r-- | compiler/i8086/hlcgcpu.pas | 6 | ||||
-rw-r--r-- | compiler/llvm/hlcgllvm.pas | 4 | ||||
-rw-r--r-- | compiler/mips/cgcpu.pas | 2 | ||||
-rw-r--r-- | compiler/ncgcal.pas | 4 | ||||
-rw-r--r-- | compiler/ncgutil.pas | 4 | ||||
-rw-r--r-- | compiler/parabase.pas | 7 | ||||
-rw-r--r-- | compiler/paramgr.pas | 2 | ||||
-rw-r--r-- | compiler/sparcgen/cgsparc.pas | 2 |
14 files changed, 44 insertions, 49 deletions
diff --git a/compiler/arm/cgcpu.pas b/compiler/arm/cgcpu.pas index e230738b87..61bb4db1a9 100644 --- a/compiler/arm/cgcpu.pas +++ b/compiler/arm/cgcpu.pas @@ -526,7 +526,7 @@ unit cgcpu; begin { offset in the wrapper needs to be adjusted for the stored return address } - reference_reset_base(href,reference.index,reference.offset+sizeof(aint),reference.temppos,sizeof(pint),[]); + reference_reset_base(href,reference.index,reference.offset+sizeof(aint),ctempposinvalid,sizeof(pint),[]); if is_shifter_const(ioffset,shift) then a_op_const_ref(list,OP_SUB,size,ioffset,href) else @@ -582,7 +582,7 @@ unit cgcpu; a_load_ref_reg(list,location^.size,location^.size,tmpref,location^.register); LOC_REFERENCE: begin - reference_reset_base(ref,location^.reference.index,location^.reference.offset,location^.reference.temppos,paraloc.alignment,[]); + reference_reset_base(ref,location^.reference.index,location^.reference.offset,ctempposinvalid,paraloc.alignment,[]); { doubles in softemu mode have a strange order of registers and references } if location^.size=OS_32 then g_concatcopy(list,tmpref,ref,4) @@ -1683,7 +1683,7 @@ unit cgcpu; end; LOC_REFERENCE : begin - reference_reset_base(href2,hloc^.reference.index,hloc^.reference.offset,hloc^.reference.temppos,paraloc.alignment,[]); + reference_reset_base(href2,hloc^.reference.index,hloc^.reference.offset,ctempposinvalid,paraloc.alignment,[]); { concatcopy should choose the best way to copy the data } g_concatcopy(list,href,href2,tcgsize2size[hloc^.size]); end; @@ -3935,7 +3935,7 @@ unit cgcpu; begin { offset in the wrapper needs to be adjusted for the stored return address } - reference_reset_base(href,reference.index,reference.offset+sizeof(aint),reference.temppos,sizeof(pint),[]); + reference_reset_base(href,reference.index,reference.offset+sizeof(aint),ctempposinvalid,sizeof(pint),[]); if is_thumb_imm(ioffset) then a_op_const_ref(list,OP_SUB,size,ioffset,href) else diff --git a/compiler/avr/cgcpu.pas b/compiler/avr/cgcpu.pas index 0f36789b69..2e3260aac5 100644 --- a/compiler/avr/cgcpu.pas +++ b/compiler/avr/cgcpu.pas @@ -194,7 +194,7 @@ unit cgcpu; a_load_reg_reg(list,paraloc^.size,paraloc^.size,r,paraloc^.register); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(ref,paraloc^.reference.index,paraloc^.reference.offset,paraloc^.reference.temppos,2,[]); + reference_reset_base(ref,paraloc^.reference.index,paraloc^.reference.offset,ctempposinvalid,2,[]); a_load_reg_ref(list,paraloc^.size,paraloc^.size,r,ref); end; else @@ -348,7 +348,7 @@ unit cgcpu; a_load_ref_reg(list,location^.size,location^.size,tmpref,location^.register); LOC_REFERENCE: begin - reference_reset_base(ref,location^.reference.index,location^.reference.offset,location^.reference.temppos,paraloc.alignment,[]); + reference_reset_base(ref,location^.reference.index,location^.reference.offset,ctempposinvalid,paraloc.alignment,[]); { doubles in softemu mode have a strange order of registers and references } if location^.size=OS_32 then g_concatcopy(list,tmpref,ref,4) diff --git a/compiler/cgobj.pas b/compiler/cgobj.pas index a40ceb1b19..fe839b56b2 100644 --- a/compiler/cgobj.pas +++ b/compiler/cgobj.pas @@ -965,7 +965,7 @@ implementation a_load_reg_reg(list,size,cgpara.location^.size,r,cgpara.location^.register); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_load_reg_ref(list,size,cgpara.location^.size,r,ref); end; LOC_MMREGISTER,LOC_CMMREGISTER: @@ -996,7 +996,7 @@ implementation a_load_const_reg(list,cgpara.location^.size,a,cgpara.location^.register); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_load_const_ref(list,cgpara.location^.size,a,ref); end else @@ -1125,7 +1125,7 @@ implementation begin if assigned(location^.next) then internalerror(2010052906); - reference_reset_base(ref,location^.reference.index,location^.reference.offset,location^.reference.temppos,newalignment(cgpara.alignment,cgpara.intsize-sizeleft),[]); + reference_reset_base(ref,location^.reference.index,location^.reference.offset,ctempposinvalid,newalignment(cgpara.alignment,cgpara.intsize-sizeleft),[]); if (size <> OS_NO) and (tcgsize2size[size] <= sizeof(aint)) then a_load_ref_ref(list,size,location^.size,tmpref,ref) @@ -1341,7 +1341,7 @@ implementation a_loadfpu_reg_ref(list,paraloc.size,paraloc.size,paraloc.register,ref); LOC_REFERENCE : begin - reference_reset_base(href,paraloc.reference.index,paraloc.reference.offset,paraloc.reference.temppos,align,[]); + reference_reset_base(href,paraloc.reference.index,paraloc.reference.offset,ctempposinvalid,align,[]); { use concatcopy, because it can also be a float which fails when load_ref_ref is used. Don't copy data when the references are equal } if not((href.base=ref.base) and (href.offset=ref.offset)) then @@ -1409,7 +1409,7 @@ implementation end; LOC_REFERENCE : begin - reference_reset_base(href,paraloc.reference.index,paraloc.reference.offset,paraloc.reference.temppos,align,[]); + reference_reset_base(href,paraloc.reference.index,paraloc.reference.offset,ctempposinvalid,align,[]); case getregtype(reg) of R_ADDRESSREGISTER, R_INTREGISTER : @@ -1838,7 +1838,7 @@ implementation LOC_REFERENCE,LOC_CREFERENCE: begin cgpara.check_simple_location; - reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(ref,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_loadfpu_reg_ref(list,size,size,r,ref); end; LOC_REGISTER,LOC_CREGISTER: @@ -1879,7 +1879,7 @@ implementation LOC_REFERENCE,LOC_CREFERENCE: begin cgpara.check_simple_location; - reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); { concatcopy should choose the best way to copy the data } g_concatcopy(list,ref,href,tcgsize2size[size]); end; @@ -2293,7 +2293,7 @@ implementation a_loadmm_reg_reg(list,size,cgpara.location^.size,reg,cgpara.location^.register,shuffle); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_loadmm_reg_ref(list,size,cgpara.location^.size,reg,href,shuffle); end; LOC_REGISTER,LOC_CREGISTER: @@ -2334,7 +2334,7 @@ implementation begin if not(cgpara.location^.next^.size in [OS_32,OS_S32]) then internalerror(2009112911); - reference_reset_base(href,cgpara.location^.next^.reference.index,cgpara.location^.next^.reference.offset,cgpara.location^.next^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,cgpara.location^.next^.reference.index,cgpara.location^.next^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_load_reg_ref(list,OS_32,cgpara.location^.next^.size,tmpreg,href); end; end @@ -2693,7 +2693,7 @@ implementation begin { offset in the wrapper needs to be adjusted for the stored return address } - reference_reset_base(href,reference.index,reference.offset+sizeof(pint),reference.temppos,sizeof(pint),[]); + reference_reset_base(href,reference.index,reference.offset+sizeof(pint),ctempposinvalid,sizeof(pint),[]); a_op_const_ref(list,OP_SUB,size,ioffset,href); end else diff --git a/compiler/hlcgobj.pas b/compiler/hlcgobj.pas index da6101c1de..b425353109 100644 --- a/compiler/hlcgobj.pas +++ b/compiler/hlcgobj.pas @@ -885,7 +885,7 @@ implementation a_load_reg_reg(list,size,cgpara.location^.def,r,cgpara.location^.register); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(ref,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(ref,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_load_reg_ref(list,size,cgpara.location^.def,r,ref); end; LOC_MMREGISTER,LOC_CMMREGISTER: @@ -915,7 +915,7 @@ implementation a_load_const_reg(list,cgpara.location^.def,a,cgpara.location^.register); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(ref,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(ref,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_load_const_ref(list,cgpara.location^.def,a,ref); end else @@ -1046,7 +1046,7 @@ implementation begin if assigned(location^.next) then internalerror(2017073001); - reference_reset_base(ref,voidstackpointertype,location^.reference.index,location^.reference.offset,location^.reference.temppos,newalignment(cgpara.alignment,cgpara.intsize-sizeleft),[]); + reference_reset_base(ref,voidstackpointertype,location^.reference.index,location^.reference.offset,ctempposinvalid,newalignment(cgpara.alignment,cgpara.intsize-sizeleft),[]); if (def_cgsize(size)<>OS_NO) and (size.size=sizeleft) and (sizeleft<=sizeof(aint)) then @@ -2541,7 +2541,7 @@ implementation LOC_REFERENCE,LOC_CREFERENCE: begin cgpara.check_simple_location; - reference_reset_base(ref,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(ref,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_loadfpu_reg_ref(list,fromsize,cgpara.def,r,ref); end; LOC_REGISTER,LOC_CREGISTER: @@ -2573,7 +2573,7 @@ implementation LOC_REFERENCE,LOC_CREFERENCE: begin cgpara.check_simple_location; - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); { concatcopy should choose the best way to copy the data } g_concatcopy(list,fromsize,ref,href); end; @@ -2683,7 +2683,7 @@ implementation a_loadmm_reg_reg(list,fromsize,cgpara.def,reg,cgpara.location^.register,shuffle); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); a_loadmm_reg_ref(list,fromsize,cgpara.def,reg,href,shuffle); end; LOC_REGISTER,LOC_CREGISTER: @@ -4597,7 +4597,7 @@ implementation procedure thlcgobj.paravarsym_set_initialloc_to_paraloc(vs: tparavarsym); begin reference_reset_base(vs.initialloc.reference,voidstackpointertype,tparavarsym(vs).paraloc[calleeside].location^.reference.index, - tparavarsym(vs).paraloc[calleeside].location^.reference.offset,tparavarsym(vs).paraloc[calleeside].location^.reference.temppos, + tparavarsym(vs).paraloc[calleeside].location^.reference.offset,ctempposinvalid, tparavarsym(vs).paraloc[calleeside].alignment,[]); end; @@ -5155,7 +5155,7 @@ implementation case para.location^.loc of LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(href,voidstackpointertype,para.location^.reference.index,para.location^.reference.offset,para.location^.reference.temppos,para.alignment,[]); + reference_reset_base(href,voidstackpointertype,para.location^.reference.index,para.location^.reference.offset,ctempposinvalid,para.alignment,[]); a_load_ref_ref(list,para.def,para.def,href,destloc.reference); end; else diff --git a/compiler/i386/hlcgcpu.pas b/compiler/i386/hlcgcpu.pas index 5e93e5ac2b..e975600ca0 100644 --- a/compiler/i386/hlcgcpu.pas +++ b/compiler/i386/hlcgcpu.pas @@ -93,7 +93,7 @@ implementation reference_reset_base(href,voidstackpointertype,NR_STACK_POINTER_REG,0,ctempposinvalid,voidstackpointertype.size,[]); end else - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); cg.a_loadfpu_reg_ref(list,locsize,locsize,l.register,href); end; LOC_FPUREGISTER: @@ -138,7 +138,7 @@ implementation reference_reset_base(href,voidstackpointertype,NR_STACK_POINTER_REG,0,ctempposinvalid,voidstackpointertype.size,[]); end else - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); cg.a_loadmm_reg_ref(list,locsize,locsize,l.register,href,mms_movescalar); end; LOC_FPUREGISTER: @@ -164,7 +164,7 @@ implementation cg.a_load_ref_cgpara(list,locsize,l.reference,cgpara) else begin - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); cg.g_concatcopy(list,l.reference,href,stacksize); end; end; diff --git a/compiler/i8086/cgcpu.pas b/compiler/i8086/cgcpu.pas index a36400738f..88429fb6e8 100644 --- a/compiler/i8086/cgcpu.pas +++ b/compiler/i8086/cgcpu.pas @@ -1285,7 +1285,7 @@ unit cgcpu; a_load_reg_reg(list,paraloc^.size,paraloc^.size,r,paraloc^.register); LOC_REFERENCE,LOC_CREFERENCE: begin - reference_reset_base(ref,paraloc^.reference.index,paraloc^.reference.offset,paraloc^.reference.temppos,2,[]); + reference_reset_base(ref,paraloc^.reference.index,paraloc^.reference.offset,ctempposinvalid,2,[]); a_load_reg_ref(list,paraloc^.size,paraloc^.size,r,ref); end; else @@ -2722,16 +2722,16 @@ unit cgcpu; list.concat(taicpu.op_reg_reg(A_MOV,S_W,reference.index,NR_DI)); if reference.index=NR_SP then - reference_reset_base(href,NR_DI,reference.offset+return_address_size+2,reference.temppos,sizeof(pint),[]) + reference_reset_base(href,NR_DI,reference.offset+return_address_size+2,ctempposinvalid,sizeof(pint),[]) else - reference_reset_base(href,NR_DI,reference.offset+return_address_size,reference.temppos,sizeof(pint),[]); + reference_reset_base(href,NR_DI,reference.offset+return_address_size,ctempposinvalid,sizeof(pint),[]); href.segment:=NR_SS; a_op_const_ref(list,OP_SUB,size,ioffset,href); list.concat(taicpu.op_reg(A_POP,S_W,NR_DI)); end else begin - reference_reset_base(href,reference.index,reference.offset+return_address_size,reference.temppos,sizeof(pint),[]); + reference_reset_base(href,reference.index,reference.offset+return_address_size,ctempposinvalid,sizeof(pint),[]); href.segment:=NR_SS; a_op_const_ref(list,OP_SUB,size,ioffset,href); end; diff --git a/compiler/i8086/hlcgcpu.pas b/compiler/i8086/hlcgcpu.pas index 41b4650132..43b104cd29 100644 --- a/compiler/i8086/hlcgcpu.pas +++ b/compiler/i8086/hlcgcpu.pas @@ -152,7 +152,7 @@ implementation reference_reset_base(href,voidstackpointertype,NR_STACK_POINTER_REG,0,ctempposinvalid,voidstackpointertype.size,[]); end else - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); cg.a_loadfpu_reg_ref(list,locsize,locsize,l.register,href); end; LOC_FPUREGISTER: @@ -197,7 +197,7 @@ implementation reference_reset_base(href,voidstackpointertype,NR_STACK_POINTER_REG,0,ctempposinvalid,voidstackpointertype.size,[]); end else - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); cg.a_loadmm_reg_ref(list,locsize,locsize,l.register,href,mms_movescalar); end; LOC_FPUREGISTER: @@ -223,7 +223,7 @@ implementation cg.a_load_ref_cgpara(list,locsize,l.reference,cgpara) else begin - reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.Location^.reference.temppos,cgpara.alignment,[]); + reference_reset_base(href,voidstackpointertype,cgpara.location^.reference.index,cgpara.location^.reference.offset,ctempposinvalid,cgpara.alignment,[]); cg.g_concatcopy(list,l.reference,href,stacksize); end; end; diff --git a/compiler/llvm/hlcgllvm.pas b/compiler/llvm/hlcgllvm.pas index b6de7d4f5f..80ae2f550b 100644 --- a/compiler/llvm/hlcgllvm.pas +++ b/compiler/llvm/hlcgllvm.pas @@ -242,7 +242,7 @@ implementation begin if assigned(location^.next) then internalerror(2010052906); - reference_reset_base(ref,cpointerdef.getreusable(size),location^.reference.index,location^.reference.offset,location^.reference.temppos,newalignment(cgpara.alignment,cgpara.intsize-sizeleft),[]); + reference_reset_base(ref,cpointerdef.getreusable(size),location^.reference.index,location^.reference.offset,ctempposinvalid,newalignment(cgpara.alignment,cgpara.intsize-sizeleft),[]); if (def_cgsize(size)<>OS_NO) and (size.size=sizeleft) and (sizeleft<=sizeof(aint)) then @@ -458,7 +458,7 @@ implementation internalerror(2014012307) else begin - reference_reset_base(href, cpointerdef.getreusable(callpara^.def), paraloc^.reference.index, paraloc^.reference.offset, paraloc^.reference.temppos, paraloc^.def.alignment, []); + reference_reset_base(href, cpointerdef.getreusable(callpara^.def), paraloc^.reference.index, paraloc^.reference.offset, ctempposinvalid, paraloc^.def.alignment, []); res:=getregisterfordef(list, paraloc^.def); load_ref_anyreg(callpara^.def, href, res, callpara); end; diff --git a/compiler/mips/cgcpu.pas b/compiler/mips/cgcpu.pas index 1fa4657635..a518fa7d03 100644 --- a/compiler/mips/cgcpu.pas +++ b/compiler/mips/cgcpu.pas @@ -320,7 +320,7 @@ begin LOC_REFERENCE: begin paraloc.check_simple_location; - reference_reset_base(href2,paraloc.location^.reference.index,paraloc.location^.reference.offset,paraloc.location^.reference.temppos,paraloc.alignment,[]); + reference_reset_base(href2,paraloc.location^.reference.index,paraloc.location^.reference.offset,ctempposinvalid,paraloc.alignment,[]); { concatcopy should choose the best way to copy the data } g_concatcopy(list,ref,href2,tcgsize2size[size]); end; diff --git a/compiler/ncgcal.pas b/compiler/ncgcal.pas index 4ccf1f244e..490f2934ab 100644 --- a/compiler/ncgcal.pas +++ b/compiler/ncgcal.pas @@ -798,12 +798,12 @@ implementation ((tmpparaloc^.loc<>LOC_REFERENCE) or assigned(tmpparaloc^.next)) then internalerror(200501281); - reference_reset_base(href,callerparaloc^.reference.index,callerparaloc^.reference.offset,callerparaloc^.reference.temppos,calleralignment,[]); + reference_reset_base(href,callerparaloc^.reference.index,callerparaloc^.reference.offset,ctempposinvalid,calleralignment,[]); { copy parameters in case they were moved to a temp. location because we've a fixed stack } case tmpparaloc^.loc of LOC_REFERENCE: begin - reference_reset_base(htempref,tmpparaloc^.reference.index,tmpparaloc^.reference.offset,tmpparaloc^.reference.temppos,tmpalignment,[]); + reference_reset_base(htempref,tmpparaloc^.reference.index,tmpparaloc^.reference.offset,ctempposinvalid,tmpalignment,[]); { use concatcopy, because it can also be a float which fails when load_ref_ref is used } if (ppn.tempcgpara.size <> OS_NO) then diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index 5c19d77357..089eab0159 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -805,7 +805,7 @@ implementation LOC_REFERENCE: begin gen_alloc_regloc(list,destloc,vardef); - reference_reset_base(href,paraloc^.reference.index,paraloc^.reference.offset,paraloc^.reference.temppos,para.alignment,[]); + reference_reset_base(href,paraloc^.reference.index,paraloc^.reference.offset,ctempposinvalid,para.alignment,[]); cg128.a_load128_ref_reg(list,href,destloc.register128); unget_para(paraloc^); end; @@ -936,7 +936,7 @@ implementation LOC_REFERENCE: begin gen_alloc_regloc(list,destloc,vardef); - reference_reset_base(href,paraloc^.reference.index,paraloc^.reference.offset,paraloc^.reference.temppos,para.alignment,[]); + reference_reset_base(href,paraloc^.reference.index,paraloc^.reference.offset,ctempposinvalid,para.alignment,[]); cg64.a_load64_ref_reg(list,href,destloc.register64); unget_para(paraloc^); end; diff --git a/compiler/parabase.pas b/compiler/parabase.pas index f747c1397c..7a205be0f7 100644 --- a/compiler/parabase.pas +++ b/compiler/parabase.pas @@ -35,12 +35,7 @@ unit parabase; type TCGParaReference = record index : tregister; - { right now, the initial offset and the temppos of a para reference - is always the same; use separate names in case this would ever - change, or be different for a particular platform } - case byte of - 0: (offset : asizeint); - 1: (temppos : treftemppos); + offset : asizeint; end; PCGParaLocation = ^TCGParaLocation; diff --git a/compiler/paramgr.pas b/compiler/paramgr.pas index c41df060d1..358c6b79c8 100644 --- a/compiler/paramgr.pas +++ b/compiler/paramgr.pas @@ -425,7 +425,7 @@ implementation fillchar(href,sizeof(href),0); href.base:=paraloc^.reference.index; href.offset:=paraloc^.reference.offset; - href.temppos:=paraloc^.reference.temppos; + href.temppos:=ctempposinvalid; tg.ungetiftemp(list,href); end; end; diff --git a/compiler/sparcgen/cgsparc.pas b/compiler/sparcgen/cgsparc.pas index 5d5b3e18f2..02d5a61f29 100644 --- a/compiler/sparcgen/cgsparc.pas +++ b/compiler/sparcgen/cgsparc.pas @@ -338,7 +338,7 @@ implementation a_load_ref_reg(list,hloc^.size,hloc^.size,href,hloc^.register); LOC_REFERENCE : begin - reference_reset_base(href2,hloc^.reference.index,hloc^.reference.offset,hloc^.reference.temppos,paraloc.alignment,[]); + reference_reset_base(href2,hloc^.reference.index,hloc^.reference.offset,ctempposinvalid,paraloc.alignment,[]); { concatcopy should choose the best way to copy the data } g_concatcopy(list,href,href2,tcgsize2size[hloc^.size]); |