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
174 .cfi_adjust_cfa_offset -SWITCH_STACK_SIZE
178 * Non-syscall kernel entry points.
183 lda $8, 0x3fff
186 mov $sp, $19
192 lda $8, 0x3fff
201 /* save $9 - $15 so the inline exception code can manipulate them. */
204 stq $9, 0($sp)
211 .cfi_rel_offset $9, 0
218 addq $sp, 56, $19
220 lda $8, 0x3fff
224 ldq $9, 0($sp)
239 .cfi_adjust_cfa_offset -56
246 lda $8, 0x3fff
254 lda $sp, -256($sp)
256 stq $0, 0($sp)
257 .cfi_rel_offset $0, 0
259 ldq $0, 256($sp) /* get PS */
263 and $0, 8, $0 /* user mode? */
265 bne $0, entUnaUser /* yup -> do user-level unaligned fault */
277 /* 16-18 PAL-saved */
278 stq $19, 152($sp)
288 mov $sp, $19
305 .cfi_rel_offset $19, 19*8
316 lda $8, 0x3fff
320 ldq $0, 0($sp)
336 /* 16-18 PAL-saved */
337 ldq $19, 152($sp)
364 .cfi_restore $19
375 .cfi_adjust_cfa_offset -256
381 ldq $0, 0($sp) /* restore original $0 */
383 .cfi_restore $0
384 .cfi_adjust_cfa_offset -256
386 lda $sp, -56($sp)
388 stq $9, 0($sp)
395 .cfi_rel_offset $9, 0
402 lda $8, 0x3fff
403 addq $sp, 56, $19
406 ldq $9, 0($sp)
421 .cfi_adjust_cfa_offset -56
427 lda $8, 0x3fff
442 * Note that a0-a2 are not saved by PALcode as with the other entry points.
455 lda $8, 0x3fff
461 cmpult $0, $4, $4
464 s8addq $0, $5, $5
475 ldq $27, 0($5)
477 ldgp $gp, 0($26)
478 blt $0, $syscall_error /* the call failed */
479 stq $0, 0($sp)
480 stq $31, 72($sp) /* a3=0 => no error */
485 cmovne $26, 0, $18 /* $18 = 0 => non-restartable */
486 ldq $0, SP_OFF($sp)
487 and $0, 8, $0
488 beq $0, ret_to_kernel
513 * Those functions must zero $0 (v0) directly in the stack
517 ldq $18, 0($sp) /* old syscall nr (zero if success) */
520 ldq $19, 72($sp) /* .. and this a3 */
521 subq $31, $0, $0 /* with error in v0 */
523 stq $0, 0($sp)
529 stq $0, 0($sp)
530 stq $31, 72($sp) /* a3=0 => no error */
541 * $19: The old a3 value
554 * restarts for us, so let $18 and $19 burn.
557 mov 0, $18
583 ldq $19, 72($sp)
591 cmpult $0, $1, $1
592 s8addq $0, $2, $2
594 ldq $27, 0($2)
597 ldgp $gp, 0($26)
600 blt $0, $strace_error /* the call failed */
601 stq $31, 72($sp) /* a3=0 => no error */
603 stq $0, 0($sp) /* save return value */
612 ldq $18, 0($sp) /* old syscall nr (zero if success) */
614 ldq $19, 72($sp) /* .. and this a3 */
616 subq $31, $0, $0 /* with error in v0 */
618 stq $0, 0($sp)
623 mov $19, $10 /* save old a3 */
626 mov $10, $19
634 * Save and restore the switch stack -- aka the balance of the user context.
641 .cfi_def_cfa $sp, 0
644 lda $sp, -SWITCH_STACK_SIZE($sp)
646 stq $9, 0($sp)
690 .size do_switch_stack, .-do_switch_stack
695 .cfi_def_cfa $sp, 0
698 ldq $9, 0($sp)
742 .size undo_switch_stack, .-undo_switch_stack
755 lda $8, 0x3fff
758 mov $17, $0
761 .size alpha_switch_to, .-alpha_switch_to
777 * ... and new kernel threads - here
802 .prologue 0
820 .prologue 0
823 lda $sp, -SWITCH_STACK_SIZE($sp)
839 .prologue 0
843 That works nicely, but for real syscall 0 we need to
845 Store a non-zero there - -ENOSYS we need in register
848 lda $0, -ENOSYS
850 stq $0, 0($sp)