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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 8773039: Clean up multi byte nop support on x64 to more closely match IA32. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years 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/x64/disasm-x64.cc ('k') | test/cctest/SConscript » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4194 Smi::FromInt(StackFrame::CONSTRUCT)); 4194 Smi::FromInt(StackFrame::CONSTRUCT));
4195 } 4195 }
4196 4196
4197 4197
4198 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 4198 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
4199 // Ensure that we have enough space after the previous lazy-bailout 4199 // Ensure that we have enough space after the previous lazy-bailout
4200 // instruction for patching the code here. 4200 // instruction for patching the code here.
4201 int current_pc = masm()->pc_offset(); 4201 int current_pc = masm()->pc_offset();
4202 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 4202 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
4203 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 4203 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
4204 while (padding_size > 0) { 4204 __ Nop(padding_size);
4205 int nop_size = padding_size > 9 ? 9 : padding_size;
4206 __ nop(nop_size);
4207 padding_size -= nop_size;
4208 }
4209 } 4205 }
4210 } 4206 }
4211 4207
4212 4208
4213 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { 4209 void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
4214 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); 4210 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size());
4215 last_lazy_deopt_pc_ = masm()->pc_offset(); 4211 last_lazy_deopt_pc_ = masm()->pc_offset();
4216 ASSERT(instr->HasEnvironment()); 4212 ASSERT(instr->HasEnvironment());
4217 LEnvironment* env = instr->environment(); 4213 LEnvironment* env = instr->environment();
4218 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 4214 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
4328 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 4324 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4329 ASSERT(osr_pc_offset_ == -1); 4325 ASSERT(osr_pc_offset_ == -1);
4330 osr_pc_offset_ = masm()->pc_offset(); 4326 osr_pc_offset_ = masm()->pc_offset();
4331 } 4327 }
4332 4328
4333 #undef __ 4329 #undef __
4334 4330
4335 } } // namespace v8::internal 4331 } } // namespace v8::internal
4336 4332
4337 #endif // V8_TARGET_ARCH_X64 4333 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/disasm-x64.cc ('k') | test/cctest/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698