mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 15:49:18 +02:00
+ x86: track use of full ymm registers and generate vzeroupper if needed
git-svn-id: trunk@45484 -
This commit is contained in:
parent
78381bd1ae
commit
82a3877126
@ -748,7 +748,9 @@ interface
|
|||||||
{ subroutine needs to load and maintain a tls register }
|
{ subroutine needs to load and maintain a tls register }
|
||||||
pi_needs_tls,
|
pi_needs_tls,
|
||||||
{ subroutine uses get_frame }
|
{ subroutine uses get_frame }
|
||||||
pi_uses_get_frame
|
pi_uses_get_frame,
|
||||||
|
{ x86 only: subroutine uses ymm registers, requires vzeroupper call }
|
||||||
|
pi_uses_ymm
|
||||||
);
|
);
|
||||||
tprocinfoflags=set of tprocinfoflag;
|
tprocinfoflags=set of tprocinfoflag;
|
||||||
|
|
||||||
|
@ -338,6 +338,9 @@ unit cgcpu;
|
|||||||
list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
|
list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if pi_uses_ymm in current_procinfo.flags then
|
||||||
|
list.Concat(taicpu.op_none(A_VZEROUPPER));
|
||||||
|
|
||||||
{ return from proc }
|
{ return from proc }
|
||||||
if po_interrupt in current_procinfo.procdef.procoptions then
|
if po_interrupt in current_procinfo.procdef.procoptions then
|
||||||
begin
|
begin
|
||||||
|
@ -1641,7 +1641,9 @@ const
|
|||||||
(mask:pi_needs_tls;
|
(mask:pi_needs_tls;
|
||||||
str:' uses TLS data pointer '),
|
str:' uses TLS data pointer '),
|
||||||
(mask:pi_uses_get_frame;
|
(mask:pi_uses_get_frame;
|
||||||
str:' uses get_frame')
|
str:' uses get_frame'),
|
||||||
|
(mask:pi_uses_ymm;
|
||||||
|
str:' uses ymm register (x86 only)')
|
||||||
);
|
);
|
||||||
var
|
var
|
||||||
procinfooptions : tprocinfoflags;
|
procinfooptions : tprocinfoflags;
|
||||||
|
@ -423,7 +423,11 @@ unit cgcpu;
|
|||||||
list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
|
list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if pi_uses_ymm in current_procinfo.flags then
|
||||||
|
list.Concat(taicpu.op_none(A_VZEROUPPER));
|
||||||
|
|
||||||
list.concat(Taicpu.Op_none(A_RET,S_NO));
|
list.concat(Taicpu.Op_none(A_RET,S_NO));
|
||||||
|
|
||||||
if (pi_has_unwind_info in current_procinfo.flags) then
|
if (pi_has_unwind_info in current_procinfo.flags) then
|
||||||
begin
|
begin
|
||||||
tcpuprocinfo(current_procinfo).dump_scopes(list);
|
tcpuprocinfo(current_procinfo).dump_scopes(list);
|
||||||
|
Loading…
Reference in New Issue
Block a user