Mercurial > hg > graal-compiler
diff src/share/vm/runtime/sharedRuntime.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | f6c04e69cf75 8a9bb7821e28 |
children | 4ca6dc0799b6 |
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.hpp Wed Mar 12 00:00:05 2014 +0100 +++ b/src/share/vm/runtime/sharedRuntime.hpp Tue Mar 11 18:45:59 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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 @@ -141,7 +141,7 @@ static double dabs(double f); #endif -#if defined(__SOFTFP__) || defined(PPC) +#if defined(__SOFTFP__) || defined(PPC32) static double dsqrt(double f); #endif @@ -366,7 +366,25 @@ const VMRegPair* regs) NOT_DEBUG_RETURN; // Ditto except for calling C - static int c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed); + // + // C argument in register AND stack slot. + // Some architectures require that an argument must be passed in a register + // AND in a stack slot. These architectures provide a second VMRegPair array + // to be filled by the c_calling_convention method. On other architectures, + // NULL is being passed as the second VMRegPair array, so arguments are either + // passed in a register OR in a stack slot. + static int c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, VMRegPair *regs2, + int total_args_passed); + + // Compute the new number of arguments in the signature if 32 bit ints + // must be converted to longs. Needed if CCallingConventionRequiresIntsAsLongs + // is true. + static int convert_ints_to_longints_argcnt(int in_args_count, BasicType* in_sig_bt); + // Adapt a method's signature if it contains 32 bit integers that must + // be converted to longs. Needed if CCallingConventionRequiresIntsAsLongs + // is true. + static void convert_ints_to_longints(int i2l_argcnt, int& in_args_count, + BasicType*& in_sig_bt, VMRegPair*& in_regs); // Generate I2C and C2I adapters. These adapters are simple argument marshalling // blobs. Unlike adapters in the tiger and earlier releases the code in these @@ -380,13 +398,13 @@ // location for the interpreter to record. This is used by the frame code // to correct the sender code to match up with the stack pointer when the // thread left the compiled code. In addition it allows the interpreter - // to remove the space the c2i adapter allocated to do it argument conversion. + // to remove the space the c2i adapter allocated to do its argument conversion. // Although a c2i blob will always run interpreted even if compiled code is // present if we see that compiled code is present the compiled call site // will be patched/re-resolved so that later calls will run compiled. - // Aditionally a c2i blob need to have a unverified entry because it can be reached + // Additionally a c2i blob need to have a unverified entry because it can be reached // in situations where the call site is an inlined cache site and may go megamorphic. // A i2c adapter is simpler than the c2i adapter. This is because it is assumed @@ -586,7 +604,7 @@ // arguments for a Java-compiled call, and jumps to Rmethod-> code()-> // code_begin(). It is broken to call it without an nmethod assigned. // The usual behavior is to lift any register arguments up out of the -// stack and possibly re-pack the extra arguments to be contigious. +// stack and possibly re-pack the extra arguments to be contiguous. // I2C adapters will save what the interpreter's stack pointer will be // after arguments are popped, then adjust the interpreter's frame // size to force alignment and possibly to repack the arguments. @@ -603,7 +621,7 @@ // outgoing stack args will be dead after the copy. // // Native wrappers, like adapters, marshal arguments. Unlike adapters they -// also perform an offical frame push & pop. They have a call to the native +// also perform an official frame push & pop. They have a call to the native // routine in their middles and end in a return (instead of ending in a jump). // The native wrappers are stored in real nmethods instead of the BufferBlobs // used by the adapters. The code generation happens here because it's very @@ -620,11 +638,9 @@ #ifdef ASSERT // Captures code and signature used to generate this adapter when - // verifing adapter equivalence. + // verifying adapter equivalence. unsigned char* _saved_code; - int _code_length; - BasicType* _saved_sig; - int _total_args_passed; + int _saved_code_length; #endif void init(AdapterFingerPrint* fingerprint, address i2c_entry, address c2i_entry, address c2i_unverified_entry) { @@ -634,9 +650,7 @@ _c2i_unverified_entry = c2i_unverified_entry; #ifdef ASSERT _saved_code = NULL; - _code_length = 0; - _saved_sig = NULL; - _total_args_passed = 0; + _saved_code_length = 0; #endif } @@ -649,7 +663,6 @@ address get_i2c_entry() const { return _i2c_entry; } address get_c2i_entry() const { return _c2i_entry; } address get_c2i_unverified_entry() const { return _c2i_unverified_entry; } - address base_address(); void relocate(address new_base); @@ -661,8 +674,8 @@ #ifdef ASSERT // Used to verify that code generated for shared adapters is equivalent - void save_code(unsigned char* code, int length, int total_args_passed, BasicType* sig_bt); - bool compare_code(unsigned char* code, int length, int total_args_passed, BasicType* sig_bt); + void save_code (unsigned char* code, int length); + bool compare_code(unsigned char* code, int length); #endif //virtual void print_on(outputStream* st) const; DO NOT USE @@ -681,7 +694,7 @@ static AdapterHandlerEntry* new_entry(AdapterFingerPrint* fingerprint, address i2c_entry, address c2i_entry, address c2i_unverified_entry); - static nmethod* create_native_wrapper(methodHandle method, int compile_id); + static void create_native_wrapper(methodHandle method); static AdapterHandlerEntry* get_adapter(methodHandle method); #ifdef HAVE_DTRACE_H