< prev index next >

src/share/vm/runtime/stackValueCollection.cpp

Print this page




  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "runtime/stackValueCollection.hpp"
  27 #ifdef TARGET_ARCH_x86
  28 # include "jniTypes_x86.hpp"
  29 #endif
  30 #ifdef TARGET_ARCH_sparc
  31 # include "jniTypes_sparc.hpp"
  32 #endif
  33 #ifdef TARGET_ARCH_zero
  34 # include "jniTypes_zero.hpp"
  35 #endif
  36 #ifdef TARGET_ARCH_arm
  37 # include "jniTypes_arm.hpp"
  38 #endif
  39 #ifdef TARGET_ARCH_ppc
  40 # include "jniTypes_ppc.hpp"
  41 #endif



  42 
  43 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  44 
  45 jint StackValueCollection::int_at(int slot) const {
  46   intptr_t val =  at(slot)->get_int();
  47   jint ival = *((jint*) (&val));
  48   return ival;
  49 }
  50 
  51 jlong StackValueCollection::long_at(int slot) const {
  52 #ifdef _LP64
  53   return at(slot+1)->get_int();
  54 #else
  55   union {
  56     jlong jl;
  57     jint  array[2];
  58   } value;
  59   // Interpreter stack is reversed in memory:
  60   // low memory location is in higher java local slot.
  61   value.array[0] = at(slot+1)->get_int();




  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "runtime/stackValueCollection.hpp"
  27 #ifdef TARGET_ARCH_x86
  28 # include "jniTypes_x86.hpp"
  29 #endif
  30 #ifdef TARGET_ARCH_sparc
  31 # include "jniTypes_sparc.hpp"
  32 #endif
  33 #ifdef TARGET_ARCH_zero
  34 # include "jniTypes_zero.hpp"
  35 #endif
  36 #ifdef TARGET_ARCH_arm
  37 # include "jniTypes_arm.hpp"
  38 #endif
  39 #ifdef TARGET_ARCH_ppc
  40 # include "jniTypes_ppc.hpp"
  41 #endif
  42 #ifdef TARGET_ARCH_aarch32
  43 # include "jniTypes_aarch32.hpp"
  44 #endif
  45 
  46 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  47 
  48 jint StackValueCollection::int_at(int slot) const {
  49   intptr_t val =  at(slot)->get_int();
  50   jint ival = *((jint*) (&val));
  51   return ival;
  52 }
  53 
  54 jlong StackValueCollection::long_at(int slot) const {
  55 #ifdef _LP64
  56   return at(slot+1)->get_int();
  57 #else
  58   union {
  59     jlong jl;
  60     jint  array[2];
  61   } value;
  62   // Interpreter stack is reversed in memory:
  63   // low memory location is in higher java local slot.
  64   value.array[0] = at(slot+1)->get_int();


< prev index next >