This patch moves some of the register allocation logic in the C1 load barrier stub to shared code instead of being platform specific. There's also some cosmetic touch-ups of this code. http://cr.openjdk.java.net/~pliden/zgc/c1_load_barrier_stub_tmp_alloc/webrev.0 /Per