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

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

Issue 922153002: Move identical code from platform specific assemblers to assembler.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/ia32/assembler-ia32.cc ('k') | src/mips64/assembler-mips64.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 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 2325
2326 2326
2327 void Assembler::bc1t(int16_t offset, uint16_t cc) { 2327 void Assembler::bc1t(int16_t offset, uint16_t cc) {
2328 DCHECK(is_uint3(cc)); 2328 DCHECK(is_uint3(cc));
2329 Instr instr = COP1 | BC1 | cc << 18 | 1 << 16 | (offset & kImm16Mask); 2329 Instr instr = COP1 | BC1 | cc << 18 | 1 << 16 | (offset & kImm16Mask);
2330 emit(instr); 2330 emit(instr);
2331 } 2331 }
2332 2332
2333 2333
2334 // Debugging. 2334 // Debugging.
2335 void Assembler::RecordJSReturn() {
2336 positions_recorder()->WriteRecordedPositions();
2337 CheckBuffer();
2338 RecordRelocInfo(RelocInfo::JS_RETURN);
2339 }
2340
2341
2342 void Assembler::RecordDebugBreakSlot() {
2343 positions_recorder()->WriteRecordedPositions();
2344 CheckBuffer();
2345 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
2346 }
2347
2348
2349 void Assembler::RecordComment(const char* msg) {
2350 if (FLAG_code_comments) {
2351 CheckBuffer();
2352 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
2353 }
2354 }
2355
2356
2357 void Assembler::RecordDeoptReason(const int reason, const int raw_position) {
2358 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) {
2359 EnsureSpace ensure_space(this);
2360 RecordRelocInfo(RelocInfo::POSITION, raw_position);
2361 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason);
2362 }
2363 }
2364
2365
2366 int Assembler::RelocateInternalReference(byte* pc, intptr_t pc_delta) { 2335 int Assembler::RelocateInternalReference(byte* pc, intptr_t pc_delta) {
2367 Instr instr = instr_at(pc); 2336 Instr instr = instr_at(pc);
2368 if (IsLui(instr)) { 2337 if (IsLui(instr)) {
2369 Instr instr_lui = instr_at(pc + 0 * Assembler::kInstrSize); 2338 Instr instr_lui = instr_at(pc + 0 * Assembler::kInstrSize);
2370 Instr instr_ori = instr_at(pc + 1 * Assembler::kInstrSize); 2339 Instr instr_ori = instr_at(pc + 1 * Assembler::kInstrSize);
2371 DCHECK(IsOri(instr_ori)); 2340 DCHECK(IsOri(instr_ori));
2372 int32_t imm = (instr_lui & static_cast<int32_t>(kImm16Mask)) << kLuiShift; 2341 int32_t imm = (instr_lui & static_cast<int32_t>(kImm16Mask)) << kLuiShift;
2373 imm |= (instr_ori & static_cast<int32_t>(kImm16Mask)); 2342 imm |= (instr_ori & static_cast<int32_t>(kImm16Mask));
2374 if (imm == kEndOfJumpChain) { 2343 if (imm == kEndOfJumpChain) {
2375 return 0; // Number of instructions patched. 2344 return 0; // Number of instructions patched.
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2761 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2793 // No out-of-line constant pool support. 2762 // No out-of-line constant pool support.
2794 DCHECK(!FLAG_enable_ool_constant_pool); 2763 DCHECK(!FLAG_enable_ool_constant_pool);
2795 return; 2764 return;
2796 } 2765 }
2797 2766
2798 2767
2799 } } // namespace v8::internal 2768 } } // namespace v8::internal
2800 2769
2801 #endif // V8_TARGET_ARCH_MIPS 2770 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698