1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright 2015, Cyril Bur, IBM Corp.
9 #long check_vsx(vector int *r3);
10 #This function wraps storeing VSX regs to the end of an array and a
11 #call to a comparison function in C which boils down to a memcmp()
14 std r3,STACK_FRAME_PARAM(0)(sp)
15 addi r3, r3, 16 * 12 #Second half of array
17 ld r3,STACK_FRAME_PARAM(0)(sp)
23 # int preempt_vmx(vector int *varray, int *threads_starting,
25 # On starting will (atomically) decrement threads_starting as a signal
26 # that the VMX have been loaded with varray. Will proceed to check the
27 # validity of the VMX registers while running is not zero.
28 FUNC_START(preempt_vsx)
30 std r3,STACK_FRAME_PARAM(0)(sp) # vector int *varray
31 std r4,STACK_FRAME_PARAM(1)(sp) # int *threads_starting
32 std r5,STACK_FRAME_PARAM(2)(sp) # int *running
39 ld r3,STACK_FRAME_PARAM(1)(sp)
45 2: ld r3,STACK_FRAME_PARAM(0)(sp)
50 ld r4,STACK_FRAME_PARAM(2)(sp)
55 3: POP_BASIC_STACK(512)