Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/tools/testing/selftests/powerpc/math/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  vsx_asm.S   Sprache: Sparc

 
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright 2015, Cyril Bur, IBM Corp.
 */


#include "basic_asm.h"
#include "vsx_asm.h"

#long check_vsx(vector int *r3);
#This function wraps storeing VSX regs to the end of an array and a
#call to a comparison function in C which boils down to a memcmp()
FUNC_START(check_vsx)
 PUSH_BASIC_STACK(32)
 std r3,STACK_FRAME_PARAM(0)(sp)
 addi r3, r3, 16 * 12 #Second half of array
 bl store_vsx
 ld r3,STACK_FRAME_PARAM(0)(sp)
 bl vsx_memcmp
 POP_BASIC_STACK(32)
 blr
FUNC_END(check_vsx)

# int preempt_vmx(vector int *varray, int *threads_starting,
#                 int *running);
# On starting will (atomically) decrement threads_starting as a signal
# that the VMX have been loaded with varray. Will proceed to check the
# validity of the VMX registers while running is not zero.
FUNC_START(preempt_vsx)
 PUSH_BASIC_STACK(512)
 std r3,STACK_FRAME_PARAM(0)(sp) # vector int *varray
 std r4,STACK_FRAME_PARAM(1)(sp) # int *threads_starting
 std r5,STACK_FRAME_PARAM(2)(sp) # int *running

 bl load_vsx
 nop

 sync
 # Atomic DEC
 ld r3,STACK_FRAME_PARAM(1)(sp)
1: lwarx r4,0,r3
 addi r4,r4,-1
 stwcx. r4,0,r3
 bne- 1b

2: ld r3,STACK_FRAME_PARAM(0)(sp)
 bl check_vsx
 nop
 cmpdi r3,0
 bne 3f
 ld r4,STACK_FRAME_PARAM(2)(sp)
 ld r5,0(r4)
 cmpwi r5,0
 bne 2b

3: POP_BASIC_STACK(512)
 blr
FUNC_END(preempt_vsx)

Messung V0.5
C=94 H=96 G=94

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.