6887186: G1: Incorrect code generated for G1 pre-barrier by C1 on SPARC
Summary: Modify operand passed to C1 pre-barrier to be the operand representing the address of the object field that is being stored.
Reviewed-by: never
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Fri Sep 25 04:39:54 2009 -0700
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Thu Oct 01 15:56:19 2009 -0700
@@ -668,7 +668,7 @@
__ add(obj.result(), offset.result(), addr);
if (type == objectType) { // Write-barrier needed for Object fields.
- pre_barrier(obj.result(), false, NULL);
+ pre_barrier(addr, false, NULL);
}
if (type == objectType)