< prev index next >

src/hotspot/share/interpreter/bytecodes.hpp

Print this page

  1 /*
  2  * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_INTERPRETER_BYTECODES_HPP
 26 #define SHARE_INTERPRETER_BYTECODES_HPP
 27 
 28 #include "memory/allStatic.hpp"

 29 #include "utilities/globalDefinitions.hpp"
 30 
 31 // Bytecodes specifies all bytecodes used in the VM and
 32 // provides utility functions to get bytecode attributes.
 33 
 34 class Method;
 35 
 36 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/interpreter/Bytecodes.java
 37 class Bytecodes: AllStatic {
 38  public:
 39   enum Code {
 40     _illegal              =  -1,
 41 
 42     // Java bytecodes
 43     _nop                  =   0, // 0x00
 44     _aconst_null          =   1, // 0x01
 45     _iconst_m1            =   2, // 0x02
 46     _iconst_0             =   3, // 0x03
 47     _iconst_1             =   4, // 0x04
 48     _iconst_2             =   5, // 0x05

231     _newarray             = 188, // 0xbc
232     _anewarray            = 189, // 0xbd
233     _arraylength          = 190, // 0xbe
234     _athrow               = 191, // 0xbf
235     _checkcast            = 192, // 0xc0
236     _instanceof           = 193, // 0xc1
237     _monitorenter         = 194, // 0xc2
238     _monitorexit          = 195, // 0xc3
239     _wide                 = 196, // 0xc4
240     _multianewarray       = 197, // 0xc5
241     _ifnull               = 198, // 0xc6
242     _ifnonnull            = 199, // 0xc7
243     _goto_w               = 200, // 0xc8
244     _jsr_w                = 201, // 0xc9
245     _breakpoint           = 202, // 0xca
246 
247     number_of_java_codes,
248 
249     // JVM bytecodes
250     _fast_agetfield       = number_of_java_codes,

251     _fast_bgetfield       ,
252     _fast_cgetfield       ,
253     _fast_dgetfield       ,
254     _fast_fgetfield       ,
255     _fast_igetfield       ,
256     _fast_lgetfield       ,
257     _fast_sgetfield       ,
258 
259     _fast_aputfield       ,

260     _fast_bputfield       ,
261     _fast_zputfield       ,
262     _fast_cputfield       ,
263     _fast_dputfield       ,
264     _fast_fputfield       ,
265     _fast_iputfield       ,
266     _fast_lputfield       ,
267     _fast_sputfield       ,
268 
269     _fast_aload_0         ,
270     _fast_iaccess_0       ,
271     _fast_aaccess_0       ,
272     _fast_faccess_0       ,
273 
274     _fast_iload           ,
275     _fast_iload2          ,
276     _fast_icaload         ,
277 
278     _fast_invokevfinal    ,
279     _fast_linearswitch    ,

  1 /*
  2  * Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef SHARE_INTERPRETER_BYTECODES_HPP
 26 #define SHARE_INTERPRETER_BYTECODES_HPP
 27 
 28 #include "memory/allStatic.hpp"
 29 #include "runtime/globals.hpp"
 30 #include "utilities/globalDefinitions.hpp"
 31 
 32 // Bytecodes specifies all bytecodes used in the VM and
 33 // provides utility functions to get bytecode attributes.
 34 
 35 class Method;
 36 
 37 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/interpreter/Bytecodes.java
 38 class Bytecodes: AllStatic {
 39  public:
 40   enum Code {
 41     _illegal              =  -1,
 42 
 43     // Java bytecodes
 44     _nop                  =   0, // 0x00
 45     _aconst_null          =   1, // 0x01
 46     _iconst_m1            =   2, // 0x02
 47     _iconst_0             =   3, // 0x03
 48     _iconst_1             =   4, // 0x04
 49     _iconst_2             =   5, // 0x05

232     _newarray             = 188, // 0xbc
233     _anewarray            = 189, // 0xbd
234     _arraylength          = 190, // 0xbe
235     _athrow               = 191, // 0xbf
236     _checkcast            = 192, // 0xc0
237     _instanceof           = 193, // 0xc1
238     _monitorenter         = 194, // 0xc2
239     _monitorexit          = 195, // 0xc3
240     _wide                 = 196, // 0xc4
241     _multianewarray       = 197, // 0xc5
242     _ifnull               = 198, // 0xc6
243     _ifnonnull            = 199, // 0xc7
244     _goto_w               = 200, // 0xc8
245     _jsr_w                = 201, // 0xc9
246     _breakpoint           = 202, // 0xca
247 
248     number_of_java_codes,
249 
250     // JVM bytecodes
251     _fast_agetfield       = number_of_java_codes,
252     _fast_vgetfield       ,
253     _fast_bgetfield       ,
254     _fast_cgetfield       ,
255     _fast_dgetfield       ,
256     _fast_fgetfield       ,
257     _fast_igetfield       ,
258     _fast_lgetfield       ,
259     _fast_sgetfield       ,
260 
261     _fast_aputfield       ,
262     _fast_vputfield       ,
263     _fast_bputfield       ,
264     _fast_zputfield       ,
265     _fast_cputfield       ,
266     _fast_dputfield       ,
267     _fast_fputfield       ,
268     _fast_iputfield       ,
269     _fast_lputfield       ,
270     _fast_sputfield       ,
271 
272     _fast_aload_0         ,
273     _fast_iaccess_0       ,
274     _fast_aaccess_0       ,
275     _fast_faccess_0       ,
276 
277     _fast_iload           ,
278     _fast_iload2          ,
279     _fast_icaload         ,
280 
281     _fast_invokevfinal    ,
282     _fast_linearswitch    ,
< prev index next >