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

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

Issue 7891042: Add asserts to ensure that we: (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « 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"
32 #include "v8globals.h" 33 #include "v8globals.h"
33 34
34 namespace v8 { 35 namespace v8 {
35 namespace internal { 36 namespace internal {
36 37
37 // ---------------------------------------------------------------------------- 38 // ----------------------------------------------------------------------------
38 // Static helper functions 39 // Static helper functions
39 40
40 // Generate a MemOperand for loading a field from an object. 41 // Generate a MemOperand for loading a field from an object.
41 static inline MemOperand FieldMemOperand(Register object, int offset) { 42 static inline MemOperand FieldMemOperand(Register object, int offset) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 const Condition cond = al); 312 const Condition cond = al);
312 void VFPCompareAndLoadFlags(const DwVfpRegister src1, 313 void VFPCompareAndLoadFlags(const DwVfpRegister src1,
313 const double src2, 314 const double src2,
314 const Register fpscr_flags, 315 const Register fpscr_flags,
315 const Condition cond = al); 316 const Condition cond = al);
316 317
317 void Vmov(const DwVfpRegister dst, 318 void Vmov(const DwVfpRegister dst,
318 const double imm, 319 const double imm,
319 const Condition cond = al); 320 const Condition cond = al);
320 321
321
322 // ---------------------------------------------------------------------------
323 // Activation frames
324
325 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); }
326 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); }
327
328 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); }
329 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); }
330
331 // Enter exit frame. 322 // Enter exit frame.
332 // stack_space - extra stack space, used for alignment before call to C. 323 // stack_space - extra stack space, used for alignment before call to C.
333 void EnterExitFrame(bool save_doubles, int stack_space = 0); 324 void EnterExitFrame(bool save_doubles, int stack_space = 0);
334 325
335 // Leave the current exit frame. Expects the return value in r0. 326 // Leave the current exit frame. Expects the return value in r0.
336 // Expect the number of values, pushed prior to the exit frame, to 327 // Expect the number of values, pushed prior to the exit frame, to
337 // remove in a register (or no_reg, if there is nothing to remove). 328 // remove in a register (or no_reg, if there is nothing to remove).
338 void LeaveExitFrame(bool save_doubles, Register argument_count); 329 void LeaveExitFrame(bool save_doubles, Register argument_count);
339 330
340 // Get the actual activation frame alignment for target environment. 331 // Get the actual activation frame alignment for target environment.
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 void Check(Condition cond, const char* msg); 886 void Check(Condition cond, const char* msg);
896 887
897 // Print a message to stdout and abort execution. 888 // Print a message to stdout and abort execution.
898 void Abort(const char* msg); 889 void Abort(const char* msg);
899 890
900 // Verify restrictions about code generated in stubs. 891 // Verify restrictions about code generated in stubs.
901 void set_generating_stub(bool value) { generating_stub_ = value; } 892 void set_generating_stub(bool value) { generating_stub_ = value; }
902 bool generating_stub() { return generating_stub_; } 893 bool generating_stub() { return generating_stub_; }
903 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } 894 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
904 bool allow_stub_calls() { return allow_stub_calls_; } 895 bool allow_stub_calls() { return allow_stub_calls_; }
896 void set_has_frame(bool value) { has_frame_ = value; }
897 bool has_frame() { return has_frame_; }
898 inline bool AllowThisStubCall(CodeStub* stub);
905 899
906 // EABI variant for double arguments in use. 900 // EABI variant for double arguments in use.
907 bool use_eabi_hardfloat() { 901 bool use_eabi_hardfloat() {
908 #if USE_EABI_HARDFLOAT 902 #if USE_EABI_HARDFLOAT
909 return true; 903 return true;
910 #else 904 #else
911 return false; 905 return false;
912 #endif 906 #endif
913 } 907 }
914 908
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 1035
1042 void ClampUint8(Register output_reg, Register input_reg); 1036 void ClampUint8(Register output_reg, Register input_reg);
1043 1037
1044 void ClampDoubleToUint8(Register result_reg, 1038 void ClampDoubleToUint8(Register result_reg,
1045 DoubleRegister input_reg, 1039 DoubleRegister input_reg,
1046 DoubleRegister temp_double_reg); 1040 DoubleRegister temp_double_reg);
1047 1041
1048 1042
1049 void LoadInstanceDescriptors(Register map, Register descriptors); 1043 void LoadInstanceDescriptors(Register map, Register descriptors);
1050 1044
1045 // Activation support.
1046 void EnterFrame(StackFrame::Type type);
1047 void LeaveFrame(StackFrame::Type type);
1048
1051 private: 1049 private:
1052 void CallCFunctionHelper(Register function, 1050 void CallCFunctionHelper(Register function,
1053 ExternalReference function_reference, 1051 ExternalReference function_reference,
1054 Register scratch, 1052 Register scratch,
1055 int num_reg_arguments, 1053 int num_reg_arguments,
1056 int num_double_arguments); 1054 int num_double_arguments);
1057 1055
1058 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); 1056 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
1059 1057
1060 // Helper functions for generating invokes. 1058 // Helper functions for generating invokes.
1061 void InvokePrologue(const ParameterCount& expected, 1059 void InvokePrologue(const ParameterCount& expected,
1062 const ParameterCount& actual, 1060 const ParameterCount& actual,
1063 Handle<Code> code_constant, 1061 Handle<Code> code_constant,
1064 Register code_reg, 1062 Register code_reg,
1065 Label* done, 1063 Label* done,
1066 InvokeFlag flag, 1064 InvokeFlag flag,
1067 const CallWrapper& call_wrapper, 1065 const CallWrapper& call_wrapper,
1068 CallKind call_kind); 1066 CallKind call_kind);
1069 1067
1070 // Activation support.
1071 void EnterFrame(StackFrame::Type type);
1072 void LeaveFrame(StackFrame::Type type);
1073
1074 void InitializeNewString(Register string, 1068 void InitializeNewString(Register string,
1075 Register length, 1069 Register length,
1076 Heap::RootListIndex map_index, 1070 Heap::RootListIndex map_index,
1077 Register scratch1, 1071 Register scratch1,
1078 Register scratch2); 1072 Register scratch2);
1079 1073
1080 // Compute memory operands for safepoint stack slots. 1074 // Compute memory operands for safepoint stack slots.
1081 static int SafepointRegisterStackIndex(int reg_code); 1075 static int SafepointRegisterStackIndex(int reg_code);
1082 MemOperand SafepointRegisterSlot(Register reg); 1076 MemOperand SafepointRegisterSlot(Register reg);
1083 MemOperand SafepointRegistersAndDoublesSlot(Register reg); 1077 MemOperand SafepointRegistersAndDoublesSlot(Register reg);
1084 1078
1085 bool generating_stub_; 1079 bool generating_stub_;
1086 bool allow_stub_calls_; 1080 bool allow_stub_calls_;
1081 bool has_frame_;
1087 // This handle will be patched with the code object on installation. 1082 // This handle will be patched with the code object on installation.
1088 Handle<Object> code_object_; 1083 Handle<Object> code_object_;
1089 1084
1090 // Needs access to SafepointRegisterStackIndex for optimized frame 1085 // Needs access to SafepointRegisterStackIndex for optimized frame
1091 // traversal. 1086 // traversal.
1092 friend class OptimizedFrame; 1087 friend class OptimizedFrame;
1093 }; 1088 };
1094 1089
1095 1090
1096 #ifdef ENABLE_DEBUGGER_SUPPORT 1091 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1140 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1146 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1141 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1147 #else 1142 #else
1148 #define ACCESS_MASM(masm) masm-> 1143 #define ACCESS_MASM(masm) masm->
1149 #endif 1144 #endif
1150 1145
1151 1146
1152 } } // namespace v8::internal 1147 } } // namespace v8::internal
1153 1148
1154 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1149 #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