Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: src/mips/macro-assembler-mips.cc

Issue 2801683003: MIPS[64]: Support for some SIMD operations (8) (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index 90361e730549dce181ada360e7b4dd89fbd4d45b..b38cb9b8c260689a57013d55c7640d10a8038269 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -2316,6 +2316,82 @@ void MacroAssembler::BranchShortF(SecondaryField sizeField, Label* target,
}
}
+void MacroAssembler::BranchMSA(Label* target, MSABranchDF df,
+ MSABranchCondition cond, MSARegister wt,
+ BranchDelaySlot bd) {
+ {
+ BlockTrampolinePoolScope block_trampoline_pool(this);
+
+ if (target) {
+ bool long_branch =
+ target->is_bound() ? !is_near(target) : is_trampoline_emitted();
+ if (long_branch) {
+ Label skip;
+ MSABranchCondition neg_cond = NegateMSABranchCondition(cond);
+ BranchShortMSA(df, &skip, neg_cond, wt, bd);
+ BranchLong(target, bd);
+ bind(&skip);
+ } else {
+ BranchShortMSA(df, target, cond, wt, bd);
+ }
+ }
+ }
+}
+
+void MacroAssembler::BranchShortMSA(MSABranchDF df, Label* target,
+ MSABranchCondition cond, MSARegister wt,
+ BranchDelaySlot bd) {
+ if (IsMipsArchVariant(kMips32r6)) {
+ BlockTrampolinePoolScope block_trampoline_pool(this);
+ if (target) {
+ switch (cond) {
+ case all_not_zero:
+ switch (df) {
+ case MSA_BRANCH_D:
+ bnz_d(wt, target);
+ break;
+ case MSA_BRANCH_W:
+ bnz_w(wt, target);
+ break;
+ case MSA_BRANCH_H:
+ bnz_h(wt, target);
+ break;
+ case MSA_BRANCH_B:
+ default:
+ bnz_b(wt, target);
+ }
+ break;
+ case one_elem_not_zero:
+ bnz_v(wt, target);
+ break;
+ case one_elem_zero:
+ switch (df) {
+ case MSA_BRANCH_D:
+ bz_d(wt, target);
+ break;
+ case MSA_BRANCH_W:
+ bz_w(wt, target);
+ break;
+ case MSA_BRANCH_H:
+ bz_h(wt, target);
+ break;
+ case MSA_BRANCH_B:
+ default:
+ bz_b(wt, target);
+ }
+ break;
+ case all_zero:
+ bz_v(wt, target);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+ if (bd == PROTECT) {
+ nop();
+ }
+}
void MacroAssembler::FmoveLow(FPURegister dst, Register src_low) {
if (IsFp32Mode()) {
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698