From 629be9cee1e79bc039ae988bdaefb7b3fb5649c1 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 6 Feb 2018 16:22:41 +0000 Subject: [PATCH] + add a 'constsize' parameter to ConcatConstSymbol, so it can be used to distinguish between e.g. 16-bit and 32-bit offsets on i8086 git-svn-id: trunk@38141 - --- compiler/raatt.pas | 2 +- compiler/rautils.pas | 4 ++-- compiler/x86/rax86int.pas | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/raatt.pas b/compiler/raatt.pas index c132fd42c5..f414816635 100644 --- a/compiler/raatt.pas +++ b/compiler/raatt.pas @@ -896,7 +896,7 @@ unit raatt; begin if constsize<>sizeof(pint) then Message(asmr_w_32bit_const_for_address); - ConcatConstSymbol(curlist,asmsym,asmsymtyp,value) + ConcatConstSymbol(curlist,asmsym,asmsymtyp,value,constsize) end else ConcatConstant(curlist,value,constsize); diff --git a/compiler/rautils.pas b/compiler/rautils.pas index 33aaff8734..95eecacdaf 100644 --- a/compiler/rautils.pas +++ b/compiler/rautils.pas @@ -198,7 +198,7 @@ Function AsmRegisterPara(sym: tabstractnormalvarsym): boolean; Procedure ConcatLabel(p: TAsmList;var l : tasmlabel); Procedure ConcatConstant(p : TAsmList;value: tcgint; constsize:byte); - Procedure ConcatConstSymbol(p : TAsmList;const sym:string;symtyp:tasmsymtype;l:tcgint); + Procedure ConcatConstSymbol(p : TAsmList;const sym:string;symtyp:tasmsymtype;l:tcgint;constsize:byte); Procedure ConcatRealConstant(p : TAsmList;value: bestreal; real_typ : tfloattype); Procedure ConcatString(p : TAsmList;s:string); procedure ConcatAlign(p:TAsmList;l:tcgint); @@ -1647,7 +1647,7 @@ Begin end; - Procedure ConcatConstSymbol(p : TAsmList;const sym:string;symtyp:tasmsymtype;l:tcgint); + Procedure ConcatConstSymbol(p : TAsmList;const sym:string;symtyp:tasmsymtype;l:tcgint;constsize:byte); begin p.concat(Tai_const.Createname(sym,l)); end; diff --git a/compiler/x86/rax86int.pas b/compiler/x86/rax86int.pas index 789d59ffc4..488a91d8b4 100644 --- a/compiler/x86/rax86int.pas +++ b/compiler/x86/rax86int.pas @@ -2486,7 +2486,7 @@ Unit Rax86int; end else {$endif i8086} - ConcatConstSymbol(curlist,asmsym,asmsymtyp,value); + ConcatConstSymbol(curlist,asmsym,asmsymtyp,value,constsize); end else ConcatConstant(curlist,value,constsize);