diff options
author | 2014-05-28 22:43:01 -0700 | |
---|---|---|
committer | 2014-05-29 20:50:49 -0700 | |
commit | cf4035a4c41ccfcc3e89a0cee25f5218a11b0705 (patch) | |
tree | 323d9e98e6129c67e464a3e6857ee02593a2f2c2 /runtime/arch/arch_test.cc | |
parent | 29b53d3d715b1ec19349e8cbf7c5e4ff529bd5fe (diff) |
ART: Use StackReference in Quick Stack Frame
The method reference at the bottom of a quick frame is a stack
reference and not a native pointer. This is important for 64b
architectures, where the notions do not coincide.
Change key methods to have StackReference<mirror::ArtMethod>*
parameter instead of mirror::ArtMethod**. Make changes to
invoke stubs for 64b archs, change the frame setup for JNI code
(both generic JNI and compilers), tie up loose ends.
Tested on x86 and x86-64 with host tests. On x86-64, tests succeed
with jni compiler activated. x86-64 QCG was not tested.
Tested on ARM32 with device tests.
Fix ARM64 not saving x19 (used for wSUSPEND) on upcalls.
Tested on ARM64 in interpreter-only + generic-jni mode.
Fix ARM64 JNI Compiler to work with the CL.
Tested on ARM64 in interpreter-only + jni compiler.
Change-Id: I77931a0cbadd04d163b3eb8d6f6a6f8740578f13
Diffstat (limited to 'runtime/arch/arch_test.cc')
-rw-r--r-- | runtime/arch/arch_test.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/runtime/arch/arch_test.cc b/runtime/arch/arch_test.cc index 45ff21f4a8..5220dc3ca9 100644 --- a/runtime/arch/arch_test.cc +++ b/runtime/arch/arch_test.cc @@ -337,30 +337,22 @@ TEST_F(ArchTest, X86_64) { // The following tests are all for the running architecture. So we get away // with just including it and not undefining it every time. - #if defined(__arm__) #include "arch/arm/asm_support_arm.h" -#undef ART_RUNTIME_ARCH_ARM_ASM_SUPPORT_ARM_H_ #elif defined(__aarch64__) #include "arch/arm64/asm_support_arm64.h" -#undef ART_RUNTIME_ARCH_ARM64_ASM_SUPPORT_ARM64_H_ #elif defined(__mips__) #include "arch/mips/asm_support_mips.h" -#undef ART_RUNTIME_ARCH_MIPS_ASM_SUPPORT_MIPS_H_ #elif defined(__i386__) #include "arch/x86/asm_support_x86.h" -#undef ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_H_ #elif defined(__x86_64__) #include "arch/x86_64/asm_support_x86_64.h" -#undef ART_RUNTIME_ARCH_X86_64_ASM_SUPPORT_X86_64_H_ #else // This happens for the host test. #ifdef __LP64__ #include "arch/x86_64/asm_support_x86_64.h" -#undef ART_RUNTIME_ARCH_X86_64_ASM_SUPPORT_X86_64_H_ #else #include "arch/x86/asm_support_x86.h" -#undef ART_RUNTIME_ARCH_X86_ASM_SUPPORT_X86_H_ #endif #endif @@ -436,4 +428,13 @@ TEST_F(ArchTest, HeapReferenceSize) { #endif } +TEST_F(ArchTest, StackReferenceSize) { +#if defined(STACK_REFERENCE_SIZE) + EXPECT_EQ(sizeof(StackReference<mirror::Object>), + static_cast<size_t>(STACK_REFERENCE_SIZE)); +#else + LOG(INFO) << "No expected StackReference Size #define found."; +#endif +} + } // namespace art |