This is the mail archive of the gcc-help@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: Is GCC V3.4.6 supposed to be SystemV i386 ABI v4 compliant?


Curtis Taylor <cjt@us.ibm.com> writes:

> I have a case of g++ generating this instruction:
> 	add	$0xe,%esp
> and creating a non 32bit aligned %esp.  This is enabling a SIGSEGV in a
> signal handler that expects the stack to be word aligned.  

Presumably there is going to be a pushw around there somewhere.  gcc
can create a misaligned stack temporarily but it shouldn't create one
across a function call.  If that is the case, you may be able to avoid
the problem by using the -mno-push-args or -maccumulate-outgoing-args
options.

I agree that issuing this instruction violates the i386 ELF ABI, and
if current mainline gcc does it that is a bug which should be fixed.

Ian


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