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

Side by Side Diff: src/mips/assembler-mips.cc

Issue 104353002: MIPS: Faster memcpy. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Rebased Created 7 years 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/mips/assembler-mips.h ('k') | src/mips/codegen-mips.cc » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 rmode_ = RelocInfo::NONE32; 253 rmode_ = RelocInfo::NONE32;
254 } 254 }
255 } 255 }
256 256
257 257
258 MemOperand::MemOperand(Register rm, int32_t offset) : Operand(rm) { 258 MemOperand::MemOperand(Register rm, int32_t offset) : Operand(rm) {
259 offset_ = offset; 259 offset_ = offset;
260 } 260 }
261 261
262 262
263 MemOperand::MemOperand(Register rm, int32_t unit, int32_t multiplier,
264 OffsetAddend offset_addend) : Operand(rm) {
265 offset_ = unit * multiplier + offset_addend;
266 }
267
268
263 // ----------------------------------------------------------------------------- 269 // -----------------------------------------------------------------------------
264 // Specific instructions, constants, and masks. 270 // Specific instructions, constants, and masks.
265 271
266 static const int kNegOffset = 0x00008000; 272 static const int kNegOffset = 0x00008000;
267 // addiu(sp, sp, 4) aka Pop() operation or part of Pop(r) 273 // addiu(sp, sp, 4) aka Pop() operation or part of Pop(r)
268 // operations as post-increment of sp. 274 // operations as post-increment of sp.
269 const Instr kPopInstruction = ADDIU | (kRegister_sp_Code << kRsShift) 275 const Instr kPopInstruction = ADDIU | (kRegister_sp_Code << kRsShift)
270 | (kRegister_sp_Code << kRtShift) | (kPointerSize & kImm16Mask); 276 | (kRegister_sp_Code << kRtShift) | (kPointerSize & kImm16Mask);
271 // addiu(sp, sp, -4) part of Push(r) operation as pre-decrement of sp. 277 // addiu(sp, sp, -4) part of Push(r) operation as pre-decrement of sp.
272 const Instr kPushInstruction = ADDIU | (kRegister_sp_Code << kRsShift) 278 const Instr kPushInstruction = ADDIU | (kRegister_sp_Code << kRsShift)
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 1622
1617 1623
1618 void Assembler::ext_(Register rt, Register rs, uint16_t pos, uint16_t size) { 1624 void Assembler::ext_(Register rt, Register rs, uint16_t pos, uint16_t size) {
1619 // Should be called via MacroAssembler::Ext. 1625 // Should be called via MacroAssembler::Ext.
1620 // Ext instr has 'rt' field as dest, and two uint5: msb, lsb. 1626 // Ext instr has 'rt' field as dest, and two uint5: msb, lsb.
1621 ASSERT(kArchVariant == kMips32r2); 1627 ASSERT(kArchVariant == kMips32r2);
1622 GenInstrRegister(SPECIAL3, rs, rt, size - 1, pos, EXT); 1628 GenInstrRegister(SPECIAL3, rs, rt, size - 1, pos, EXT);
1623 } 1629 }
1624 1630
1625 1631
1632 void Assembler::pref(int32_t hint, const MemOperand& rs) {
1633 ASSERT(kArchVariant != kLoongson);
1634 ASSERT(is_uint5(hint) && is_uint16(rs.offset_));
1635 Instr instr = PREF | (rs.rm().code() << kRsShift) | (hint << kRtShift)
1636 | (rs.offset_);
1637 emit(instr);
1638 }
1639
1640
1626 //--------Coprocessor-instructions---------------- 1641 //--------Coprocessor-instructions----------------
1627 1642
1628 // Load, store, move. 1643 // Load, store, move.
1629 void Assembler::lwc1(FPURegister fd, const MemOperand& src) { 1644 void Assembler::lwc1(FPURegister fd, const MemOperand& src) {
1630 GenInstrImmediate(LWC1, src.rm(), fd, src.offset_); 1645 GenInstrImmediate(LWC1, src.rm(), fd, src.offset_);
1631 } 1646 }
1632 1647
1633 1648
1634 void Assembler::ldc1(FPURegister fd, const MemOperand& src) { 1649 void Assembler::ldc1(FPURegister fd, const MemOperand& src) {
1635 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit 1650 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 } 2317 }
2303 2318
2304 if (patched) { 2319 if (patched) {
2305 CPU::FlushICache(pc+2, sizeof(Address)); 2320 CPU::FlushICache(pc+2, sizeof(Address));
2306 } 2321 }
2307 } 2322 }
2308 2323
2309 } } // namespace v8::internal 2324 } } // namespace v8::internal
2310 2325
2311 #endif // V8_TARGET_ARCH_MIPS 2326 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698