Lines Matching +full:0 +full:- +full:19

1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Kernel entry-points.
8 #include <asm/asm-offsets.h>
35 .size \func, . - \func
39 * This defines the normal kernel pt-regs layout.
41 * regs 9-15 preserved by C code
42 * regs 16-18 saved by PAL-code
43 * regs 29-30 saved and set up by PAL-code
44 * JRP - Save regs 16-18 in a special area of the stack, so that
45 * the palcode-provided values are available to the signal handler.
51 stq $0, 0($sp)
57 .cfi_rel_offset $0, 0
68 stq $19, 72($sp)
86 .cfi_rel_offset $19, 72
98 lda $19, alpha_mv
99 ldq $0, 0($sp)
104 ldq $20, HAE_CACHE($19)
112 ldq $20, HAE_REG($19)
113 stq $21, HAE_CACHE($19)
114 stq $21, 0($20)
115 99: ldq $19, 72($sp)
126 .cfi_restore $0
135 .cfi_restore $19
145 .cfi_adjust_cfa_offset -SP_OFF
151 .cfi_rel_offset $9, 0
169 .cfi_adjust_cfa_offset -SWITCH_STACK_SIZE
173 * Non-syscall kernel entry points.
178 lda $8, 0x3fff
181 mov $sp, $19
187 lda $8, 0x3fff
196 /* save $9 - $15 so the inline exception code can manipulate them. */
199 stq $9, 0($sp)
206 .cfi_rel_offset $9, 0
213 addq $sp, 64, $19
215 lda $8, 0x3fff
219 ldq $9, 0($sp)
234 .cfi_adjust_cfa_offset -64
241 lda $8, 0x3fff
249 lda $sp, -256($sp)
251 stq $0, 0($sp)
252 .cfi_rel_offset $0, 0
254 ldq $0, 256($sp) /* get PS */
258 and $0, 8, $0 /* user mode? */
260 bne $0, entUnaUser /* yup -> do user-level unaligned fault */
272 /* 16-18 PAL-saved */
273 stq $19, 152($sp)
283 mov $sp, $19
300 .cfi_rel_offset $19, 19*8
311 lda $8, 0x3fff
315 ldq $0, 0($sp)
331 /* 16-18 PAL-saved */
332 ldq $19, 152($sp)
359 .cfi_restore $19
370 .cfi_adjust_cfa_offset -256
376 ldq $0, 0($sp) /* restore original $0 */
378 .cfi_restore $0
379 .cfi_adjust_cfa_offset -256
381 lda $sp, -64($sp)
383 stq $9, 0($sp)
390 .cfi_rel_offset $9, 0
397 lda $8, 0x3fff
398 addq $sp, 64, $19
401 ldq $9, 0($sp)
416 .cfi_adjust_cfa_offset -64
422 lda $8, 0x3fff
437 * Note that a0-a2 are not saved by PALcode as with the other entry points.
450 lda $8, 0x3fff
456 cmpult $0, $4, $4
459 s8addq $0, $5, $5
472 ldq $27, 0($5)
474 ldgp $gp, 0($26)
475 blt $0, $syscall_error /* the call failed */
477 stq $0, 0($sp)
478 stq $31, 72($sp) /* a3=0 => no error */
483 cmovne $26, 0, $18 /* $18 = 0 => non-restartable */
484 ldq $0, SP_OFF($sp)
485 and $0, 8, $0
486 beq $0, ret_to_kernel
515 * Those functions must zero $0 (v0) directly in the stack
519 ldq $18, 0($sp) /* old syscall nr (zero if success) */
522 ldq $19, 72($sp) /* .. and this a3 */
523 subq $31, $0, $0 /* with error in v0 */
525 stq $0, 0($sp)
538 * $19: The old a3 value
551 * restarts for us, so let $18 and $19 burn.
554 mov 0, $18
588 ldq $19, 72($sp)
596 cmpult $0, $1, $1
597 s8addq $0, $2, $2
599 ldq $27, 0($2)
602 ldgp $gp, 0($26)
605 blt $0, $strace_error /* the call failed */
607 stq $31, 72($sp) /* a3=0 => no error */
608 stq $0, 0($sp) /* save return value */
617 ldq $18, 0($sp) /* old syscall nr (zero if success) */
619 ldq $19, 72($sp) /* .. and this a3 */
621 subq $31, $0, $0 /* with error in v0 */
623 stq $0, 0($sp)
628 mov $19, $10 /* save old a3 */
631 mov $10, $19
639 * Save and restore the switch stack -- aka the balance of the user context.
646 .cfi_def_cfa $sp, 0
649 lda $sp, -SWITCH_STACK_SIZE($sp)
651 stq $9, 0($sp)
661 .size do_switch_stack, .-do_switch_stack
666 .cfi_def_cfa $sp, 0
669 ldq $9, 0($sp)
680 .size undo_switch_stack, .-undo_switch_stack
688 V( 0); V( 1); V( 2); V( 3)
692 V(16); V(17); V(18); V(19)
698 ldt $f0, FR(0) # don't let "__save_fpu" change fp state.
701 .size __save_fpu, .-__save_fpu
710 V( 0); V( 1); V( 2); V( 3)
715 V(16); V(17); V(18); V(19)
743 lda $8, 0x3fff
746 mov $17, $0
749 .size alpha_switch_to, .-alpha_switch_to
765 * ... and new kernel threads - here
790 .prologue 0
817 .prologue 0
820 lda $sp, -SWITCH_STACK_SIZE($sp)
836 .prologue 0
840 That works nicely, but for real syscall 0 we need to
842 Store a non-zero there - -ENOSYS we need in register
845 lda $0, -ENOSYS
847 stq $0, 0($sp)