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

Side by Side Diff: src/arm/assembler-arm.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 | « no previous file | src/arm64/assembler-arm64.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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after
3362 return fits_shifter(imm32, &dummy1, &dummy2, NULL); 3362 return fits_shifter(imm32, &dummy1, &dummy2, NULL);
3363 } 3363 }
3364 3364
3365 3365
3366 bool Assembler::ImmediateFitsAddrMode2Instruction(int32_t imm32) { 3366 bool Assembler::ImmediateFitsAddrMode2Instruction(int32_t imm32) {
3367 return is_uint12(abs(imm32)); 3367 return is_uint12(abs(imm32));
3368 } 3368 }
3369 3369
3370 3370
3371 // Debugging. 3371 // Debugging.
3372 void Assembler::RecordJSReturn() {
3373 positions_recorder()->WriteRecordedPositions();
3374 CheckBuffer();
3375 RecordRelocInfo(RelocInfo::JS_RETURN);
3376 }
3377
3378
3379 void Assembler::RecordDebugBreakSlot() {
3380 positions_recorder()->WriteRecordedPositions();
3381 CheckBuffer();
3382 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
3383 }
3384
3385
3386 void Assembler::RecordComment(const char* msg) {
3387 if (FLAG_code_comments) {
3388 CheckBuffer();
3389 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
3390 }
3391 }
3392
3393
3394 void Assembler::RecordDeoptReason(const int reason, const int raw_position) {
3395 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) {
3396 EnsureSpace ensure_space(this);
3397 RecordRelocInfo(RelocInfo::POSITION, raw_position);
3398 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason);
3399 }
3400 }
3401
3402
3403 void Assembler::RecordConstPool(int size) { 3372 void Assembler::RecordConstPool(int size) {
3404 // We only need this for debugger support, to correctly compute offsets in the 3373 // We only need this for debugger support, to correctly compute offsets in the
3405 // code. 3374 // code.
3406 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); 3375 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size));
3407 } 3376 }
3408 3377
3409 3378
3410 void Assembler::GrowBuffer() { 3379 void Assembler::GrowBuffer() {
3411 if (!own_buffer_) FATAL("external code buffer is too small"); 3380 if (!own_buffer_) FATAL("external code buffer is too small");
3412 3381
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
4038 assm->instr_at_put( 4007 assm->instr_at_put(
4039 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); 4008 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset));
4040 } 4009 }
4041 } 4010 }
4042 } 4011 }
4043 4012
4044 4013
4045 } } // namespace v8::internal 4014 } } // namespace v8::internal
4046 4015
4047 #endif // V8_TARGET_ARCH_ARM 4016 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698