This is the mail archive of the
mailing list for the GCC project.
Re: stack-protection vs alloca vs dwarf2
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 18 Apr 2014 11:40:09 +0200
- Subject: Re: stack-protection vs alloca vs dwarf2
- Authentication-results: sourceware.org; auth=none
- References: <201404170303 dot s3H335mQ015761 at greed dot delorie dot com> <1636047 dot kX3vM79Z3J at polaris> <201404172334 dot s3HNY5A2015625 at greed dot delorie dot com>
> Also, is that rule true if we *don't* have a frame pointer? That is,
> when we add a constant to the stack to allocate the frame, should that
> function be marked as frame-related? Or is it just the fp->sp move
> (or potentially an add, if there's outgoing args) that shouldn't be
The prologue expansion code needs to know what it is doing, in the sense that
it needs to know what register is the CFA register and what insn sets it up.
Once the CFA register is set up, insns modifying other registers, including sp
if sp is not the CFA register, must not be marked; of course, if sp is the CFA
register throughout the function because there is no frame pointer, then all
insns modifying sp must be marked.