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

Side by Side Diff: src/codegen-ia32.cc

Issue 4211: Allow platforms (linux and win32) to not force 16-byte alignment... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/platform.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 5191 matching lines...) Expand 10 before | Expand all | Expand 10 after
5202 5202
5203 #undef __ 5203 #undef __
5204 #define __ masm-> 5204 #define __ masm->
5205 5205
5206 5206
5207 void CEntryStub::GenerateReserveCParameterSpace(MacroAssembler* masm, 5207 void CEntryStub::GenerateReserveCParameterSpace(MacroAssembler* masm,
5208 int num_parameters) { 5208 int num_parameters) {
5209 if (num_parameters > 0) { 5209 if (num_parameters > 0) {
5210 __ sub(Operand(esp), Immediate(num_parameters * kPointerSize)); 5210 __ sub(Operand(esp), Immediate(num_parameters * kPointerSize));
5211 } 5211 }
5212 // OS X activation frames are 16 byte-aligned 5212 static const int kFrameAlignment = OS::ActivationFrameAlignment();
5213 // (see "Mac OS X ABI Function Call Guide"). 5213 if (kFrameAlignment > 0) {
5214 const int kFrameAlignment = 16; 5214 ASSERT(IsPowerOf2(kFrameAlignment));
5215 ASSERT(IsPowerOf2(kFrameAlignment)); 5215 __ and_(esp, -kFrameAlignment);
5216 __ and_(esp, -kFrameAlignment); 5216 }
5217 } 5217 }
5218 5218
5219 5219
5220 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 5220 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
5221 ASSERT(StackHandlerConstants::kSize == 6 * kPointerSize); // adjust this code 5221 ASSERT(StackHandlerConstants::kSize == 6 * kPointerSize); // adjust this code
5222 ExternalReference handler_address(Top::k_handler_address); 5222 ExternalReference handler_address(Top::k_handler_address);
5223 __ mov(edx, Operand::StaticVariable(handler_address)); 5223 __ mov(edx, Operand::StaticVariable(handler_address));
5224 __ mov(ecx, Operand(edx, -1 * kPointerSize)); // get next in chain 5224 __ mov(ecx, Operand(edx, -1 * kPointerSize)); // get next in chain
5225 __ mov(Operand::StaticVariable(handler_address), ecx); 5225 __ mov(Operand::StaticVariable(handler_address), ecx);
5226 __ mov(esp, Operand(edx)); 5226 __ mov(esp, Operand(edx));
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
5545 bool is_eval) { 5545 bool is_eval) {
5546 Handle<Code> code = Ia32CodeGenerator::MakeCode(fun, script, is_eval); 5546 Handle<Code> code = Ia32CodeGenerator::MakeCode(fun, script, is_eval);
5547 if (!code.is_null()) { 5547 if (!code.is_null()) {
5548 Counters::total_compiled_code_size.Increment(code->instruction_size()); 5548 Counters::total_compiled_code_size.Increment(code->instruction_size());
5549 } 5549 }
5550 return code; 5550 return code;
5551 } 5551 }
5552 5552
5553 5553
5554 } } // namespace v8::internal 5554 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698