summaryrefslogtreecommitdiff
path: root/compiler/x86_64
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-24 17:52:05 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-24 17:52:05 +0000
commit115f8a1b407bd85ad049b1f7601ff5332395fcb0 (patch)
tree65cf6da5371386757074ddd475ac354e8379a61e /compiler/x86_64
parent2bb58752f71ba2baccafa0f065e456274b922b46 (diff)
downloadfpc-115f8a1b407bd85ad049b1f7601ff5332395fcb0.tar.gz
+ x86: track use of full ymm registers and generate vzeroupper if needed
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45484 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/x86_64')
-rw-r--r--compiler/x86_64/cgcpu.pas4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/x86_64/cgcpu.pas b/compiler/x86_64/cgcpu.pas
index df755f0718..0310786856 100644
--- a/compiler/x86_64/cgcpu.pas
+++ b/compiler/x86_64/cgcpu.pas
@@ -423,7 +423,11 @@ unit cgcpu;
list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
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));
+
if (pi_has_unwind_info in current_procinfo.flags) then
begin
tcpuprocinfo(current_procinfo).dump_scopes(list);