Lines Matching +full:0 +full:- +full:19
1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Kernel entry-points.
8 #include <asm/asm-offsets.h>
39 .size \func, . - \func
43 * This defines the normal kernel pt-regs layout.
45 * regs 9-15 preserved by C code
46 * regs 16-18 saved by PAL-code
47 * regs 29-30 saved and set up by PAL-code
48 * JRP - Save regs 16-18 in a special area of the stack, so that
49 * the palcode-provided values are available to the signal handler.
55 stq $0, 0($sp)
61 .cfi_rel_offset $0, 0
72 stq $19, 72($sp)
90 .cfi_rel_offset $19, 72
102 lda $19, alpha_mv
103 ldq $0, 0($sp)
108 ldq $20, HAE_CACHE($19)
116 ldq $20, HAE_REG($19)
117 stq $21, HAE_CACHE($19)
118 stq $21, 0($20)
119 99: ldq $19, 72($sp)
130 .cfi_restore $0
139 .cfi_restore $19
149 .cfi_adjust_cfa_offset -SP_OFF
155 .cfi_rel_offset $9, 0
173 .cfi_adjust_cfa_offset -SWITCH_STACK_SIZE
177 * Non-syscall kernel entry points.
182 lda $8, 0x3fff
185 mov $sp, $19
191 lda $8, 0x3fff
200 /* save $9 - $15 so the inline exception code can manipulate them. */
203 stq $9, 0($sp)
210 .cfi_rel_offset $9, 0
217 addq $sp, 56, $19
219 lda $8, 0x3fff
223 ldq $9, 0($sp)
238 .cfi_adjust_cfa_offset -56
245 lda $8, 0x3fff
253 lda $sp, -256($sp)
255 stq $0, 0($sp)
256 .cfi_rel_offset $0, 0
258 ldq $0, 256($sp) /* get PS */
262 and $0, 8, $0 /* user mode? */
264 bne $0, entUnaUser /* yup -> do user-level unaligned fault */
276 /* 16-18 PAL-saved */
277 stq $19, 152($sp)
287 mov $sp, $19
304 .cfi_rel_offset $19, 19*8
315 lda $8, 0x3fff
319 ldq $0, 0($sp)
335 /* 16-18 PAL-saved */
336 ldq $19, 152($sp)
363 .cfi_restore $19
374 .cfi_adjust_cfa_offset -256
380 ldq $0, 0($sp) /* restore original $0 */
382 .cfi_restore $0
383 .cfi_adjust_cfa_offset -256
385 lda $sp, -56($sp)
387 stq $9, 0($sp)
394 .cfi_rel_offset $9, 0
401 lda $8, 0x3fff
402 addq $sp, 56, $19
405 ldq $9, 0($sp)
420 .cfi_adjust_cfa_offset -56
426 lda $8, 0x3fff
441 * Note that a0-a2 are not saved by PALcode as with the other entry points.
454 lda $8, 0x3fff
460 cmpult $0, $4, $4
463 s8addq $0, $5, $5
476 ldq $27, 0($5)
478 ldgp $gp, 0($26)
479 blt $0, $syscall_error /* the call failed */
481 stq $0, 0($sp)
482 stq $31, 72($sp) /* a3=0 => no error */
487 cmovne $26, 0, $18 /* $18 = 0 => non-restartable */
488 ldq $0, SP_OFF($sp)
489 and $0, 8, $0
490 beq $0, ret_to_kernel
519 * Those functions must zero $0 (v0) directly in the stack
523 ldq $18, 0($sp) /* old syscall nr (zero if success) */
526 ldq $19, 72($sp) /* .. and this a3 */
527 subq $31, $0, $0 /* with error in v0 */
529 stq $0, 0($sp)
542 * $19: The old a3 value
555 * restarts for us, so let $18 and $19 burn.
558 mov 0, $18
592 ldq $19, 72($sp)
600 cmpult $0, $1, $1
601 s8addq $0, $2, $2
603 ldq $27, 0($2)
606 ldgp $gp, 0($26)
609 blt $0, $strace_error /* the call failed */
611 stq $31, 72($sp) /* a3=0 => no error */
612 stq $0, 0($sp) /* save return value */
621 ldq $18, 0($sp) /* old syscall nr (zero if success) */
623 ldq $19, 72($sp) /* .. and this a3 */
625 subq $31, $0, $0 /* with error in v0 */
627 stq $0, 0($sp)
632 mov $19, $10 /* save old a3 */
635 mov $10, $19
643 * Save and restore the switch stack -- aka the balance of the user context.
650 .cfi_def_cfa $sp, 0
653 lda $sp, -SWITCH_STACK_SIZE($sp)
655 stq $9, 0($sp)
665 .size do_switch_stack, .-do_switch_stack
670 .cfi_def_cfa $sp, 0
673 ldq $9, 0($sp)
684 .size undo_switch_stack, .-undo_switch_stack
692 V( 0); V( 1); V( 2); V( 3)
696 V(16); V(17); V(18); V(19)
702 ldt $f0, FR(0) # don't let "__save_fpu" change fp state.
705 .size __save_fpu, .-__save_fpu
714 V( 0); V( 1); V( 2); V( 3)
719 V(16); V(17); V(18); V(19)
747 lda $8, 0x3fff
750 mov $17, $0
753 .size alpha_switch_to, .-alpha_switch_to
769 * ... and new kernel threads - here
794 .prologue 0
821 .prologue 0
824 lda $sp, -SWITCH_STACK_SIZE($sp)
840 .prologue 0
844 That works nicely, but for real syscall 0 we need to
846 Store a non-zero there - -ENOSYS we need in register
849 lda $0, -ENOSYS
851 stq $0, 0($sp)