Request for reviews (L): 7063628: Use cbcond on T4 (original) (raw)

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jul 14 09:47:20 PDT 2011


Christian Thalinger wrote:

On Jul 14, 2011, at 5:44 AM, Vladimir Kozlov wrote:

src/cpu/sparc/vm/assemblersparc.hpp: - void brzero( Condition c, bool a, Predict p, Register s1, Label& L); + // compares register with zero (32 bit) and branches (V9 and V8 instructions) + void brzero ( Register s1, Label& L ); Why did you remove the annul and predict argument while you left it with brnull/brnotnull? Maybe we should add default arguments for these: + void brzero(Register s1, Label& L, bool a = false, Predict p = Assembler::pt);

In all usage cases annul was false but there were cases where predict was pn but those case had far label so I replaced them with normal code. But I agree that I should add default parameters. Done.

src/cpu/sparc/vm/assemblersparc.cpp: - cmp(valuereg, topregaftersave); - br(Assembler::notEqual, false, Assembler::pn, notsame); - delayed()->nop(); + cmpandbr(valuereg, topregaftersave, Assembler::notEqual, false, Assembler::pt, notsame); You changed the predict bit. Intentionally? Here too: - cmp(t1, t2); - br(Assembler::equal, false, Assembler::pt, ok); - delayed()->nop(); + cmpandbr(t1, t2, Assembler::equal, false, Assembler::pn, ok);

copy-paste bug. Fixed.

src/cpu/sparc/vm/c1LIRAssemblersparc.cpp: 2608 _ ba(*objisnull, false); 2609 _ delayed()->nop(); 2610 _ bind(notnull); 2611 } else { 2612 _ brnull(obj, false, Assembler::pn, *objisnull, false); 2613 _ delayed()->nop(); 2614 } Just a question: I guess you are using emitdelayednop = false here to not emit a cbcond instruction. What is the reason for this? There are also a couple of ba with a nop in the delay slot that use false.

Correct. *obj_is_null is far label so I don't want to use cbcond.

Otherwise this looks good. Nice cleanup! And thanks for enabling UseRDPCForConstantTableBase on T4s. -- Christian

Thanks, Vladimir



More information about the hotspot-compiler-dev mailing list