diff src/cpu/x86/vm/c1_FrameMap_x86.hpp @ 2029:6ce496c8fc07

Merge
author coleenp
date Thu, 16 Dec 2010 09:31:55 -0500
parents ac637b7220d1
children 8a02ca5e5576
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_FrameMap_x86.hpp	Wed Dec 15 08:03:54 2010 -0800
+++ b/src/cpu/x86/vm/c1_FrameMap_x86.hpp	Thu Dec 16 09:31:55 2010 -0500
@@ -130,4 +130,15 @@
     return _caller_save_xmm_regs[i];
   }
 
+  static int adjust_reg_range(int range) {
+    // Reduce the number of available regs (to free r12) in case of compressed oops
+    if (UseCompressedOops) return range - 1;
+    return range;
+  }
+
+  static int nof_caller_save_cpu_regs() { return adjust_reg_range(pd_nof_caller_save_cpu_regs_frame_map); }
+  static int last_cpu_reg()             { return adjust_reg_range(pd_last_cpu_reg);  }
+  static int last_byte_reg()            { return adjust_reg_range(pd_last_byte_reg); }
+
 #endif // CPU_X86_VM_C1_FRAMEMAP_X86_HPP
+