This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] x86: Add support for frame pointer less mcount


On 07/31/2010 01:19 AM, Andi Kleen wrote:
> +	ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(__fentry__)
> +	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
> +	.align ALIGNARG(4)
> +C_LABEL(__fentry__)
> +	/* Allocate space for 7 registers.  */
> +	subq	$56,%rsp
...
> +	call C_SYMBOL_NAME(__mcount_internal)

You've an unaligned stack here.

  %16 = 0
	caller return address
	fentry return address
        64 bytes local
  %16 = 0
	mcount_internal return address

would be correct.

The i386 version should have been compiled with -mpreferred-stack-boundary=2,
so that one doesn't care about stack alignment.


r~


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