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

Side by Side Diff: src/mips/macro-assembler-mips.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/mips/ic-mips.cc ('k') | src/mips/macro-assembler-mips.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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 // Performs a truncating conversion of a floating point number as used by 572 // Performs a truncating conversion of a floating point number as used by
573 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. 573 // the JS bitwise operations. See ECMA-262 9.5: ToInt32.
574 // Exits with 'result' holding the answer and all other registers clobbered. 574 // Exits with 'result' holding the answer and all other registers clobbered.
575 void EmitECMATruncate(Register result, 575 void EmitECMATruncate(Register result,
576 FPURegister double_input, 576 FPURegister double_input,
577 FPURegister single_scratch, 577 FPURegister single_scratch,
578 Register scratch, 578 Register scratch,
579 Register scratch2, 579 Register scratch2,
580 Register scratch3); 580 Register scratch3);
581 581
582 // -------------------------------------------------------------------------
583 // Activation frames.
584
585 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); }
586 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); }
587
588 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); }
589 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); }
590
591 // Enter exit frame. 582 // Enter exit frame.
592 // argc - argument count to be dropped by LeaveExitFrame. 583 // argc - argument count to be dropped by LeaveExitFrame.
593 // save_doubles - saves FPU registers on stack, currently disabled. 584 // save_doubles - saves FPU registers on stack, currently disabled.
594 // stack_space - extra stack space. 585 // stack_space - extra stack space.
595 void EnterExitFrame(bool save_doubles, 586 void EnterExitFrame(bool save_doubles,
596 int stack_space = 0); 587 int stack_space = 0);
597 588
598 // Leave the current exit frame. 589 // Leave the current exit frame.
599 void LeaveExitFrame(bool save_doubles, Register arg_count); 590 void LeaveExitFrame(bool save_doubles, Register arg_count);
600 591
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 void Check(Condition cc, const char* msg, Register rs, Operand rt); 960 void Check(Condition cc, const char* msg, Register rs, Operand rt);
970 961
971 // Print a message to stdout and abort execution. 962 // Print a message to stdout and abort execution.
972 void Abort(const char* msg); 963 void Abort(const char* msg);
973 964
974 // Verify restrictions about code generated in stubs. 965 // Verify restrictions about code generated in stubs.
975 void set_generating_stub(bool value) { generating_stub_ = value; } 966 void set_generating_stub(bool value) { generating_stub_ = value; }
976 bool generating_stub() { return generating_stub_; } 967 bool generating_stub() { return generating_stub_; }
977 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } 968 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
978 bool allow_stub_calls() { return allow_stub_calls_; } 969 bool allow_stub_calls() { return allow_stub_calls_; }
970 void set_has_frame(bool value) { has_frame_ = value; }
971 bool has_frame() { return has_frame_; }
972 inline bool AllowThisStubCall(CodeStub* stub);
979 973
980 // --------------------------------------------------------------------------- 974 // ---------------------------------------------------------------------------
981 // Number utilities. 975 // Number utilities.
982 976
983 // Check whether the value of reg is a power of two and not zero. If not 977 // Check whether the value of reg is a power of two and not zero. If not
984 // control continues at the label not_power_of_two. If reg is a power of two 978 // control continues at the label not_power_of_two. If reg is a power of two
985 // the register scratch contains the value of (reg - 1) when control falls 979 // the register scratch contains the value of (reg - 1) when control falls
986 // through. 980 // through.
987 void JumpIfNotPowerOfTwoOrZero(Register reg, 981 void JumpIfNotPowerOfTwoOrZero(Register reg,
988 Register scratch, 982 Register scratch,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 // Test that both first and second are sequential ASCII strings. 1079 // Test that both first and second are sequential ASCII strings.
1086 // Check that they are non-smis. 1080 // Check that they are non-smis.
1087 void JumpIfNotBothSequentialAsciiStrings(Register first, 1081 void JumpIfNotBothSequentialAsciiStrings(Register first,
1088 Register second, 1082 Register second,
1089 Register scratch1, 1083 Register scratch1,
1090 Register scratch2, 1084 Register scratch2,
1091 Label* failure); 1085 Label* failure);
1092 1086
1093 void LoadInstanceDescriptors(Register map, Register descriptors); 1087 void LoadInstanceDescriptors(Register map, Register descriptors);
1094 1088
1089 // Activation support.
1090 void EnterFrame(StackFrame::Type type);
1091 void LeaveFrame(StackFrame::Type type);
1092
1095 private: 1093 private:
1096 void CallCFunctionHelper(Register function, 1094 void CallCFunctionHelper(Register function,
1097 ExternalReference function_reference, 1095 ExternalReference function_reference,
1098 Register scratch, 1096 Register scratch,
1099 int num_arguments); 1097 int num_arguments);
1100 1098
1101 void BranchShort(int16_t offset, BranchDelaySlot bdslot = PROTECT); 1099 void BranchShort(int16_t offset, BranchDelaySlot bdslot = PROTECT);
1102 void BranchShort(int16_t offset, Condition cond, Register rs, 1100 void BranchShort(int16_t offset, Condition cond, Register rs,
1103 const Operand& rt, 1101 const Operand& rt,
1104 BranchDelaySlot bdslot = PROTECT); 1102 BranchDelaySlot bdslot = PROTECT);
(...skipping 20 matching lines...) Expand all
1125 Register code_reg, 1123 Register code_reg,
1126 Label* done, 1124 Label* done,
1127 InvokeFlag flag, 1125 InvokeFlag flag,
1128 const CallWrapper& call_wrapper, 1126 const CallWrapper& call_wrapper,
1129 CallKind call_kind); 1127 CallKind call_kind);
1130 1128
1131 // Get the code for the given builtin. Returns if able to resolve 1129 // Get the code for the given builtin. Returns if able to resolve
1132 // the function in the 'resolved' flag. 1130 // the function in the 'resolved' flag.
1133 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); 1131 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved);
1134 1132
1135 // Activation support.
1136 void EnterFrame(StackFrame::Type type);
1137 void LeaveFrame(StackFrame::Type type);
1138
1139 void InitializeNewString(Register string, 1133 void InitializeNewString(Register string,
1140 Register length, 1134 Register length,
1141 Heap::RootListIndex map_index, 1135 Heap::RootListIndex map_index,
1142 Register scratch1, 1136 Register scratch1,
1143 Register scratch2); 1137 Register scratch2);
1144 1138
1145 // Compute memory operands for safepoint stack slots. 1139 // Compute memory operands for safepoint stack slots.
1146 static int SafepointRegisterStackIndex(int reg_code); 1140 static int SafepointRegisterStackIndex(int reg_code);
1147 MemOperand SafepointRegisterSlot(Register reg); 1141 MemOperand SafepointRegisterSlot(Register reg);
1148 MemOperand SafepointRegistersAndDoublesSlot(Register reg); 1142 MemOperand SafepointRegistersAndDoublesSlot(Register reg);
1149 1143
1150 bool UseAbsoluteCodePointers(); 1144 bool UseAbsoluteCodePointers();
1151 1145
1152 bool generating_stub_; 1146 bool generating_stub_;
1153 bool allow_stub_calls_; 1147 bool allow_stub_calls_;
1148 bool has_frame_;
1154 // This handle will be patched with the code object on installation. 1149 // This handle will be patched with the code object on installation.
1155 Handle<Object> code_object_; 1150 Handle<Object> code_object_;
1156 1151
1157 // Needs access to SafepointRegisterStackIndex for optimized frame 1152 // Needs access to SafepointRegisterStackIndex for optimized frame
1158 // traversal. 1153 // traversal.
1159 friend class OptimizedFrame; 1154 friend class OptimizedFrame;
1160 }; 1155 };
1161 1156
1162 1157
1163 // The code patcher is used to patch (typically) small parts of code e.g. for 1158 // The code patcher is used to patch (typically) small parts of code e.g. for
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 1220 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
1226 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1221 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1227 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1222 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1228 #else 1223 #else
1229 #define ACCESS_MASM(masm) masm-> 1224 #define ACCESS_MASM(masm) masm->
1230 #endif 1225 #endif
1231 1226
1232 } } // namespace v8::internal 1227 } } // namespace v8::internal
1233 1228
1234 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 1229 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698