changeset 18854:b8d3f84740c7

guarded use of 64-bit only code with #ifdefs Contributed-by: Igor Ignatyev <igor.ignatyev@oracle.com>
author Doug Simon <doug.simon@oracle.com>
date Tue, 13 Jan 2015 12:59:48 +0100
parents 90fb04cda7d6
children 82e5b5ccdb0c
files src/cpu/x86/vm/frame_x86.cpp src/cpu/x86/vm/graalCodeInstaller_x86.cpp src/cpu/x86/vm/vmStructs_x86.hpp
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/frame_x86.cpp	Tue Jan 13 11:18:46 2015 +0100
+++ b/src/cpu/x86/vm/frame_x86.cpp	Tue Jan 13 12:59:48 2015 +0100
@@ -696,6 +696,7 @@
     DESCRIBE_FP_OFFSET(interpreter_frame_locals);
     DESCRIBE_FP_OFFSET(interpreter_frame_bcx);
     DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
+#ifdef AMD64
   } else if (is_entry_frame()) {
     // This could be more descriptive if we use the enum in
     // stubGenerator to map to real names but it's most important to
@@ -704,8 +705,9 @@
       values.describe(frame_no, fp() - i, err_msg("call_stub word fp - %d", i));
     }
   }
+#endif // AMD64
 }
-#endif
+#endif // !PRODUCT
 
 intptr_t *frame::initial_deoptimization_info() {
   // used to reset the saved FP
--- a/src/cpu/x86/vm/graalCodeInstaller_x86.cpp	Tue Jan 13 11:18:46 2015 +0100
+++ b/src/cpu/x86/vm/graalCodeInstaller_x86.cpp	Tue Jan 13 12:59:48 2015 +0100
@@ -67,10 +67,14 @@
   Handle obj = HotSpotObjectConstantImpl::object(constant);
   jobject value = JNIHandles::make_local(obj());
   if (HotSpotObjectConstantImpl::compressed(constant)) {
+#ifdef _LP64
     address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand);
     int oop_index = _oop_recorder->find_index(value);
     _instructions->relocate(pc, oop_Relocation::spec(oop_index), Assembler::narrow_oop_operand);
     TRACE_graal_3("relocating (narrow oop constant) at %p/%p", pc, operand);
+#else
+    fatal("compressed oop on 32bit");
+#endif
   } else {
     address operand = Assembler::locate_operand(pc, Assembler::imm_operand);
     *((jobject*) operand) = value;
--- a/src/cpu/x86/vm/vmStructs_x86.hpp	Tue Jan 13 11:18:46 2015 +0100
+++ b/src/cpu/x86/vm/vmStructs_x86.hpp	Tue Jan 13 12:59:48 2015 +0100
@@ -46,7 +46,7 @@
   declare_toplevel_type(VM_Version)
 
 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
-  declare_constant(frame::arg_reg_save_area_bytes)                  \
+  LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes))       \
   declare_constant(frame::interpreter_frame_sender_sp_offset)       \
   declare_constant(frame::interpreter_frame_last_sp_offset)         \
   declare_constant(VM_Version::CPU_CX8)                             \