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