~vorlon/ubuntu/natty/eglibc/multiarch

« back to all changes in this revision

Viewing changes to ports/sysdeps/unix/sysv/linux/hppa/getcontext.S

  • Committer: Steve Langasek
  • Date: 2011-02-18 21:18:44 UTC
  • mfrom: (103.1.7 eglibc)
  • Revision ID: steve.langasek@linaro.org-20110218211844-lodmi8b1qhyq3f3x
Tags: 2.13~pre1-0ubuntu1+multiarch.1
merge from natty

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "ucontext_i.h"
24
24
 
25
25
 
26
 
        /* Trampoline function.  */
 
26
        /* Trampoline function. Non-standard calling ABI.  */
27
27
        /* Can not use ENTRY(__getcontext_ret) here.  */
28
28
        .type   __getcontext_ret, @function
29
29
        .hidden __getcontext_ret
30
30
__getcontext_ret:
31
31
        .proc
32
32
        .callinfo FRAME=0,NO_CALLS
 
33
        /* r26-r23 contain original r3-r6, but because setcontext
 
34
           does not reload r3-r6 (it's using them as temporaries)
 
35
           we must save them elsewhere and swap them back in.  */
33
36
        copy    %r23, %r3
34
37
        copy    %r24, %r4
35
38
        copy    %r25, %r5
36
39
        copy    %r26, %r6
 
40
        /* r20 contains original return pointer.  */
37
41
        bv      0(%r20)
38
42
        copy    %r0, %ret0
39
43
        .procend
72
76
        stw     %r27, oR27(%r26)
73
77
        stw     %r28, oR28(%r26)
74
78
        stw     %r29, oR29(%r26)
75
 
        ldo     -64(%sp), %r1   /* Calculate %sp in %r1.  */
76
 
        stw     %r1, oR30(%r26) /* Save new %sp.  */
 
79
        stw     %sp, oR30(%r26)
77
80
        stw     %r31, oR31(%r26)
78
81
 
79
82
        stw     %r0, oUC_FLAGS(%r26)
80
83
        /* stw  %r0, oUC_LINK(%r26) - Do not overwrite.  */
81
 
        stw     %r1, oSS_SP(%r26)
 
84
        stw     %sp, oSS_SP(%r26)
82
85
        stw     %r0, oSS_FLAGS(%r26)
83
86
        stw     %r0, oSS_SIZE(%r26)
84
87
 
127
130
        fstds    %fr31, 0(%r1)
128
131
 
129
132
        /* Prologue */
130
 
        stwm    %r4, 64(%r30)
 
133
        stwm    %r4, 64(%sp)
131
134
#ifdef PIC
132
 
        stw     %r19, -32(%r30)
 
135
        stw     %r19, -32(%sp)
133
136
#endif
134
137
 
135
138
        /* Set up the trampoline registers.
152
155
        ldi     SIG_BLOCK, %r26
153
156
 
154
157
        /* Epilogue */
155
 
        ldw     -84(%r30), %r2
 
158
        ldw     -84(%sp), %r2
156
159
#ifdef PIC
157
 
        ldw     -96(%r30), %r19
 
160
        ldw     -96(%sp), %r19
158
161
#endif
159
162
        bv      %r0(%r2)
160
 
        ldwm    -64(%r30), %r4
 
163
        ldwm    -64(%sp), %r4
161
164
END(__getcontext)
162
165
 
163
166
weak_alias (__getcontext, getcontext)