| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 
| 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 
| 7 | 7 | 
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" | 
| 9 #include "src/globals.h" | 9 #include "src/globals.h" | 
| 10 #include "src/mips/assembler-mips.h" | 10 #include "src/mips/assembler-mips.h" | 
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 105                 Register reg4 = no_reg, | 105                 Register reg4 = no_reg, | 
| 106                 Register reg5 = no_reg, | 106                 Register reg5 = no_reg, | 
| 107                 Register reg6 = no_reg, | 107                 Register reg6 = no_reg, | 
| 108                 Register reg7 = no_reg, | 108                 Register reg7 = no_reg, | 
| 109                 Register reg8 = no_reg); | 109                 Register reg8 = no_reg); | 
| 110 | 110 | 
| 111 | 111 | 
| 112 // ----------------------------------------------------------------------------- | 112 // ----------------------------------------------------------------------------- | 
| 113 // Static helper functions. | 113 // Static helper functions. | 
| 114 | 114 | 
| 115 inline MemOperand ContextOperand(Register context, int index) { | 115 inline MemOperand ContextMemOperand(Register context, int index) { | 
| 116   return MemOperand(context, Context::SlotOffset(index)); | 116   return MemOperand(context, Context::SlotOffset(index)); | 
| 117 } | 117 } | 
| 118 | 118 | 
| 119 | 119 | 
| 120 inline MemOperand GlobalObjectOperand()  { | 120 inline MemOperand NativeContextMemOperand() { | 
| 121   return ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX); | 121   return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); | 
| 122 } | 122 } | 
| 123 | 123 | 
| 124 | 124 | 
| 125 // Generate a MemOperand for loading a field from an object. | 125 // Generate a MemOperand for loading a field from an object. | 
| 126 inline MemOperand FieldMemOperand(Register object, int offset) { | 126 inline MemOperand FieldMemOperand(Register object, int offset) { | 
| 127   return MemOperand(object, offset - kHeapObjectTag); | 127   return MemOperand(object, offset - kHeapObjectTag); | 
| 128 } | 128 } | 
| 129 | 129 | 
| 130 | 130 | 
| 131 // Generate a MemOperand for storing arguments 5..N on the stack | 131 // Generate a MemOperand for storing arguments 5..N on the stack | 
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 928                       bool argument_count_is_length = false); | 928                       bool argument_count_is_length = false); | 
| 929 | 929 | 
| 930   // Get the actual activation frame alignment for target environment. | 930   // Get the actual activation frame alignment for target environment. | 
| 931   static int ActivationFrameAlignment(); | 931   static int ActivationFrameAlignment(); | 
| 932 | 932 | 
| 933   // Make sure the stack is aligned. Only emits code in debug mode. | 933   // Make sure the stack is aligned. Only emits code in debug mode. | 
| 934   void AssertStackIsAligned(); | 934   void AssertStackIsAligned(); | 
| 935 | 935 | 
| 936   void LoadContext(Register dst, int context_chain_length); | 936   void LoadContext(Register dst, int context_chain_length); | 
| 937 | 937 | 
|  | 938   // Load the global object from the current context. | 
|  | 939   void LoadGlobalObject(Register dst) { | 
|  | 940     LoadNativeContextSlot(Context::EXTENSION_INDEX, dst); | 
|  | 941   } | 
|  | 942 | 
| 938   // Load the global proxy from the current context. | 943   // Load the global proxy from the current context. | 
| 939   void LoadGlobalProxy(Register dst); | 944   void LoadGlobalProxy(Register dst) { | 
|  | 945     LoadNativeContextSlot(Context::GLOBAL_PROXY_INDEX, dst); | 
|  | 946   } | 
| 940 | 947 | 
| 941   // Conditionally load the cached Array transitioned map of type | 948   // Conditionally load the cached Array transitioned map of type | 
| 942   // transitioned_kind from the native context if the map in register | 949   // transitioned_kind from the native context if the map in register | 
| 943   // map_in_out is the cached Array map in the native context of | 950   // map_in_out is the cached Array map in the native context of | 
| 944   // expected_kind. | 951   // expected_kind. | 
| 945   void LoadTransitionedArrayMapConditional( | 952   void LoadTransitionedArrayMapConditional( | 
| 946       ElementsKind expected_kind, | 953       ElementsKind expected_kind, | 
| 947       ElementsKind transitioned_kind, | 954       ElementsKind transitioned_kind, | 
| 948       Register map_in_out, | 955       Register map_in_out, | 
| 949       Register scratch, | 956       Register scratch, | 
| 950       Label* no_map_match); | 957       Label* no_map_match); | 
| 951 | 958 | 
| 952   void LoadGlobalFunction(int index, Register function); | 959   void LoadNativeContextSlot(int index, Register dst); | 
| 953 | 960 | 
| 954   // Load the initial map from the global function. The registers | 961   // Load the initial map from the global function. The registers | 
| 955   // function and map can be the same, function is then overwritten. | 962   // function and map can be the same, function is then overwritten. | 
| 956   void LoadGlobalFunctionInitialMap(Register function, | 963   void LoadGlobalFunctionInitialMap(Register function, | 
| 957                                     Register map, | 964                                     Register map, | 
| 958                                     Register scratch); | 965                                     Register scratch); | 
| 959 | 966 | 
| 960   void InitializeRootRegister() { | 967   void InitializeRootRegister() { | 
| 961     ExternalReference roots_array_start = | 968     ExternalReference roots_array_start = | 
| 962         ExternalReference::roots_array_start(isolate()); | 969         ExternalReference::roots_array_start(isolate()); | 
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1323   void MovToFloatResult(DoubleRegister src); | 1330   void MovToFloatResult(DoubleRegister src); | 
| 1324 | 1331 | 
| 1325   // Jump to the builtin routine. | 1332   // Jump to the builtin routine. | 
| 1326   void JumpToExternalReference(const ExternalReference& builtin, | 1333   void JumpToExternalReference(const ExternalReference& builtin, | 
| 1327                                BranchDelaySlot bd = PROTECT); | 1334                                BranchDelaySlot bd = PROTECT); | 
| 1328 | 1335 | 
| 1329   // Invoke specified builtin JavaScript function. | 1336   // Invoke specified builtin JavaScript function. | 
| 1330   void InvokeBuiltin(int native_context_index, InvokeFlag flag, | 1337   void InvokeBuiltin(int native_context_index, InvokeFlag flag, | 
| 1331                      const CallWrapper& call_wrapper = NullCallWrapper()); | 1338                      const CallWrapper& call_wrapper = NullCallWrapper()); | 
| 1332 | 1339 | 
| 1333   // Store the code object for the given builtin in the target register and |  | 
| 1334   // setup the function in a1. |  | 
| 1335   void GetBuiltinEntry(Register target, int native_context_index); |  | 
| 1336 |  | 
| 1337   // Store the function for the given builtin in the target register. |  | 
| 1338   void GetBuiltinFunction(Register target, int native_context_index); |  | 
| 1339 |  | 
| 1340   struct Unresolved { | 1340   struct Unresolved { | 
| 1341     int pc; | 1341     int pc; | 
| 1342     uint32_t flags;  // See Bootstrapper::FixupFlags decoders/encoders. | 1342     uint32_t flags;  // See Bootstrapper::FixupFlags decoders/encoders. | 
| 1343     const char* name; | 1343     const char* name; | 
| 1344   }; | 1344   }; | 
| 1345 | 1345 | 
| 1346   Handle<Object> CodeObject() { | 1346   Handle<Object> CodeObject() { | 
| 1347     DCHECK(!code_object_.is_null()); | 1347     DCHECK(!code_object_.is_null()); | 
| 1348     return code_object_; | 1348     return code_object_; | 
| 1349   } | 1349   } | 
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1754 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1754 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 
| 1755 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1755 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 
| 1756 #else | 1756 #else | 
| 1757 #define ACCESS_MASM(masm) masm-> | 1757 #define ACCESS_MASM(masm) masm-> | 
| 1758 #endif | 1758 #endif | 
| 1759 | 1759 | 
| 1760 }  // namespace internal | 1760 }  // namespace internal | 
| 1761 }  // namespace v8 | 1761 }  // namespace v8 | 
| 1762 | 1762 | 
| 1763 #endif  // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1763 #endif  // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 
| OLD | NEW | 
|---|