Home | History | Annotate | Download | only in pa

Lines Matching refs:stack

82 /* PA has a downward growing stack, which looks like this:
99 The first four argument words on the stack are reserved for use by
111 The registers are allocated in the same manner as stack slots.
112 This allows the callee to save its arguments on the stack if
123 The rest of the arguments are passed on the stack starting at SP-52,
127 or in the stack. */
129 /* ffi_prep_args is called by the assembly routine once stack space
132 The following code will put everything into the stack frame
140 void ffi_prep_args_pa32(UINT32 *stack, extended_cif *ecif, unsigned bytes)
149 debug(1, "%s: stack = %p, ecif = %p, bytes = %u\n", __FUNCTION__, stack,
162 *(SINT32 *)(stack - slot) = *(SINT8 *)(*p_argv);
166 *(UINT32 *)(stack - slot) = *(UINT8 *)(*p_argv);
170 *(SINT32 *)(stack - slot) = *(SINT16 *)(*p_argv);
174 *(UINT32 *)(stack - slot) = *(UINT16 *)(*p_argv);
182 *(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv);
189 *(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv);
195 *(UINT32 *)(stack - slot) = *(UINT32 *)(*p_argv);
199 case 0: fldw(stack - slot, fr4); break;
200 case 1: fldw(stack - slot, fr5); break;
201 case 2: fldw(stack - slot, fr6); break;
202 case 3: fldw(stack - slot, fr7); break;
210 *(UINT64 *)(stack - slot) = *(UINT64 *)(*p_argv);
214 case 1: fldd(stack - slot, fr5); break;
215 case 3: fldd(stack - slot, fr7); break;
223 *(UINT32 *)(stack - slot) = (UINT32)(*p_argv);
236 dest_cpy = (char *)(stack - slot) + 4 - len;
242 dest_cpy = (char *)(stack - slot) + 8 - len;
246 *(UINT32 *)(stack - slot) = (UINT32)(*p_argv);
258 /* Make sure we didn't mess up and scribble on the stack. */
262 debug(5, "Stack setup:\n");
265 if ((n%4) == 0) { debug(5, "\n%08x: ", (unsigned int)(stack - n)); }
266 debug(5, "%08x ", *(stack - n));
280 int z = 0; /* # stack slots */
306 /* We can fit up to 6 args in the default 64-byte stack frame,
307 if we need more, we need more stack. */
309 cif->bytes = MIN_STACK_SIZE; /* min stack size */
313 debug(3, "Calculated stack size is %u bytes\n", cif->bytes);
355 own stack sizing. */
414 the stack, and we need to fill them into a cif structure and invoke
417 ffi_status ffi_closure_inner_pa32(ffi_closure *closure, UINT32 *stack)
454 avalue[i] = (char *)(stack - slot) + sizeof(UINT32) - (*p_arg)->size;
460 avalue[i] = (void *)(stack - slot);
473 case 0: fstw(fr4, (void *)(stack - slot)); break;
474 case 1: fstw(fr5, (void *)(stack - slot)); break;
475 case 2: fstw(fr6, (void *)(stack - slot)); break;
476 case 3: fstw(fr7, (void *)(stack - slot)); break;
479 avalue[i] = (void *)(stack - slot);
488 case 1: fstd(fr5, (void *)(stack - slot)); break;
489 case 3: fstd(fr7, (void *)(stack - slot)); break;
492 avalue[i] = (void *)(stack - slot);
501 avalue[i] = (void *)(stack - slot) + sizeof(UINT32) -
507 avalue[i] = (void *)(stack - slot) + sizeof(UINT64) -
511 avalue[i] = (void *) *(stack - slot);
532 *(stack - FIRST_ARG_SLOT) = (UINT8)(ret[0] >> 24);
535 *(stack - FIRST_ARG_SLOT) = (SINT8)(ret[0] >> 24);
538 *(stack - FIRST_ARG_SLOT) = (UINT16)(ret[0] >> 16);
541 *(stack - FIRST_ARG_SLOT) = (SINT16)(ret[0] >> 16);
546 *(stack - FIRST_ARG_SLOT) = ret[0];
550 *(stack - FIRST_ARG_SLOT) = ret[0];
551 *(stack - FIRST_ARG_SLOT - 1) = ret[1];
569 tmp = (void*)(stack - FIRST_ARG_SLOT);
594 *(stack - FIRST_ARG_SLOT) = ret2[0];
595 *(stack - FIRST_ARG_SLOT - 1) = ret2[1];