comparison src/cpu/ppc/vm/frame_ppc.cpp @ 17804:fd1b9f02cc91

8036976: PPC64: implement the template interpreter Reviewed-by: kvn, coleenp Contributed-by: axel.siebenborn@sap.com, martin.doerr@sap.com
author goetz
date Mon, 10 Mar 2014 12:58:02 +0100
parents 67fa91961822
children 92aa6797d639 327e7269f90d
comparison
equal deleted inserted replaced
17803:31e80afe3fed 17804:fd1b9f02cc91
1 /* 1 /*
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2012, 2013 SAP AG. All rights reserved. 3 * Copyright 2012, 2014 SAP AG. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * 5 *
6 * This code is free software; you can redistribute it and/or modify it 6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as 7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
40 #ifdef COMPILER1 40 #ifdef COMPILER1
41 #include "c1/c1_Runtime1.hpp" 41 #include "c1/c1_Runtime1.hpp"
42 #include "runtime/vframeArray.hpp" 42 #include "runtime/vframeArray.hpp"
43 #endif 43 #endif
44 44
45 #ifndef CC_INTERP
46 #error "CC_INTERP must be defined on PPC64"
47 #endif
48
49 #ifdef ASSERT 45 #ifdef ASSERT
50 void RegisterMap::check_location_valid() { 46 void RegisterMap::check_location_valid() {
51 } 47 }
52 #endif // ASSERT 48 #endif // ASSERT
53 49
87 return fr; 83 return fr;
88 } 84 }
89 85
90 frame frame::sender_for_interpreter_frame(RegisterMap *map) const { 86 frame frame::sender_for_interpreter_frame(RegisterMap *map) const {
91 // Pass callers initial_caller_sp as unextended_sp. 87 // Pass callers initial_caller_sp as unextended_sp.
92 return frame(sender_sp(), sender_pc(), (intptr_t*)((parent_ijava_frame_abi *)callers_abi())->initial_caller_sp); 88 return frame(sender_sp(), sender_pc(),
89 CC_INTERP_ONLY((intptr_t*)((parent_ijava_frame_abi *)callers_abi())->initial_caller_sp)
90 NOT_CC_INTERP((intptr_t*)get_ijava_state()->sender_sp)
91 );
93 } 92 }
94 93
95 frame frame::sender_for_compiled_frame(RegisterMap *map) const { 94 frame frame::sender_for_compiled_frame(RegisterMap *map) const {
96 assert(map != NULL, "map must be set"); 95 assert(map != NULL, "map must be set");
97 96
181 // result value is saved into the interpreter frame. 180 // result value is saved into the interpreter frame.
182 #ifdef CC_INTERP 181 #ifdef CC_INTERP
183 interpreterState istate = get_interpreterState(); 182 interpreterState istate = get_interpreterState();
184 address lresult = (address)istate + in_bytes(BytecodeInterpreter::native_lresult_offset()); 183 address lresult = (address)istate + in_bytes(BytecodeInterpreter::native_lresult_offset());
185 address fresult = (address)istate + in_bytes(BytecodeInterpreter::native_fresult_offset()); 184 address fresult = (address)istate + in_bytes(BytecodeInterpreter::native_fresult_offset());
185 #else
186 address lresult = (address)&(get_ijava_state()->lresult);
187 address fresult = (address)&(get_ijava_state()->fresult);
186 #endif 188 #endif
187 189
188 switch (method->result_type()) { 190 switch (method->result_type()) {
189 case T_OBJECT: 191 case T_OBJECT:
190 case T_ARRAY: { 192 case T_ARRAY: {
257 values.describe(frame_no, (intptr_t*)&(istate->_last_Java_sp), " last_Java_sp"); 259 values.describe(frame_no, (intptr_t*)&(istate->_last_Java_sp), " last_Java_sp");
258 values.describe(frame_no, (intptr_t*)&(istate->_self_link), " self_link"); 260 values.describe(frame_no, (intptr_t*)&(istate->_self_link), " self_link");
259 values.describe(frame_no, (intptr_t*)&(istate->_native_fresult), " native_fresult"); 261 values.describe(frame_no, (intptr_t*)&(istate->_native_fresult), " native_fresult");
260 values.describe(frame_no, (intptr_t*)&(istate->_native_lresult), " native_lresult"); 262 values.describe(frame_no, (intptr_t*)&(istate->_native_lresult), " native_lresult");
261 #else 263 #else
262 Unimplemented(); 264 #define DESCRIBE_ADDRESS(name) \
265 values.describe(frame_no, (intptr_t*)&(get_ijava_state()->name), #name);
266
267 DESCRIBE_ADDRESS(method);
268 DESCRIBE_ADDRESS(locals);
269 DESCRIBE_ADDRESS(monitors);
270 DESCRIBE_ADDRESS(cpoolCache);
271 DESCRIBE_ADDRESS(bcp);
272 DESCRIBE_ADDRESS(esp);
273 DESCRIBE_ADDRESS(mdx);
274 DESCRIBE_ADDRESS(top_frame_sp);
275 DESCRIBE_ADDRESS(sender_sp);
276 DESCRIBE_ADDRESS(oop_tmp);
277 DESCRIBE_ADDRESS(lresult);
278 DESCRIBE_ADDRESS(fresult);
263 #endif 279 #endif
264 } 280 }
265 } 281 }
266 #endif 282 #endif
267 283