* store character constants converted to shortstrings unaligned

git-svn-id: trunk@9106 -
This commit is contained in:
florian 2007-11-03 16:07:18 +00:00
parent c794ec6de0
commit 6ac5ed6a47
2 changed files with 12 additions and 2 deletions

View File

@ -139,6 +139,9 @@ unit cgutils;
{ allocate room for parameters on the stack in the entry code? }
function use_fixed_stack: boolean;
{ returns r with the given alignment }
function setalignment(const r : treference;b : byte) : treference;
implementation
uses
@ -179,6 +182,13 @@ uses
end;
{ returns r with the given alignment }
function setalignment(const r : treference;b : byte) : treference;
begin
result:=r;
result.alignment:=b;
end;
{****************************************************************************
TLocation
****************************************************************************}

View File

@ -613,10 +613,10 @@ implementation
begin
if (target_info.endian = endian_little) then
cg.a_load_const_ref(current_asmdata.CurrAsmList,OS_16,(tordconstnode(right).value.svalue shl 8) or 1,
left.location.reference)
setalignment(left.location.reference,1))
else
cg.a_load_const_ref(current_asmdata.CurrAsmList,OS_16,tordconstnode(right).value.svalue or (1 shl 8),
left.location.reference);
setalignment(left.location.reference,1));
end
else
begin