Commit 0f086d14 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Rename BranchF functions.

BUG=

Review URL: https://codereview.chromium.org/1052653003

Cr-Commit-Position: refs/heads/master@{#27575}
parent 94506cc3
......@@ -858,8 +858,8 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
UNSUPPORTED_COND(kMips64CmpS, branch->condition);
}
Label* nan = acceptNaN ? tlabel : flabel;
__ BranchFS(tlabel, nan, cc, i.InputSingleRegister(0),
i.InputSingleRegister(1));
__ BranchF32(tlabel, nan, cc, i.InputSingleRegister(0),
i.InputSingleRegister(1));
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
......@@ -871,8 +871,8 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
UNSUPPORTED_COND(kMips64CmpD, branch->condition);
}
Label* nan = acceptNaN ? tlabel : flabel;
__ BranchF(tlabel, nan, cc, i.InputDoubleRegister(0),
i.InputDoubleRegister(1));
__ BranchF64(tlabel, nan, cc, i.InputDoubleRegister(0),
i.InputDoubleRegister(1));
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
......
......@@ -923,8 +923,8 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
UNSUPPORTED_COND(kMips64CmpS, branch->condition);
}
Label* nan = acceptNaN ? tlabel : flabel;
__ BranchFS(tlabel, nan, cc, i.InputSingleRegister(0),
i.InputSingleRegister(1));
__ BranchF32(tlabel, nan, cc, i.InputSingleRegister(0),
i.InputSingleRegister(1));
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
......@@ -936,8 +936,8 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
UNSUPPORTED_COND(kMips64CmpD, branch->condition);
}
Label* nan = acceptNaN ? tlabel : flabel;
__ BranchF(tlabel, nan, cc, i.InputDoubleRegister(0),
i.InputDoubleRegister(1));
__ BranchF64(tlabel, nan, cc, i.InputDoubleRegister(0),
i.InputDoubleRegister(1));
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
} else {
......
......@@ -1430,9 +1430,9 @@ void MacroAssembler::Mfhc1(Register rt, FPURegister fs) {
}
void MacroAssembler::BranchFSize(SecondaryField sizeField, Label* target,
Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd) {
void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd) {
BlockTrampolinePoolScope block_trampoline_pool(this);
if (cc == al) {
Branch(bd, target);
......@@ -1551,20 +1551,6 @@ void MacroAssembler::BranchFSize(SecondaryField sizeField, Label* target,
}
void MacroAssembler::BranchF(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd) {
BranchFSize(D, target, nan, cc, cmp1, cmp2, bd);
}
void MacroAssembler::BranchFS(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd) {
BranchFSize(S, target, nan, cc, cmp1, cmp2, bd);
}
void MacroAssembler::FmoveLow(FPURegister dst, Register src_low) {
if (IsFp64Mode()) {
DCHECK(!src_low.is(at));
......
......@@ -772,33 +772,38 @@ class MacroAssembler: public Assembler {
void Mfhc1(Register rt, FPURegister fs);
// Wrapper functions for the different cmp/branch types.
void BranchFSize(SecondaryField sizeField, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT);
void BranchF(Label* target,
Label* nan,
Condition cc,
FPURegister cmp1,
FPURegister cmp2,
BranchDelaySlot bd = PROTECT);
inline void BranchF32(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT) {
BranchFCommon(S, target, nan, cc, cmp1, cmp2, bd);
}
void BranchFS(Label* target, Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd = PROTECT);
inline void BranchF64(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT) {
BranchFCommon(D, target, nan, cc, cmp1, cmp2, bd);
}
// Alternate (inline) version for better readability with USE_DELAY_SLOT.
inline void BranchF(BranchDelaySlot bd,
Label* target,
Label* nan,
Condition cc,
FPURegister cmp1,
FPURegister cmp2) {
BranchF(target, nan, cc, cmp1, cmp2, bd);
inline void BranchF64(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchF64(target, nan, cc, cmp1, cmp2, bd);
}
inline void BranchFS(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchFS(target, nan, cc, cmp1, cmp2, bd);
inline void BranchF32(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchF32(target, nan, cc, cmp1, cmp2, bd);
}
// Alias functions for backward compatibility.
inline void BranchF(Label* target, Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd = PROTECT) {
BranchF64(target, nan, cc, cmp1, cmp2, bd);
}
inline void BranchF(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchF64(bd, target, nan, cc, cmp1, cmp2);
}
// Truncates a double using a specific rounding mode, and writes the value
......@@ -1632,6 +1637,11 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
void Jr(Label* L, BranchDelaySlot bdslot);
void Jalr(Label* L, BranchDelaySlot bdslot);
// Common implementation of BranchF functions for the different formats.
void BranchFCommon(SecondaryField sizeField, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT);
// Helper functions for generating invokes.
void InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual,
......
......@@ -1629,9 +1629,9 @@ void MacroAssembler::Madd_d(FPURegister fd, FPURegister fr, FPURegister fs,
}
void MacroAssembler::BranchFSize(SecondaryField sizeField, Label* target,
Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd) {
void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd) {
BlockTrampolinePoolScope block_trampoline_pool(this);
if (cc == al) {
Branch(bd, target);
......@@ -1749,20 +1749,6 @@ void MacroAssembler::BranchFSize(SecondaryField sizeField, Label* target,
}
void MacroAssembler::BranchF(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd) {
BranchFSize(D, target, nan, cc, cmp1, cmp2, bd);
}
void MacroAssembler::BranchFS(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd) {
BranchFSize(S, target, nan, cc, cmp1, cmp2, bd);
}
void MacroAssembler::FmoveLow(FPURegister dst, Register src_low) {
DCHECK(!src_low.is(at));
mfhc1(at, dst);
......
......@@ -802,33 +802,38 @@ class MacroAssembler: public Assembler {
FPURegister scratch);
// Wrapper functions for the different cmp/branch types.
void BranchFSize(SecondaryField sizeField, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT);
void BranchF(Label* target,
Label* nan,
Condition cc,
FPURegister cmp1,
FPURegister cmp2,
BranchDelaySlot bd = PROTECT);
inline void BranchF32(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT) {
BranchFCommon(S, target, nan, cc, cmp1, cmp2, bd);
}
void BranchFS(Label* target, Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd = PROTECT);
inline void BranchF64(Label* target, Label* nan, Condition cc,
FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT) {
BranchFCommon(D, target, nan, cc, cmp1, cmp2, bd);
}
// Alternate (inline) version for better readability with USE_DELAY_SLOT.
inline void BranchF(BranchDelaySlot bd,
Label* target,
Label* nan,
Condition cc,
FPURegister cmp1,
FPURegister cmp2) {
BranchF(target, nan, cc, cmp1, cmp2, bd);
inline void BranchF64(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchF64(target, nan, cc, cmp1, cmp2, bd);
}
inline void BranchFS(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchFS(target, nan, cc, cmp1, cmp2, bd);
inline void BranchF32(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchF32(target, nan, cc, cmp1, cmp2, bd);
}
// Alias functions for backward compatibility.
inline void BranchF(Label* target, Label* nan, Condition cc, FPURegister cmp1,
FPURegister cmp2, BranchDelaySlot bd = PROTECT) {
BranchF64(target, nan, cc, cmp1, cmp2, bd);
}
inline void BranchF(BranchDelaySlot bd, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2) {
BranchF64(bd, target, nan, cc, cmp1, cmp2);
}
// Truncates a double using a specific rounding mode, and writes the value
......@@ -1701,6 +1706,11 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
void Jr(Label* L, BranchDelaySlot bdslot);
void Jalr(Label* L, BranchDelaySlot bdslot);
// Common implementation of BranchF functions for the different formats.
void BranchFCommon(SecondaryField sizeField, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2,
BranchDelaySlot bd = PROTECT);
// Helper functions for generating invokes.
void InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment