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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 // Inline functions for Intel frames: 26 27 // Constructors: 28 29 inline frame::frame() { 30 _pc = NULL; 31 _sp = NULL; 32 _unextended_sp = NULL; 33 _fp = NULL; 34 _cb = NULL; 35 _deopt_state = unknown; 36 } 37 38 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) { 39 _sp = sp; 40 _unextended_sp = sp; 41 _fp = fp; 42 _pc = pc; 43 assert(pc != NULL, "no pc?"); 44 _cb = CodeCache::find_blob(pc); 279 return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors); 280 } 281 282 inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) { 283 return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1); 284 } 285 286 inline bool frame::volatile_across_calls(Register reg) { 287 return true; 288 } 289 290 291 292 inline oop frame::saved_oop_result(RegisterMap* map) const { 293 return *((oop*) map->location(rax->as_VMReg())); 294 } 295 296 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { 297 *((oop*) map->location(rax->as_VMReg())) = obj; 298 } | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef CPU_X86_VM_FRAME_X86_INLINE_HPP 26 #define CPU_X86_VM_FRAME_X86_INLINE_HPP 27 28 // Inline functions for Intel frames: 29 30 // Constructors: 31 32 inline frame::frame() { 33 _pc = NULL; 34 _sp = NULL; 35 _unextended_sp = NULL; 36 _fp = NULL; 37 _cb = NULL; 38 _deopt_state = unknown; 39 } 40 41 inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) { 42 _sp = sp; 43 _unextended_sp = sp; 44 _fp = fp; 45 _pc = pc; 46 assert(pc != NULL, "no pc?"); 47 _cb = CodeCache::find_blob(pc); 282 return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors); 283 } 284 285 inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) { 286 return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1); 287 } 288 289 inline bool frame::volatile_across_calls(Register reg) { 290 return true; 291 } 292 293 294 295 inline oop frame::saved_oop_result(RegisterMap* map) const { 296 return *((oop*) map->location(rax->as_VMReg())); 297 } 298 299 inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { 300 *((oop*) map->location(rax->as_VMReg())) = obj; 301 } 302 303 #endif // CPU_X86_VM_FRAME_X86_INLINE_HPP |