diff src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp @ 2127:5577848f5923

7011463: Sparc MacroAssembler::incr_allocated_bytes() needs a RegisterOrConstant argument Summary: Replaced incr_allocated_bytes() formals var_size_in_bytes and con_size_in_bytes with a single RegisterOrConstant formal. Reviewed-by: twisti, jcoomes
author phh
date Tue, 11 Jan 2011 17:33:21 -0500
parents b1a2afa37ec4
children 1d1603768966 d86923d96dca
line wrap: on
line diff
--- a/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Mon Jan 10 17:14:53 2011 -0500
+++ b/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp	Tue Jan 11 17:33:21 2011 -0500
@@ -170,11 +170,13 @@
   Register t2,                         // temp register
   Label&   slow_case                   // continuation point if fast allocation fails
 ) {
+  RegisterOrConstant size_in_bytes = var_size_in_bytes->is_valid()
+    ? RegisterOrConstant(var_size_in_bytes) : RegisterOrConstant(con_size_in_bytes);
   if (UseTLAB) {
     tlab_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);
   } else {
     eden_allocate(obj, var_size_in_bytes, con_size_in_bytes, t1, t2, slow_case);
-    incr_allocated_bytes(var_size_in_bytes, con_size_in_bytes, t1);
+    incr_allocated_bytes(size_in_bytes, t1, t2);
   }
 }