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

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

Issue 1238973009: Revert of Version 4.4.63.20 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.4
Patch Set: Created 5 years, 5 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/arm/assembler-arm.h ('k') | src/arm/assembler-arm-inl.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 (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 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 1291
1292 // Post-indexed addressing requires W == 1; different than in addrmod2/3. 1292 // Post-indexed addressing requires W == 1; different than in addrmod2/3.
1293 if ((am & P) == 0) 1293 if ((am & P) == 0)
1294 am |= W; 1294 am |= W;
1295 1295
1296 DCHECK(offset_8 >= 0); // no masking needed 1296 DCHECK(offset_8 >= 0); // no masking needed
1297 emit(instr | am | x.rn_.code()*B16 | crd.code()*B12 | offset_8); 1297 emit(instr | am | x.rn_.code()*B16 | crd.code()*B12 | offset_8);
1298 } 1298 }
1299 1299
1300 1300
1301 int Assembler::branch_offset(Label* L) { 1301 int Assembler::branch_offset(Label* L, bool jump_elimination_allowed) {
1302 int target_pos; 1302 int target_pos;
1303 if (L->is_bound()) { 1303 if (L->is_bound()) {
1304 target_pos = L->pos(); 1304 target_pos = L->pos();
1305 } else { 1305 } else {
1306 if (L->is_linked()) { 1306 if (L->is_linked()) {
1307 // Point to previous instruction that uses the link. 1307 // Point to previous instruction that uses the link.
1308 target_pos = L->pos(); 1308 target_pos = L->pos();
1309 } else { 1309 } else {
1310 // First entry of the link chain points to itself. 1310 // First entry of the link chain points to itself.
1311 target_pos = pc_offset(); 1311 target_pos = pc_offset();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 } 1360 }
1361 1361
1362 1362
1363 void Assembler::bx(Register target, Condition cond) { // v5 and above, plus v4t 1363 void Assembler::bx(Register target, Condition cond) { // v5 and above, plus v4t
1364 positions_recorder()->WriteRecordedPositions(); 1364 positions_recorder()->WriteRecordedPositions();
1365 DCHECK(!target.is(pc)); // use of pc is actually allowed, but discouraged 1365 DCHECK(!target.is(pc)); // use of pc is actually allowed, but discouraged
1366 emit(cond | B24 | B21 | 15*B16 | 15*B12 | 15*B8 | BX | target.code()); 1366 emit(cond | B24 | B21 | 15*B16 | 15*B12 | 15*B8 | BX | target.code());
1367 } 1367 }
1368 1368
1369 1369
1370 void Assembler::b(Label* L, Condition cond) {
1371 CheckBuffer();
1372 b(branch_offset(L), cond);
1373 }
1374
1375
1376 void Assembler::bl(Label* L, Condition cond) {
1377 CheckBuffer();
1378 bl(branch_offset(L), cond);
1379 }
1380
1381
1382 void Assembler::blx(Label* L) {
1383 CheckBuffer();
1384 blx(branch_offset(L));
1385 }
1386
1387
1388 // Data-processing instructions. 1370 // Data-processing instructions.
1389 1371
1390 void Assembler::and_(Register dst, Register src1, const Operand& src2, 1372 void Assembler::and_(Register dst, Register src1, const Operand& src2,
1391 SBit s, Condition cond) { 1373 SBit s, Condition cond) {
1392 addrmod1(cond | AND | s, src1, dst, src2); 1374 addrmod1(cond | AND | s, src1, dst, src2);
1393 } 1375 }
1394 1376
1395 1377
1396 void Assembler::eor(Register dst, Register src1, const Operand& src2, 1378 void Assembler::eor(Register dst, Register src1, const Operand& src2,
1397 SBit s, Condition cond) { 1379 SBit s, Condition cond) {
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
3782 int needed_space = size + kGap; 3764 int needed_space = size + kGap;
3783 while (buffer_space() <= needed_space) GrowBuffer(); 3765 while (buffer_space() <= needed_space) GrowBuffer();
3784 3766
3785 { 3767 {
3786 // Block recursive calls to CheckConstPool. 3768 // Block recursive calls to CheckConstPool.
3787 BlockConstPoolScope block_const_pool(this); 3769 BlockConstPoolScope block_const_pool(this);
3788 RecordComment("[ Constant Pool"); 3770 RecordComment("[ Constant Pool");
3789 RecordConstPool(size); 3771 RecordConstPool(size);
3790 3772
3791 // Emit jump over constant pool if necessary. 3773 // Emit jump over constant pool if necessary.
3792 if (require_jump) b(size - kPcLoadDelta); 3774 Label after_pool;
3775 if (require_jump) {
3776 b(&after_pool);
3777 }
3793 3778
3794 // Put down constant pool marker "Undefined instruction". 3779 // Put down constant pool marker "Undefined instruction".
3795 // The data size helps disassembly know what to print. 3780 // The data size helps disassembly know what to print.
3796 emit(kConstantPoolMarker | 3781 emit(kConstantPoolMarker |
3797 EncodeConstantPoolLength(size_after_marker / kPointerSize)); 3782 EncodeConstantPoolLength(size_after_marker / kPointerSize));
3798 3783
3799 if (require_64_bit_align) { 3784 if (require_64_bit_align) {
3800 emit(kConstantPoolMarker); 3785 emit(kConstantPoolMarker);
3801 } 3786 }
3802 3787
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
3889 DCHECK(IsMovW(instr)); 3874 DCHECK(IsMovW(instr));
3890 } 3875 }
3891 } 3876 }
3892 3877
3893 num_pending_32_bit_reloc_info_ = 0; 3878 num_pending_32_bit_reloc_info_ = 0;
3894 num_pending_64_bit_reloc_info_ = 0; 3879 num_pending_64_bit_reloc_info_ = 0;
3895 first_const_pool_32_use_ = -1; 3880 first_const_pool_32_use_ = -1;
3896 first_const_pool_64_use_ = -1; 3881 first_const_pool_64_use_ = -1;
3897 3882
3898 RecordComment("]"); 3883 RecordComment("]");
3884
3885 if (after_pool.is_linked()) {
3886 bind(&after_pool);
3887 }
3899 } 3888 }
3900 3889
3901 // Since a constant pool was just emitted, move the check offset forward by 3890 // Since a constant pool was just emitted, move the check offset forward by
3902 // the standard interval. 3891 // the standard interval.
3903 next_buffer_check_ = pc_offset() + kCheckPoolInterval; 3892 next_buffer_check_ = pc_offset() + kCheckPoolInterval;
3904 } 3893 }
3905 3894
3906 3895
3907 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) { 3896 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) {
3908 if (!FLAG_enable_ool_constant_pool) { 3897 if (!FLAG_enable_ool_constant_pool) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
4123 assm->instr_at_put( 4112 assm->instr_at_put(
4124 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); 4113 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset));
4125 } 4114 }
4126 } 4115 }
4127 } 4116 }
4128 4117
4129 4118
4130 } } // namespace v8::internal 4119 } } // namespace v8::internal
4131 4120
4132 #endif // V8_TARGET_ARCH_ARM 4121 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/assembler-arm-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698