mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 20:30:55 +02:00
* cpubase.cgsize2subreg should handle all valid sizes, resolves #38557
git-svn-id: trunk@49087 -
This commit is contained in:
parent
45b3d8e0bf
commit
47557e0ad2
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
37
tests/webtbs/tw38557.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user