hotspot/src/share/vm/shark/sharkBlock.cpp
author lana
Wed, 28 Dec 2011 10:51:24 -0800
changeset 11360 cfa173720adb
parent 7397 5b173b4ca846
child 14622 8e94e4186d35
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
     2
 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     3
 * Copyright 2008, 2009, 2010 Red Hat, Inc.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     5
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     8
 * published by the Free Software Foundation.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     9
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    14
 * accompanied this code).
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    15
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    19
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    22
 * questions.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    23
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    24
 */
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    25
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    26
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    27
#include "interpreter/bytecodes.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    28
#include "shark/llvmHeaders.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    29
#include "shark/llvmValue.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    30
#include "shark/sharkBlock.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    31
#include "shark/sharkBuilder.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    32
#include "shark/sharkConstant.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    33
#include "shark/sharkState.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    34
#include "shark/sharkValue.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    35
#include "shark/shark_globals.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    36
#include "utilities/debug.hpp"
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    37
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    38
using namespace llvm;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    39
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    40
void SharkBlock::parse_bytecode(int start, int limit) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    41
  SharkValue *a, *b, *c, *d;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    42
  int i;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    43
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    44
  // Ensure the current state is initialized before we emit any code,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    45
  // so that any setup code for the state is at the start of the block
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    46
  current_state();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    47
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    48
  // Parse the bytecodes
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    49
  iter()->reset_to_bci(start);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    50
  while (iter()->next_bci() < limit) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    51
    NOT_PRODUCT(a = b = c = d = NULL);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    52
    iter()->next();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    53
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    54
    if (SharkTraceBytecodes)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    55
      tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    56
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    57
    if (has_trap() && trap_bci() == bci()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    58
      do_trap(trap_request());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    59
      return;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    60
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    61
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    62
    if (UseLoopSafepoints) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    63
      // XXX if a lcmp is followed by an if_?? then C2 maybe-inserts
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    64
      // the safepoint before the lcmp rather than before the if.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    65
      // Maybe we should do this too.  See parse2.cpp for details.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    66
      switch (bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    67
      case Bytecodes::_goto:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    68
      case Bytecodes::_ifnull:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    69
      case Bytecodes::_ifnonnull:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    70
      case Bytecodes::_if_acmpeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    71
      case Bytecodes::_if_acmpne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    72
      case Bytecodes::_ifeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    73
      case Bytecodes::_ifne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    74
      case Bytecodes::_iflt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    75
      case Bytecodes::_ifle:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    76
      case Bytecodes::_ifgt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    77
      case Bytecodes::_ifge:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    78
      case Bytecodes::_if_icmpeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    79
      case Bytecodes::_if_icmpne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    80
      case Bytecodes::_if_icmplt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    81
      case Bytecodes::_if_icmple:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    82
      case Bytecodes::_if_icmpgt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    83
      case Bytecodes::_if_icmpge:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    84
        if (iter()->get_dest() <= bci())
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    85
          maybe_add_backedge_safepoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    86
        break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    87
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    88
      case Bytecodes::_goto_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    89
        if (iter()->get_far_dest() <= bci())
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    90
          maybe_add_backedge_safepoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    91
        break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    92
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    93
      case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    94
      case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    95
        if (switch_default_dest() <= bci()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    96
          maybe_add_backedge_safepoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    97
          break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    98
        }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    99
        int len = switch_table_length();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   100
        for (int i = 0; i < len; i++) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   101
          if (switch_dest(i) <= bci()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   102
            maybe_add_backedge_safepoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   103
            break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   104
          }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   105
        }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   106
        break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   107
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   108
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   109
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   110
    switch (bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   111
    case Bytecodes::_nop:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   112
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   113
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   114
    case Bytecodes::_aconst_null:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   115
      push(SharkValue::null());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   116
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   117
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   118
    case Bytecodes::_iconst_m1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   119
      push(SharkValue::jint_constant(-1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   120
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   121
    case Bytecodes::_iconst_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   122
      push(SharkValue::jint_constant(0));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   123
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   124
    case Bytecodes::_iconst_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   125
      push(SharkValue::jint_constant(1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   126
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   127
    case Bytecodes::_iconst_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   128
      push(SharkValue::jint_constant(2));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   129
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   130
    case Bytecodes::_iconst_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   131
      push(SharkValue::jint_constant(3));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   132
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   133
    case Bytecodes::_iconst_4:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   134
      push(SharkValue::jint_constant(4));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   135
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   136
    case Bytecodes::_iconst_5:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   137
      push(SharkValue::jint_constant(5));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   138
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   139
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   140
    case Bytecodes::_lconst_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   141
      push(SharkValue::jlong_constant(0));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   142
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   143
    case Bytecodes::_lconst_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   144
      push(SharkValue::jlong_constant(1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   145
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   146
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   147
    case Bytecodes::_fconst_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   148
      push(SharkValue::jfloat_constant(0));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   149
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   150
    case Bytecodes::_fconst_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   151
      push(SharkValue::jfloat_constant(1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   152
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   153
    case Bytecodes::_fconst_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   154
      push(SharkValue::jfloat_constant(2));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   155
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   156
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   157
    case Bytecodes::_dconst_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   158
      push(SharkValue::jdouble_constant(0));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   159
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   160
    case Bytecodes::_dconst_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   161
      push(SharkValue::jdouble_constant(1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   162
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   163
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   164
    case Bytecodes::_bipush:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   165
      push(SharkValue::jint_constant(iter()->get_constant_u1()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   166
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   167
    case Bytecodes::_sipush:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   168
      push(SharkValue::jint_constant(iter()->get_constant_u2()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   169
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   170
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   171
    case Bytecodes::_ldc:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   172
    case Bytecodes::_ldc_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   173
    case Bytecodes::_ldc2_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   174
      push(SharkConstant::for_ldc(iter())->value(builder()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   175
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   176
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   177
    case Bytecodes::_iload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   178
    case Bytecodes::_lload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   179
    case Bytecodes::_fload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   180
    case Bytecodes::_dload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   181
    case Bytecodes::_aload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   182
      push(local(0));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   183
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   184
    case Bytecodes::_iload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   185
    case Bytecodes::_lload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   186
    case Bytecodes::_fload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   187
    case Bytecodes::_dload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   188
    case Bytecodes::_aload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   189
      push(local(1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   190
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   191
    case Bytecodes::_iload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   192
    case Bytecodes::_lload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   193
    case Bytecodes::_fload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   194
    case Bytecodes::_dload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   195
    case Bytecodes::_aload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   196
      push(local(2));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   197
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   198
    case Bytecodes::_iload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   199
    case Bytecodes::_lload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   200
    case Bytecodes::_fload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   201
    case Bytecodes::_dload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   202
    case Bytecodes::_aload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   203
      push(local(3));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   204
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   205
    case Bytecodes::_iload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   206
    case Bytecodes::_lload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   207
    case Bytecodes::_fload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   208
    case Bytecodes::_dload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   209
    case Bytecodes::_aload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   210
      push(local(iter()->get_index()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   211
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   212
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   213
    case Bytecodes::_baload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   214
      do_aload(T_BYTE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   215
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   216
    case Bytecodes::_caload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   217
      do_aload(T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   218
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   219
    case Bytecodes::_saload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   220
      do_aload(T_SHORT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   221
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   222
    case Bytecodes::_iaload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   223
      do_aload(T_INT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   224
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   225
    case Bytecodes::_laload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   226
      do_aload(T_LONG);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   227
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   228
    case Bytecodes::_faload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   229
      do_aload(T_FLOAT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   230
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   231
    case Bytecodes::_daload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   232
      do_aload(T_DOUBLE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   233
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   234
    case Bytecodes::_aaload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   235
      do_aload(T_OBJECT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   236
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   237
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   238
    case Bytecodes::_istore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   239
    case Bytecodes::_lstore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   240
    case Bytecodes::_fstore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   241
    case Bytecodes::_dstore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   242
    case Bytecodes::_astore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   243
      set_local(0, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   244
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   245
    case Bytecodes::_istore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   246
    case Bytecodes::_lstore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   247
    case Bytecodes::_fstore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   248
    case Bytecodes::_dstore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   249
    case Bytecodes::_astore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   250
      set_local(1, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   251
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   252
    case Bytecodes::_istore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   253
    case Bytecodes::_lstore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   254
    case Bytecodes::_fstore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   255
    case Bytecodes::_dstore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   256
    case Bytecodes::_astore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   257
      set_local(2, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   258
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   259
    case Bytecodes::_istore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   260
    case Bytecodes::_lstore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   261
    case Bytecodes::_fstore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   262
    case Bytecodes::_dstore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   263
    case Bytecodes::_astore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   264
      set_local(3, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   265
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   266
    case Bytecodes::_istore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   267
    case Bytecodes::_lstore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   268
    case Bytecodes::_fstore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   269
    case Bytecodes::_dstore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   270
    case Bytecodes::_astore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   271
      set_local(iter()->get_index(), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   272
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   273
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   274
    case Bytecodes::_bastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   275
      do_astore(T_BYTE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   276
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   277
    case Bytecodes::_castore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   278
      do_astore(T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   279
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   280
    case Bytecodes::_sastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   281
      do_astore(T_SHORT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   282
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   283
    case Bytecodes::_iastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   284
      do_astore(T_INT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   285
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   286
    case Bytecodes::_lastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   287
      do_astore(T_LONG);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   288
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   289
    case Bytecodes::_fastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   290
      do_astore(T_FLOAT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   291
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   292
    case Bytecodes::_dastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   293
      do_astore(T_DOUBLE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   294
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   295
    case Bytecodes::_aastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   296
      do_astore(T_OBJECT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   297
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   298
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   299
    case Bytecodes::_pop:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   300
      xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   301
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   302
    case Bytecodes::_pop2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   303
      xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   304
      xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   305
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   306
    case Bytecodes::_swap:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   307
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   308
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   309
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   310
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   311
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   312
    case Bytecodes::_dup:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   313
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   314
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   315
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   316
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   317
    case Bytecodes::_dup_x1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   318
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   319
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   320
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   321
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   322
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   323
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   324
    case Bytecodes::_dup_x2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   325
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   326
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   327
      c = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   328
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   329
      xpush(c);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   330
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   331
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   332
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   333
    case Bytecodes::_dup2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   334
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   335
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   336
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   337
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   338
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   339
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   340
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   341
    case Bytecodes::_dup2_x1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   342
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   343
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   344
      c = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   345
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   346
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   347
      xpush(c);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   348
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   349
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   350
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   351
    case Bytecodes::_dup2_x2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   352
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   353
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   354
      c = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   355
      d = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   356
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   357
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   358
      xpush(d);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   359
      xpush(c);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   360
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   361
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   362
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   363
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   364
    case Bytecodes::_arraylength:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   365
      do_arraylength();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   366
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   367
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   368
    case Bytecodes::_getfield:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   369
      do_getfield();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   370
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   371
    case Bytecodes::_getstatic:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   372
      do_getstatic();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   373
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   374
    case Bytecodes::_putfield:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   375
      do_putfield();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   376
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   377
    case Bytecodes::_putstatic:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   378
      do_putstatic();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   379
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   380
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   381
    case Bytecodes::_iadd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   382
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   383
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   384
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   385
        builder()->CreateAdd(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   386
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   387
    case Bytecodes::_isub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   388
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   389
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   390
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   391
        builder()->CreateSub(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   392
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   393
    case Bytecodes::_imul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   394
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   395
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   396
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   397
        builder()->CreateMul(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   398
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   399
    case Bytecodes::_idiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   400
      do_idiv();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   401
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   402
    case Bytecodes::_irem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   403
      do_irem();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   404
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   405
    case Bytecodes::_ineg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   406
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   407
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   408
        builder()->CreateNeg(a->jint_value()), a->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   409
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   410
    case Bytecodes::_ishl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   411
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   412
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   413
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   414
        builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   415
          a->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   416
          builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   417
            b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   418
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   419
    case Bytecodes::_ishr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   420
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   421
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   422
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   423
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   424
          a->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   425
          builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   426
            b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   427
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   428
    case Bytecodes::_iushr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   429
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   430
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   431
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   432
        builder()->CreateLShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   433
          a->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   434
          builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   435
            b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   436
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   437
    case Bytecodes::_iand:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   438
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   439
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   440
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   441
        builder()->CreateAnd(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   442
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   443
    case Bytecodes::_ior:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   444
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   445
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   446
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   447
        builder()->CreateOr(a->jint_value(), b->jint_value()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   448
        a->zero_checked() && b->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   449
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   450
    case Bytecodes::_ixor:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   451
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   452
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   453
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   454
        builder()->CreateXor(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   455
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   456
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   457
    case Bytecodes::_ladd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   458
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   459
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   460
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   461
        builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   462
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   463
    case Bytecodes::_lsub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   464
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   465
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   466
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   467
        builder()->CreateSub(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   468
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   469
    case Bytecodes::_lmul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   470
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   471
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   472
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   473
        builder()->CreateMul(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   474
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   475
    case Bytecodes::_ldiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   476
      do_ldiv();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   477
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   478
    case Bytecodes::_lrem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   479
      do_lrem();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   480
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   481
    case Bytecodes::_lneg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   482
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   483
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   484
        builder()->CreateNeg(a->jlong_value()), a->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   485
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   486
    case Bytecodes::_lshl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   487
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   488
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   489
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   490
        builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   491
          a->jlong_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   492
          builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   493
            builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   494
              b->jint_value(), LLVMValue::jint_constant(0x3f)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   495
            SharkType::jlong_type(), true)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   496
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   497
    case Bytecodes::_lshr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   498
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   499
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   500
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   501
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   502
          a->jlong_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   503
          builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   504
            builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   505
              b->jint_value(), LLVMValue::jint_constant(0x3f)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   506
            SharkType::jlong_type(), true)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   507
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   508
    case Bytecodes::_lushr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   509
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   510
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   511
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   512
        builder()->CreateLShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   513
          a->jlong_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   514
          builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   515
            builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   516
              b->jint_value(), LLVMValue::jint_constant(0x3f)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   517
            SharkType::jlong_type(), true)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   518
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   519
    case Bytecodes::_land:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   520
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   521
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   522
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   523
        builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   524
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   525
    case Bytecodes::_lor:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   526
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   527
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   528
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   529
        builder()->CreateOr(a->jlong_value(), b->jlong_value()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   530
        a->zero_checked() && b->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   531
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   532
    case Bytecodes::_lxor:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   533
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   534
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   535
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   536
        builder()->CreateXor(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   537
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   538
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   539
    case Bytecodes::_fadd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   540
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   541
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   542
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   543
        builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   544
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   545
    case Bytecodes::_fsub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   546
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   547
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   548
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   549
        builder()->CreateFSub(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   550
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   551
    case Bytecodes::_fmul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   552
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   553
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   554
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   555
        builder()->CreateFMul(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   556
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   557
    case Bytecodes::_fdiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   558
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   559
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   560
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   561
        builder()->CreateFDiv(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   562
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   563
    case Bytecodes::_frem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   564
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   565
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   566
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   567
        builder()->CreateFRem(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   568
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   569
    case Bytecodes::_fneg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   570
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   571
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   572
        builder()->CreateFNeg(a->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   573
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   574
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   575
    case Bytecodes::_dadd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   576
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   577
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   578
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   579
        builder()->CreateFAdd(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   580
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   581
    case Bytecodes::_dsub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   582
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   583
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   584
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   585
        builder()->CreateFSub(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   586
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   587
    case Bytecodes::_dmul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   588
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   589
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   590
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   591
        builder()->CreateFMul(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   592
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   593
    case Bytecodes::_ddiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   594
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   595
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   596
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   597
        builder()->CreateFDiv(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   598
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   599
    case Bytecodes::_drem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   600
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   601
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   602
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   603
        builder()->CreateFRem(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   604
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   605
    case Bytecodes::_dneg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   606
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   607
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   608
        builder()->CreateFNeg(a->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   609
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   610
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   611
    case Bytecodes::_iinc:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   612
      i = iter()->get_index();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   613
      set_local(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   614
        i,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   615
        SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   616
          builder()->CreateAdd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   617
            LLVMValue::jint_constant(iter()->get_iinc_con()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   618
            local(i)->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   619
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   620
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   621
    case Bytecodes::_lcmp:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   622
      do_lcmp();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   623
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   624
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   625
    case Bytecodes::_fcmpl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   626
      do_fcmp(false, false);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   627
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   628
    case Bytecodes::_fcmpg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   629
      do_fcmp(false, true);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   630
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   631
    case Bytecodes::_dcmpl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   632
      do_fcmp(true, false);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   633
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   634
    case Bytecodes::_dcmpg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   635
      do_fcmp(true, true);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   636
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   637
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   638
    case Bytecodes::_i2l:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   639
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   640
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   641
        builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   642
          a->jint_value(), SharkType::jlong_type(), true), a->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   643
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   644
    case Bytecodes::_i2f:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   645
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   646
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   647
          pop()->jint_value(), SharkType::jfloat_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   648
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   649
    case Bytecodes::_i2d:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   650
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   651
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   652
          pop()->jint_value(), SharkType::jdouble_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   653
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   654
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   655
    case Bytecodes::_l2i:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   656
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   657
        builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   658
          pop()->jlong_value(), SharkType::jint_type(), true), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   659
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   660
    case Bytecodes::_l2f:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   661
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   662
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   663
          pop()->jlong_value(), SharkType::jfloat_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   664
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   665
    case Bytecodes::_l2d:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   666
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   667
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   668
          pop()->jlong_value(), SharkType::jdouble_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   669
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   670
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   671
    case Bytecodes::_f2i:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   672
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   673
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   674
          builder()->f2i(), pop()->jfloat_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   675
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   676
    case Bytecodes::_f2l:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   677
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   678
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   679
          builder()->f2l(), pop()->jfloat_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   680
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   681
    case Bytecodes::_f2d:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   682
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   683
        builder()->CreateFPExt(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   684
          pop()->jfloat_value(), SharkType::jdouble_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   685
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   686
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   687
    case Bytecodes::_d2i:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   688
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   689
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   690
          builder()->d2i(), pop()->jdouble_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   691
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   692
    case Bytecodes::_d2l:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   693
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   694
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   695
          builder()->d2l(), pop()->jdouble_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   696
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   697
    case Bytecodes::_d2f:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   698
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   699
        builder()->CreateFPTrunc(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   700
          pop()->jdouble_value(), SharkType::jfloat_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   701
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   702
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   703
    case Bytecodes::_i2b:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   704
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   705
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   706
          builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   707
            pop()->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   708
            LLVMValue::jint_constant(24)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   709
          LLVMValue::jint_constant(24)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   710
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   711
    case Bytecodes::_i2c:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   712
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   713
        builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   714
            pop()->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   715
            LLVMValue::jint_constant(0xffff)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   716
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   717
    case Bytecodes::_i2s:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   718
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   719
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   720
          builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   721
            pop()->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   722
            LLVMValue::jint_constant(16)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   723
          LLVMValue::jint_constant(16)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   724
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   725
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   726
    case Bytecodes::_return:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   727
      do_return(T_VOID);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   728
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   729
    case Bytecodes::_ireturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   730
      do_return(T_INT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   731
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   732
    case Bytecodes::_lreturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   733
      do_return(T_LONG);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   734
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   735
    case Bytecodes::_freturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   736
      do_return(T_FLOAT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   737
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   738
    case Bytecodes::_dreturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   739
      do_return(T_DOUBLE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   740
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   741
    case Bytecodes::_areturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   742
      do_return(T_OBJECT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   743
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   744
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   745
    case Bytecodes::_athrow:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   746
      do_athrow();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   747
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   748
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   749
    case Bytecodes::_goto:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   750
    case Bytecodes::_goto_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   751
      do_goto();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   752
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   753
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   754
    case Bytecodes::_jsr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   755
    case Bytecodes::_jsr_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   756
      do_jsr();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   757
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   758
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   759
    case Bytecodes::_ret:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   760
      do_ret();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   761
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   762
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   763
    case Bytecodes::_ifnull:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   764
      do_if(ICmpInst::ICMP_EQ, SharkValue::null(), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   765
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   766
    case Bytecodes::_ifnonnull:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   767
      do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   768
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   769
    case Bytecodes::_if_acmpeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   770
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   771
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   772
      do_if(ICmpInst::ICMP_EQ, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   773
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   774
    case Bytecodes::_if_acmpne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   775
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   776
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   777
      do_if(ICmpInst::ICMP_NE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   778
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   779
    case Bytecodes::_ifeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   780
      do_if(ICmpInst::ICMP_EQ, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   781
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   782
    case Bytecodes::_ifne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   783
      do_if(ICmpInst::ICMP_NE, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   784
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   785
    case Bytecodes::_iflt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   786
      do_if(ICmpInst::ICMP_SLT, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   787
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   788
    case Bytecodes::_ifle:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   789
      do_if(ICmpInst::ICMP_SLE, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   790
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   791
    case Bytecodes::_ifgt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   792
      do_if(ICmpInst::ICMP_SGT, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   793
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   794
    case Bytecodes::_ifge:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   795
      do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   796
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   797
    case Bytecodes::_if_icmpeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   798
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   799
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   800
      do_if(ICmpInst::ICMP_EQ, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   801
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   802
    case Bytecodes::_if_icmpne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   803
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   804
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   805
      do_if(ICmpInst::ICMP_NE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   806
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   807
    case Bytecodes::_if_icmplt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   808
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   809
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   810
      do_if(ICmpInst::ICMP_SLT, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   811
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   812
    case Bytecodes::_if_icmple:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   813
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   814
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   815
      do_if(ICmpInst::ICMP_SLE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   816
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   817
    case Bytecodes::_if_icmpgt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   818
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   819
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   820
      do_if(ICmpInst::ICMP_SGT, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   821
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   822
    case Bytecodes::_if_icmpge:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   823
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   824
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   825
      do_if(ICmpInst::ICMP_SGE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   826
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   827
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   828
    case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   829
    case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   830
      do_switch();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   831
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   832
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   833
    case Bytecodes::_invokestatic:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   834
    case Bytecodes::_invokespecial:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   835
    case Bytecodes::_invokevirtual:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   836
    case Bytecodes::_invokeinterface:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   837
      do_call();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   838
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   839
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   840
    case Bytecodes::_instanceof:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   841
      // This is a very common construct:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   842
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   843
      //  if (object instanceof Klass) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   844
      //    something = (Klass) object;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   845
      //    ...
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   846
      //  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   847
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   848
      // which gets compiled to something like this:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   849
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   850
      //  28: aload 9
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   851
      //  30: instanceof <Class Klass>
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   852
      //  33: ifeq 52
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   853
      //  36: aload 9
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   854
      //  38: checkcast <Class Klass>
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   855
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   856
      // Handling both bytecodes at once allows us
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   857
      // to eliminate the checkcast.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   858
      if (iter()->next_bci() < limit &&
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   859
          (iter()->next_bc() == Bytecodes::_ifeq ||
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   860
           iter()->next_bc() == Bytecodes::_ifne) &&
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   861
          (!UseLoopSafepoints ||
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   862
           iter()->next_get_dest() > iter()->next_bci())) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   863
        if (maybe_do_instanceof_if()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   864
          iter()->next();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   865
          if (SharkTraceBytecodes)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   866
            tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   867
          break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   868
        }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   869
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   870
      // fall through
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   871
    case Bytecodes::_checkcast:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   872
      do_instance_check();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   873
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   874
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   875
    case Bytecodes::_new:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   876
      do_new();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   877
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   878
    case Bytecodes::_newarray:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   879
      do_newarray();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   880
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   881
    case Bytecodes::_anewarray:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   882
      do_anewarray();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   883
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   884
    case Bytecodes::_multianewarray:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   885
      do_multianewarray();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   886
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   887
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   888
    case Bytecodes::_monitorenter:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   889
      do_monitorenter();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   890
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   891
    case Bytecodes::_monitorexit:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   892
      do_monitorexit();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   893
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   894
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   895
    default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   896
      ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   897
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   898
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   899
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   900
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   901
SharkState* SharkBlock::initial_current_state() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   902
  return entry_state()->copy();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   903
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   904
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   905
int SharkBlock::switch_default_dest() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   906
  return iter()->get_dest_table(0);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   907
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   908
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   909
int SharkBlock::switch_table_length() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   910
  switch(bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   911
  case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   912
    return iter()->get_int_table(2) - iter()->get_int_table(1) + 1;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   913
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   914
  case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   915
    return iter()->get_int_table(1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   916
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   917
  default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   918
    ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   919
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   920
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   921
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   922
int SharkBlock::switch_key(int i) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   923
  switch(bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   924
  case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   925
    return iter()->get_int_table(1) + i;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   926
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   927
  case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   928
    return iter()->get_int_table(2 + 2 * i);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   929
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   930
  default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   931
    ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   932
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   933
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   934
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   935
int SharkBlock::switch_dest(int i) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   936
  switch(bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   937
  case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   938
    return iter()->get_dest_table(i + 3);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   939
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   940
  case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   941
    return iter()->get_dest_table(2 + 2 * i + 1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   942
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   943
  default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   944
    ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   945
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   946
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   947
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   948
void SharkBlock::do_div_or_rem(bool is_long, bool is_rem) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   949
  SharkValue *sb = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   950
  SharkValue *sa = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   951
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   952
  check_divide_by_zero(sb);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   953
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   954
  Value *a, *b, *p, *q;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   955
  if (is_long) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   956
    a = sa->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   957
    b = sb->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   958
    p = LLVMValue::jlong_constant(0x8000000000000000LL);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   959
    q = LLVMValue::jlong_constant(-1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   960
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   961
  else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   962
    a = sa->jint_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   963
    b = sb->jint_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   964
    p = LLVMValue::jint_constant(0x80000000);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   965
    q = LLVMValue::jint_constant(-1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   966
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   967
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   968
  BasicBlock *ip           = builder()->GetBlockInsertionPoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   969
  BasicBlock *special_case = builder()->CreateBlock(ip, "special_case");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   970
  BasicBlock *general_case = builder()->CreateBlock(ip, "general_case");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   971
  BasicBlock *done         = builder()->CreateBlock(ip, "done");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   972
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   973
  builder()->CreateCondBr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   974
    builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   975
      builder()->CreateICmpEQ(a, p),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   976
      builder()->CreateICmpEQ(b, q)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   977
    special_case, general_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   978
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   979
  builder()->SetInsertPoint(special_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   980
  Value *special_result;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   981
  if (is_rem) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   982
    if (is_long)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   983
      special_result = LLVMValue::jlong_constant(0);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   984
    else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   985
      special_result = LLVMValue::jint_constant(0);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   986
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   987
  else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   988
    special_result = a;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   989
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   990
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   991
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   992
  builder()->SetInsertPoint(general_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   993
  Value *general_result;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   994
  if (is_rem)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   995
    general_result = builder()->CreateSRem(a, b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   996
  else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   997
    general_result = builder()->CreateSDiv(a, b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   998
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   999
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1000
  builder()->SetInsertPoint(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1001
  PHINode *result;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1002
  if (is_long)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1003
    result = builder()->CreatePHI(SharkType::jlong_type(), "result");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1004
  else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1005
    result = builder()->CreatePHI(SharkType::jint_type(), "result");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1006
  result->addIncoming(special_result, special_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1007
  result->addIncoming(general_result, general_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1008
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1009
  if (is_long)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1010
    push(SharkValue::create_jlong(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1011
  else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1012
    push(SharkValue::create_jint(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1013
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1014
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1015
void SharkBlock::do_field_access(bool is_get, bool is_field) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1016
  bool will_link;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1017
  ciField *field = iter()->get_field(will_link);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1018
  assert(will_link, "typeflow responsibility");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1019
  assert(is_field != field->is_static(), "mismatch");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1020
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1021
  // Pop the value off the stack where necessary
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1022
  SharkValue *value = NULL;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1023
  if (!is_get)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1024
    value = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1025
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1026
  // Find the object we're accessing, if necessary
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1027
  Value *object = NULL;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1028
  if (is_field) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1029
    SharkValue *value = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1030
    check_null(value);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1031
    object = value->generic_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1032
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1033
  if (is_get && field->is_constant()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1034
    SharkConstant *constant = SharkConstant::for_field(iter());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1035
    if (constant->is_loaded())
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1036
      value = constant->value(builder());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1037
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1038
  if (!is_get || value == NULL) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1039
    if (!is_field)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1040
      object = builder()->CreateInlineOop(field->holder());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1041
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1042
    BasicType   basic_type = field->type()->basic_type();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1043
    const Type *stack_type = SharkType::to_stackType(basic_type);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1044
    const Type *field_type = SharkType::to_arrayType(basic_type);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1045
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1046
    Value *addr = builder()->CreateAddressOfStructEntry(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1047
      object, in_ByteSize(field->offset_in_bytes()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1048
      PointerType::getUnqual(field_type),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1049
      "addr");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1050
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1051
    // Do the access
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1052
    if (is_get) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1053
      Value *field_value = builder()->CreateLoad(addr);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1054
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1055
      if (field_type != stack_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1056
        field_value = builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1057
          field_value, stack_type, basic_type != T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1058
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1059
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1060
      value = SharkValue::create_generic(field->type(), field_value, false);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1061
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1062
    else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1063
      Value *field_value = value->generic_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1064
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1065
      if (field_type != stack_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1066
        field_value = builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1067
          field_value, field_type, basic_type != T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1068
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1069
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1070
      builder()->CreateStore(field_value, addr);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1071
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1072
      if (!field->type()->is_primitive_type())
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1073
        builder()->CreateUpdateBarrierSet(oopDesc::bs(), addr);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1074
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1075
      if (field->is_volatile())
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1076
        builder()->CreateMemoryBarrier(SharkBuilder::BARRIER_STORELOAD);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1077
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1078
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1079
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1080
  // Push the value onto the stack where necessary
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1081
  if (is_get)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1082
    push(value);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1083
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1084
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1085
void SharkBlock::do_lcmp() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1086
  Value *b = pop()->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1087
  Value *a = pop()->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1088
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1089
  BasicBlock *ip   = builder()->GetBlockInsertionPoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1090
  BasicBlock *ne   = builder()->CreateBlock(ip, "lcmp_ne");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1091
  BasicBlock *lt   = builder()->CreateBlock(ip, "lcmp_lt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1092
  BasicBlock *gt   = builder()->CreateBlock(ip, "lcmp_gt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1093
  BasicBlock *done = builder()->CreateBlock(ip, "done");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1094
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1095
  BasicBlock *eq = builder()->GetInsertBlock();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1096
  builder()->CreateCondBr(builder()->CreateICmpEQ(a, b), done, ne);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1097
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1098
  builder()->SetInsertPoint(ne);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1099
  builder()->CreateCondBr(builder()->CreateICmpSLT(a, b), lt, gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1100
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1101
  builder()->SetInsertPoint(lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1102
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1103
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1104
  builder()->SetInsertPoint(gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1105
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1106
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1107
  builder()->SetInsertPoint(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1108
  PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1109
  result->addIncoming(LLVMValue::jint_constant(-1), lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1110
  result->addIncoming(LLVMValue::jint_constant(0),  eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1111
  result->addIncoming(LLVMValue::jint_constant(1),  gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1112
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1113
  push(SharkValue::create_jint(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1114
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1115
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1116
void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1117
  Value *a, *b;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1118
  if (is_double) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1119
    b = pop()->jdouble_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1120
    a = pop()->jdouble_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1121
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1122
  else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1123
    b = pop()->jfloat_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1124
    a = pop()->jfloat_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1125
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1126
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1127
  BasicBlock *ip      = builder()->GetBlockInsertionPoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1128
  BasicBlock *ordered = builder()->CreateBlock(ip, "ordered");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1129
  BasicBlock *ge      = builder()->CreateBlock(ip, "fcmp_ge");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1130
  BasicBlock *lt      = builder()->CreateBlock(ip, "fcmp_lt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1131
  BasicBlock *eq      = builder()->CreateBlock(ip, "fcmp_eq");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1132
  BasicBlock *gt      = builder()->CreateBlock(ip, "fcmp_gt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1133
  BasicBlock *done    = builder()->CreateBlock(ip, "done");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1134
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1135
  builder()->CreateCondBr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1136
    builder()->CreateFCmpUNO(a, b),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1137
    unordered_is_greater ? gt : lt, ordered);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1138
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1139
  builder()->SetInsertPoint(ordered);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1140
  builder()->CreateCondBr(builder()->CreateFCmpULT(a, b), lt, ge);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1141
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1142
  builder()->SetInsertPoint(ge);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1143
  builder()->CreateCondBr(builder()->CreateFCmpUGT(a, b), gt, eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1144
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1145
  builder()->SetInsertPoint(lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1146
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1147
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1148
  builder()->SetInsertPoint(gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1149
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1150
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1151
  builder()->SetInsertPoint(eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1152
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1153
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1154
  builder()->SetInsertPoint(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1155
  PHINode *result = builder()->CreatePHI(SharkType::jint_type(), "result");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1156
  result->addIncoming(LLVMValue::jint_constant(-1), lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1157
  result->addIncoming(LLVMValue::jint_constant(0),  eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1158
  result->addIncoming(LLVMValue::jint_constant(1),  gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1159
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1160
  push(SharkValue::create_jint(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1161
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1162
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1163
void SharkBlock::emit_IR() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1164
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1165
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1166
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1167
SharkState* SharkBlock::entry_state() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1168
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1169
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1170
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1171
void SharkBlock::do_zero_check(SharkValue* value) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1172
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1173
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1174
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1175
void SharkBlock::maybe_add_backedge_safepoint() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1176
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1177
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1178
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1179
bool SharkBlock::has_trap() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1180
  return false;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1181
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1182
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1183
int SharkBlock::trap_request() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1184
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1185
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1186
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1187
int SharkBlock::trap_bci() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1188
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1189
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1190
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1191
void SharkBlock::do_trap(int trap_request) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1192
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1193
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1194
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1195
void SharkBlock::do_arraylength() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1196
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1197
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1198
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1199
void SharkBlock::do_aload(BasicType basic_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1200
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1201
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1202
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1203
void SharkBlock::do_astore(BasicType basic_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1204
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1205
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1206
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1207
void SharkBlock::do_return(BasicType type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1208
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1209
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1210
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1211
void SharkBlock::do_athrow() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1212
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1213
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1214
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1215
void SharkBlock::do_goto() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1216
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1217
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1218
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1219
void SharkBlock::do_jsr() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1220
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1221
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1222
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1223
void SharkBlock::do_ret() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1224
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1225
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1226
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1227
void SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1228
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1229
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1230
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1231
void SharkBlock::do_switch() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1232
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1233
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1234
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1235
void SharkBlock::do_call() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1236
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1237
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1238
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1239
void SharkBlock::do_instance_check() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1240
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1241
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1242
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1243
bool SharkBlock::maybe_do_instanceof_if() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1244
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1245
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1246
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1247
void SharkBlock::do_new() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1248
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1249
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1250
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1251
void SharkBlock::do_newarray() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1252
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1253
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1254
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1255
void SharkBlock::do_anewarray() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1256
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1257
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1258
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1259
void SharkBlock::do_multianewarray() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1260
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1261
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1262
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1263
void SharkBlock::do_monitorenter() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1264
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1265
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1266
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1267
void SharkBlock::do_monitorexit() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1268
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1269
}