8036976: PPC64: implement the template interpreter

Co-authored-by: Martin Doerr <martin.doerr@sap.com>
Reviewed-by: kvn, coleenp
This commit is contained in:
Axel Siebenborn 2014-03-10 12:58:02 +01:00 committed by Goetz Lindenmaier
parent 768beb9a23
commit faad7883f2
23 changed files with 8327 additions and 103 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 2013 SAP AG. All rights reserved.
* Copyright 2012, 2014 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,15 +39,10 @@
#include "runtime/stubCodeGenerator.hpp"
#include "runtime/stubRoutines.hpp"
#include "utilities/top.hpp"
#ifdef TARGET_OS_FAMILY_aix
# include "thread_aix.inline.hpp"
#endif
#ifdef TARGET_OS_FAMILY_linux
# include "thread_linux.inline.hpp"
#endif
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
#include "runtime/thread.inline.hpp"
#define __ _masm->
@ -221,7 +216,7 @@ class StubGenerator: public StubCodeGenerator {
{
BLOCK_COMMENT("Call frame manager or native entry.");
// Call frame manager or native entry.
Register r_new_arg_entry = R14_state;
Register r_new_arg_entry = R14; // PPC_state;
assert_different_registers(r_new_arg_entry, r_top_of_arguments_addr,
r_arg_method, r_arg_thread);
@ -234,7 +229,11 @@ class StubGenerator: public StubCodeGenerator {
// R16_thread - JavaThread*
// Tos must point to last argument - element_size.
#ifdef CC_INTERP
const Register tos = R17_tos;
#else
const Register tos = R15_esp;
#endif
__ addi(tos, r_top_of_arguments_addr, -Interpreter::stackElementSize);
// initialize call_stub locals (step 2)
@ -248,8 +247,11 @@ class StubGenerator: public StubCodeGenerator {
assert(tos != r_arg_thread && R19_method != r_arg_thread, "trashed r_arg_thread");
// Set R15_prev_state to 0 for simplifying checks in callee.
#ifdef CC_INTERP
__ li(R15_prev_state, 0);
#else
__ load_const_optimized(R25_templateTableBase, (address)Interpreter::dispatch_table((TosState)0), R11_scratch1);
#endif
// Stack on entry to frame manager / native entry:
//
// F0 [TOP_IJAVA_FRAME_ABI]
@ -2089,7 +2091,7 @@ class StubGenerator: public StubCodeGenerator {
guarantee(!UseAESIntrinsics, "not yet implemented.");
}
// PPC uses stubs for safefetch.
// Safefetch stubs.
generate_safefetch("SafeFetch32", sizeof(int), &StubRoutines::_safefetch32_entry,
&StubRoutines::_safefetch32_fault_pc,
&StubRoutines::_safefetch32_continuation_pc);