github.com/goccy/go-jit@v0.0.0-20200514131505-ff78d45cf6af/internal/ccall/jit-interp-opcode.h (about)

     1  /* Automatically generated from ./jit-interp-opcodes.ops - DO NOT EDIT */
     2  
     3  /*
     4   * jit-interp-opcode.h - List of interpreter specific opcodes for
     5   *			 JIT instructions.
     6   *
     7   * Copyright (C) 2004  Southern Storm Software, Pty Ltd.
     8   *
     9   * The libjit library is free software: you can redistribute it and/or
    10   * modify it under the terms of the GNU Lesser General Public License
    11   * as published by the Free Software Foundation, either version 2.1 of
    12   * the License, or (at your option) any later version.
    13   *
    14   * The libjit library is distributed in the hope that it will be useful,
    15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
    16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    17   * Lesser General Public License for more details.
    18   *
    19   * You should have received a copy of the GNU Lesser General Public
    20   * License along with the libjit library.  If not, see
    21   * <http://www.gnu.org/licenses/>.
    22   */
    23  
    24  #ifndef	_JIT_INTERP_OPCODE_H
    25  #define	_JIT_INTERP_OPCODE_H
    26  
    27  #include <jit/jit-defs.h>
    28  
    29  #ifdef	__cplusplus
    30  extern	"C" {
    31  #endif
    32  
    33  #define	JIT_INTERP_OP_LDA_0_SBYTE				(JIT_OP_NUM_OPCODES + 0x0000)
    34  #define	JIT_INTERP_OP_LDA_0_UBYTE				(JIT_OP_NUM_OPCODES + 0x0001)
    35  #define	JIT_INTERP_OP_LDA_0_SHORT				(JIT_OP_NUM_OPCODES + 0x0002)
    36  #define	JIT_INTERP_OP_LDA_0_USHORT				(JIT_OP_NUM_OPCODES + 0x0003)
    37  #define	JIT_INTERP_OP_LDA_0_INT					(JIT_OP_NUM_OPCODES + 0x0004)
    38  #define	JIT_INTERP_OP_LDA_0_LONG				(JIT_OP_NUM_OPCODES + 0x0005)
    39  #define	JIT_INTERP_OP_LDA_0_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0006)
    40  #define	JIT_INTERP_OP_LDA_0_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0007)
    41  #define	JIT_INTERP_OP_LDA_0_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0008)
    42  #define	JIT_INTERP_OP_LDAA_0					(JIT_OP_NUM_OPCODES + 0x0009)
    43  #define	JIT_INTERP_OP_LDA_1_SBYTE				(JIT_OP_NUM_OPCODES + 0x000A)
    44  #define	JIT_INTERP_OP_LDA_1_UBYTE				(JIT_OP_NUM_OPCODES + 0x000B)
    45  #define	JIT_INTERP_OP_LDA_1_SHORT				(JIT_OP_NUM_OPCODES + 0x000C)
    46  #define	JIT_INTERP_OP_LDA_1_USHORT				(JIT_OP_NUM_OPCODES + 0x000D)
    47  #define	JIT_INTERP_OP_LDA_1_INT					(JIT_OP_NUM_OPCODES + 0x000E)
    48  #define	JIT_INTERP_OP_LDA_1_LONG				(JIT_OP_NUM_OPCODES + 0x000F)
    49  #define	JIT_INTERP_OP_LDA_1_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0010)
    50  #define	JIT_INTERP_OP_LDA_1_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0011)
    51  #define	JIT_INTERP_OP_LDA_1_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0012)
    52  #define	JIT_INTERP_OP_LDAA_1					(JIT_OP_NUM_OPCODES + 0x0013)
    53  #define	JIT_INTERP_OP_LDA_2_SBYTE				(JIT_OP_NUM_OPCODES + 0x0014)
    54  #define	JIT_INTERP_OP_LDA_2_UBYTE				(JIT_OP_NUM_OPCODES + 0x0015)
    55  #define	JIT_INTERP_OP_LDA_2_SHORT				(JIT_OP_NUM_OPCODES + 0x0016)
    56  #define	JIT_INTERP_OP_LDA_2_USHORT				(JIT_OP_NUM_OPCODES + 0x0017)
    57  #define	JIT_INTERP_OP_LDA_2_INT					(JIT_OP_NUM_OPCODES + 0x0018)
    58  #define	JIT_INTERP_OP_LDA_2_LONG				(JIT_OP_NUM_OPCODES + 0x0019)
    59  #define	JIT_INTERP_OP_LDA_2_FLOAT32				(JIT_OP_NUM_OPCODES + 0x001A)
    60  #define	JIT_INTERP_OP_LDA_2_FLOAT64				(JIT_OP_NUM_OPCODES + 0x001B)
    61  #define	JIT_INTERP_OP_LDA_2_NFLOAT				(JIT_OP_NUM_OPCODES + 0x001C)
    62  #define	JIT_INTERP_OP_LDAA_2					(JIT_OP_NUM_OPCODES + 0x001D)
    63  #define	JIT_INTERP_OP_STA_0_BYTE				(JIT_OP_NUM_OPCODES + 0x001E)
    64  #define	JIT_INTERP_OP_STA_0_SHORT				(JIT_OP_NUM_OPCODES + 0x001F)
    65  #define	JIT_INTERP_OP_STA_0_INT					(JIT_OP_NUM_OPCODES + 0x0020)
    66  #define	JIT_INTERP_OP_STA_0_LONG				(JIT_OP_NUM_OPCODES + 0x0021)
    67  #define	JIT_INTERP_OP_STA_0_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0022)
    68  #define	JIT_INTERP_OP_STA_0_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0023)
    69  #define	JIT_INTERP_OP_STA_0_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0024)
    70  #define	JIT_INTERP_OP_LDL_0_SBYTE				(JIT_OP_NUM_OPCODES + 0x0025)
    71  #define	JIT_INTERP_OP_LDL_0_UBYTE				(JIT_OP_NUM_OPCODES + 0x0026)
    72  #define	JIT_INTERP_OP_LDL_0_SHORT				(JIT_OP_NUM_OPCODES + 0x0027)
    73  #define	JIT_INTERP_OP_LDL_0_USHORT				(JIT_OP_NUM_OPCODES + 0x0028)
    74  #define	JIT_INTERP_OP_LDL_0_INT					(JIT_OP_NUM_OPCODES + 0x0029)
    75  #define	JIT_INTERP_OP_LDL_0_LONG				(JIT_OP_NUM_OPCODES + 0x002A)
    76  #define	JIT_INTERP_OP_LDL_0_FLOAT32				(JIT_OP_NUM_OPCODES + 0x002B)
    77  #define	JIT_INTERP_OP_LDL_0_FLOAT64				(JIT_OP_NUM_OPCODES + 0x002C)
    78  #define	JIT_INTERP_OP_LDL_0_NFLOAT				(JIT_OP_NUM_OPCODES + 0x002D)
    79  #define	JIT_INTERP_OP_LDLA_0					(JIT_OP_NUM_OPCODES + 0x002E)
    80  #define	JIT_INTERP_OP_LDL_1_SBYTE				(JIT_OP_NUM_OPCODES + 0x002F)
    81  #define	JIT_INTERP_OP_LDL_1_UBYTE				(JIT_OP_NUM_OPCODES + 0x0030)
    82  #define	JIT_INTERP_OP_LDL_1_SHORT				(JIT_OP_NUM_OPCODES + 0x0031)
    83  #define	JIT_INTERP_OP_LDL_1_USHORT				(JIT_OP_NUM_OPCODES + 0x0032)
    84  #define	JIT_INTERP_OP_LDL_1_INT					(JIT_OP_NUM_OPCODES + 0x0033)
    85  #define	JIT_INTERP_OP_LDL_1_LONG				(JIT_OP_NUM_OPCODES + 0x0034)
    86  #define	JIT_INTERP_OP_LDL_1_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0035)
    87  #define	JIT_INTERP_OP_LDL_1_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0036)
    88  #define	JIT_INTERP_OP_LDL_1_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0037)
    89  #define	JIT_INTERP_OP_LDLA_1					(JIT_OP_NUM_OPCODES + 0x0038)
    90  #define	JIT_INTERP_OP_LDL_2_SBYTE				(JIT_OP_NUM_OPCODES + 0x0039)
    91  #define	JIT_INTERP_OP_LDL_2_UBYTE				(JIT_OP_NUM_OPCODES + 0x003A)
    92  #define	JIT_INTERP_OP_LDL_2_SHORT				(JIT_OP_NUM_OPCODES + 0x003B)
    93  #define	JIT_INTERP_OP_LDL_2_USHORT				(JIT_OP_NUM_OPCODES + 0x003C)
    94  #define	JIT_INTERP_OP_LDL_2_INT					(JIT_OP_NUM_OPCODES + 0x003D)
    95  #define	JIT_INTERP_OP_LDL_2_LONG				(JIT_OP_NUM_OPCODES + 0x003E)
    96  #define	JIT_INTERP_OP_LDL_2_FLOAT32				(JIT_OP_NUM_OPCODES + 0x003F)
    97  #define	JIT_INTERP_OP_LDL_2_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0040)
    98  #define	JIT_INTERP_OP_LDL_2_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0041)
    99  #define	JIT_INTERP_OP_LDLA_2					(JIT_OP_NUM_OPCODES + 0x0042)
   100  #define	JIT_INTERP_OP_STL_0_BYTE				(JIT_OP_NUM_OPCODES + 0x0043)
   101  #define	JIT_INTERP_OP_STL_0_SHORT				(JIT_OP_NUM_OPCODES + 0x0044)
   102  #define	JIT_INTERP_OP_STL_0_INT					(JIT_OP_NUM_OPCODES + 0x0045)
   103  #define	JIT_INTERP_OP_STL_0_LONG				(JIT_OP_NUM_OPCODES + 0x0046)
   104  #define	JIT_INTERP_OP_STL_0_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0047)
   105  #define	JIT_INTERP_OP_STL_0_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0048)
   106  #define	JIT_INTERP_OP_STL_0_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0049)
   107  #define	JIT_INTERP_OP_LDC_0_INT					(JIT_OP_NUM_OPCODES + 0x004A)
   108  #define	JIT_INTERP_OP_LDC_1_INT					(JIT_OP_NUM_OPCODES + 0x004B)
   109  #define	JIT_INTERP_OP_LDC_2_INT					(JIT_OP_NUM_OPCODES + 0x004C)
   110  #define	JIT_INTERP_OP_LDC_0_LONG				(JIT_OP_NUM_OPCODES + 0x004D)
   111  #define	JIT_INTERP_OP_LDC_1_LONG				(JIT_OP_NUM_OPCODES + 0x004E)
   112  #define	JIT_INTERP_OP_LDC_2_LONG				(JIT_OP_NUM_OPCODES + 0x004F)
   113  #define	JIT_INTERP_OP_LDC_0_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0050)
   114  #define	JIT_INTERP_OP_LDC_1_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0051)
   115  #define	JIT_INTERP_OP_LDC_2_FLOAT32				(JIT_OP_NUM_OPCODES + 0x0052)
   116  #define	JIT_INTERP_OP_LDC_0_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0053)
   117  #define	JIT_INTERP_OP_LDC_1_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0054)
   118  #define	JIT_INTERP_OP_LDC_2_FLOAT64				(JIT_OP_NUM_OPCODES + 0x0055)
   119  #define	JIT_INTERP_OP_LDC_0_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0056)
   120  #define	JIT_INTERP_OP_LDC_1_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0057)
   121  #define	JIT_INTERP_OP_LDC_2_NFLOAT				(JIT_OP_NUM_OPCODES + 0x0058)
   122  #define	JIT_INTERP_OP_LDR_0_INT					(JIT_OP_NUM_OPCODES + 0x0059)
   123  #define	JIT_INTERP_OP_LDR_0_LONG				(JIT_OP_NUM_OPCODES + 0x005A)
   124  #define	JIT_INTERP_OP_LDR_0_FLOAT32				(JIT_OP_NUM_OPCODES + 0x005B)
   125  #define	JIT_INTERP_OP_LDR_0_FLOAT64				(JIT_OP_NUM_OPCODES + 0x005C)
   126  #define	JIT_INTERP_OP_LDR_0_NFLOAT				(JIT_OP_NUM_OPCODES + 0x005D)
   127  #define	JIT_INTERP_OP_POP					(JIT_OP_NUM_OPCODES + 0x005E)
   128  #define	JIT_INTERP_OP_POP_2					(JIT_OP_NUM_OPCODES + 0x005F)
   129  #define	JIT_INTERP_OP_POP_3					(JIT_OP_NUM_OPCODES + 0x0060)
   130  #define	JIT_INTERP_OP_END_MARKER				(JIT_OP_NUM_OPCODES + 0x0061)
   131  #define	JIT_INTERP_OP_NUM_OPCODES				0x0062
   132  
   133  
   134  /*
   135   * Opcode version.  Should be increased whenever new opcodes
   136   * are added to this list or the public list in "jit-opcode.h".
   137   * This value is written to ELF binaries, to ensure that code
   138   * for one version of libjit is not inadvertantly used in another.
   139   */
   140  #define	JIT_OPCODE_VERSION					0
   141  
   142  /*
   143   * Additional opcode definition flags.
   144   */
   145  #define	JIT_OPCODE_INTERP_ARGS_MASK			0x7E000000
   146  #define	JIT_OPCODE_NINT_ARG					0x02000000
   147  #define	JIT_OPCODE_NINT_ARG_TWO				0x04000000
   148  #define	JIT_OPCODE_CONST_LONG				0x06000000
   149  #define	JIT_OPCODE_CONST_FLOAT32			0x08000000
   150  #define	JIT_OPCODE_CONST_FLOAT64			0x0A000000
   151  #define	JIT_OPCODE_CONST_NFLOAT				0x0C000000
   152  #define	JIT_OPCODE_CALL_INDIRECT_ARGS		0x0E000000
   153  
   154  extern jit_opcode_info_t const _jit_interp_opcodes[JIT_INTERP_OP_NUM_OPCODES];
   155  
   156  #ifdef	__cplusplus
   157  };
   158  #endif
   159  
   160  #endif /* _JIT_INTERP_OPCODE_H */