Commit c32b1281 authored by Ilija Pavlovic's avatar Ilija Pavlovic Committed by Commit Bot

MIPS[64]: Calculate offsets in branch helpers.

In definitions for BranchShortHelperR6 and BranchAndLinkShortHelperR6
are noted many source code lines which are very often repeated or very
similar. These lines of code calcluate offsets and for them this CL
introduces functions CalculateOffset().

TEST=
BUG=

Change-Id: Ia64020efaeab207e72fc00d1dcb5b35a4003f36a
Reviewed-on: https://chromium-review.googlesource.com/574229Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Reviewed-by: 's avatarMiran Karić <Miran.Karic@imgtec.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
Cr-Commit-Position: refs/heads/master@{#46893}
parent d6c4269c
This diff is collapsed.
......@@ -853,6 +853,10 @@ class TurboAssembler : public Assembler {
void BranchShortMSA(MSABranchDF df, Label* target, MSABranchCondition cond,
MSARegister wt, BranchDelaySlot bd = PROTECT);
bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits);
bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits,
Register& scratch, const Operand& rt);
void BranchShortHelperR6(int32_t offset, Label* L);
void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot);
bool BranchShortHelperR6(int32_t offset, Label* L, Condition cond,
......
This diff is collapsed.
......@@ -875,6 +875,10 @@ class TurboAssembler : public Assembler {
void CallCFunctionHelper(Register function, int num_reg_arguments,
int num_double_arguments);
bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits);
bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits,
Register& scratch, const Operand& rt);
// Common implementation of BranchF functions for the different formats.
void BranchFCommon(SecondaryField sizeField, Label* target, Label* nan,
Condition cc, FPURegister cmp1, FPURegister cmp2,
......
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