Mercurial > hg > truffle
comparison src/cpu/x86/vm/interpreter_x86_64.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 1d7922586cf6 |
children | cd3d6a6b95d9 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
28 #include "interpreter/interpreter.hpp" | 28 #include "interpreter/interpreter.hpp" |
29 #include "interpreter/interpreterGenerator.hpp" | 29 #include "interpreter/interpreterGenerator.hpp" |
30 #include "interpreter/interpreterRuntime.hpp" | 30 #include "interpreter/interpreterRuntime.hpp" |
31 #include "interpreter/templateTable.hpp" | 31 #include "interpreter/templateTable.hpp" |
32 #include "oops/arrayOop.hpp" | 32 #include "oops/arrayOop.hpp" |
33 #include "oops/methodDataOop.hpp" | 33 #include "oops/methodData.hpp" |
34 #include "oops/methodOop.hpp" | 34 #include "oops/method.hpp" |
35 #include "oops/oop.inline.hpp" | 35 #include "oops/oop.inline.hpp" |
36 #include "prims/jvmtiExport.hpp" | 36 #include "prims/jvmtiExport.hpp" |
37 #include "prims/jvmtiThreadState.hpp" | 37 #include "prims/jvmtiThreadState.hpp" |
38 #include "prims/methodHandles.hpp" | 38 #include "prims/methodHandles.hpp" |
39 #include "runtime/arguments.hpp" | 39 #include "runtime/arguments.hpp" |
90 __ jcc(Assembler::notZero, isfloatordouble); | 90 __ jcc(Assembler::notZero, isfloatordouble); |
91 | 91 |
92 // Do Int register here | 92 // Do Int register here |
93 switch ( i ) { | 93 switch ( i ) { |
94 case 0: | 94 case 0: |
95 __ movl(rscratch1, Address(rbx, methodOopDesc::access_flags_offset())); | 95 __ movl(rscratch1, Address(rbx, Method::access_flags_offset())); |
96 __ testl(rscratch1, JVM_ACC_STATIC); | 96 __ testl(rscratch1, JVM_ACC_STATIC); |
97 __ cmovptr(Assembler::zero, c_rarg1, Address(rsp, 0)); | 97 __ cmovptr(Assembler::zero, c_rarg1, Address(rsp, 0)); |
98 break; | 98 break; |
99 case 1: | 99 case 1: |
100 __ movptr(c_rarg2, Address(rsp, wordSize)); | 100 __ movptr(c_rarg2, Address(rsp, wordSize)); |
175 __ movdbl(r, Address(rsp, (6 + i) * wordSize)); | 175 __ movdbl(r, Address(rsp, (6 + i) * wordSize)); |
176 __ bind(done); | 176 __ bind(done); |
177 } | 177 } |
178 | 178 |
179 // Now handle integrals. Only do c_rarg1 if not static. | 179 // Now handle integrals. Only do c_rarg1 if not static. |
180 __ movl(c_rarg3, Address(rbx, methodOopDesc::access_flags_offset())); | 180 __ movl(c_rarg3, Address(rbx, Method::access_flags_offset())); |
181 __ testl(c_rarg3, JVM_ACC_STATIC); | 181 __ testl(c_rarg3, JVM_ACC_STATIC); |
182 __ cmovptr(Assembler::zero, c_rarg1, Address(rsp, 0)); | 182 __ cmovptr(Assembler::zero, c_rarg1, Address(rsp, 0)); |
183 | 183 |
184 __ movptr(c_rarg2, Address(rsp, wordSize)); | 184 __ movptr(c_rarg2, Address(rsp, wordSize)); |
185 __ movptr(c_rarg3, Address(rsp, 2 * wordSize)); | 185 __ movptr(c_rarg3, Address(rsp, 2 * wordSize)); |
200 // Various method entries | 200 // Various method entries |
201 // | 201 // |
202 | 202 |
203 address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) { | 203 address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) { |
204 | 204 |
205 // rbx,: methodOop | 205 // rbx,: Method* |
206 // rcx: scratrch | 206 // rcx: scratrch |
207 // r13: sender sp | 207 // r13: sender sp |
208 | 208 |
209 if (!InlineIntrinsics) return NULL; // Generate a vanilla entry | 209 if (!InlineIntrinsics) return NULL; // Generate a vanilla entry |
210 | 210 |
301 | 301 |
302 | 302 |
303 // Abstract method entry | 303 // Abstract method entry |
304 // Attempt to execute abstract method. Throw exception | 304 // Attempt to execute abstract method. Throw exception |
305 address InterpreterGenerator::generate_abstract_entry(void) { | 305 address InterpreterGenerator::generate_abstract_entry(void) { |
306 // rbx: methodOop | 306 // rbx: Method* |
307 // r13: sender SP | 307 // r13: sender SP |
308 | 308 |
309 address entry_point = __ pc(); | 309 address entry_point = __ pc(); |
310 | 310 |
311 // abstract method entry | 311 // abstract method entry |
326 | 326 |
327 | 327 |
328 // Empty method, generate a very fast return. | 328 // Empty method, generate a very fast return. |
329 | 329 |
330 address InterpreterGenerator::generate_empty_entry(void) { | 330 address InterpreterGenerator::generate_empty_entry(void) { |
331 // rbx: methodOop | 331 // rbx: Method* |
332 // r13: sender sp must set sp to this value on return | 332 // r13: sender sp must set sp to this value on return |
333 | 333 |
334 if (!UseFastEmptyMethods) { | 334 if (!UseFastEmptyMethods) { |
335 return NULL; | 335 return NULL; |
336 } | 336 } |