* synchronized with trunk

git-svn-id: branches/wasm@48513 -
This commit is contained in:
nickysn 2021-02-04 21:34:40 +00:00
commit cf3b883bce
5 changed files with 34 additions and 9 deletions

1
.gitattributes vendored
View File

@ -18367,6 +18367,7 @@ tests/webtbs/tw32111.pp svneol=native#text/pascal
tests/webtbs/tw32115.pp svneol=native#text/pascal
tests/webtbs/tw32118.pp svneol=native#text/pascal
tests/webtbs/tw3212.pp svneol=native#text/plain
tests/webtbs/tw32139.pp -text svneol=native#text/pascal
tests/webtbs/tw3214.pp svneol=native#text/plain
tests/webtbs/tw32150.pp svneol=native#text/pascal
tests/webtbs/tw3216.pp svneol=native#text/plain

View File

@ -435,7 +435,8 @@ implementation
end
else
begin
tc:=tai_const.create_sym(cielabel);
{ according to the dwarf (2 to 4) standard, this is an uword being always 32 bit unsigned }
tc:=tai_const.create_type_sym(aitconst_32bit,cielabel);
{ force label offset to secrel32 for windows systems }
if (target_info.system in systems_windows+systems_wince) then
tc.consttype:=aitconst_secrel32_symbol;

View File

@ -556,7 +556,7 @@ Type
tkernel_timespecs = array[0..1] of kernel_timespec;
{$ifndef android}
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'statx'; {$ENDIF}
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'utimensat'; {$ENDIF}
Function futimens(fd: cint; const times:tkernel_timespecs):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'futimens'; {$ENDIF}
{$endif android}
@ -875,7 +875,6 @@ begin
statx:=do_syscall(syscall_nr_statx,TSysParam(dfd),TSysParam(filename),TSysParam(flags),TSysParam(mask),TSysParam(@buf));
end;
{$endif}
{$ifndef android}
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint;
@ -917,6 +916,7 @@ begin
{$endif sizeof(clong)<=4}
end;
{$endif android}
{$endif not FPC_USE_LIBC}
end.

View File

@ -20,9 +20,10 @@
procedure mcount; external name 'mcount';
{$endif FPC_PROFILE}
function FpSysCall(sysnr:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL0'];
function FpSysCall(sysnr:TSysParam):TSysResult; assembler; nostackframe; [public,alias:'FPC_SYSCALL0'];
asm
pushq %rax { keep stack aligned }
{$ifdef FPC_PROFILE}
pushq sysnr
call mcount
@ -37,11 +38,13 @@ asm
call seterrno@PLT
movq $-1,%rax
.LSyscOK:
popq %rcx { remove alignment }
end;
function FpSysCall(sysnr,param1 : TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL1'];
function FpSysCall(sysnr,param1 : TSysParam):TSysResult; assembler; nostackframe; [public,alias:'FPC_SYSCALL1'];
asm
pushq %rax { keep stack aligned }
{$ifdef FPC_PROFILE}
pushq sysnr
pushq param1
@ -59,11 +62,13 @@ asm
call seterrno@PLT
movq $-1,%rax
.LSyscOK:
popq %rcx { remove alignment }
end;
function FpSysCall(sysnr,param1,param2 : TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL2'];
function FpSysCall(sysnr,param1,param2 : TSysParam):TSysResult; assembler; nostackframe; [public,alias:'FPC_SYSCALL2'];
asm
pushq %rax { keep stack aligned }
{$ifdef FPC_PROFILE}
pushq sysnr
pushq param1
@ -84,11 +89,13 @@ asm
call seterrno@PLT
movq $-1,%rax
.LSyscOK:
popq %rcx { remove alignment }
end;
function FpSysCall(sysnr,param1,param2,param3:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL3'];
function FpSysCall(sysnr,param1,param2,param3:TSysParam):TSysResult; assembler; nostackframe; [public,alias:'FPC_SYSCALL3'];
asm
pushq %rax { keep stack aligned }
{$ifdef FPC_PROFILE}
pushq sysnr
pushq param1
@ -112,11 +119,13 @@ asm
call seterrno@PLT
movq $-1,%rax
.LSyscOK:
popq %rcx { remove alignment }
end;
function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL4'];
function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; assembler; nostackframe; [public,alias:'FPC_SYSCALL4'];
asm
pushq %rax { keep stack aligned }
{$ifdef FPC_PROFILE}
pushq sysnr
pushq param1
@ -143,11 +152,13 @@ asm
call seterrno@PLT
movq $-1,%rax
.LSyscOK:
popq %rcx { remove alignment }
end;
function FpSysCall(sysnr,param1,param2,param3,param4,param5 : TSysParam):TSysResult; assembler;[public,alias:'FPC_SYSCALL5'];
function FpSysCall(sysnr,param1,param2,param3,param4,param5 : TSysParam):TSysResult; assembler; nostackframe; [public,alias:'FPC_SYSCALL5'];
asm
pushq %rax { keep stack aligned }
{$ifdef FPC_PROFILE}
pushq sysnr
pushq param1
@ -177,6 +188,7 @@ asm
call seterrno@PLT
movq $-1,%rax
.LSyscOK:
popq %rcx { remove alignment }
end;

11
tests/webtbs/tw32139.pp Normal file
View File

@ -0,0 +1,11 @@
{ %OPT=-Seh }
program Test;
{$HINTS ON}
var
cur: Currency;
begin
cur := 3.5;
cur := cur / 1.5;
end.