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"
13 #long check_vsx(vector int *r3);
14 #This function wraps storeing VSX regs to the end of an array and a
15 #call to a comparison function in C which boils down to a memcmp()
18 std r3,STACK_FRAME_PARAM(0)(sp)
19 addi r3, r3, 16 * 12 #Second half of array
21 ld r3,STACK_FRAME_PARAM(0)(sp)
27 # int preempt_vmx(vector int *varray, int *threads_starting,
29 # On starting will (atomically) decrement threads_starting as a signal
30 # that the VMX have been loaded with varray. Will proceed to check the
31 # validity of the VMX registers while running is not zero.
32 FUNC_START(preempt_vsx)
34 std r3,STACK_FRAME_PARAM(0)(sp) # vector int *varray
35 std r4,STACK_FRAME_PARAM(1)(sp) # int *threads_starting
36 std r5,STACK_FRAME_PARAM(2)(sp) # int *running
43 ld r3,STACK_FRAME_PARAM(1)(sp)
49 2: ld r3,STACK_FRAME_PARAM(0)(sp)
54 ld r4,STACK_FRAME_PARAM(2)(sp)
59 3: POP_BASIC_STACK(512)