This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libitm: Add custom HTM fast path for RTM on x86_64.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]