]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Save the link register in savectx().
authorjhibbits <jhibbits@FreeBSD.org>
Tue, 6 Oct 2015 01:24:46 +0000 (01:24 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Tue, 6 Oct 2015 01:24:46 +0000 (01:24 +0000)
Pointed out by: jhb

sys/powerpc/powerpc/swtch32.S
sys/powerpc/powerpc/swtch64.S

index 12b1bc03a399993affc570775e52a09072f3577d..e8394625bcf588adc9b87d1cc6d31c997f4c1ac1 100644 (file)
@@ -187,6 +187,8 @@ ENTRY(savectx)
        stmw    %r12,PCB_CONTEXT(%r3)   /* Save the non-volatile GP regs */
        mfcr    %r4                     /* Save the condition register */
        stw     %r4,PCB_CR(%r3)
+       mflr    %r4                     /* Save the link register */
+       stw     %r4,PCB_LR(%r3)
        blr
 
 /*
index b785281b2888817dd14ef0cb1bd02e93719fc800..d2f686372b1dc43c4e21a283b2564e5c36770fac 100644 (file)
@@ -255,6 +255,8 @@ ENTRY(savectx)
        mfcr    %r4                     /* Save the condition register */
        std     %r4,PCB_CR(%r3)
        std     %r2,PCB_TOC(%r3)        /* Save the TOC pointer */
+       mflr    %r4                     /* Save the link register */
+       std     %r4,PCB_LR(%r3)
        blr
 
 /*