This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix split_stack_return
"H.J. Lu" <hjl.tools@gmail.com> writes:
> I found the problem when I am working on my vzeroupper change.
> The bad "split_stack_return" pattern makes it impossible for me
> to work on vzeroupper since gcc kept generating "ret $2"
> for my vzeroupper pattern. The split_stack_return issue wasted
> my time and blocked my vzeroupper change, which I want to finish during
> gcc summit. That is why I committed my change.
I'm sorry for blocking your change. Still, we have an approval system
for a reason.
Does this patch fix your problem?
Ian
Index: gcc/config/i386/i386.md
===================================================================
--- gcc/config/i386/i386.md (revision 165994)
+++ gcc/config/i386/i386.md (working copy)
@@ -261,6 +261,7 @@
UNSPECV_WRFSBASE
UNSPECV_WRGSBASE
UNSPECV_RDRAND
+ UNSPECV_SPLIT_STACK_RETURN
])
;; Constants to represent pcomtrue/pcomfalse variants
@@ -11751,8 +11752,8 @@
;; In order to support the call/return predictor, we use a return
;; instruction which the middle-end doesn't see.
(define_insn "split_stack_return"
- [(unspec [(match_operand:SI 0 "const_int_operand" "")]
- UNSPEC_STACK_CHECK)]
+ [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")]
+ UNSPECV_SPLIT_STACK_RETURN)]
""
{
if (operands[0] == const0_rtx)