On 11/03/2017 02:38 AM, Uros Bizjak wrote:
            * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
            (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
            to probe at the start of a noreturn function.

            * gcc.target/i386/stack-check-12.c: New test

-      emit_stack_probe (plus_constant (Pmode, stack_pointer_rtx,
-       -GET_MODE_SIZE (word_mode)));
+      rtx_insn *insn = emit_insn (gen_push (gen_rtx_REG (word_mode, 0)));

Please use AX_REG instead of 0.

+      RTX_FRAME_RELATED_P (insn) = 1;
+      ix86_emit_restore_reg_using_pop (gen_rtx_REG (word_mode, 0));

Also here.

        emit_insn (gen_blockage ());

BTW: Could we use an unused register here, if available? %eax is used
to pass first argument in regparm functions on 32bit targets.
Any register is sufficient.  We just want to touch the top of the stack.

Jeff

Reply via email to