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

Side by Side Diff: src/mips64/macro-assembler-mips64.cc

Issue 1545013002: Add assembler test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/mips64/simulator-mips64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/base/division-by-constant.h" 9 #include "src/base/division-by-constant.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 drotr(rd, rs, rt.imm64_); 1181 drotr(rd, rs, rt.imm64_);
1182 } 1182 }
1183 } 1183 }
1184 1184
1185 1185
1186 void MacroAssembler::Pref(int32_t hint, const MemOperand& rs) { 1186 void MacroAssembler::Pref(int32_t hint, const MemOperand& rs) {
1187 pref(hint, rs); 1187 pref(hint, rs);
1188 } 1188 }
1189 1189
1190 1190
1191 void MacroAssembler::Lsa(Register rd, Register rt, Register rs, uint8_t sa,
1192 Register scratch) {
1193 if (kArchVariant == kMips64r6 && sa <= 4) {
1194 lsa(rd, rt, rs, sa);
1195 } else {
1196 Register tmp = rd.is(rt) ? scratch : rd;
1197 DCHECK(!tmp.is(rt));
1198 sll(tmp, rs, sa);
1199 Addu(rd, rt, tmp);
1200 }
1201 }
1202
1203
1204 void MacroAssembler::Dlsa(Register rd, Register rt, Register rs, uint8_t sa,
1205 Register scratch) {
1206 if (kArchVariant == kMips64r6 && sa <= 4) {
1207 dlsa(rd, rt, rs, sa);
1208 } else {
1209 Register tmp = rd.is(rt) ? scratch : rd;
1210 DCHECK(!tmp.is(rt));
1211 dsll(tmp, rs, sa);
1212 Daddu(rd, rt, tmp);
1213 }
1214 }
1215
1216
1191 // ------------Pseudo-instructions------------- 1217 // ------------Pseudo-instructions-------------
1192 1218
1193 void MacroAssembler::Ulw(Register rd, const MemOperand& rs) { 1219 void MacroAssembler::Ulw(Register rd, const MemOperand& rs) {
1194 lwr(rd, rs); 1220 lwr(rd, rs);
1195 lwl(rd, MemOperand(rs.rm(), rs.offset() + 3)); 1221 lwl(rd, MemOperand(rs.rm(), rs.offset() + 3));
1196 } 1222 }
1197 1223
1198 1224
1199 void MacroAssembler::Usw(Register rd, const MemOperand& rs) { 1225 void MacroAssembler::Usw(Register rd, const MemOperand& rs) {
1200 swr(rd, rs); 1226 swr(rd, rs);
(...skipping 5166 matching lines...) Expand 10 before | Expand all | Expand 10 after
6367 if (mag.shift > 0) sra(result, result, mag.shift); 6393 if (mag.shift > 0) sra(result, result, mag.shift);
6368 srl(at, dividend, 31); 6394 srl(at, dividend, 31);
6369 Addu(result, result, Operand(at)); 6395 Addu(result, result, Operand(at));
6370 } 6396 }
6371 6397
6372 6398
6373 } // namespace internal 6399 } // namespace internal
6374 } // namespace v8 6400 } // namespace v8
6375 6401
6376 #endif // V8_TARGET_ARCH_MIPS64 6402 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/mips64/simulator-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698