Ticket #5824: 0001-ARM-StgRun-Ensure-r11-state-is-preserved.patch

File 0001-ARM-StgRun-Ensure-r11-state-is-preserved.patch, 1.2 KB (added by bgamari, 2 years ago)

Ensure r11 is preserved

  • rts/StgCRun.c

    From fb179992e931fcff7e9c9fab167a7e8c23e00c4e Mon Sep 17 00:00:00 2001
    From: Ben Gamari <bgamari.foss@gmail.com>
    Date: Mon, 30 Jan 2012 16:52:40 -0500
    Subject: [PATCH] ARM StgRun: Ensure r11 state is preserved
    
    ---
     rts/StgCRun.c |    6 +++---
     1 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/rts/StgCRun.c b/rts/StgCRun.c
    index 8fcb550..17aefb6 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-r10, fp, ip, lr}\n\t" 
     635        "stmfd sp!, {r4-r11, 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-r10, fp, ip, lr}\n\t" 
     672        "ldmfd sp!, {r4-r11, fp, ip, lr}\n\t" 
    673673      : "=r" (r) 
    674674      : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES) 
    675       : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%fp", "%ip", "%lr" 
     675      : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%r11", "%fp", "%ip", "%lr" 
    676676    ); 
    677677    return r; 
    678678}