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

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

Issue 2357323003: [ic][ia32][x87] Don't push/pop value/slot/vector in store handlers. (Closed)
Patch Set: Created 4 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/ia32/code-stubs-ia32.cc ('k') | src/ic/arm/handler-compiler-arm.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 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 791
792 // --------------------------------------------------------------------------- 792 // ---------------------------------------------------------------------------
793 // Utilities 793 // Utilities
794 794
795 void Ret(); 795 void Ret();
796 796
797 // Return and drop arguments from stack, where the number of arguments 797 // Return and drop arguments from stack, where the number of arguments
798 // may be bigger than 2^16 - 1. Requires a scratch register. 798 // may be bigger than 2^16 - 1. Requires a scratch register.
799 void Ret(int bytes_dropped, Register scratch); 799 void Ret(int bytes_dropped, Register scratch);
800 800
801 // Emit code that loads |parameter_index|'th parameter from the stack to
802 // the register according to the CallInterfaceDescriptor definition.
803 // |sp_to_caller_sp_offset_in_words| specifies the number of words pushed
804 // below the caller's sp (on ia32 it's at least return address).
805 template <class Descriptor>
806 void LoadParameterFromStack(
807 Register reg, typename Descriptor::ParameterIndices parameter_index,
808 int sp_to_ra_offset_in_words = 1) {
809 DCHECK(Descriptor::kPassLastArgsOnStack);
810 DCHECK_LT(parameter_index, Descriptor::kParameterCount);
811 DCHECK_LE(Descriptor::kParameterCount - Descriptor::kStackArgumentsCount,
812 parameter_index);
813 int offset = (Descriptor::kParameterCount - parameter_index - 1 +
814 sp_to_ra_offset_in_words) *
815 kPointerSize;
816 mov(reg, Operand(esp, offset));
817 }
818
801 // Emit code to discard a non-negative number of pointer-sized elements 819 // Emit code to discard a non-negative number of pointer-sized elements
802 // from the stack, clobbering only the esp register. 820 // from the stack, clobbering only the esp register.
803 void Drop(int element_count); 821 void Drop(int element_count);
804 822
805 void Call(Label* target) { call(target); } 823 void Call(Label* target) { call(target); }
806 void Call(Handle<Code> target, RelocInfo::Mode rmode) { call(target, rmode); } 824 void Call(Handle<Code> target, RelocInfo::Mode rmode) { call(target, rmode); }
807 void Jump(Handle<Code> target, RelocInfo::Mode rmode) { jmp(target, rmode); } 825 void Jump(Handle<Code> target, RelocInfo::Mode rmode) { jmp(target, rmode); }
808 void Push(Register src) { push(src); } 826 void Push(Register src) { push(src); }
809 void Push(const Operand& src) { push(src); } 827 void Push(const Operand& src) { push(src); }
810 void Push(Immediate value) { push(value); } 828 void Push(Immediate value) { push(value); }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 inline Operand NativeContextOperand() { 1077 inline Operand NativeContextOperand() {
1060 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); 1078 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX);
1061 } 1079 }
1062 1080
1063 #define ACCESS_MASM(masm) masm-> 1081 #define ACCESS_MASM(masm) masm->
1064 1082
1065 } // namespace internal 1083 } // namespace internal
1066 } // namespace v8 1084 } // namespace v8
1067 1085
1068 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 1086 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698