hotspot/src/share/vm/interpreter/bytecodes.hpp
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 1 489c9b5090e2
child 1493 7d2dc5fbfa8c
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1997-2005 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
// Bytecodes specifies all bytecodes used in the VM and
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
// provides utility functions to get bytecode attributes.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
// NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/interpreter/Bytecodes.java
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
class Bytecodes: AllStatic {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
  enum Code {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
    _illegal              =  -1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
    // Java bytecodes
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
    _nop                  =   0, // 0x00
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
    _aconst_null          =   1, // 0x01
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    _iconst_m1            =   2, // 0x02
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
    _iconst_0             =   3, // 0x03
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
    _iconst_1             =   4, // 0x04
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
    _iconst_2             =   5, // 0x05
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    _iconst_3             =   6, // 0x06
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    _iconst_4             =   7, // 0x07
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
    _iconst_5             =   8, // 0x08
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
    _lconst_0             =   9, // 0x09
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
    _lconst_1             =  10, // 0x0a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
    _fconst_0             =  11, // 0x0b
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
    _fconst_1             =  12, // 0x0c
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
    _fconst_2             =  13, // 0x0d
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
    _dconst_0             =  14, // 0x0e
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
    _dconst_1             =  15, // 0x0f
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
    _bipush               =  16, // 0x10
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
    _sipush               =  17, // 0x11
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
    _ldc                  =  18, // 0x12
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
    _ldc_w                =  19, // 0x13
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
    _ldc2_w               =  20, // 0x14
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
    _iload                =  21, // 0x15
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    _lload                =  22, // 0x16
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
    _fload                =  23, // 0x17
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    _dload                =  24, // 0x18
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    _aload                =  25, // 0x19
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    _iload_0              =  26, // 0x1a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    _iload_1              =  27, // 0x1b
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    _iload_2              =  28, // 0x1c
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    _iload_3              =  29, // 0x1d
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    _lload_0              =  30, // 0x1e
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    _lload_1              =  31, // 0x1f
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    _lload_2              =  32, // 0x20
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
    _lload_3              =  33, // 0x21
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
    _fload_0              =  34, // 0x22
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
    _fload_1              =  35, // 0x23
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
    _fload_2              =  36, // 0x24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
    _fload_3              =  37, // 0x25
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
    _dload_0              =  38, // 0x26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    _dload_1              =  39, // 0x27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    _dload_2              =  40, // 0x28
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
    _dload_3              =  41, // 0x29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    _aload_0              =  42, // 0x2a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
    _aload_1              =  43, // 0x2b
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
    _aload_2              =  44, // 0x2c
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    _aload_3              =  45, // 0x2d
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    _iaload               =  46, // 0x2e
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
    _laload               =  47, // 0x2f
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
    _faload               =  48, // 0x30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    _daload               =  49, // 0x31
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    _aaload               =  50, // 0x32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
    _baload               =  51, // 0x33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
    _caload               =  52, // 0x34
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
    _saload               =  53, // 0x35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
    _istore               =  54, // 0x36
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    _lstore               =  55, // 0x37
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    _fstore               =  56, // 0x38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    _dstore               =  57, // 0x39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    _astore               =  58, // 0x3a
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
    _istore_0             =  59, // 0x3b
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    _istore_1             =  60, // 0x3c
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    _istore_2             =  61, // 0x3d
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
    _istore_3             =  62, // 0x3e
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
    _lstore_0             =  63, // 0x3f
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    _lstore_1             =  64, // 0x40
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    _lstore_2             =  65, // 0x41
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    _lstore_3             =  66, // 0x42
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
    _fstore_0             =  67, // 0x43
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
    _fstore_1             =  68, // 0x44
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    _fstore_2             =  69, // 0x45
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    _fstore_3             =  70, // 0x46
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    _dstore_0             =  71, // 0x47
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    _dstore_1             =  72, // 0x48
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
    _dstore_2             =  73, // 0x49
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
    _dstore_3             =  74, // 0x4a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    _astore_0             =  75, // 0x4b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    _astore_1             =  76, // 0x4c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    _astore_2             =  77, // 0x4d
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    _astore_3             =  78, // 0x4e
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    _iastore              =  79, // 0x4f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    _lastore              =  80, // 0x50
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    _fastore              =  81, // 0x51
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
    _dastore              =  82, // 0x52
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
    _aastore              =  83, // 0x53
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    _bastore              =  84, // 0x54
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
    _castore              =  85, // 0x55
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
    _sastore              =  86, // 0x56
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
    _pop                  =  87, // 0x57
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
    _pop2                 =  88, // 0x58
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
    _dup                  =  89, // 0x59
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
    _dup_x1               =  90, // 0x5a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
    _dup_x2               =  91, // 0x5b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
    _dup2                 =  92, // 0x5c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
    _dup2_x1              =  93, // 0x5d
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    _dup2_x2              =  94, // 0x5e
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
    _swap                 =  95, // 0x5f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
    _iadd                 =  96, // 0x60
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
    _ladd                 =  97, // 0x61
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
    _fadd                 =  98, // 0x62
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
    _dadd                 =  99, // 0x63
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
    _isub                 = 100, // 0x64
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
    _lsub                 = 101, // 0x65
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
    _fsub                 = 102, // 0x66
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    _dsub                 = 103, // 0x67
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
    _imul                 = 104, // 0x68
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
    _lmul                 = 105, // 0x69
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    _fmul                 = 106, // 0x6a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
    _dmul                 = 107, // 0x6b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
    _idiv                 = 108, // 0x6c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
    _ldiv                 = 109, // 0x6d
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
    _fdiv                 = 110, // 0x6e
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
    _ddiv                 = 111, // 0x6f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
    _irem                 = 112, // 0x70
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
    _lrem                 = 113, // 0x71
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
    _frem                 = 114, // 0x72
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
    _drem                 = 115, // 0x73
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
    _ineg                 = 116, // 0x74
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    _lneg                 = 117, // 0x75
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
    _fneg                 = 118, // 0x76
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
    _dneg                 = 119, // 0x77
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
    _ishl                 = 120, // 0x78
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
    _lshl                 = 121, // 0x79
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
    _ishr                 = 122, // 0x7a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
    _lshr                 = 123, // 0x7b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
    _iushr                = 124, // 0x7c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
    _lushr                = 125, // 0x7d
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
    _iand                 = 126, // 0x7e
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
    _land                 = 127, // 0x7f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
    _ior                  = 128, // 0x80
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
    _lor                  = 129, // 0x81
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
    _ixor                 = 130, // 0x82
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
    _lxor                 = 131, // 0x83
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
    _iinc                 = 132, // 0x84
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    _i2l                  = 133, // 0x85
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
    _i2f                  = 134, // 0x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
    _i2d                  = 135, // 0x87
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
    _l2i                  = 136, // 0x88
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    _l2f                  = 137, // 0x89
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    _l2d                  = 138, // 0x8a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    _f2i                  = 139, // 0x8b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
    _f2l                  = 140, // 0x8c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    _f2d                  = 141, // 0x8d
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
    _d2i                  = 142, // 0x8e
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    _d2l                  = 143, // 0x8f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
    _d2f                  = 144, // 0x90
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
    _i2b                  = 145, // 0x91
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
    _i2c                  = 146, // 0x92
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
    _i2s                  = 147, // 0x93
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
    _lcmp                 = 148, // 0x94
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
    _fcmpl                = 149, // 0x95
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
    _fcmpg                = 150, // 0x96
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
    _dcmpl                = 151, // 0x97
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
    _dcmpg                = 152, // 0x98
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
    _ifeq                 = 153, // 0x99
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
    _ifne                 = 154, // 0x9a
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
    _iflt                 = 155, // 0x9b
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
    _ifge                 = 156, // 0x9c
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
    _ifgt                 = 157, // 0x9d
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
    _ifle                 = 158, // 0x9e
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
    _if_icmpeq            = 159, // 0x9f
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
    _if_icmpne            = 160, // 0xa0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    _if_icmplt            = 161, // 0xa1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    _if_icmpge            = 162, // 0xa2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
    _if_icmpgt            = 163, // 0xa3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    _if_icmple            = 164, // 0xa4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
    _if_acmpeq            = 165, // 0xa5
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
    _if_acmpne            = 166, // 0xa6
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
    _goto                 = 167, // 0xa7
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
    _jsr                  = 168, // 0xa8
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
    _ret                  = 169, // 0xa9
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
    _tableswitch          = 170, // 0xaa
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
    _lookupswitch         = 171, // 0xab
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
    _ireturn              = 172, // 0xac
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
    _lreturn              = 173, // 0xad
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
    _freturn              = 174, // 0xae
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
    _dreturn              = 175, // 0xaf
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
    _areturn              = 176, // 0xb0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
    _return               = 177, // 0xb1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
    _getstatic            = 178, // 0xb2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
    _putstatic            = 179, // 0xb3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
    _getfield             = 180, // 0xb4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
    _putfield             = 181, // 0xb5
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
    _invokevirtual        = 182, // 0xb6
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    _invokespecial        = 183, // 0xb7
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
    _invokestatic         = 184, // 0xb8
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
    _invokeinterface      = 185, // 0xb9
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
    _xxxunusedxxx         = 186, // 0xba
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
    _new                  = 187, // 0xbb
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
    _newarray             = 188, // 0xbc
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
    _anewarray            = 189, // 0xbd
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
    _arraylength          = 190, // 0xbe
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
    _athrow               = 191, // 0xbf
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
    _checkcast            = 192, // 0xc0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
    _instanceof           = 193, // 0xc1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
    _monitorenter         = 194, // 0xc2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
    _monitorexit          = 195, // 0xc3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
    _wide                 = 196, // 0xc4
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
    _multianewarray       = 197, // 0xc5
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
    _ifnull               = 198, // 0xc6
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
    _ifnonnull            = 199, // 0xc7
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
    _goto_w               = 200, // 0xc8
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
    _jsr_w                = 201, // 0xc9
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
    _breakpoint           = 202, // 0xca
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
    number_of_java_codes,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
    // JVM bytecodes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
    _fast_agetfield       = number_of_java_codes,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
    _fast_bgetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
    _fast_cgetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
    _fast_dgetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
    _fast_fgetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
    _fast_igetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
    _fast_lgetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
    _fast_sgetfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
    _fast_aputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
    _fast_bputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
    _fast_cputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
    _fast_dputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
    _fast_fputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
    _fast_iputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
    _fast_lputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
    _fast_sputfield       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
    _fast_aload_0         ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
    _fast_iaccess_0       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
    _fast_aaccess_0       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
    _fast_faccess_0       ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
    _fast_iload           ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
    _fast_iload2          ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
    _fast_icaload         ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
    _fast_invokevfinal    ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
    _fast_linearswitch    ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
    _fast_binaryswitch    ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
    _return_register_finalizer    ,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
    _shouldnotreachhere,      // For debugging
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
    // Platform specific JVM bytecodes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
    #include "incls/_bytecodes_pd.hpp.incl"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
    number_of_codes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
  static bool        _is_initialized;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
  static const char* _name          [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
  static const char* _format        [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
  static const char* _wide_format   [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
  static BasicType   _result_type   [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
  static s_char      _depth         [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
  static u_char      _length        [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
  static bool        _can_trap      [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
  static Code        _java_code     [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
  static bool        _can_rewrite   [number_of_codes];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
  static void        def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
  static void        def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap, Code java_code);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
  static void        pd_initialize();              // platform specific initialization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  static Code        pd_base_code_for(Code code);  // platform specific base_code_for implementation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
  // Conversion
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
  static void        check          (Code code)    { assert(is_defined(code), "illegal code"); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
  static void        wide_check     (Code code)    { assert(wide_is_defined(code), "illegal code"); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
  static Code        cast           (int  code)    { return (Code)code; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
   // Fetch a bytecode, hiding breakpoints as necessary:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
   static Code       code_at(address bcp, methodOop method = NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
          Code code = cast(*bcp); return (code != _breakpoint) ? code : non_breakpoint_code_at(bcp, method);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
   static Code       java_code_at(address bcp, methodOop method = NULL) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
          return java_code(code_at(bcp, method));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
   // Fetch a bytecode or a breakpoint:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
   static Code       code_or_bp_at(address bcp)    { return (Code)cast(*bcp); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
   static Code       code_at(methodOop method, int bci);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
   static bool       is_active_breakpoint_at(address bcp) { return (Code)*bcp == _breakpoint; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
   // find a bytecode, behind a breakpoint if necessary:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
   static Code       non_breakpoint_code_at(address bcp, methodOop method = NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
  // Bytecode attributes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  static bool        is_defined     (int  code)    { return 0 <= code && code < number_of_codes && _format[code] != NULL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
  static bool        wide_is_defined(int  code)    { return is_defined(code) && _wide_format[code] != NULL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
  static const char* name           (Code code)    { check(code);      return _name          [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
  static const char* format         (Code code)    { check(code);      return _format        [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
  static const char* wide_format    (Code code)    { return _wide_format[code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
  static BasicType   result_type    (Code code)    { check(code);      return _result_type   [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
  static int         depth          (Code code)    { check(code);      return _depth         [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
  static int         length_for     (Code code)    { return _length[code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  static bool        can_trap       (Code code)    { check(code);      return _can_trap      [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
  static Code        java_code      (Code code)    { check(code);      return _java_code     [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
  static bool        can_rewrite    (Code code)    { check(code);      return _can_rewrite   [code]; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
  static int         wide_length_for(Code code)    {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
    if (!is_defined(code)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
      return 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
    const char* wf = wide_format(code);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
    return (wf == NULL) ? 0 : (int)strlen(wf);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
  static int         special_length_at(address bcp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
  static int         raw_special_length_at(address bcp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  static int         length_at      (address bcp)  { int l = length_for(code_at(bcp)); return l > 0 ? l : special_length_at(bcp); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  static int         java_length_at (address bcp)  { int l = length_for(java_code_at(bcp)); return l > 0 ? l : special_length_at(bcp); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
  static bool        is_java_code   (Code code)    { return 0 <= code && code < number_of_java_codes; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  static bool        is_aload       (Code code)    { return (code == _aload  || code == _aload_0  || code == _aload_1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
                                                                             || code == _aload_2  || code == _aload_3); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
  static bool        is_astore      (Code code)    { return (code == _astore || code == _astore_0 || code == _astore_1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
                                                                             || code == _astore_2 || code == _astore_3); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
  static bool        is_zero_const  (Code code)    { return (code == _aconst_null || code == _iconst_0
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
                                                           || code == _fconst_0 || code == _dconst_0); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
  // Initialization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
  static void        initialize     ();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
};