]> granicus.if.org Git - llvm/commitdiff
[X86] Fix the AllRegs AVX calling convention.
authorQuentin Colombet <qcolombet@apple.com>
Mon, 9 May 2016 22:37:05 +0000 (22:37 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Mon, 9 May 2016 22:37:05 +0000 (22:37 +0000)
We used to list registers that were not in the AVX space. In other
words, we were pushing registers that the ISA cannot encode
(YMM16-YMM31).

This is part of llvm.org/PR27481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268983 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CallingConv.td
test/CodeGen/X86/x86-interrupt_vzeroupper.ll

index 263a207a66728bf2099ba8c79f594aa061057a5c..47e581fa1cde8c54421e32454aa3ec6fae12b615 100644 (file)
@@ -897,7 +897,7 @@ def CSR_32_AllRegs_SSE : CalleeSavedRegs<(add CSR_32_AllRegs,
 def CSR_64_AllRegs     : CalleeSavedRegs<(add CSR_64_MostRegs, RAX, RSP,
                                               (sequence "XMM%u", 16, 31))>;
 def CSR_64_AllRegs_AVX : CalleeSavedRegs<(sub (add CSR_64_MostRegs, RAX, RSP,
-                                                   (sequence "YMM%u", 0, 31)),
+                                                   (sequence "YMM%u", 0, 15)),
                                               (sequence "XMM%u", 0, 15))>;
 
 // Standard C + YMM6-15
index ab9f168d9727e8464745088a39d8a7270676bf04..b735ae82bd526d292820c8866c67b43814720e65 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s
+; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Checks that interrupt handler code does not call "vzeroupper" instruction