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

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 532133002: X87: First step to cleanup the power-of-2 mess (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 3 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/x87/assembler-x87.cc ('k') | src/x87/lithium-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 11 #include "src/code-stubs.h"
11 #include "src/codegen.h" 12 #include "src/codegen.h"
12 #include "src/ic/handler-compiler.h" 13 #include "src/ic/handler-compiler.h"
13 #include "src/isolate.h" 14 #include "src/isolate.h"
14 #include "src/jsregexp.h" 15 #include "src/jsregexp.h"
15 #include "src/regexp-macro-assembler.h" 16 #include "src/regexp-macro-assembler.h"
16 #include "src/runtime.h" 17 #include "src/runtime.h"
17 18
18 namespace v8 { 19 namespace v8 {
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 } 2502 }
2502 2503
2503 2504
2504 // ------------------------------------------------------------------------- 2505 // -------------------------------------------------------------------------
2505 // StringCharFromCodeGenerator 2506 // StringCharFromCodeGenerator
2506 2507
2507 void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) { 2508 void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) {
2508 // Fast case of Heap::LookupSingleCharacterStringFromCode. 2509 // Fast case of Heap::LookupSingleCharacterStringFromCode.
2509 STATIC_ASSERT(kSmiTag == 0); 2510 STATIC_ASSERT(kSmiTag == 0);
2510 STATIC_ASSERT(kSmiShiftSize == 0); 2511 STATIC_ASSERT(kSmiShiftSize == 0);
2511 DCHECK(IsPowerOf2(String::kMaxOneByteCharCode + 1)); 2512 DCHECK(base::bits::IsPowerOfTwo32(String::kMaxOneByteCharCode + 1));
2512 __ test(code_, 2513 __ test(code_,
2513 Immediate(kSmiTagMask | 2514 Immediate(kSmiTagMask |
2514 ((~String::kMaxOneByteCharCode) << kSmiTagSize))); 2515 ((~String::kMaxOneByteCharCode) << kSmiTagSize)));
2515 __ j(not_zero, &slow_case_); 2516 __ j(not_zero, &slow_case_);
2516 2517
2517 Factory* factory = masm->isolate()->factory(); 2518 Factory* factory = masm->isolate()->factory();
2518 __ Move(result_, Immediate(factory->single_character_string_cache())); 2519 __ Move(result_, Immediate(factory->single_character_string_cache()));
2519 STATIC_ASSERT(kSmiTag == 0); 2520 STATIC_ASSERT(kSmiTag == 0);
2520 STATIC_ASSERT(kSmiTagSize == 1); 2521 STATIC_ASSERT(kSmiTagSize == 1);
2521 STATIC_ASSERT(kSmiShiftSize == 0); 2522 STATIC_ASSERT(kSmiShiftSize == 0);
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
4421 Operand(ebp, 7 * kPointerSize), 4422 Operand(ebp, 7 * kPointerSize),
4422 NULL); 4423 NULL);
4423 } 4424 }
4424 4425
4425 4426
4426 #undef __ 4427 #undef __
4427 4428
4428 } } // namespace v8::internal 4429 } } // namespace v8::internal
4429 4430
4430 #endif // V8_TARGET_ARCH_X87 4431 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/assembler-x87.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698