From 68419da235342b0efcc172a16308ee2676a84da6 Mon Sep 17 00:00:00 2001 From: David Given Date: Sat, 29 Oct 2016 12:00:33 +0200 Subject: [PATCH] Actually, the locals need to go above the spills and saved regs, so fp == lb. --- mach/powerpc/mcg/platform.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mach/powerpc/mcg/platform.c b/mach/powerpc/mcg/platform.c index a8fd1af7c..b8bd44744 100644 --- a/mach/powerpc/mcg/platform.c +++ b/mach/powerpc/mcg/platform.c @@ -7,11 +7,11 @@ * | old FR * | old FP * | --------------- <- st, fp (a.k.a. lb) + * | locals + * | --------------- * | spills * | --------------- * | saved regs - * | --------------- - * | locals * | --------------- <- sp * V ...user area... * @@ -39,9 +39,9 @@ void platform_calculate_offsets(void) } } - current_proc->fp_to_st = 0; + current_proc->fp_to_st = -current_proc->locals_size; current_proc->fp_to_ab = 8; - current_proc->fp_to_lb = -(current_proc->spills_size + current_proc->saved_size); + current_proc->fp_to_lb = 0; } struct hop* platform_prologue(void) @@ -62,7 +62,7 @@ struct hop* platform_prologue(void) hop_add_insel(hop, "addi fp, sp, %d", spoffset); /* Saved reg offsets are negative. */ - saved_offset = -current_proc->spills_size; + saved_offset = -(current_proc->locals_size + current_proc->spills_size); for (i=0; ispills_size; + saved_offset = -(current_proc->locals_size + current_proc->spills_size); for (i=0; i