Ticket #5824: 0002-fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis.patch

File 0002-fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis.patch, 1.1 KB (added by kgardas, 4 years ago)

the patch fixing ARM StgCRun to not save and restore r11/fp register twice

  • rts/StgCRun.c

    From 1cbf3bcae87dd102942d85ce71ea17d42d4b5f5a Mon Sep 17 00:00:00 2001
    From: Karel Gardas <[email protected]>
    Date: Tue, 14 Feb 2012 08:03:07 +0100
    Subject: [PATCH 2/2] fix ARM StgCRun to not save and restore r11/fp register twice
    
    ---
     rts/StgCRun.c |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/rts/StgCRun.c b/rts/StgCRun.c
    index 9ca22d2..3654b33 100644
    a b StgRun(StgFunPtr f, StgRegTable *basereg) { 
    632632        /*
    633633         * save callee-saves registers on behalf of the STG code.
    634634         */
    635         "stmfd sp!, {r4-r11, fp, ip, lr}\n\t"
     635        "stmfd sp!, {r4-r10, fp, ip, lr}\n\t"
    636636#if !defined(arm_HOST_ARCH_PRE_ARMv6)
    637637        "vstmdb sp!, {d8-d11}\n\t"
    638638#endif
    StgRun(StgFunPtr f, StgRegTable *basereg) { 
    669669#if !defined(arm_HOST_ARCH_PRE_ARMv6)
    670670        "vldmia sp!, {d8-d11}\n\t"
    671671#endif
    672         "ldmfd sp!, {r4-r11, fp, ip, lr}\n\t"
     672        "ldmfd sp!, {r4-r10, fp, ip, lr}\n\t"
    673673      : "=r" (r)
    674674      : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
    675675#if !defined(__thumb__)