This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] libitm: Add custom HTM fast path for RTM on x86_64.
- From: Andi Kleen <andi at firstfloor dot org>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Henderson <rth at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, Peter Bergner <bergner at vnet dot ibm dot com>, "Kleen\, Andi" <andi dot kleen at intel dot com>
- Date: Wed, 21 Aug 2013 10:14:07 -0700
- Subject: Re: [PATCH] libitm: Add custom HTM fast path for RTM on x86_64.
- References: <1377094606 dot 3196 dot 4901 dot camel at triegel dot csb>
Torvald Riegel <triegel@redhat.com> writes:
> +#endif
> leaq 8(%rsp), %rax
> - subq $56, %rsp
> - cfi_def_cfa_offset(64)
> + subq $64, %rsp
> + cfi_def_cfa_offset(72)
I don't see why you did this change and the addq change below.
The rest seems reasonable to me, although I haven't tried to untangle
the full dependencies between C++ and asm code for retries.
It would be likely cleaner to just keep the retries fully
in C++ like the original patch did. There's no advantage
of going back to assembler.
> movq %rax, (%rsp)
> movq %rbx, 8(%rsp)
> movq %rbp, 16(%rsp)
> @@ -72,8 +127,21 @@ SYM(_ITM_beginTransaction):
> movq %r15, 48(%rsp)
> movq %rsp, %rsi
> call SYM(GTM_begin_transaction)
> - addq $56, %rsp
> + addq $64, %rsp
> cfi_def_cfa_offset(8)
-Andi
--
ak@linux.intel.com -- Speaking for myself only