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

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

Issue 321123002: Make presubmit script happy again. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 bool in_range = (ipc ^ static_cast<uint32_t>(target) >> 1178 bool in_range = (ipc ^ static_cast<uint32_t>(target) >>
1179 (kImm26Bits+kImmFieldShift)) == 0; 1179 (kImm26Bits+kImmFieldShift)) == 0;
1180 if (in_range) { 1180 if (in_range) {
1181 jal(target); 1181 jal(target);
1182 } else { 1182 } else {
1183 jalr(t9); 1183 jalr(t9);
1184 } 1184 }
1185 } 1185 }
1186 1186
1187 1187
1188 //-------Data-processing-instructions--------- 1188 // -------Data-processing-instructions---------
1189 1189
1190 // Arithmetic. 1190 // Arithmetic.
1191 1191
1192 void Assembler::addu(Register rd, Register rs, Register rt) { 1192 void Assembler::addu(Register rd, Register rs, Register rt) {
1193 GenInstrRegister(SPECIAL, rs, rt, rd, 0, ADDU); 1193 GenInstrRegister(SPECIAL, rs, rt, rd, 0, ADDU);
1194 } 1194 }
1195 1195
1196 1196
1197 void Assembler::addiu(Register rd, Register rs, int32_t j) { 1197 void Assembler::addiu(Register rd, Register rs, int32_t j) {
1198 GenInstrImmediate(ADDIU, rs, rd, j); 1198 GenInstrImmediate(ADDIU, rs, rd, j);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 void Assembler::rotrv(Register rd, Register rt, Register rs) { 1321 void Assembler::rotrv(Register rd, Register rt, Register rs) {
1322 // Should be called via MacroAssembler::Ror. 1322 // Should be called via MacroAssembler::Ror.
1323 ASSERT(rd.is_valid() && rt.is_valid() && rs.is_valid() ); 1323 ASSERT(rd.is_valid() && rt.is_valid() && rs.is_valid() );
1324 ASSERT(kArchVariant == kMips32r2); 1324 ASSERT(kArchVariant == kMips32r2);
1325 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) 1325 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift)
1326 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; 1326 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV;
1327 emit(instr); 1327 emit(instr);
1328 } 1328 }
1329 1329
1330 1330
1331 //------------Memory-instructions------------- 1331 // ------------Memory-instructions-------------
1332 1332
1333 // Helper for base-reg + offset, when offset is larger than int16. 1333 // Helper for base-reg + offset, when offset is larger than int16.
1334 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) { 1334 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) {
1335 ASSERT(!src.rm().is(at)); 1335 ASSERT(!src.rm().is(at));
1336 lui(at, (src.offset_ >> kLuiShift) & kImm16Mask); 1336 lui(at, (src.offset_ >> kLuiShift) & kImm16Mask);
1337 ori(at, at, src.offset_ & kImm16Mask); // Load 32-bit offset. 1337 ori(at, at, src.offset_ & kImm16Mask); // Load 32-bit offset.
1338 addu(at, at, src.rm()); // Add base register. 1338 addu(at, at, src.rm()); // Add base register.
1339 } 1339 }
1340 1340
1341 1341
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_); 1438 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_);
1439 } 1439 }
1440 1440
1441 1441
1442 void Assembler::lui(Register rd, int32_t j) { 1442 void Assembler::lui(Register rd, int32_t j) {
1443 ASSERT(is_uint16(j)); 1443 ASSERT(is_uint16(j));
1444 GenInstrImmediate(LUI, zero_reg, rd, j); 1444 GenInstrImmediate(LUI, zero_reg, rd, j);
1445 } 1445 }
1446 1446
1447 1447
1448 //-------------Misc-instructions-------------- 1448 // -------------Misc-instructions--------------
1449 1449
1450 // Break / Trap instructions. 1450 // Break / Trap instructions.
1451 void Assembler::break_(uint32_t code, bool break_as_stop) { 1451 void Assembler::break_(uint32_t code, bool break_as_stop) {
1452 ASSERT((code & ~0xfffff) == 0); 1452 ASSERT((code & ~0xfffff) == 0);
1453 // We need to invalidate breaks that could be stops as well because the 1453 // We need to invalidate breaks that could be stops as well because the
1454 // simulator expects a char pointer after the stop instruction. 1454 // simulator expects a char pointer after the stop instruction.
1455 // See constants-mips.h for explanation. 1455 // See constants-mips.h for explanation.
1456 ASSERT((break_as_stop && 1456 ASSERT((break_as_stop &&
1457 code <= kMaxStopCode && 1457 code <= kMaxStopCode &&
1458 code > kMaxWatchpointCode) || 1458 code > kMaxWatchpointCode) ||
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 1611
1612 void Assembler::pref(int32_t hint, const MemOperand& rs) { 1612 void Assembler::pref(int32_t hint, const MemOperand& rs) {
1613 ASSERT(kArchVariant != kLoongson); 1613 ASSERT(kArchVariant != kLoongson);
1614 ASSERT(is_uint5(hint) && is_uint16(rs.offset_)); 1614 ASSERT(is_uint5(hint) && is_uint16(rs.offset_));
1615 Instr instr = PREF | (rs.rm().code() << kRsShift) | (hint << kRtShift) 1615 Instr instr = PREF | (rs.rm().code() << kRsShift) | (hint << kRtShift)
1616 | (rs.offset_); 1616 | (rs.offset_);
1617 emit(instr); 1617 emit(instr);
1618 } 1618 }
1619 1619
1620 1620
1621 //--------Coprocessor-instructions---------------- 1621 // --------Coprocessor-instructions----------------
1622 1622
1623 // Load, store, move. 1623 // Load, store, move.
1624 void Assembler::lwc1(FPURegister fd, const MemOperand& src) { 1624 void Assembler::lwc1(FPURegister fd, const MemOperand& src) {
1625 GenInstrImmediate(LWC1, src.rm(), fd, src.offset_); 1625 GenInstrImmediate(LWC1, src.rm(), fd, src.offset_);
1626 } 1626 }
1627 1627
1628 1628
1629 void Assembler::ldc1(FPURegister fd, const MemOperand& src) { 1629 void Assembler::ldc1(FPURegister fd, const MemOperand& src) {
1630 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit 1630 // Workaround for non-8-byte alignment of HeapNumber, convert 64-bit
1631 // load to two 32-bit loads. 1631 // load to two 32-bit loads.
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2314 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2315 // No out-of-line constant pool support. 2315 // No out-of-line constant pool support.
2316 ASSERT(!FLAG_enable_ool_constant_pool); 2316 ASSERT(!FLAG_enable_ool_constant_pool);
2317 return; 2317 return;
2318 } 2318 }
2319 2319
2320 2320
2321 } } // namespace v8::internal 2321 } } // namespace v8::internal
2322 2322
2323 #endif // V8_TARGET_ARCH_MIPS 2323 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698