OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // | 44 // |
45 // The programmer should know that the MacroAssembler may clobber these three, | 45 // The programmer should know that the MacroAssembler may clobber these three, |
46 // but won't touch other registers except in special cases. | 46 // but won't touch other registers except in special cases. |
47 // | 47 // |
48 // Per the MIPS ABI, register t9 must be used for indirect function call | 48 // Per the MIPS ABI, register t9 must be used for indirect function call |
49 // via 'jalr t9' or 'jr t9' instructions. This is relied upon by gcc when | 49 // via 'jalr t9' or 'jr t9' instructions. This is relied upon by gcc when |
50 // trying to update gp register for position-independent-code. Whenever | 50 // trying to update gp register for position-independent-code. Whenever |
51 // MIPS generated code calls C code, it must be via t9 register. | 51 // MIPS generated code calls C code, it must be via t9 register. |
52 | 52 |
53 | 53 |
54 // Flags used for LeaveExitFrame function. | |
55 enum LeaveExitFrameMode { | |
56 EMIT_RETURN = true, | |
57 NO_EMIT_RETURN = false | |
58 }; | |
59 | |
60 // Flags used for AllocateHeapNumber | 54 // Flags used for AllocateHeapNumber |
61 enum TaggingMode { | 55 enum TaggingMode { |
62 // Tag the result. | 56 // Tag the result. |
63 TAG_RESULT, | 57 TAG_RESULT, |
64 // Don't tag | 58 // Don't tag |
65 DONT_TAG_RESULT | 59 DONT_TAG_RESULT |
66 }; | 60 }; |
67 | 61 |
68 // Flags used for the ObjectToDoubleFPURegister function. | 62 // Flags used for the ObjectToDoubleFPURegister function. |
69 enum ObjectToDoubleFlags { | 63 enum ObjectToDoubleFlags { |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 // Enter exit frame. | 841 // Enter exit frame. |
848 // argc - argument count to be dropped by LeaveExitFrame. | 842 // argc - argument count to be dropped by LeaveExitFrame. |
849 // save_doubles - saves FPU registers on stack, currently disabled. | 843 // save_doubles - saves FPU registers on stack, currently disabled. |
850 // stack_space - extra stack space. | 844 // stack_space - extra stack space. |
851 void EnterExitFrame(bool save_doubles, | 845 void EnterExitFrame(bool save_doubles, |
852 int stack_space = 0); | 846 int stack_space = 0); |
853 | 847 |
854 // Leave the current exit frame. | 848 // Leave the current exit frame. |
855 void LeaveExitFrame(bool save_doubles, | 849 void LeaveExitFrame(bool save_doubles, |
856 Register arg_count, | 850 Register arg_count, |
857 bool restore_context, | 851 bool do_return = false); |
858 bool do_return = NO_EMIT_RETURN); | |
859 | 852 |
860 // Get the actual activation frame alignment for target environment. | 853 // Get the actual activation frame alignment for target environment. |
861 static int ActivationFrameAlignment(); | 854 static int ActivationFrameAlignment(); |
862 | 855 |
863 // Make sure the stack is aligned. Only emits code in debug mode. | 856 // Make sure the stack is aligned. Only emits code in debug mode. |
864 void AssertStackIsAligned(); | 857 void AssertStackIsAligned(); |
865 | 858 |
866 void LoadContext(Register dst, int context_chain_length); | 859 void LoadContext(Register dst, int context_chain_length); |
867 | 860 |
868 // Conditionally load the cached Array transitioned map of type | 861 // Conditionally load the cached Array transitioned map of type |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 | 1264 |
1272 // Calls an API function. Allocates HandleScope, extracts returned value | 1265 // Calls an API function. Allocates HandleScope, extracts returned value |
1273 // from handle and propagates exceptions. Restores context. stack_space | 1266 // from handle and propagates exceptions. Restores context. stack_space |
1274 // - space to be unwound on exit (includes the call JS arguments space and | 1267 // - space to be unwound on exit (includes the call JS arguments space and |
1275 // the additional space allocated for the fast call). | 1268 // the additional space allocated for the fast call). |
1276 void CallApiFunctionAndReturn(ExternalReference function, | 1269 void CallApiFunctionAndReturn(ExternalReference function, |
1277 Address function_address, | 1270 Address function_address, |
1278 ExternalReference thunk_ref, | 1271 ExternalReference thunk_ref, |
1279 Register thunk_last_arg, | 1272 Register thunk_last_arg, |
1280 int stack_space, | 1273 int stack_space, |
1281 MemOperand return_value_operand, | 1274 int return_value_offset_from_fp); |
1282 MemOperand* context_restore_operand); | |
1283 | 1275 |
1284 // Jump to the builtin routine. | 1276 // Jump to the builtin routine. |
1285 void JumpToExternalReference(const ExternalReference& builtin, | 1277 void JumpToExternalReference(const ExternalReference& builtin, |
1286 BranchDelaySlot bd = PROTECT); | 1278 BranchDelaySlot bd = PROTECT); |
1287 | 1279 |
1288 // Invoke specified builtin JavaScript function. Adds an entry to | 1280 // Invoke specified builtin JavaScript function. Adds an entry to |
1289 // the unresolved list if the name does not resolve. | 1281 // the unresolved list if the name does not resolve. |
1290 void InvokeBuiltin(Builtins::JavaScript id, | 1282 void InvokeBuiltin(Builtins::JavaScript id, |
1291 InvokeFlag flag, | 1283 InvokeFlag flag, |
1292 const CallWrapper& call_wrapper = NullCallWrapper()); | 1284 const CallWrapper& call_wrapper = NullCallWrapper()); |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1615 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1624 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1616 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1625 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1617 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1626 #else | 1618 #else |
1627 #define ACCESS_MASM(masm) masm-> | 1619 #define ACCESS_MASM(masm) masm-> |
1628 #endif | 1620 #endif |
1629 | 1621 |
1630 } } // namespace v8::internal | 1622 } } // namespace v8::internal |
1631 | 1623 |
1632 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1624 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |