/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*----------------------------------------------------------------------
*
* Prototypes for the inline templates in vis_32.il (and vis_64.il)
*
*----------------------------------------------------------------------
*/
#ifndef VIS_PROTO_H
#define VIS_PROTO_H
#include <sys/isa_defs.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Pure edge handling instructions */
/* Edge handling instructions with negative return values if cc set. */
/* Alignment instructions. */
/* Partitioned comparison instructions. */
/* Partitioned multiplication. */
#ifdef MLIB_OS64BIT
#else
#endif /* MLIB_OS64BIT */
/* Partitioned addition & subtraction. */
/* Pixel packing & clamping. */
float vis_fpack16(double /*frs2*/);
float vis_fpackfix(double /*frs2*/);
/* Combined pack ops. */
void vis_st2_fpack16(double, double, double *);
void vis_std_fpack16(double, double, double *);
void vis_st2_fpackfix(double, double, double *);
/* Motion estimation. */
#ifdef MLIB_OS64BIT
double pxls2 /*frs2*/);
#else
#endif /* MLIB_OS64BIT */
/* Channel merging. */
/* Pixel expansion. */
double vis_fexpand(float /*frs2*/);
double vis_fexpand_hi(double /*frs2*/);
double vis_fexpand_lo(double /*frs2*/);
/* Bitwise logical operators. */
double vis_fnot(double /*frs1*/);
float vis_fnots(float /*frs1*/);
double vis_fsrc(double /*frs1*/);
float vis_fsrcs(float /*frs1*/);
double vis_fzero(void);
float vis_fzeros(void);
double vis_fone(void);
float vis_fones(void);
/* Partial stores. */
void * /*rs3*/, int /*rmask*/);
/* Byte & short stores. */
/* Byte & short loads. */
double vis_lddfa_ASI_FL8P(void * /*rs1*/);
double vis_lddfa_ASI_FL8S(void * /*rs1*/);
double vis_lddfa_ASI_FL16P(void * /*rs1*/);
double vis_lddfa_ASI_FL16S(void * /*rs1*/);
double vis_lddfa_ASI_FL8PL(void * /*rs1*/);
double vis_lddfa_ASI_FL8SL(void * /*rs1*/);
double vis_lddfa_ASI_FL16PL(void * /*rs1*/);
double vis_lddfa_ASI_FL16SL(void * /*rs1*/);
/* Direct read from GSR, write to GSR. */
unsigned int vis_read_gsr32(void);
void vis_write_gsr32(unsigned int /*GSR*/);
/* Voxel texture mapping. */
#ifdef MLIB_OS64BIT
#endif /* MLIB_OS64BIT */
/* Register aliasing and type casts. */
float vis_read_hi(double /*frs1*/);
float vis_read_lo(double /*frs1*/);
float vis_to_float(unsigned int /*value*/);
double vis_to_double_dup(unsigned int /*value*/);
#ifdef MLIB_OS64BIT
double vis_ll_to_double(unsigned long /*value*/);
double vis_ll_to_double(unsigned long long /*value*/);
#endif /* MLIB_OS64BIT */
/* Direct access to ASI. */
/* normal asi = 0x82, big endian = 0x80, little endian = 0x88 */
unsigned int vis_read_asi(void);
void vis_write_asi(unsigned int /*ASI*/);
/* to %asi */
/* to %asi */
/* to %asi */
/* to %asi */
unsigned short vis_lduha_ASI_REG(void * /*rs1*/);
unsigned short vis_lduha_ASI_P(void * /*rs1*/);
unsigned short vis_lduha_ASI_PL(void * /*rs1*/);
/* Nicknames for explicit ASI loads and stores. */
/* "<" and ">=" may be implemented in terms of ">" and "<=". */
/* Prefetch */
void vis_prefetch_read(void * /*address*/);
void vis_prefetch_write(void * /*address*/);
#pragma no_side_effect(vis_prefetch_read)
#pragma no_side_effect(vis_prefetch_write)
/* Nonfaulting load */
char vis_ldsba_ASI_PNF(void * /*rs1*/);
char vis_ldsba_ASI_PNFL(void * /*rs1*/);
unsigned char vis_lduba_ASI_PNF(void * /*rs1*/);
unsigned char vis_lduba_ASI_PNFL(void * /*rs1*/);
short vis_ldsha_ASI_PNF(void * /*rs1*/);
short vis_ldsha_ASI_PNFL(void * /*rs1*/);
unsigned short vis_lduha_ASI_PNF(void * /*rs1*/);
unsigned short vis_lduha_ASI_PNFL(void * /*rs1*/);
int vis_ldswa_ASI_PNF(void * /*rs1*/);
int vis_ldswa_ASI_PNFL(void * /*rs1*/);
unsigned int vis_lduwa_ASI_PNF(void * /*rs1*/);
unsigned int vis_lduwa_ASI_PNFL(void * /*rs1*/);
#ifdef MLIB_OS64BIT
long vis_ldxa_ASI_PNF(void * /*rs1*/);
long vis_ldxa_ASI_PNFL(void * /*rs1*/);
long long vis_ldda_ASI_PNF(void * /*rs1*/);
long long vis_ldda_ASI_PNFL(void * /*rs1*/);
#endif /* MLIB_OS64BIT */
float vis_ldfa_ASI_PNF(void * /*rs1*/);
float vis_ldfa_ASI_PNFL(void * /*rs1*/);
double vis_lddfa_ASI_PNF(void * /*rs1*/);
double vis_lddfa_ASI_PNFL(void * /*rs1*/);
#ifdef MLIB_OS64BIT
#endif /* MLIB_OS64BIT */
#if VIS >= 0x200
/* Edge handling instructions which do not set the integer condition codes */
/* Byte mask and shuffle instructions */
/* Graphics status register */
unsigned int vis_read_bmask(void);
#ifdef MLIB_OS64BIT
unsigned long vis_read_gsr64(void);
void vis_write_gsr64(unsigned long /* GSR */);
unsigned long long vis_read_gsr64(void);
void vis_write_gsr64(unsigned long long /* GSR */);
#endif /* MLIB_OS64BIT */
#endif /* VIS >= 0x200 */
#ifdef __cplusplus
} // End of extern "C"
#endif /* __cplusplus */
#endif /* VIS_PROTO_H */