mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 12:26:58 +02:00
* adapt register if the size of the paraloc and the register differ, resolves #34409
git-svn-id: trunk@43617 -
This commit is contained in:
parent
06c1a17d13
commit
f2a8b8ad6a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -17783,6 +17783,7 @@ tests/webtbs/tw3435.pp svneol=native#text/plain
|
||||
tests/webtbs/tw34380.pp svneol=native#text/plain
|
||||
tests/webtbs/tw34385.pp svneol=native#text/plain
|
||||
tests/webtbs/tw34385a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw34409.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3441.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3443.pp svneol=native#text/plain
|
||||
tests/webtbs/tw34438.pp svneol=native#text/pascal
|
||||
|
@ -84,6 +84,9 @@ interface
|
||||
procinfo,
|
||||
cpuinfo,
|
||||
tgobj
|
||||
{$ifdef x86}
|
||||
,cgx86
|
||||
{$endif x86}
|
||||
;
|
||||
|
||||
{*****************************************************************************
|
||||
@ -215,7 +218,10 @@ interface
|
||||
begin
|
||||
op.typ:=top_reg;
|
||||
op.reg:=sym.localloc.register;
|
||||
|
||||
{$ifdef x86}
|
||||
if reg2opsize(op.reg)<>TCGSize2Opsize[sym.localloc.size] then
|
||||
op.reg:=newreg(getregtype(op.reg),getsupreg(op.reg),cgsize2subreg(getregtype(op.reg),sym.localloc.size));
|
||||
{$endif x86}
|
||||
{$ifdef avr}
|
||||
case sofs of
|
||||
1: op.reg:=cg.GetNextReg(op.reg);
|
||||
|
13
tests/webtbs/tw34409.pp
Normal file
13
tests/webtbs/tw34409.pp
Normal file
@ -0,0 +1,13 @@
|
||||
{ %cpu=i386,x86_64 }
|
||||
{ %norun }
|
||||
{ %opt=-Rintel -O4 -a }
|
||||
|
||||
function foo ( w : word):byte; assembler;
|
||||
asm
|
||||
mov ax, w
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
foo(3);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user