hotspot/src/cpu/x86/vm/jniFastGetField_x86_64.cpp
author stefank
Tue, 23 Nov 2010 13:22:55 -0800
changeset 7397 5b173b4ca846
parent 6418 6671edbd230e
child 14626 0cf4eccf130f
permissions -rw-r--r--
6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
     2
 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1217
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1217
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1217
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6418
diff changeset
    25
#include "precompiled.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6418
diff changeset
    26
#include "assembler_x86.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6418
diff changeset
    27
#include "memory/resourceArea.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6418
diff changeset
    28
#include "prims/jniFastGetField.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6418
diff changeset
    29
#include "prims/jvm_misc.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6418
diff changeset
    30
#include "runtime/safepoint.hpp"
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
#define __ masm->
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
#define BUFFER_SIZE 30*wordSize
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
// Instead of issuing lfence for LoadLoad barrier, we create data dependency
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
// between loads, which is more efficient than lfence.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
// Common register usage:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
// rax/xmm0: result
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
// c_rarg0:    jni env
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
// c_rarg1:    obj
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
// c_rarg2:    jfield id
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
static const Register robj          = r9;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
static const Register rcounter      = r10;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
static const Register roffset       = r11;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
static const Register rcounter_addr = r11;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
// Warning: do not use rip relative addressing after the first counter load
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
// since that may scratch r10!
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  const char *name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  switch (type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
    case T_BOOLEAN: name = "jni_fast_GetBooleanField"; break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    case T_BYTE:    name = "jni_fast_GetByteField";    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
    case T_CHAR:    name = "jni_fast_GetCharField";    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
    case T_SHORT:   name = "jni_fast_GetShortField";   break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
    case T_INT:     name = "jni_fast_GetIntField";     break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
    case T_LONG:    name = "jni_fast_GetLongField";    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
    default:        ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  ResourceMark rm;
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
    65
  BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE);
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
    66
  CodeBuffer cbuf(blob);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  MacroAssembler* masm = new MacroAssembler(&cbuf);
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
    68
  address fast_entry = __ pc();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  Label slow;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  ExternalAddress counter(SafepointSynchronize::safepoint_counter_addr());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  __ mov32 (rcounter, counter);
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
    74
  __ mov   (robj, c_rarg1);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  __ testb (rcounter, 1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  __ jcc (Assembler::notZero, slow);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  if (os::is_MP()) {
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
    78
    __ xorptr(robj, rcounter);
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
    79
    __ xorptr(robj, rcounter);                   // obj, since
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
                                                // robj ^ rcounter ^ rcounter == robj
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
                                                // robj is data dependent on rcounter.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  }
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
    83
  __ movptr(robj, Address(robj, 0));             // *obj
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
    84
  __ mov   (roffset, c_rarg2);
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
    85
  __ shrptr(roffset, 2);                         // offset
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  speculative_load_pclist[count] = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  switch (type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
    case T_BOOLEAN: __ movzbl (rax, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    case T_BYTE:    __ movsbl (rax, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    case T_CHAR:    __ movzwl (rax, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    case T_SHORT:   __ movswl (rax, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
    case T_INT:     __ movl   (rax, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
    case T_LONG:    __ movq   (rax, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
    default:        ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  if (os::is_MP()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    __ lea(rcounter_addr, counter);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    // ca is data dependent on rax.
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   102
    __ xorptr(rcounter_addr, rax);
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   103
    __ xorptr(rcounter_addr, rax);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    __ cmpl (rcounter, Address(rcounter_addr, 0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    __ cmp32 (rcounter, counter);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  __ jcc (Assembler::notEqual, slow);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  __ ret (0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  slowcase_entry_pclist[count++] = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  __ bind (slow);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  address slow_case_addr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  switch (type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    case T_BOOLEAN: slow_case_addr = jni_GetBooleanField_addr(); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
    case T_BYTE:    slow_case_addr = jni_GetByteField_addr();    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
    case T_CHAR:    slow_case_addr = jni_GetCharField_addr();    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    case T_SHORT:   slow_case_addr = jni_GetShortField_addr();   break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
    case T_INT:     slow_case_addr = jni_GetIntField_addr();     break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
    case T_LONG:    slow_case_addr = jni_GetLongField_addr();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  // tail call
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  __ jump (ExternalAddress(slow_case_addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  __ flush ();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  return fast_entry;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
address JNI_FastGetField::generate_fast_get_boolean_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  return generate_fast_get_int_field0(T_BOOLEAN);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
address JNI_FastGetField::generate_fast_get_byte_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  return generate_fast_get_int_field0(T_BYTE);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
address JNI_FastGetField::generate_fast_get_char_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  return generate_fast_get_int_field0(T_CHAR);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
address JNI_FastGetField::generate_fast_get_short_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  return generate_fast_get_int_field0(T_SHORT);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
address JNI_FastGetField::generate_fast_get_int_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  return generate_fast_get_int_field0(T_INT);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
address JNI_FastGetField::generate_fast_get_long_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  return generate_fast_get_int_field0(T_LONG);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  const char *name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  switch (type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
    case T_FLOAT:     name = "jni_fast_GetFloatField";     break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
    case T_DOUBLE:    name = "jni_fast_GetDoubleField";    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
    default:          ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  ResourceMark rm;
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
   163
  BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE);
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
   164
  CodeBuffer cbuf(blob);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  MacroAssembler* masm = new MacroAssembler(&cbuf);
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5547
diff changeset
   166
  address fast_entry = __ pc();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  Label slow;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  ExternalAddress counter(SafepointSynchronize::safepoint_counter_addr());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  __ mov32 (rcounter, counter);
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   172
  __ mov   (robj, c_rarg1);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  __ testb (rcounter, 1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  __ jcc (Assembler::notZero, slow);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  if (os::is_MP()) {
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   176
    __ xorptr(robj, rcounter);
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   177
    __ xorptr(robj, rcounter);                   // obj, since
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
                                                // robj ^ rcounter ^ rcounter == robj
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
                                                // robj is data dependent on rcounter.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  }
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   181
  __ movptr(robj, Address(robj, 0));             // *obj
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   182
  __ mov   (roffset, c_rarg2);
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   183
  __ shrptr(roffset, 2);                         // offset
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  speculative_load_pclist[count] = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  switch (type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
    case T_FLOAT:  __ movflt (xmm0, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
    case T_DOUBLE: __ movdbl (xmm0, Address(robj, roffset, Address::times_1)); break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
    default:        ShouldNotReachHere();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  if (os::is_MP()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
    __ lea(rcounter_addr, counter);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
    __ movdq (rax, xmm0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    // counter address is data dependent on xmm0.
1066
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   197
    __ xorptr(rcounter_addr, rax);
717c3345024f 5108146: Merge i486 and amd64 cpu directories
never
parents: 1
diff changeset
   198
    __ xorptr(rcounter_addr, rax);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    __ cmpl (rcounter, Address(rcounter_addr, 0));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
    __ cmp32 (rcounter, counter);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  __ jcc (Assembler::notEqual, slow);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  __ ret (0);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  slowcase_entry_pclist[count++] = __ pc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  __ bind (slow);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  address slow_case_addr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  switch (type) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
    case T_FLOAT:     slow_case_addr = jni_GetFloatField_addr();  break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
    case T_DOUBLE:    slow_case_addr = jni_GetDoubleField_addr();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  // tail call
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  __ jump (ExternalAddress(slow_case_addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  __ flush ();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  return fast_entry;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
address JNI_FastGetField::generate_fast_get_float_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  return generate_fast_get_float_field0(T_FLOAT);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
address JNI_FastGetField::generate_fast_get_double_field() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  return generate_fast_get_float_field0(T_DOUBLE);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
}