hotspot/src/share/vm/shark/sharkBlock.cpp
author coleenp
Mon, 11 Mar 2013 14:00:09 -0400
changeset 15932 a27c3d066552
parent 15207 86fd7c602ddf
child 22234 da823d78ad65
permissions -rw-r--r--
8008965: @Contended fails with classes having static fields Summary: Disable @Contended support for static fields Reviewed-by: coleenp, kvn Contributed-by: Aleksey Shipilev <aleksey.shipilev@oracle.com>
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:
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
   173
    case Bytecodes::_ldc2_w: {
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
   174
      SharkConstant* constant = SharkConstant::for_ldc(iter());
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
   175
      assert(constant->is_loaded(), "trap should handle unloaded classes");
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
   176
      push(constant->value(builder()));
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   177
      break;
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
   178
    }
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   179
    case Bytecodes::_iload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   180
    case Bytecodes::_lload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   181
    case Bytecodes::_fload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   182
    case Bytecodes::_dload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   183
    case Bytecodes::_aload_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   184
      push(local(0));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   185
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   186
    case Bytecodes::_iload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   187
    case Bytecodes::_lload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   188
    case Bytecodes::_fload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   189
    case Bytecodes::_dload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   190
    case Bytecodes::_aload_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   191
      push(local(1));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   192
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   193
    case Bytecodes::_iload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   194
    case Bytecodes::_lload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   195
    case Bytecodes::_fload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   196
    case Bytecodes::_dload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   197
    case Bytecodes::_aload_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   198
      push(local(2));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   199
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   200
    case Bytecodes::_iload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   201
    case Bytecodes::_lload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   202
    case Bytecodes::_fload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   203
    case Bytecodes::_dload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   204
    case Bytecodes::_aload_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   205
      push(local(3));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   206
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   207
    case Bytecodes::_iload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   208
    case Bytecodes::_lload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   209
    case Bytecodes::_fload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   210
    case Bytecodes::_dload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   211
    case Bytecodes::_aload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   212
      push(local(iter()->get_index()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   213
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   214
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   215
    case Bytecodes::_baload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   216
      do_aload(T_BYTE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   217
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   218
    case Bytecodes::_caload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   219
      do_aload(T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   220
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   221
    case Bytecodes::_saload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   222
      do_aload(T_SHORT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   223
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   224
    case Bytecodes::_iaload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   225
      do_aload(T_INT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   226
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   227
    case Bytecodes::_laload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   228
      do_aload(T_LONG);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   229
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   230
    case Bytecodes::_faload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   231
      do_aload(T_FLOAT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   232
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   233
    case Bytecodes::_daload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   234
      do_aload(T_DOUBLE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   235
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   236
    case Bytecodes::_aaload:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   237
      do_aload(T_OBJECT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   238
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   239
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   240
    case Bytecodes::_istore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   241
    case Bytecodes::_lstore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   242
    case Bytecodes::_fstore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   243
    case Bytecodes::_dstore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   244
    case Bytecodes::_astore_0:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   245
      set_local(0, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   246
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   247
    case Bytecodes::_istore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   248
    case Bytecodes::_lstore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   249
    case Bytecodes::_fstore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   250
    case Bytecodes::_dstore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   251
    case Bytecodes::_astore_1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   252
      set_local(1, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   253
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   254
    case Bytecodes::_istore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   255
    case Bytecodes::_lstore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   256
    case Bytecodes::_fstore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   257
    case Bytecodes::_dstore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   258
    case Bytecodes::_astore_2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   259
      set_local(2, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   260
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   261
    case Bytecodes::_istore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   262
    case Bytecodes::_lstore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   263
    case Bytecodes::_fstore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   264
    case Bytecodes::_dstore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   265
    case Bytecodes::_astore_3:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   266
      set_local(3, pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   267
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   268
    case Bytecodes::_istore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   269
    case Bytecodes::_lstore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   270
    case Bytecodes::_fstore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   271
    case Bytecodes::_dstore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   272
    case Bytecodes::_astore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   273
      set_local(iter()->get_index(), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   274
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   275
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   276
    case Bytecodes::_bastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   277
      do_astore(T_BYTE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   278
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   279
    case Bytecodes::_castore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   280
      do_astore(T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   281
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   282
    case Bytecodes::_sastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   283
      do_astore(T_SHORT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   284
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   285
    case Bytecodes::_iastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   286
      do_astore(T_INT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   287
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   288
    case Bytecodes::_lastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   289
      do_astore(T_LONG);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   290
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   291
    case Bytecodes::_fastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   292
      do_astore(T_FLOAT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   293
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   294
    case Bytecodes::_dastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   295
      do_astore(T_DOUBLE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   296
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   297
    case Bytecodes::_aastore:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   298
      do_astore(T_OBJECT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   299
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   300
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   301
    case Bytecodes::_pop:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   302
      xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   303
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   304
    case Bytecodes::_pop2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   305
      xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   306
      xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   307
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   308
    case Bytecodes::_swap:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   309
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   310
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   311
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   312
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   313
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   314
    case Bytecodes::_dup:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   315
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   316
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   317
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   318
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   319
    case Bytecodes::_dup_x1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   320
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   321
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   322
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   323
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   324
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   325
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   326
    case Bytecodes::_dup_x2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   327
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   328
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   329
      c = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   330
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   331
      xpush(c);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   332
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   333
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   334
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   335
    case Bytecodes::_dup2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   336
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   337
      b = xpop();
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
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   341
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   342
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   343
    case Bytecodes::_dup2_x1:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   344
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   345
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   346
      c = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   347
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   348
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   349
      xpush(c);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   350
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   351
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   352
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   353
    case Bytecodes::_dup2_x2:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   354
      a = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   355
      b = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   356
      c = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   357
      d = xpop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   358
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   359
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   360
      xpush(d);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   361
      xpush(c);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   362
      xpush(b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   363
      xpush(a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   364
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   365
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   366
    case Bytecodes::_arraylength:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   367
      do_arraylength();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   368
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   369
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   370
    case Bytecodes::_getfield:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   371
      do_getfield();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   372
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   373
    case Bytecodes::_getstatic:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   374
      do_getstatic();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   375
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   376
    case Bytecodes::_putfield:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   377
      do_putfield();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   378
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   379
    case Bytecodes::_putstatic:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   380
      do_putstatic();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   381
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   382
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   383
    case Bytecodes::_iadd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   384
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   385
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   386
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   387
        builder()->CreateAdd(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   388
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   389
    case Bytecodes::_isub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   390
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   391
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   392
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   393
        builder()->CreateSub(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   394
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   395
    case Bytecodes::_imul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   396
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   397
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   398
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   399
        builder()->CreateMul(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   400
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   401
    case Bytecodes::_idiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   402
      do_idiv();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   403
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   404
    case Bytecodes::_irem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   405
      do_irem();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   406
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   407
    case Bytecodes::_ineg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   408
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   409
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   410
        builder()->CreateNeg(a->jint_value()), a->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   411
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   412
    case Bytecodes::_ishl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   413
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   414
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   415
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   416
        builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   417
          a->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   418
          builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   419
            b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   420
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   421
    case Bytecodes::_ishr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   422
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   423
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   424
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   425
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   426
          a->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   427
          builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   428
            b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   429
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   430
    case Bytecodes::_iushr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   431
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   432
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   433
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   434
        builder()->CreateLShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   435
          a->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   436
          builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   437
            b->jint_value(), LLVMValue::jint_constant(0x1f))), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   438
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   439
    case Bytecodes::_iand:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   440
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   441
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   442
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   443
        builder()->CreateAnd(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   444
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   445
    case Bytecodes::_ior:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   446
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   447
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   448
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   449
        builder()->CreateOr(a->jint_value(), b->jint_value()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   450
        a->zero_checked() && b->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   451
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   452
    case Bytecodes::_ixor:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   453
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   454
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   455
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   456
        builder()->CreateXor(a->jint_value(), b->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   457
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   458
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   459
    case Bytecodes::_ladd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   460
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   461
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   462
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   463
        builder()->CreateAdd(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   464
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   465
    case Bytecodes::_lsub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   466
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   467
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   468
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   469
        builder()->CreateSub(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   470
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   471
    case Bytecodes::_lmul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   472
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   473
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   474
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   475
        builder()->CreateMul(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   476
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   477
    case Bytecodes::_ldiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   478
      do_ldiv();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   479
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   480
    case Bytecodes::_lrem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   481
      do_lrem();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   482
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   483
    case Bytecodes::_lneg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   484
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   485
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   486
        builder()->CreateNeg(a->jlong_value()), a->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   487
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   488
    case Bytecodes::_lshl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   489
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   490
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   491
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   492
        builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   493
          a->jlong_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   494
          builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   495
            builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   496
              b->jint_value(), LLVMValue::jint_constant(0x3f)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   497
            SharkType::jlong_type(), true)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   498
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   499
    case Bytecodes::_lshr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   500
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   501
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   502
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   503
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   504
          a->jlong_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   505
          builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   506
            builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   507
              b->jint_value(), LLVMValue::jint_constant(0x3f)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   508
            SharkType::jlong_type(), true)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   509
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   510
    case Bytecodes::_lushr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   511
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   512
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   513
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   514
        builder()->CreateLShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   515
          a->jlong_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   516
          builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   517
            builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   518
              b->jint_value(), LLVMValue::jint_constant(0x3f)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   519
            SharkType::jlong_type(), true)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   520
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   521
    case Bytecodes::_land:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   522
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   523
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   524
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   525
        builder()->CreateAnd(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   526
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   527
    case Bytecodes::_lor:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   528
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   529
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   530
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   531
        builder()->CreateOr(a->jlong_value(), b->jlong_value()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   532
        a->zero_checked() && b->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   533
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   534
    case Bytecodes::_lxor:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   535
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   536
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   537
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   538
        builder()->CreateXor(a->jlong_value(), b->jlong_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   539
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   540
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   541
    case Bytecodes::_fadd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   542
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   543
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   544
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   545
        builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   546
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   547
    case Bytecodes::_fsub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   548
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   549
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   550
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   551
        builder()->CreateFSub(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   552
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   553
    case Bytecodes::_fmul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   554
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   555
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   556
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   557
        builder()->CreateFMul(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   558
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   559
    case Bytecodes::_fdiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   560
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   561
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   562
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   563
        builder()->CreateFDiv(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   564
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   565
    case Bytecodes::_frem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   566
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   567
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   568
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   569
        builder()->CreateFRem(a->jfloat_value(), b->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   570
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   571
    case Bytecodes::_fneg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   572
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   573
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   574
        builder()->CreateFNeg(a->jfloat_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   575
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   576
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   577
    case Bytecodes::_dadd:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   578
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   579
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   580
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   581
        builder()->CreateFAdd(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   582
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   583
    case Bytecodes::_dsub:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   584
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   585
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   586
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   587
        builder()->CreateFSub(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   588
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   589
    case Bytecodes::_dmul:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   590
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   591
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   592
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   593
        builder()->CreateFMul(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   594
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   595
    case Bytecodes::_ddiv:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   596
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   597
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   598
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   599
        builder()->CreateFDiv(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   600
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   601
    case Bytecodes::_drem:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   602
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   603
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   604
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   605
        builder()->CreateFRem(a->jdouble_value(), b->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   606
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   607
    case Bytecodes::_dneg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   608
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   609
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   610
        builder()->CreateFNeg(a->jdouble_value())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   611
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   612
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   613
    case Bytecodes::_iinc:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   614
      i = iter()->get_index();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   615
      set_local(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   616
        i,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   617
        SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   618
          builder()->CreateAdd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   619
            LLVMValue::jint_constant(iter()->get_iinc_con()),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   620
            local(i)->jint_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   621
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   622
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   623
    case Bytecodes::_lcmp:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   624
      do_lcmp();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   625
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   626
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   627
    case Bytecodes::_fcmpl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   628
      do_fcmp(false, false);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   629
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   630
    case Bytecodes::_fcmpg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   631
      do_fcmp(false, true);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   632
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   633
    case Bytecodes::_dcmpl:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   634
      do_fcmp(true, false);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   635
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   636
    case Bytecodes::_dcmpg:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   637
      do_fcmp(true, true);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   638
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   639
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   640
    case Bytecodes::_i2l:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   641
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   642
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   643
        builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   644
          a->jint_value(), SharkType::jlong_type(), true), a->zero_checked()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   645
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   646
    case Bytecodes::_i2f:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   647
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   648
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   649
          pop()->jint_value(), SharkType::jfloat_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   650
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   651
    case Bytecodes::_i2d:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   652
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   653
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   654
          pop()->jint_value(), SharkType::jdouble_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   655
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   656
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   657
    case Bytecodes::_l2i:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   658
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   659
        builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   660
          pop()->jlong_value(), SharkType::jint_type(), true), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   661
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   662
    case Bytecodes::_l2f:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   663
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   664
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   665
          pop()->jlong_value(), SharkType::jfloat_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   666
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   667
    case Bytecodes::_l2d:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   668
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   669
        builder()->CreateSIToFP(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   670
          pop()->jlong_value(), SharkType::jdouble_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   671
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   672
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   673
    case Bytecodes::_f2i:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   674
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   675
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   676
          builder()->f2i(), pop()->jfloat_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   677
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   678
    case Bytecodes::_f2l:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   679
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   680
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   681
          builder()->f2l(), pop()->jfloat_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   682
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   683
    case Bytecodes::_f2d:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   684
      push(SharkValue::create_jdouble(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   685
        builder()->CreateFPExt(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   686
          pop()->jfloat_value(), SharkType::jdouble_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   687
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   688
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   689
    case Bytecodes::_d2i:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   690
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   691
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   692
          builder()->d2i(), pop()->jdouble_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   693
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   694
    case Bytecodes::_d2l:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   695
      push(SharkValue::create_jlong(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   696
        builder()->CreateCall(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   697
          builder()->d2l(), pop()->jdouble_value()), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   698
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   699
    case Bytecodes::_d2f:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   700
      push(SharkValue::create_jfloat(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   701
        builder()->CreateFPTrunc(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   702
          pop()->jdouble_value(), SharkType::jfloat_type())));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   703
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   704
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   705
    case Bytecodes::_i2b:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   706
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   707
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   708
          builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   709
            pop()->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   710
            LLVMValue::jint_constant(24)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   711
          LLVMValue::jint_constant(24)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   712
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   713
    case Bytecodes::_i2c:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   714
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   715
        builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   716
            pop()->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   717
            LLVMValue::jint_constant(0xffff)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   718
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   719
    case Bytecodes::_i2s:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   720
      push(SharkValue::create_jint(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   721
        builder()->CreateAShr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   722
          builder()->CreateShl(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   723
            pop()->jint_value(),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   724
            LLVMValue::jint_constant(16)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   725
          LLVMValue::jint_constant(16)), false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   726
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   727
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   728
    case Bytecodes::_return:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   729
      do_return(T_VOID);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   730
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   731
    case Bytecodes::_ireturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   732
      do_return(T_INT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   733
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   734
    case Bytecodes::_lreturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   735
      do_return(T_LONG);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   736
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   737
    case Bytecodes::_freturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   738
      do_return(T_FLOAT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   739
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   740
    case Bytecodes::_dreturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   741
      do_return(T_DOUBLE);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   742
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   743
    case Bytecodes::_areturn:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   744
      do_return(T_OBJECT);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   745
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   746
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   747
    case Bytecodes::_athrow:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   748
      do_athrow();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   749
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   750
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   751
    case Bytecodes::_goto:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   752
    case Bytecodes::_goto_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   753
      do_goto();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   754
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   755
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   756
    case Bytecodes::_jsr:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   757
    case Bytecodes::_jsr_w:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   758
      do_jsr();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   759
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   760
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   761
    case Bytecodes::_ret:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   762
      do_ret();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   763
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   764
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   765
    case Bytecodes::_ifnull:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   766
      do_if(ICmpInst::ICMP_EQ, SharkValue::null(), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   767
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   768
    case Bytecodes::_ifnonnull:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   769
      do_if(ICmpInst::ICMP_NE, SharkValue::null(), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   770
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   771
    case Bytecodes::_if_acmpeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   772
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   773
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   774
      do_if(ICmpInst::ICMP_EQ, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   775
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   776
    case Bytecodes::_if_acmpne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   777
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   778
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   779
      do_if(ICmpInst::ICMP_NE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   780
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   781
    case Bytecodes::_ifeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   782
      do_if(ICmpInst::ICMP_EQ, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   783
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   784
    case Bytecodes::_ifne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   785
      do_if(ICmpInst::ICMP_NE, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   786
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   787
    case Bytecodes::_iflt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   788
      do_if(ICmpInst::ICMP_SLT, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   789
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   790
    case Bytecodes::_ifle:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   791
      do_if(ICmpInst::ICMP_SLE, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   792
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   793
    case Bytecodes::_ifgt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   794
      do_if(ICmpInst::ICMP_SGT, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   795
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   796
    case Bytecodes::_ifge:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   797
      do_if(ICmpInst::ICMP_SGE, SharkValue::jint_constant(0), pop());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   798
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   799
    case Bytecodes::_if_icmpeq:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   800
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   801
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   802
      do_if(ICmpInst::ICMP_EQ, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   803
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   804
    case Bytecodes::_if_icmpne:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   805
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   806
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   807
      do_if(ICmpInst::ICMP_NE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   808
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   809
    case Bytecodes::_if_icmplt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   810
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   811
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   812
      do_if(ICmpInst::ICMP_SLT, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   813
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   814
    case Bytecodes::_if_icmple:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   815
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   816
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   817
      do_if(ICmpInst::ICMP_SLE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   818
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   819
    case Bytecodes::_if_icmpgt:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   820
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   821
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   822
      do_if(ICmpInst::ICMP_SGT, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   823
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   824
    case Bytecodes::_if_icmpge:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   825
      b = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   826
      a = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   827
      do_if(ICmpInst::ICMP_SGE, b, a);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   828
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   829
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   830
    case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   831
    case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   832
      do_switch();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   833
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   834
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   835
    case Bytecodes::_invokestatic:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   836
    case Bytecodes::_invokespecial:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   837
    case Bytecodes::_invokevirtual:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   838
    case Bytecodes::_invokeinterface:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   839
      do_call();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   840
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   841
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   842
    case Bytecodes::_instanceof:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   843
      // This is a very common construct:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   844
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   845
      //  if (object instanceof Klass) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   846
      //    something = (Klass) object;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   847
      //    ...
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   848
      //  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   849
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   850
      // which gets compiled to something like this:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   851
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   852
      //  28: aload 9
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   853
      //  30: instanceof <Class Klass>
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   854
      //  33: ifeq 52
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   855
      //  36: aload 9
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   856
      //  38: checkcast <Class Klass>
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   857
      //
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   858
      // Handling both bytecodes at once allows us
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   859
      // to eliminate the checkcast.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   860
      if (iter()->next_bci() < limit &&
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   861
          (iter()->next_bc() == Bytecodes::_ifeq ||
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   862
           iter()->next_bc() == Bytecodes::_ifne) &&
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   863
          (!UseLoopSafepoints ||
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   864
           iter()->next_get_dest() > iter()->next_bci())) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   865
        if (maybe_do_instanceof_if()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   866
          iter()->next();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   867
          if (SharkTraceBytecodes)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   868
            tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc()));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   869
          break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   870
        }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   871
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   872
      // fall through
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   873
    case Bytecodes::_checkcast:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   874
      do_instance_check();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   875
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   876
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   877
    case Bytecodes::_new:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   878
      do_new();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   879
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   880
    case Bytecodes::_newarray:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   881
      do_newarray();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   882
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   883
    case Bytecodes::_anewarray:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   884
      do_anewarray();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   885
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   886
    case Bytecodes::_multianewarray:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   887
      do_multianewarray();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   888
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   889
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   890
    case Bytecodes::_monitorenter:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   891
      do_monitorenter();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   892
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   893
    case Bytecodes::_monitorexit:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   894
      do_monitorexit();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   895
      break;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   896
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   897
    default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   898
      ShouldNotReachHere();
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
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   902
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   903
SharkState* SharkBlock::initial_current_state() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   904
  return entry_state()->copy();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   905
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   906
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   907
int SharkBlock::switch_default_dest() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   908
  return iter()->get_dest_table(0);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   909
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   910
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   911
int SharkBlock::switch_table_length() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   912
  switch(bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   913
  case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   914
    return iter()->get_int_table(2) - iter()->get_int_table(1) + 1;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   915
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   916
  case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   917
    return iter()->get_int_table(1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   918
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   919
  default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   920
    ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   921
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   922
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   923
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   924
int SharkBlock::switch_key(int i) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   925
  switch(bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   926
  case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   927
    return iter()->get_int_table(1) + i;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   928
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   929
  case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   930
    return iter()->get_int_table(2 + 2 * i);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   931
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   932
  default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   933
    ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   934
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   935
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   936
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   937
int SharkBlock::switch_dest(int i) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   938
  switch(bc()) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   939
  case Bytecodes::_tableswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   940
    return iter()->get_dest_table(i + 3);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   941
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   942
  case Bytecodes::_lookupswitch:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   943
    return iter()->get_dest_table(2 + 2 * i + 1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   944
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   945
  default:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   946
    ShouldNotReachHere();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   947
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   948
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   949
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   950
void SharkBlock::do_div_or_rem(bool is_long, bool is_rem) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   951
  SharkValue *sb = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   952
  SharkValue *sa = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   953
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   954
  check_divide_by_zero(sb);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   955
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   956
  Value *a, *b, *p, *q;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   957
  if (is_long) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   958
    a = sa->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   959
    b = sb->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   960
    p = LLVMValue::jlong_constant(0x8000000000000000LL);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   961
    q = LLVMValue::jlong_constant(-1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   962
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   963
  else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   964
    a = sa->jint_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   965
    b = sb->jint_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   966
    p = LLVMValue::jint_constant(0x80000000);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   967
    q = LLVMValue::jint_constant(-1);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   968
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   969
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   970
  BasicBlock *ip           = builder()->GetBlockInsertionPoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   971
  BasicBlock *special_case = builder()->CreateBlock(ip, "special_case");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   972
  BasicBlock *general_case = builder()->CreateBlock(ip, "general_case");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   973
  BasicBlock *done         = builder()->CreateBlock(ip, "done");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   974
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   975
  builder()->CreateCondBr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   976
    builder()->CreateAnd(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   977
      builder()->CreateICmpEQ(a, p),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   978
      builder()->CreateICmpEQ(b, q)),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   979
    special_case, general_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   980
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   981
  builder()->SetInsertPoint(special_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   982
  Value *special_result;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   983
  if (is_rem) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   984
    if (is_long)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   985
      special_result = LLVMValue::jlong_constant(0);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   986
    else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   987
      special_result = LLVMValue::jint_constant(0);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   988
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   989
  else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   990
    special_result = a;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   991
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   992
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   993
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   994
  builder()->SetInsertPoint(general_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   995
  Value *general_result;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   996
  if (is_rem)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   997
    general_result = builder()->CreateSRem(a, b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   998
  else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   999
    general_result = builder()->CreateSDiv(a, b);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1000
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1001
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1002
  builder()->SetInsertPoint(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1003
  PHINode *result;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1004
  if (is_long)
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1005
    result = builder()->CreatePHI(SharkType::jlong_type(), 0, "result");
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1006
  else
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1007
    result = builder()->CreatePHI(SharkType::jint_type(), 0, "result");
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1008
  result->addIncoming(special_result, special_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1009
  result->addIncoming(general_result, general_case);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1010
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1011
  if (is_long)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1012
    push(SharkValue::create_jlong(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1013
  else
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1014
    push(SharkValue::create_jint(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1015
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1016
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1017
void SharkBlock::do_field_access(bool is_get, bool is_field) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1018
  bool will_link;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1019
  ciField *field = iter()->get_field(will_link);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1020
  assert(will_link, "typeflow responsibility");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1021
  assert(is_field != field->is_static(), "mismatch");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1022
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1023
  // Pop the value off the stack where necessary
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1024
  SharkValue *value = NULL;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1025
  if (!is_get)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1026
    value = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1027
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1028
  // Find the object we're accessing, if necessary
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1029
  Value *object = NULL;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1030
  if (is_field) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1031
    SharkValue *value = pop();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1032
    check_null(value);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1033
    object = value->generic_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1034
  }
15207
86fd7c602ddf 8005820: Shark: enable JSR292 support
twisti
parents: 15204
diff changeset
  1035
  if (is_get && field->is_constant() && field->is_static()) {
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1036
    SharkConstant *constant = SharkConstant::for_field(iter());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1037
    if (constant->is_loaded())
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1038
      value = constant->value(builder());
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1039
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1040
  if (!is_get || value == NULL) {
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1041
    if (!is_field) {
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1042
      object = builder()->CreateInlineOop(field->holder()->java_mirror());
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1043
    }
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1044
    BasicType   basic_type = field->type()->basic_type();
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1045
    Type *stack_type = SharkType::to_stackType(basic_type);
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1046
    Type *field_type = SharkType::to_arrayType(basic_type);
15204
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1047
    Type *type = field_type;
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1048
    if (field->is_volatile()) {
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1049
      if (field_type == SharkType::jfloat_type()) {
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1050
        type = SharkType::jint_type();
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1051
      } else if (field_type == SharkType::jdouble_type()) {
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1052
        type = SharkType::jlong_type();
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1053
      }
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1054
    }
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1055
    Value *addr = builder()->CreateAddressOfStructEntry(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1056
      object, in_ByteSize(field->offset_in_bytes()),
15204
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1057
      PointerType::getUnqual(type),
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1058
      "addr");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1059
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1060
    // Do the access
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1061
    if (is_get) {
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1062
      Value* field_value;
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1063
      if (field->is_volatile()) {
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1064
        field_value = builder()->CreateAtomicLoad(addr);
15204
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1065
        field_value = builder()->CreateBitCast(field_value, field_type);
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1066
      } else {
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1067
        field_value = builder()->CreateLoad(addr);
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1068
      }
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1069
      if (field_type != stack_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1070
        field_value = builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1071
          field_value, stack_type, basic_type != T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1072
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1073
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1074
      value = SharkValue::create_generic(field->type(), field_value, false);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1075
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1076
    else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1077
      Value *field_value = value->generic_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1078
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1079
      if (field_type != stack_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1080
        field_value = builder()->CreateIntCast(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1081
          field_value, field_type, basic_type != T_CHAR);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1082
      }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1083
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1084
      if (field->is_volatile()) {
15204
a8960bf92b09 8005816: Shark: fix volatile float field access
twisti
parents: 14622
diff changeset
  1085
        field_value = builder()->CreateBitCast(field_value, type);
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1086
        builder()->CreateAtomicStore(field_value, addr);
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1087
      } else {
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1088
        builder()->CreateStore(field_value, addr);
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1089
      }
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1090
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1091
      if (!field->type()->is_primitive_type()) {
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1092
        builder()->CreateUpdateBarrierSet(oopDesc::bs(), addr);
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1093
      }
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1094
    }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1095
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1096
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1097
  // Push the value onto the stack where necessary
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1098
  if (is_get)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1099
    push(value);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1100
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1101
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1102
void SharkBlock::do_lcmp() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1103
  Value *b = pop()->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1104
  Value *a = pop()->jlong_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1105
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1106
  BasicBlock *ip   = builder()->GetBlockInsertionPoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1107
  BasicBlock *ne   = builder()->CreateBlock(ip, "lcmp_ne");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1108
  BasicBlock *lt   = builder()->CreateBlock(ip, "lcmp_lt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1109
  BasicBlock *gt   = builder()->CreateBlock(ip, "lcmp_gt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1110
  BasicBlock *done = builder()->CreateBlock(ip, "done");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1111
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1112
  BasicBlock *eq = builder()->GetInsertBlock();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1113
  builder()->CreateCondBr(builder()->CreateICmpEQ(a, b), done, ne);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1114
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1115
  builder()->SetInsertPoint(ne);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1116
  builder()->CreateCondBr(builder()->CreateICmpSLT(a, b), lt, gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1117
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1118
  builder()->SetInsertPoint(lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1119
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1120
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1121
  builder()->SetInsertPoint(gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1122
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1123
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1124
  builder()->SetInsertPoint(done);
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1125
  PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result");
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1126
  result->addIncoming(LLVMValue::jint_constant(-1), lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1127
  result->addIncoming(LLVMValue::jint_constant(0),  eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1128
  result->addIncoming(LLVMValue::jint_constant(1),  gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1129
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1130
  push(SharkValue::create_jint(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1131
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1132
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1133
void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1134
  Value *a, *b;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1135
  if (is_double) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1136
    b = pop()->jdouble_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1137
    a = pop()->jdouble_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1138
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1139
  else {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1140
    b = pop()->jfloat_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1141
    a = pop()->jfloat_value();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1142
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1143
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1144
  BasicBlock *ip      = builder()->GetBlockInsertionPoint();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1145
  BasicBlock *ordered = builder()->CreateBlock(ip, "ordered");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1146
  BasicBlock *ge      = builder()->CreateBlock(ip, "fcmp_ge");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1147
  BasicBlock *lt      = builder()->CreateBlock(ip, "fcmp_lt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1148
  BasicBlock *eq      = builder()->CreateBlock(ip, "fcmp_eq");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1149
  BasicBlock *gt      = builder()->CreateBlock(ip, "fcmp_gt");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1150
  BasicBlock *done    = builder()->CreateBlock(ip, "done");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1151
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1152
  builder()->CreateCondBr(
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1153
    builder()->CreateFCmpUNO(a, b),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1154
    unordered_is_greater ? gt : lt, ordered);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1155
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1156
  builder()->SetInsertPoint(ordered);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1157
  builder()->CreateCondBr(builder()->CreateFCmpULT(a, b), lt, ge);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1158
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1159
  builder()->SetInsertPoint(ge);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1160
  builder()->CreateCondBr(builder()->CreateFCmpUGT(a, b), gt, eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1161
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1162
  builder()->SetInsertPoint(lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1163
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1164
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1165
  builder()->SetInsertPoint(gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1166
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1167
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1168
  builder()->SetInsertPoint(eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1169
  builder()->CreateBr(done);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1170
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1171
  builder()->SetInsertPoint(done);
14622
8e94e4186d35 8003868: fix shark for latest HotSpot and LLVM
twisti
parents: 7397
diff changeset
  1172
  PHINode *result = builder()->CreatePHI(SharkType::jint_type(), 0, "result");
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1173
  result->addIncoming(LLVMValue::jint_constant(-1), lt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1174
  result->addIncoming(LLVMValue::jint_constant(0),  eq);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1175
  result->addIncoming(LLVMValue::jint_constant(1),  gt);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1176
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1177
  push(SharkValue::create_jint(result, false));
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1178
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1179
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1180
void SharkBlock::emit_IR() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1181
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1182
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1183
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1184
SharkState* SharkBlock::entry_state() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1185
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1186
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1188
void SharkBlock::do_zero_check(SharkValue* value) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1189
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1190
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1191
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1192
void SharkBlock::maybe_add_backedge_safepoint() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1193
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1194
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1195
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1196
bool SharkBlock::has_trap() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1197
  return false;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1198
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1199
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1200
int SharkBlock::trap_request() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1201
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1202
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1203
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1204
int SharkBlock::trap_bci() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1205
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1206
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1207
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1208
void SharkBlock::do_trap(int trap_request) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1209
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1210
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1211
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1212
void SharkBlock::do_arraylength() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1213
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1214
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1215
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1216
void SharkBlock::do_aload(BasicType basic_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1217
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1218
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1219
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1220
void SharkBlock::do_astore(BasicType basic_type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1221
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1222
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1223
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1224
void SharkBlock::do_return(BasicType type) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1225
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1226
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1227
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1228
void SharkBlock::do_athrow() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1229
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1230
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1231
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1232
void SharkBlock::do_goto() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1233
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1234
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1235
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1236
void SharkBlock::do_jsr() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1237
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1238
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1239
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1240
void SharkBlock::do_ret() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1241
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1242
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1243
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1244
void SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1245
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1246
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1247
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1248
void SharkBlock::do_switch() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1249
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1250
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1251
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1252
void SharkBlock::do_call() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1253
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1254
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1255
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1256
void SharkBlock::do_instance_check() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1257
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1258
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1259
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1260
bool SharkBlock::maybe_do_instanceof_if() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1261
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1262
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1263
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1264
void SharkBlock::do_new() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1265
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1266
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1267
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1268
void SharkBlock::do_newarray() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1269
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1270
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1271
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1272
void SharkBlock::do_anewarray() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1273
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1274
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1275
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1276
void SharkBlock::do_multianewarray() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1277
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1278
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1279
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1280
void SharkBlock::do_monitorenter() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1281
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1282
}
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1283
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1284
void SharkBlock::do_monitorexit() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1285
  ShouldNotCallThis();
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
  1286
}