Mercurial > hg > graal-compiler
diff src/cpu/ppc/vm/stubGenerator_ppc.cpp @ 14694:58cf34613a72
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 | e5e8aa897002 |
children | 92aa6797d639 f6bde7889409 |
line wrap: on
line diff
--- a/src/cpu/ppc/vm/stubGenerator_ppc.cpp Wed Mar 12 11:24:26 2014 -0700 +++ b/src/cpu/ppc/vm/stubGenerator_ppc.cpp Mon Mar 10 12:58:02 2014 +0100 @@ -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 @@ { 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 @@ // 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 @@ 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 @@ 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);