On 07/03/2011 08:06 AM, Thomas Klein wrote:
> +/*
> + * Write prolouge part of stack check into asm file.
> + * For Thumb this may look like this:
> + *   push {rsym,ramn}
> + *   ldr rsym, .LSPCHK0
> + *   ldr rsym, [rsym]
> + *   ldr ramn, .LSPCHK0 + 4
> + *   add rsym, rsym, ramn
> + *   cmp sp, rsym
> + *   bhs .LSPCHK1
> + *   push {lr}
> + *   bl __thumb_stack_failure
> + * .align 2
> + * .LSPCHK0:
> + *   .word symbol_addr_of(stack_limit_rtx)
> + *   .word lenght_of(amount)
> + * .LSPCHK1:
> + *   pop {rsym,ramn}
> + */
> +void
> +stack_check_output_function (FILE *f, int reg0, int reg1, unsigned amount,
> +                             unsigned numregs)
> +{

Is there an exceedingly good reason you're emitting this much code
as text, rather than as rtl?

In particular, you adjust the stack but not the unwind info.  So
if one puts a breakpoint at your __thumb_stack_failure function,
the unwind information will be incorrect.


r~

Reply via email to