2 * Copyright 2015, Cyril Bur, IBM Corp.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
10 #include "basic_asm.h"
15 li r3,1 # assume a bad result
74 # r3 holds pointer to where to put the result of fork
75 # r4 holds pointer to the pid
76 # f14-f31 are non volatiles
79 std r3,STACK_FRAME_PARAM(0)(sp) # Address of darray
80 std r4,STACK_FRAME_PARAM(1)(sp) # Address of pid
87 # pass the result of the fork to the caller
88 ld r9,STACK_FRAME_PARAM(1)(sp)
91 ld r3,STACK_FRAME_PARAM(0)(sp)
100 # int preempt_fpu(double *darray, int *threads_running, int *running)
101 # On starting will (atomically) decrement not_ready as a signal that the FPU
102 # has been loaded with darray. Will proceed to check the validity of the FPU
103 # registers while running is not zero.
104 FUNC_START(preempt_fpu)
105 PUSH_BASIC_STACK(256)
107 std r3,STACK_FRAME_PARAM(0)(sp) # double *darray
108 std r4,STACK_FRAME_PARAM(1)(sp) # int *threads_starting
109 std r5,STACK_FRAME_PARAM(2)(sp) # int *running
116 ld r3,STACK_FRAME_PARAM(1)(sp)
122 2: ld r3,STACK_FRAME_PARAM(0)(sp)
127 ld r4,STACK_FRAME_PARAM(2)(sp)
135 FUNC_END(preempt_fpu)