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

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

Issue 7108061: ARM: Clean up literal pool generation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/arm/macro-assembler-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 int constant_offset = GetBacktrackConstantPoolEntry(); 892 int constant_offset = GetBacktrackConstantPoolEntry();
893 masm_->label_at_put(label, constant_offset); 893 masm_->label_at_put(label, constant_offset);
894 // Reading pc-relative is based on the address 8 bytes ahead of 894 // Reading pc-relative is based on the address 8 bytes ahead of
895 // the current opcode. 895 // the current opcode.
896 unsigned int offset_of_pc_register_read = 896 unsigned int offset_of_pc_register_read =
897 masm_->pc_offset() + Assembler::kPcLoadDelta; 897 masm_->pc_offset() + Assembler::kPcLoadDelta;
898 int pc_offset_of_constant = 898 int pc_offset_of_constant =
899 constant_offset - offset_of_pc_register_read; 899 constant_offset - offset_of_pc_register_read;
900 ASSERT(pc_offset_of_constant < 0); 900 ASSERT(pc_offset_of_constant < 0);
901 if (is_valid_memory_offset(pc_offset_of_constant)) { 901 if (is_valid_memory_offset(pc_offset_of_constant)) {
902 masm_->BlockConstPoolBefore(masm_->pc_offset() + Assembler::kInstrSize); 902 Assembler::BlockConstPoolScope block_const_pool(masm_);
903 __ ldr(r0, MemOperand(pc, pc_offset_of_constant)); 903 __ ldr(r0, MemOperand(pc, pc_offset_of_constant));
904 } else { 904 } else {
905 // Not a 12-bit offset, so it needs to be loaded from the constant 905 // Not a 12-bit offset, so it needs to be loaded from the constant
906 // pool. 906 // pool.
907 masm_->BlockConstPoolBefore( 907 Assembler::BlockConstPoolScope block_const_pool(masm_);
908 masm_->pc_offset() + 2 * Assembler::kInstrSize);
909 __ mov(r0, Operand(pc_offset_of_constant + Assembler::kInstrSize)); 908 __ mov(r0, Operand(pc_offset_of_constant + Assembler::kInstrSize));
910 __ ldr(r0, MemOperand(pc, r0)); 909 __ ldr(r0, MemOperand(pc, r0));
911 } 910 }
912 } 911 }
913 Push(r0); 912 Push(r0);
914 CheckStackLimit(); 913 CheckStackLimit();
915 } 914 }
916 915
917 916
918 void RegExpMacroAssemblerARM::PushCurrentPosition() { 917 void RegExpMacroAssemblerARM::PushCurrentPosition() {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 ExternalReference::address_of_regexp_stack_limit(masm_->isolate()); 1177 ExternalReference::address_of_regexp_stack_limit(masm_->isolate());
1179 __ mov(r0, Operand(stack_limit)); 1178 __ mov(r0, Operand(stack_limit));
1180 __ ldr(r0, MemOperand(r0)); 1179 __ ldr(r0, MemOperand(r0));
1181 __ cmp(backtrack_stackpointer(), Operand(r0)); 1180 __ cmp(backtrack_stackpointer(), Operand(r0));
1182 SafeCall(&stack_overflow_label_, ls); 1181 SafeCall(&stack_overflow_label_, ls);
1183 } 1182 }
1184 1183
1185 1184
1186 void RegExpMacroAssemblerARM::EmitBacktrackConstantPool() { 1185 void RegExpMacroAssemblerARM::EmitBacktrackConstantPool() {
1187 __ CheckConstPool(false, false); 1186 __ CheckConstPool(false, false);
1188 __ BlockConstPoolBefore( 1187 Assembler::BlockConstPoolScope block_const_pool(masm_);
1189 masm_->pc_offset() + kBacktrackConstantPoolSize * Assembler::kInstrSize);
1190 backtrack_constant_pool_offset_ = masm_->pc_offset(); 1188 backtrack_constant_pool_offset_ = masm_->pc_offset();
1191 for (int i = 0; i < kBacktrackConstantPoolSize; i++) { 1189 for (int i = 0; i < kBacktrackConstantPoolSize; i++) {
1192 __ emit(0); 1190 __ emit(0);
1193 } 1191 }
1194 1192
1195 backtrack_constant_pool_capacity_ = kBacktrackConstantPoolSize; 1193 backtrack_constant_pool_capacity_ = kBacktrackConstantPoolSize;
1196 } 1194 }
1197 1195
1198 1196
1199 int RegExpMacroAssemblerARM::GetBacktrackConstantPoolEntry() { 1197 int RegExpMacroAssemblerARM::GetBacktrackConstantPoolEntry() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1276 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1279 } 1277 }
1280 1278
1281 #undef __ 1279 #undef __
1282 1280
1283 #endif // V8_INTERPRETED_REGEXP 1281 #endif // V8_INTERPRETED_REGEXP
1284 1282
1285 }} // namespace v8::internal 1283 }} // namespace v8::internal
1286 1284
1287 #endif // V8_TARGET_ARCH_ARM 1285 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698