Alien-LibJIT
view release on metacpan or search on metacpan
libjit/jit/jit-opcodes.ops view on Meta::CPAN
/*
* jit-opcode.h - List of primitive opcodes for JIT instructions.
*
* Copyright (C) 2004 Southern Storm Software, Pty Ltd.
*
* The libjit library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 2.1 of
* the License, or (at your option) any later version.
*
* The libjit library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the libjit library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#ifndef _JIT_OPCODE_H
#define _JIT_OPCODE_H
#include <jit/jit-defs.h>
#ifdef __cplusplus
extern "C" {
#endif
%]
%option gen_intrinsic_table = yes
%option intrinsic_table_decl = "_jit_intrinsic_info_t const _jit_intrinsics[JIT_OP_NUM_OPCODES]"
opcodes(JIT_OP_, "jit_opcode_info_t const jit_opcodes[JIT_OP_NUM_OPCODES]")
{
op_def("nop") { }
/*
* Conversion opcodes
*/
op_def("trunc_sbyte") { op_values(int, int),
op_intrinsic(conv) }
op_def("trunc_ubyte") { op_values(int, int),
op_intrinsic(conv) }
op_def("trunc_short") { op_values(int, int),
op_intrinsic(conv) }
op_def("trunc_ushort") { op_values(int, int),
op_intrinsic(conv) }
op_def("trunc_int") { op_values(int, int),
op_intrinsic(conv) }
op_def("trunc_uint") { op_values(int, int),
op_intrinsic(conv) }
op_def("check_sbyte") { op_values(int, int) }
op_def("check_ubyte") { op_values(int, int) }
op_def("check_short") { op_values(int, int) }
op_def("check_ushort") { op_values(int, int) }
op_def("check_int") { op_values(int, int) }
op_def("check_uint") { op_values(int, int) }
op_def("low_word") { op_values(int, long),
op_intrinsic(conv) }
op_def("expand_int") { op_values(long, int),
op_intrinsic(conv) }
op_def("expand_uint") { op_values(long, int),
op_intrinsic(conv) }
op_def("check_low_word") { op_values(int, long) }
op_def("check_signed_low_word") { op_values(int, long) }
op_def("check_long") { op_values(long, long) }
op_def("check_ulong") { op_values(long, long) }
op_def("float32_to_int") { op_values(int, float32),
op_intrinsic(conv) }
op_def("float32_to_uint") { op_values(int, float32),
op_intrinsic(conv) }
op_def("float32_to_long") { op_values(long, float32),
op_intrinsic(conv) }
op_def("float32_to_ulong") { op_values(long, float32),
op_intrinsic(conv) }
op_def("check_float32_to_int") { op_values(int, float32) }
op_def("check_float32_to_uint") { op_values(int, float32) }
op_def("check_float32_to_long") { op_values(long, float32) }
op_def("check_float32_to_ulong") { op_values(long, float32) }
op_def("int_to_float32") { op_values(float32, int),
op_intrinsic(conv) }
op_def("uint_to_float32") { op_values(float32, int),
op_intrinsic(conv) }
op_def("long_to_float32") { op_values(float32, long),
op_intrinsic(conv) }
op_def("ulong_to_float32") { op_values(float32, long),
op_intrinsic(conv) }
op_def("float32_to_float64") { op_values(float64, float32),
op_intrinsic(conv) }
op_def("float64_to_int") { op_values(int, float64),
op_intrinsic(conv) }
op_def("float64_to_uint") { op_values(int, float64),
op_intrinsic(conv) }
op_def("float64_to_long") { op_values(long, float64),
op_intrinsic(conv) }
op_def("float64_to_ulong") { op_values(long, float64),
op_intrinsic(conv) }
op_def("check_float64_to_int") { op_values(int, float64) }
op_def("check_float64_to_uint") { op_values(int, float64) }
op_def("check_float64_to_long") { op_values(long, float64) }
op_def("check_float64_to_ulong") { op_values(long, float64) }
op_def("int_to_float64") { op_values(float64, int),
op_intrinsic(conv) }
op_def("uint_to_float64") { op_values(float64, int),
op_intrinsic(conv) }
op_def("long_to_float64") { op_values(float64, long),
op_intrinsic(conv) }
op_def("ulong_to_float64") { op_values(float64, long),
op_intrinsic(conv) }
op_def("float64_to_float32") { op_values(float32, float64),
op_intrinsic(conv) }
op_def("nfloat_to_int") { op_values(int, nfloat),
op_intrinsic(conv) }
op_def("nfloat_to_uint") { op_values(int, nfloat),
op_intrinsic(conv) }
op_def("nfloat_to_long") { op_values(long, nfloat),
op_intrinsic(conv) }
op_def("nfloat_to_ulong") { op_values(long, nfloat),
op_intrinsic(conv) }
op_def("check_nfloat_to_int") { op_values(int, nfloat) }
op_def("check_nfloat_to_uint") { op_values(int, nfloat) }
op_def("check_nfloat_to_long") { op_values(long, nfloat) }
( run in 0.608 second using v1.01-cache-2.11-cpan-5b529ec07f3 )