summaryrefslogtreecommitdiff
path: root/tests/tbs
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-04-22 20:19:14 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-04-22 20:19:14 +0000
commit758d72deae3757ca7c43e63350464fb3d6475287 (patch)
tree34bbd782bb92f013b6eccfe5ac8b40b625501664 /tests/tbs
parentaa815acfd123d693e4d6fefd030a95829c6b7974 (diff)
downloadfpc-758d72deae3757ca7c43e63350464fb3d6475287.tar.gz
* fix for Mantis #36951: B and BL can take immediate literals as well
+ added test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44999 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/tbs')
-rw-r--r--tests/tbs/tb0669.pp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/tbs/tb0669.pp b/tests/tbs/tb0669.pp
new file mode 100644
index 0000000000..aa62cae47e
--- /dev/null
+++ b/tests/tbs/tb0669.pp
@@ -0,0 +1,31 @@
+{ %CPU=aarch64 }
+{ %NORUN }
+
+program tb0669;
+
+Type
+ TSysResult = Int64;
+ TSysParam = Int64;
+
+procedure seterrno(err:longint);
+
+begin
+end;
+
+function FpSysCall(sysnr:TSysParam):TSysResult;
+assembler; nostackframe;
+asm
+ {mov w8,w0
+ svc #0
+ tbz x0,#63,.Ldone
+ str x30,[sp,#-16]!
+ neg x0,x0}
+ bl seterrno
+ {ldr x30,[sp],#16
+ mov x0,#-1
+.Ldone:}
+end;
+
+begin
+
+end.