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

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

Issue 7050039: Revert 8122 (stub call asserts) while test failures are investigated. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 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/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-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 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 11 matching lines...) Expand all
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ 28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_
29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ 29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_
30 30
31 #include "assembler.h" 31 #include "assembler.h"
32 #include "frames.h"
33 #include "v8globals.h" 32 #include "v8globals.h"
34 33
35 namespace v8 { 34 namespace v8 {
36 namespace internal { 35 namespace internal {
37 36
38 // ---------------------------------------------------------------------------- 37 // ----------------------------------------------------------------------------
39 // Static helper functions 38 // Static helper functions
40 39
41 // Generate a MemOperand for loading a field from an object. 40 // Generate a MemOperand for loading a field from an object.
42 static inline MemOperand FieldMemOperand(Register object, int offset) { 41 static inline MemOperand FieldMemOperand(Register object, int offset) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // Compare double values and then load the fpscr flags to a register. 304 // Compare double values and then load the fpscr flags to a register.
306 void VFPCompareAndLoadFlags(const DwVfpRegister src1, 305 void VFPCompareAndLoadFlags(const DwVfpRegister src1,
307 const DwVfpRegister src2, 306 const DwVfpRegister src2,
308 const Register fpscr_flags, 307 const Register fpscr_flags,
309 const Condition cond = al); 308 const Condition cond = al);
310 void VFPCompareAndLoadFlags(const DwVfpRegister src1, 309 void VFPCompareAndLoadFlags(const DwVfpRegister src1,
311 const double src2, 310 const double src2,
312 const Register fpscr_flags, 311 const Register fpscr_flags,
313 const Condition cond = al); 312 const Condition cond = al);
314 313
314
315 // ---------------------------------------------------------------------------
316 // Activation frames
317
318 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); }
319 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); }
320
321 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); }
322 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); }
323
315 // Enter exit frame. 324 // Enter exit frame.
316 // stack_space - extra stack space, used for alignment before call to C. 325 // stack_space - extra stack space, used for alignment before call to C.
317 void EnterExitFrame(bool save_doubles, int stack_space = 0); 326 void EnterExitFrame(bool save_doubles, int stack_space = 0);
318 327
319 // Leave the current exit frame. Expects the return value in r0. 328 // Leave the current exit frame. Expects the return value in r0.
320 // Expect the number of values, pushed prior to the exit frame, to 329 // Expect the number of values, pushed prior to the exit frame, to
321 // remove in a register (or no_reg, if there is nothing to remove). 330 // remove in a register (or no_reg, if there is nothing to remove).
322 void LeaveExitFrame(bool save_doubles, Register argument_count); 331 void LeaveExitFrame(bool save_doubles, Register argument_count);
323 332
324 // Get the actual activation frame alignment for target environment. 333 // Get the actual activation frame alignment for target environment.
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 void Check(Condition cond, const char* msg); 864 void Check(Condition cond, const char* msg);
856 865
857 // Print a message to stdout and abort execution. 866 // Print a message to stdout and abort execution.
858 void Abort(const char* msg); 867 void Abort(const char* msg);
859 868
860 // Verify restrictions about code generated in stubs. 869 // Verify restrictions about code generated in stubs.
861 void set_generating_stub(bool value) { generating_stub_ = value; } 870 void set_generating_stub(bool value) { generating_stub_ = value; }
862 bool generating_stub() { return generating_stub_; } 871 bool generating_stub() { return generating_stub_; }
863 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } 872 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
864 bool allow_stub_calls() { return allow_stub_calls_; } 873 bool allow_stub_calls() { return allow_stub_calls_; }
865 void set_has_frame(bool value) { has_frame_ = value; }
866 bool has_frame() { return has_frame_; }
867 inline bool AllowThisStubCall(CodeStub* stub);
868 874
869 // EABI variant for double arguments in use. 875 // EABI variant for double arguments in use.
870 bool use_eabi_hardfloat() { 876 bool use_eabi_hardfloat() {
871 #if USE_EABI_HARDFLOAT 877 #if USE_EABI_HARDFLOAT
872 return true; 878 return true;
873 #else 879 #else
874 return false; 880 return false;
875 #endif 881 #endif
876 } 882 }
877 883
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 1010
1005 void ClampUint8(Register output_reg, Register input_reg); 1011 void ClampUint8(Register output_reg, Register input_reg);
1006 1012
1007 void ClampDoubleToUint8(Register result_reg, 1013 void ClampDoubleToUint8(Register result_reg,
1008 DoubleRegister input_reg, 1014 DoubleRegister input_reg,
1009 DoubleRegister temp_double_reg); 1015 DoubleRegister temp_double_reg);
1010 1016
1011 1017
1012 void LoadInstanceDescriptors(Register map, Register descriptors); 1018 void LoadInstanceDescriptors(Register map, Register descriptors);
1013 1019
1014 // Activation support.
1015 void EnterFrame(StackFrame::Type type);
1016 void LeaveFrame(StackFrame::Type type);
1017
1018 private: 1020 private:
1019 void CallCFunctionHelper(Register function, 1021 void CallCFunctionHelper(Register function,
1020 ExternalReference function_reference, 1022 ExternalReference function_reference,
1021 Register scratch, 1023 Register scratch,
1022 int num_reg_arguments, 1024 int num_reg_arguments,
1023 int num_double_arguments); 1025 int num_double_arguments);
1024 1026
1025 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); 1027 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
1026 int CallSize(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); 1028 int CallSize(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
1027 void Call(intptr_t target, 1029 void Call(intptr_t target,
1028 RelocInfo::Mode rmode, 1030 RelocInfo::Mode rmode,
1029 Condition cond = al); 1031 Condition cond = al);
1030 1032
1031 // Helper functions for generating invokes. 1033 // Helper functions for generating invokes.
1032 void InvokePrologue(const ParameterCount& expected, 1034 void InvokePrologue(const ParameterCount& expected,
1033 const ParameterCount& actual, 1035 const ParameterCount& actual,
1034 Handle<Code> code_constant, 1036 Handle<Code> code_constant,
1035 Register code_reg, 1037 Register code_reg,
1036 Label* done, 1038 Label* done,
1037 InvokeFlag flag, 1039 InvokeFlag flag,
1038 const CallWrapper& call_wrapper, 1040 const CallWrapper& call_wrapper,
1039 CallKind call_kind); 1041 CallKind call_kind);
1040 1042
1043 // Activation support.
1044 void EnterFrame(StackFrame::Type type);
1045 void LeaveFrame(StackFrame::Type type);
1046
1041 void InitializeNewString(Register string, 1047 void InitializeNewString(Register string,
1042 Register length, 1048 Register length,
1043 Heap::RootListIndex map_index, 1049 Heap::RootListIndex map_index,
1044 Register scratch1, 1050 Register scratch1,
1045 Register scratch2); 1051 Register scratch2);
1046 1052
1047 // Compute memory operands for safepoint stack slots. 1053 // Compute memory operands for safepoint stack slots.
1048 static int SafepointRegisterStackIndex(int reg_code); 1054 static int SafepointRegisterStackIndex(int reg_code);
1049 MemOperand SafepointRegisterSlot(Register reg); 1055 MemOperand SafepointRegisterSlot(Register reg);
1050 MemOperand SafepointRegistersAndDoublesSlot(Register reg); 1056 MemOperand SafepointRegistersAndDoublesSlot(Register reg);
1051 1057
1052 bool generating_stub_; 1058 bool generating_stub_;
1053 bool allow_stub_calls_; 1059 bool allow_stub_calls_;
1054 bool has_frame_;
1055 // This handle will be patched with the code object on installation. 1060 // This handle will be patched with the code object on installation.
1056 Handle<Object> code_object_; 1061 Handle<Object> code_object_;
1057 1062
1058 // Needs access to SafepointRegisterStackIndex for optimized frame 1063 // Needs access to SafepointRegisterStackIndex for optimized frame
1059 // traversal. 1064 // traversal.
1060 friend class OptimizedFrame; 1065 friend class OptimizedFrame;
1061 }; 1066 };
1062 1067
1063 1068
1064 #ifdef ENABLE_DEBUGGER_SUPPORT 1069 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1118 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1114 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1119 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1115 #else 1120 #else
1116 #define ACCESS_MASM(masm) masm-> 1121 #define ACCESS_MASM(masm) masm->
1117 #endif 1122 #endif
1118 1123
1119 1124
1120 } } // namespace v8::internal 1125 } } // namespace v8::internal
1121 1126
1122 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1127 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698