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

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

Issue 1637015: Add stack alignment check to ia32 and x64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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/ia32/macro-assembler-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 11722 matching lines...) Expand 10 before | Expand all | Expand 10 after
11733 int /* alignment_skew */) { 11733 int /* alignment_skew */) {
11734 // eax: result parameter for PerformGC, if any 11734 // eax: result parameter for PerformGC, if any
11735 // ebx: pointer to C function (C callee-saved) 11735 // ebx: pointer to C function (C callee-saved)
11736 // ebp: frame pointer (restored after C call) 11736 // ebp: frame pointer (restored after C call)
11737 // esp: stack pointer (restored after C call) 11737 // esp: stack pointer (restored after C call)
11738 // edi: number of arguments including receiver (C callee-saved) 11738 // edi: number of arguments including receiver (C callee-saved)
11739 // esi: pointer to the first argument (C callee-saved) 11739 // esi: pointer to the first argument (C callee-saved)
11740 11740
11741 // Result returned in eax, or eax+edx if result_size_ is 2. 11741 // Result returned in eax, or eax+edx if result_size_ is 2.
11742 11742
11743 // Check stack alignment.
11744 if (FLAG_debug_code) {
11745 __ CheckStackAlignment();
11746 }
11747
11743 if (do_gc) { 11748 if (do_gc) {
11749 // Pass failure code returned from last attempt as first argument to
11750 // PerformGC. No need to use PrepareCallCFunction/CallCFunction here as the
11751 // stack alignment is known to be correct. This function takes one argument
11752 // which is passed on the stack, and we know that the stack has been
11753 // prepared to pass at least one argument.
11744 __ mov(Operand(esp, 0 * kPointerSize), eax); // Result. 11754 __ mov(Operand(esp, 0 * kPointerSize), eax); // Result.
11745 __ call(FUNCTION_ADDR(Runtime::PerformGC), RelocInfo::RUNTIME_ENTRY); 11755 __ call(FUNCTION_ADDR(Runtime::PerformGC), RelocInfo::RUNTIME_ENTRY);
11746 } 11756 }
11747 11757
11748 ExternalReference scope_depth = 11758 ExternalReference scope_depth =
11749 ExternalReference::heap_always_allocate_scope_depth(); 11759 ExternalReference::heap_always_allocate_scope_depth();
11750 if (always_allocate_scope) { 11760 if (always_allocate_scope) {
11751 __ inc(Operand::StaticVariable(scope_depth)); 11761 __ inc(Operand::StaticVariable(scope_depth));
11752 } 11762 }
11753 11763
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
12876 12886
12877 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) 12887 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
12878 // tagged as a small integer. 12888 // tagged as a small integer.
12879 __ bind(&runtime); 12889 __ bind(&runtime);
12880 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 12890 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
12881 } 12891 }
12882 12892
12883 #undef __ 12893 #undef __
12884 12894
12885 } } // namespace v8::internal 12895 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698