< prev index next >

src/hotspot/share/classfile/javaClasses.cpp

Print this page

        

*** 1,7 **** --- 1,8 ---- /* * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015-2018, Azul Systems, Inc. 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 4271,4280 **** --- 4272,4289 ---- int java_lang_AssertionStatusDirectives::deflt_offset; int java_nio_Buffer::_limit_offset; int java_util_concurrent_locks_AbstractOwnableSynchronizer::_owner_offset; int reflect_ConstantPool::_oop_offset; int reflect_UnsafeStaticFieldAccessorImpl::_base_offset; + #ifdef AARCH32 + int com_sun_crypto_provider_AESCrypt::_K_offset; + int com_sun_crypto_provider_CipherBlockChaining::_r_offset; + int com_sun_crypto_provider_FeedbackCipher::_embeddedCipher_offset; + int sun_security_provider_SHA::_state_offset; + int sun_security_provider_SHA2::_state_offset; + int sun_security_provider_SHA5::_state_offset; + #endif #define STACKTRACEELEMENT_FIELDS_DO(macro) \ macro(declaringClassObject_offset, k, "declaringClassObject", class_signature, false); \ macro(classLoaderName_offset, k, "classLoaderName", string_signature, false); \ macro(moduleName_offset, k, "moduleName", string_signature, false); \
*** 4433,4442 **** --- 4442,4531 ---- static int member_offset(int hardcoded_offset) { return (hardcoded_offset * heapOopSize) + instanceOopDesc::base_offset_in_bytes(); } + #ifdef AARCH32 + // Support for intrinsification of com.sun.crypto.provider.AESCrypto.encrypt + #define AESCRYPT_FIELDS_DO(macro) \ + macro(_K_offset, k, "K", int_array_signature, false) + + void com_sun_crypto_provider_AESCrypt::compute_offsets() { + InstanceKlass* k = SystemDictionary::AESCrypt_klass(); + AESCRYPT_FIELDS_DO(FIELD_COMPUTE_OFFSET); + } + + int com_sun_crypto_provider_AESCrypt::K_offset() { + return _K_offset; + } + + // Support for intrinsification of com_sun_crypto_provider_CipherBlockChaining.encrypt + #define CBC_FIELDS_DO(macro) \ + macro(_r_offset, k, "r", byte_array_signature, false) + + void com_sun_crypto_provider_CipherBlockChaining::compute_offsets() { + InstanceKlass* k = SystemDictionary::CipherBlockChaining_klass(); + CBC_FIELDS_DO(FIELD_COMPUTE_OFFSET); + } + + int com_sun_crypto_provider_CipherBlockChaining::r_offset() { + return _r_offset; + } + + // Support for intrinsification of com_sun_crypto_provider_CipherBlockChaining.encrypt + #define FC_FIELDS_DO(macro) \ + macro(_embeddedCipher_offset, k, "embeddedCipher", symmetriccipher_signature, false) + + void com_sun_crypto_provider_FeedbackCipher::compute_offsets() { + InstanceKlass* k = SystemDictionary::FeedbackCipher_klass(); + FC_FIELDS_DO(FIELD_COMPUTE_OFFSET); + } + + int com_sun_crypto_provider_FeedbackCipher::embeddedCipher_offset() { + return _embeddedCipher_offset; + } + + // Support for intrinsification of sun_security_provider_SHA.implCompress + #define SHA_FIELDS_DO(macro) \ + macro(_state_offset, k, "state", int_array_signature, false) + + void sun_security_provider_SHA::compute_offsets() { + InstanceKlass* k = SystemDictionary::SHA_klass(); + SHA_FIELDS_DO(FIELD_COMPUTE_OFFSET); + } + + int sun_security_provider_SHA::state_offset() { + return _state_offset; + } + + // Support for intrinsification of sun_security_provider_SHA2.implCompress + #define SHA2_FIELDS_DO(macro) \ + macro(_state_offset, k, "state", int_array_signature, false) + + void sun_security_provider_SHA2::compute_offsets() { + InstanceKlass* k = SystemDictionary::SHA2_klass(); + SHA2_FIELDS_DO(FIELD_COMPUTE_OFFSET); + } + + int sun_security_provider_SHA2::state_offset() { + return _state_offset; + } + + // Support for intrinsification of sun_security_provider_SHA5.implCompress + #define SHA5_FIELDS_DO(macro) \ + macro(_state_offset, k, "state", long_array_signature, false) + + void sun_security_provider_SHA5::compute_offsets() { + InstanceKlass* k = SystemDictionary::SHA5_klass(); + SHA5_FIELDS_DO(FIELD_COMPUTE_OFFSET); + } + + int sun_security_provider_SHA5::state_offset() { + return _state_offset; + } + #endif + // Compute hard-coded offsets // Invoked before SystemDictionary::initialize, so pre-loaded classes // are not available to determine the offset_of_static_fields. void JavaClasses::compute_hard_coded_offsets() {
*** 4493,4502 **** --- 4582,4600 ---- java_lang_LiveStackFrameInfo::compute_offsets(); java_util_concurrent_locks_AbstractOwnableSynchronizer::compute_offsets(); // generated interpreter code wants to know about the offsets we just computed: AbstractAssembler::update_delayed_values(); + + #ifdef AARCH32 + com_sun_crypto_provider_AESCrypt::compute_offsets(); + com_sun_crypto_provider_FeedbackCipher::compute_offsets(); + com_sun_crypto_provider_CipherBlockChaining::compute_offsets(); + sun_security_provider_SHA::compute_offsets(); + sun_security_provider_SHA2::compute_offsets(); + sun_security_provider_SHA5::compute_offsets(); + #endif } #ifndef PRODUCT // These functions exist to assert the validity of hard-coded field offsets to guard
< prev index next >