7063629: use cbcond in C2 generated code on T4

Use new short branch instruction in C2 generated code.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2011-08-11 12:08:11 -07:00
parent 52f678435a
commit ac99f413d7
20 changed files with 1298 additions and 500 deletions

View file

@ -1192,6 +1192,8 @@ class Assembler : public AbstractAssembler {
assert(offset() == 0 || !cbcond_before(), "cbcond should not follow an other cbcond");
}
public:
bool use_cbcond(Label& L) {
if (!UseCBCond || cbcond_before()) return false;
intptr_t x = intptr_t(target_distance(L)) - intptr_t(pc());
@ -1199,7 +1201,6 @@ class Assembler : public AbstractAssembler {
return is_simm(x, 12);
}
public:
// Tells assembler you know that next instruction is delayed
Assembler* delayed() {
#ifdef CHECK_DELAY
@ -1248,6 +1249,10 @@ public:
inline void bpr(RCondition c, bool a, Predict p, Register s1, address d, relocInfo::relocType rt = relocInfo::none);
inline void bpr(RCondition c, bool a, Predict p, Register s1, Label& L);
// compare and branch
inline void cbcond(Condition c, CC cc, Register s1, Register s2, Label& L);
inline void cbcond(Condition c, CC cc, Register s1, int simm5, Label& L);
protected: // use MacroAssembler::br instead
// pp 138
@ -1275,10 +1280,6 @@ public:
inline void cb( Condition c, bool a, address d, relocInfo::relocType rt = relocInfo::none );
inline void cb( Condition c, bool a, Label& L );
// compare and branch
inline void cbcond(Condition c, CC cc, Register s1, Register s2, Label& L);
inline void cbcond(Condition c, CC cc, Register s1, int simm5, Label& L);
// pp 149
inline void call( address d, relocInfo::relocType rt = relocInfo::runtime_call_type );