Test7200264.sh revision 4024
4021N/A#!/bin/sh
4021N/A#
4021N/A# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
4021N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4021N/A#
4021N/A# This code is free software; you can redistribute it and/or modify it
4021N/A# under the terms of the GNU General Public License version 2 only, as
4021N/A# published by the Free Software Foundation.
4021N/A#
4021N/A# This code is distributed in the hope that it will be useful, but WITHOUT
4021N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4021N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4021N/A# version 2 for more details (a copy is included in the LICENSE file that
4021N/A# accompanied this code).
4021N/A#
4021N/A# You should have received a copy of the GNU General Public License version
4021N/A# 2 along with this work; if not, write to the Free Software Foundation,
4021N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4021N/A#
4021N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4021N/A# or visit www.oracle.com if you need additional information or have any
4021N/A# questions.
4021N/A#
4021N/A#
4021N/A
4021N/Aif [ "${TESTSRC}" = "" ]
4021N/Athen
4021N/A echo "TESTSRC not set. Test cannot execute. Failed."
4021N/A exit 1
4021N/Afi
4021N/Aecho "TESTSRC=${TESTSRC}"
4021N/Aif [ "${TESTJAVA}" = "" ]
4021N/Athen
4021N/A echo "TESTJAVA not set. Test cannot execute. Failed."
4021N/A exit 1
4021N/Afi
4021N/Aecho "TESTJAVA=${TESTJAVA}"
4021N/Aif [ "${TESTCLASSES}" = "" ]
4021N/Athen
4021N/A echo "TESTCLASSES not set. Test cannot execute. Failed."
4021N/A exit 1
4021N/Afi
4021N/Aecho "TESTCLASSES=${TESTCLASSES}"
4021N/Aecho "CLASSPATH=${CLASSPATH}"
4021N/A
4021N/A# set platform-dependent variables
4021N/AOS=`uname -s`
4021N/Acase "$OS" in
4021N/A SunOS | Linux | Darwin )
4021N/A NULL=/dev/null
4021N/A PS=":"
4021N/A FS="/"
4021N/A ;;
4021N/A Windows_* )
4021N/A NULL=NUL
4021N/A PS=";"
4021N/A FS="\\"
4021N/A ;;
4021N/A CYGWIN_* )
4021N/A NULL=/dev/null
4021N/A PS=";"
4021N/A FS="/"
4021N/A ;;
4021N/A * )
4021N/A echo "Unrecognized system!"
4021N/A exit 1;
4021N/A ;;
4021N/Aesac
4021N/A
4021N/A
4021N/A${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
4021N/A
4021N/A# Only test fastdebug Server VM on x86
4021N/Aif [ $? != 0 ]
4021N/Athen
4021N/A echo "Test Passed"
4021N/A exit 0
4021N/Afi
4021N/A
4024N/A# grep for support integer multiply vectors (cpu with SSE4.1)
4024N/A${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintMiscellaneous -XX:+Verbose -version | grep "cores per cpu" | grep "sse4.1"
4024N/A
4024N/Aif [ $? != 0 ]
4024N/Athen
4024N/A SSE=2
4024N/Aelse
4024N/A SSE=4
4024N/Afi
4024N/A
4021N/Acp ${TESTSRC}${FS}TestIntVect.java .
4021N/A${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java
4021N/A
4021N/A${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
4021N/A
4021N/ACOUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 4 ]
4021N/Athen
4021N/A echo "Test Failed: AddVI $COUNT < 4"
4021N/A exit 1
4021N/Afi
4021N/A
4021N/A# AddVI is generated for test_subc
4021N/ACOUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 4 ]
4021N/Athen
4021N/A echo "Test Failed: SubVI $COUNT < 4"
4021N/A exit 1
4021N/Afi
4021N/A
4024N/A# MulVI is only supported with SSE4.1.
4024N/Aif [ $SSE -gt 3 ]
4024N/Athen
4021N/A# LShiftVI+SubVI is generated for test_mulc
4021N/ACOUNT=`grep MulVI test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 2 ]
4021N/Athen
4021N/A echo "Test Failed: MulVI $COUNT < 2"
4021N/A exit 1
4021N/Afi
4024N/Afi
4021N/A
4021N/ACOUNT=`grep AndV test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 3 ]
4021N/Athen
4021N/A echo "Test Failed: AndV $COUNT < 3"
4021N/A exit 1
4021N/Afi
4021N/A
4021N/ACOUNT=`grep OrV test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 3 ]
4021N/Athen
4021N/A echo "Test Failed: OrV $COUNT < 3"
4021N/A exit 1
4021N/Afi
4021N/A
4021N/ACOUNT=`grep XorV test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 3 ]
4021N/Athen
4021N/A echo "Test Failed: XorV $COUNT < 3"
4021N/A exit 1
4021N/Afi
4021N/A
4024N/A# LShiftVI+SubVI is generated for test_mulc
4021N/ACOUNT=`grep LShiftVI test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 5 ]
4021N/Athen
4021N/A echo "Test Failed: LShiftVI $COUNT < 5"
4021N/A exit 1
4021N/Afi
4021N/A
4024N/ACOUNT=`grep RShiftVI test.out | sed '/URShiftVI/d' | wc -l | awk '{print $1}'`
4024N/Aif [ $COUNT -lt 3 ]
4021N/Athen
4024N/A echo "Test Failed: RShiftVI $COUNT < 3"
4021N/A exit 1
4021N/Afi
4021N/A
4021N/ACOUNT=`grep URShiftVI test.out | wc -l | awk '{print $1}'`
4021N/Aif [ $COUNT -lt 3 ]
4021N/Athen
4021N/A echo "Test Failed: URShiftVI $COUNT < 3"
4021N/A exit 1
4021N/Afi
4021N/A