* cpubase.cgsize2subreg should handle all valid sizes, resolves #38557

git-svn-id: trunk@49087 -
This commit is contained in:
florian 2021-03-30 16:44:19 +00:00
parent 45b3d8e0bf
commit 47557e0ad2
3 changed files with 40 additions and 0 deletions

1
.gitattributes vendored
View File

@ -18761,6 +18761,7 @@ tests/webtbs/tw38549a.pp svneol=native#text/plain
tests/webtbs/tw38549b.pp svneol=native#text/plain
tests/webtbs/tw38549c.pp svneol=native#text/plain
tests/webtbs/tw38549d.pp svneol=native#text/plain
tests/webtbs/tw38557.pp svneol=native#text/pascal
tests/webtbs/tw3863.pp svneol=native#text/plain
tests/webtbs/tw38636.pp svneol=native#text/plain
tests/webtbs/tw3864.pp svneol=native#text/plain

View File

@ -473,6 +473,8 @@ implementation
cgsize2subreg:=R_SUBMMY;
OS_M512:
cgsize2subreg:=R_SUBMMZ;
OS_S128,
OS_128,
OS_NO:
{ error message should have been thrown already before, so avoid only
an internal error }

37
tests/webtbs/tw38557.pp Normal file
View File

@ -0,0 +1,37 @@
{ %cpu=x86_64 }
{ %fail }
{$asmmode intel}
type
gfxImage = record
data: pointer;
width, height: dWord;
end;
function putPixel(where:gfxImage;x,y,col:dword):dword; assembler; nostackframe;
//begin
asm
xor eax,eax
mov eax,x
mov eax,y
mov eax,col
mov rax,rdi
mov rax,rsi
rol rax,32
mov rax, where
//mov rax, where.data
//mov rax, where
end;
//end;
var a : gfxImage;
z : dword;
begin
a.data:= pointer(5);
a.width := 8;
a.height := 7;
z:= putPixel (a, 1, 2, 3);
writeln;
writeln(' ',z,' ');
writeln;
end.