Path: blob/master/test/hotspot/jtreg/compiler/floatingpoint/libTestFloatJNIArgs.c
41149 views
/*1* Copyright (c) 2015, 2016. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223#include <jni.h>2425#ifdef __cplusplus26extern "C" {27#endif2829JNIEXPORT jfloat JNICALL Java_compiler_floatingpoint_TestFloatJNIArgs_add15floats30(JNIEnv *env, jclass cls,31jfloat f1, jfloat f2, jfloat f3, jfloat f4,32jfloat f5, jfloat f6, jfloat f7, jfloat f8,33jfloat f9, jfloat f10, jfloat f11, jfloat f12,34jfloat f13, jfloat f14, jfloat f15) {35return f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14 + f15;36}3738JNIEXPORT jfloat JNICALL Java_compiler_floatingpoint_TestFloatJNIArgs_add10floats39(JNIEnv *env, jclass cls,40jfloat f1, jfloat f2, jfloat f3, jfloat f4,41jfloat f5, jfloat f6, jfloat f7, jfloat f8,42jfloat f9, jfloat f10) {43return f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10;44}4546JNIEXPORT jfloat JNICALL Java_compiler_floatingpoint_TestFloatJNIArgs_addFloatsInts47(JNIEnv *env, jclass cls,48jfloat f1, jfloat f2, jfloat f3, jfloat f4,49jfloat f5, jfloat f6, jfloat f7, jfloat f8,50jfloat f9, jfloat f10, jfloat f11, jfloat f12,51jfloat f13, jfloat f14, jfloat f15, jint a16, jint a17) {52return f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14 + f15 + a16 + a17;53}5455JNIEXPORT jdouble JNICALL Java_compiler_floatingpoint_TestFloatJNIArgs_add15doubles56(JNIEnv *env, jclass cls,57jdouble f1, jdouble f2, jdouble f3, jdouble f4,58jdouble f5, jdouble f6, jdouble f7, jdouble f8,59jdouble f9, jdouble f10, jdouble f11, jdouble f12,60jdouble f13, jdouble f14, jdouble f15) {61return f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8 + f9 + f10 + f11 + f12 + f13 + f14 + f15;62}636465#ifdef __cplusplus66}67#endif686970