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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 389283002: Use register parameters in ElementsTransitionGenerator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/codegen-x64.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_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 3036
3037 call(function); 3037 call(function);
3038 if (base::OS::ActivationFrameAlignment() != 0) { 3038 if (base::OS::ActivationFrameAlignment() != 0) {
3039 mov(esp, Operand(esp, num_arguments * kPointerSize)); 3039 mov(esp, Operand(esp, num_arguments * kPointerSize));
3040 } else { 3040 } else {
3041 add(esp, Immediate(num_arguments * kPointerSize)); 3041 add(esp, Immediate(num_arguments * kPointerSize));
3042 } 3042 }
3043 } 3043 }
3044 3044
3045 3045
3046 bool AreAliased(Register r1, Register r2, Register r3, Register r4) { 3046 #ifdef DEBUG
3047 if (r1.is(r2)) return true; 3047 bool AreAliased(Register reg1,
3048 if (r1.is(r3)) return true; 3048 Register reg2,
3049 if (r1.is(r4)) return true; 3049 Register reg3,
3050 if (r2.is(r3)) return true; 3050 Register reg4,
3051 if (r2.is(r4)) return true; 3051 Register reg5,
3052 if (r3.is(r4)) return true; 3052 Register reg6,
3053 return false; 3053 Register reg7,
3054 Register reg8) {
3055 int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() +
3056 reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid() +
3057 reg7.is_valid() + reg8.is_valid();
3058
3059 RegList regs = 0;
3060 if (reg1.is_valid()) regs |= reg1.bit();
3061 if (reg2.is_valid()) regs |= reg2.bit();
3062 if (reg3.is_valid()) regs |= reg3.bit();
3063 if (reg4.is_valid()) regs |= reg4.bit();
3064 if (reg5.is_valid()) regs |= reg5.bit();
3065 if (reg6.is_valid()) regs |= reg6.bit();
3066 if (reg7.is_valid()) regs |= reg7.bit();
3067 if (reg8.is_valid()) regs |= reg8.bit();
3068 int n_of_non_aliasing_regs = NumRegs(regs);
3069
3070 return n_of_valid_regs != n_of_non_aliasing_regs;
3054 } 3071 }
3072 #endif
3055 3073
3056 3074
3057 CodePatcher::CodePatcher(byte* address, int size) 3075 CodePatcher::CodePatcher(byte* address, int size)
3058 : address_(address), 3076 : address_(address),
3059 size_(size), 3077 size_(size),
3060 masm_(NULL, address, size + Assembler::kGap) { 3078 masm_(NULL, address, size + Assembler::kGap) {
3061 // Create a new macro assembler pointing to the address of the code to patch. 3079 // Create a new macro assembler pointing to the address of the code to patch.
3062 // The size is adjusted with kGap on order for the assembler to generate size 3080 // The size is adjusted with kGap on order for the assembler to generate size
3063 // bytes of instructions without failing with buffer size constraints. 3081 // bytes of instructions without failing with buffer size constraints.
3064 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 3082 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3409 if (ms.shift() > 0) sar(edx, ms.shift()); 3427 if (ms.shift() > 0) sar(edx, ms.shift());
3410 mov(eax, dividend); 3428 mov(eax, dividend);
3411 shr(eax, 31); 3429 shr(eax, 31);
3412 add(edx, eax); 3430 add(edx, eax);
3413 } 3431 }
3414 3432
3415 3433
3416 } } // namespace v8::internal 3434 } } // namespace v8::internal
3417 3435
3418 #endif // V8_TARGET_ARCH_IA32 3436 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698