summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-03-30 16:44:19 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-03-30 16:44:19 +0000
commitf581bf11e6918fe8998357f62da59393272f232c (patch)
treedebc358745164e08e30f5a96f3b20f9dbb43a505 /tests
parent18c7cc855ad6c0ca529a94482739fe0fbaa6db25 (diff)
downloadfpc-f581bf11e6918fe8998357f62da59393272f232c.tar.gz
* cpubase.cgsize2subreg should handle all valid sizes, resolves #38557
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49087 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests')
-rw-r--r--tests/webtbs/tw38557.pp37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/webtbs/tw38557.pp b/tests/webtbs/tw38557.pp
new file mode 100644
index 0000000000..224a108064
--- /dev/null
+++ b/tests/webtbs/tw38557.pp
@@ -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.