Index: src/ia32/macro-assembler-ia32.h |
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h |
index 4505ee287d680e624c3077161800fc060b83deba..c325eeee10857042ba73183dd621c9ff0a4cd43f 100644 |
--- a/src/ia32/macro-assembler-ia32.h |
+++ b/src/ia32/macro-assembler-ia32.h |
@@ -41,14 +41,24 @@ |
kPointersToHereAreAlwaysInteresting |
}; |
-enum RegisterValueType { REGISTER_VALUE_IS_SMI, REGISTER_VALUE_IS_INT32 }; |
+ |
+enum RegisterValueType { |
+ REGISTER_VALUE_IS_SMI, |
+ REGISTER_VALUE_IS_INT32 |
+}; |
+ |
#ifdef DEBUG |
-bool AreAliased(Register reg1, Register reg2, Register reg3 = no_reg, |
- Register reg4 = no_reg, Register reg5 = no_reg, |
- Register reg6 = no_reg, Register reg7 = no_reg, |
+bool AreAliased(Register reg1, |
+ Register reg2, |
+ Register reg3 = no_reg, |
+ Register reg4 = no_reg, |
+ Register reg5 = no_reg, |
+ Register reg6 = no_reg, |
+ Register reg7 = no_reg, |
Register reg8 = no_reg); |
#endif |
+ |
// MacroAssembler implements a collection of frequently used macros. |
class MacroAssembler: public Assembler { |
@@ -99,44 +109,64 @@ |
// --------------------------------------------------------------------------- |
// GC Support |
- enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd }; |
+ enum RememberedSetFinalAction { |
+ kReturnAtEnd, |
+ kFallThroughAtEnd |
+ }; |
// Record in the remembered set the fact that we have a pointer to new space |
// at the address pointed to by the addr register. Only works if addr is not |
// in new space. |
void RememberedSetHelper(Register object, // Used for debug code. |
- Register addr, Register scratch, |
+ Register addr, |
+ Register scratch, |
SaveFPRegsMode save_fp, |
RememberedSetFinalAction and_then); |
- void CheckPageFlag(Register object, Register scratch, int mask, Condition cc, |
+ void CheckPageFlag(Register object, |
+ Register scratch, |
+ int mask, |
+ Condition cc, |
Label* condition_met, |
Label::Distance condition_met_distance = Label::kFar); |
void CheckPageFlagForMap( |
- Handle<Map> map, int mask, Condition cc, Label* condition_met, |
+ Handle<Map> map, |
+ int mask, |
+ Condition cc, |
+ Label* condition_met, |
Label::Distance condition_met_distance = Label::kFar); |
// Check if object is in new space. Jumps if the object is not in new space. |
// The register scratch can be object itself, but scratch will be clobbered. |
- void JumpIfNotInNewSpace(Register object, Register scratch, Label* branch, |
+ void JumpIfNotInNewSpace(Register object, |
+ Register scratch, |
+ Label* branch, |
Label::Distance distance = Label::kFar) { |
InNewSpace(object, scratch, zero, branch, distance); |
} |
// Check if object is in new space. Jumps if the object is in new space. |
// The register scratch can be object itself, but it will be clobbered. |
- void JumpIfInNewSpace(Register object, Register scratch, Label* branch, |
+ void JumpIfInNewSpace(Register object, |
+ Register scratch, |
+ Label* branch, |
Label::Distance distance = Label::kFar) { |
InNewSpace(object, scratch, not_zero, branch, distance); |
} |
// Check if an object has a given incremental marking color. Also uses ecx! |
- void HasColor(Register object, Register scratch0, Register scratch1, |
- Label* has_color, Label::Distance has_color_distance, |
- int first_bit, int second_bit); |
- |
- void JumpIfBlack(Register object, Register scratch0, Register scratch1, |
+ void HasColor(Register object, |
+ Register scratch0, |
+ Register scratch1, |
+ Label* has_color, |
+ Label::Distance has_color_distance, |
+ int first_bit, |
+ int second_bit); |
+ |
+ void JumpIfBlack(Register object, |
+ Register scratch0, |
+ Register scratch1, |
Label* on_black, |
Label::Distance on_black_distance = Label::kFar); |
@@ -145,7 +175,9 @@ |
// we can determine that it doesn't need to be scanned, then we just mark it |
// black and fall through. For the rest we jump to the label so the |
// incremental marker can fix its assumptions. |
- void EnsureNotWhite(Register object, Register scratch1, Register scratch2, |
+ void EnsureNotWhite(Register object, |
+ Register scratch1, |
+ Register scratch2, |
Label* object_is_white_and_not_data, |
Label::Distance distance); |
@@ -155,7 +187,10 @@ |
// The offset is the offset from the start of the object, not the offset from |
// the tagged HeapObject pointer. For use with FieldOperand(reg, off). |
void RecordWriteField( |
- Register object, int offset, Register value, Register scratch, |
+ Register object, |
+ int offset, |
+ Register value, |
+ Register scratch, |
SaveFPRegsMode save_fp, |
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
SmiCheck smi_check = INLINE_SMI_CHECK, |
@@ -165,14 +200,22 @@ |
// As above, but the offset has the tag presubtracted. For use with |
// Operand(reg, off). |
void RecordWriteContextSlot( |
- Register context, int offset, Register value, Register scratch, |
+ Register context, |
+ int offset, |
+ Register value, |
+ Register scratch, |
SaveFPRegsMode save_fp, |
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
SmiCheck smi_check = INLINE_SMI_CHECK, |
PointersToHereCheck pointers_to_here_check_for_value = |
kPointersToHereMaybeInteresting) { |
- RecordWriteField(context, offset + kHeapObjectTag, value, scratch, save_fp, |
- remembered_set_action, smi_check, |
+ RecordWriteField(context, |
+ offset + kHeapObjectTag, |
+ value, |
+ scratch, |
+ save_fp, |
+ remembered_set_action, |
+ smi_check, |
pointers_to_here_check_for_value); |
} |
@@ -183,7 +226,10 @@ |
// filters out smis so it does not update the write barrier if the |
// value is a smi. |
void RecordWriteArray( |
- Register array, Register value, Register index, SaveFPRegsMode save_fp, |
+ Register array, |
+ Register value, |
+ Register index, |
+ SaveFPRegsMode save_fp, |
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
SmiCheck smi_check = INLINE_SMI_CHECK, |
PointersToHereCheck pointers_to_here_check_for_value = |
@@ -195,7 +241,10 @@ |
// operation. RecordWrite filters out smis so it does not update the |
// write barrier if the value is a smi. |
void RecordWrite( |
- Register object, Register address, Register value, SaveFPRegsMode save_fp, |
+ Register object, |
+ Register address, |
+ Register value, |
+ SaveFPRegsMode save_fp, |
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
SmiCheck smi_check = INLINE_SMI_CHECK, |
PointersToHereCheck pointers_to_here_check_for_value = |
@@ -204,8 +253,12 @@ |
// For page containing |object| mark the region covering the object's map |
// dirty. |object| is the object being stored into, |map| is the Map object |
// that was stored. |
- void RecordWriteForMap(Register object, Handle<Map> map, Register scratch1, |
- Register scratch2, SaveFPRegsMode save_fp); |
+ void RecordWriteForMap( |
+ Register object, |
+ Handle<Map> map, |
+ Register scratch1, |
+ Register scratch2, |
+ SaveFPRegsMode save_fp); |
// --------------------------------------------------------------------------- |
// Debugger Support |
@@ -243,11 +296,12 @@ |
// transitioned_kind from the native context if the map in register |
// map_in_out is the cached Array map in the native context of |
// expected_kind. |
- void LoadTransitionedArrayMapConditional(ElementsKind expected_kind, |
- ElementsKind transitioned_kind, |
- Register map_in_out, |
- Register scratch, |
- Label* no_map_match); |
+ void LoadTransitionedArrayMapConditional( |
+ ElementsKind expected_kind, |
+ ElementsKind transitioned_kind, |
+ Register map_in_out, |
+ Register scratch, |
+ Label* no_map_match); |
// Load the global function with the given index. |
void LoadGlobalFunction(int index, Register function); |
@@ -300,25 +354,39 @@ |
// JavaScript invokes |
// Invoke the JavaScript function code by either calling or jumping. |
- |
- void InvokeFunctionCode(Register function, Register new_target, |
- const ParameterCount& expected, |
- const ParameterCount& actual, InvokeFlag flag, |
- const CallWrapper& call_wrapper); |
+ void InvokeCode(Register code, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper) { |
+ InvokeCode(Operand(code), no_reg, expected, actual, flag, call_wrapper); |
+ } |
+ |
+ void InvokeCode(const Operand& code, |
+ Register new_target, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper); |
// Invoke the JavaScript function in the given register. Changes the |
// current context to the context in the function before invoking. |
- void InvokeFunction(Register function, Register new_target, |
- const ParameterCount& actual, InvokeFlag flag, |
+ void InvokeFunction(Register function, |
+ Register new_target, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
const CallWrapper& call_wrapper); |
- void InvokeFunction(Register function, const ParameterCount& expected, |
- const ParameterCount& actual, InvokeFlag flag, |
+ void InvokeFunction(Register function, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
const CallWrapper& call_wrapper); |
void InvokeFunction(Handle<JSFunction> function, |
const ParameterCount& expected, |
- const ParameterCount& actual, InvokeFlag flag, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
const CallWrapper& call_wrapper); |
// Invoke specified builtin JavaScript function. |
@@ -327,6 +395,9 @@ |
// Store the function for the given builtin in the target register. |
void GetBuiltinFunction(Register target, int native_context_index); |
+ |
+ // Store the code object for the given builtin in the target register. |
+ void GetBuiltinEntry(Register target, int native_context_index); |
// Expression support |
// cvtsi2sd instruction only writes to the low 64-bit of dst register, which |
@@ -349,25 +420,31 @@ |
// Check if a map for a JSObject indicates that the object has fast elements. |
// Jump to the specified label if it does not. |
- void CheckFastElements(Register map, Label* fail, |
+ void CheckFastElements(Register map, |
+ Label* fail, |
Label::Distance distance = Label::kFar); |
// Check if a map for a JSObject indicates that the object can have both smi |
// and HeapObject elements. Jump to the specified label if it does not. |
- void CheckFastObjectElements(Register map, Label* fail, |
+ void CheckFastObjectElements(Register map, |
+ Label* fail, |
Label::Distance distance = Label::kFar); |
// Check if a map for a JSObject indicates that the object has fast smi only |
// elements. Jump to the specified label if it does not. |
- void CheckFastSmiElements(Register map, Label* fail, |
+ void CheckFastSmiElements(Register map, |
+ Label* fail, |
Label::Distance distance = Label::kFar); |
// Check to see if maybe_number can be stored as a double in |
// FastDoubleElements. If it can, store it at the index specified by key in |
// the FastDoubleElements array elements, otherwise jump to fail. |
- void StoreNumberToDoubleElements(Register maybe_number, Register elements, |
- Register key, Register scratch1, |
- XMMRegister scratch2, Label* fail, |
+ void StoreNumberToDoubleElements(Register maybe_number, |
+ Register elements, |
+ Register key, |
+ Register scratch1, |
+ XMMRegister scratch2, |
+ Label* fail, |
int offset = 0); |
// Compare an object's map with the specified map. |
@@ -377,7 +454,9 @@ |
// label if not. Skip the smi check if not required (object is known to be a |
// heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match |
// against maps that are ElementsKind transition maps of the specified map. |
- void CheckMap(Register obj, Handle<Map> map, Label* fail, |
+ void CheckMap(Register obj, |
+ Handle<Map> map, |
+ Label* fail, |
SmiCheckType smi_check_type); |
// Check if the map of an object is equal to a specified weak map and branch |
@@ -392,7 +471,8 @@ |
// contains the instance_type. The registers map and instance_type can be the |
// same in which case it contains the instance type afterwards. Either of the |
// registers map and instance_type can be the same as heap_object. |
- Condition IsObjectStringType(Register heap_object, Register map, |
+ Condition IsObjectStringType(Register heap_object, |
+ Register map, |
Register instance_type); |
// Check if the object in register heap_object is a name. Afterwards the |
@@ -400,7 +480,8 @@ |
// contains the instance_type. The registers map and instance_type can be the |
// same in which case it contains the instance type afterwards. Either of the |
// registers map and instance_type can be the same as heap_object. |
- Condition IsObjectNameType(Register heap_object, Register map, |
+ Condition IsObjectNameType(Register heap_object, |
+ Register map, |
Register instance_type); |
// FCmp is similar to integer cmp, but requires unsigned |
@@ -409,7 +490,8 @@ |
void ClampUint8(Register reg); |
- void ClampDoubleToUint8(XMMRegister input_reg, XMMRegister scratch_reg, |
+ void ClampDoubleToUint8(XMMRegister input_reg, |
+ XMMRegister scratch_reg, |
Register result_reg); |
void SlowTruncateToI(Register result_reg, Register input_reg, |
@@ -447,19 +529,22 @@ |
void LoadUint32(XMMRegister dst, const Operand& src); |
// Jump the register contains a smi. |
- inline void JumpIfSmi(Register value, Label* smi_label, |
+ inline void JumpIfSmi(Register value, |
+ Label* smi_label, |
Label::Distance distance = Label::kFar) { |
test(value, Immediate(kSmiTagMask)); |
j(zero, smi_label, distance); |
} |
// Jump if the operand is a smi. |
- inline void JumpIfSmi(Operand value, Label* smi_label, |
+ inline void JumpIfSmi(Operand value, |
+ Label* smi_label, |
Label::Distance distance = Label::kFar) { |
test(value, Immediate(kSmiTagMask)); |
j(zero, smi_label, distance); |
} |
// Jump if register contain a non-smi. |
- inline void JumpIfNotSmi(Register value, Label* not_smi_label, |
+ inline void JumpIfNotSmi(Register value, |
+ Label* not_smi_label, |
Label::Distance distance = Label::kFar) { |
test(value, Immediate(kSmiTagMask)); |
j(not_zero, not_smi_label, distance); |
@@ -534,14 +619,21 @@ |
// Generate code for checking access rights - used for security checks |
// on access to global objects across environments. The holder register |
// is left untouched, but the scratch register is clobbered. |
- void CheckAccessGlobalProxy(Register holder_reg, Register scratch1, |
- Register scratch2, Label* miss); |
+ void CheckAccessGlobalProxy(Register holder_reg, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* miss); |
void GetNumberHash(Register r0, Register scratch); |
- void LoadFromNumberDictionary(Label* miss, Register elements, Register key, |
- Register r0, Register r1, Register r2, |
+ void LoadFromNumberDictionary(Label* miss, |
+ Register elements, |
+ Register key, |
+ Register r0, |
+ Register r1, |
+ Register r2, |
Register result); |
+ |
// --------------------------------------------------------------------------- |
// Allocation support |
@@ -556,29 +648,48 @@ |
// result is known to be the allocation top on entry (could be result_end |
// from a previous call). If result_contains_top_on_entry is true scratch |
// should be no_reg as it is never used. |
- void Allocate(int object_size, Register result, Register result_end, |
- Register scratch, Label* gc_required, AllocationFlags flags); |
- |
- void Allocate(int header_size, ScaleFactor element_size, |
- Register element_count, RegisterValueType element_count_type, |
- Register result, Register result_end, Register scratch, |
- Label* gc_required, AllocationFlags flags); |
- |
- void Allocate(Register object_size, Register result, Register result_end, |
- Register scratch, Label* gc_required, AllocationFlags flags); |
+ void Allocate(int object_size, |
+ Register result, |
+ Register result_end, |
+ Register scratch, |
+ Label* gc_required, |
+ AllocationFlags flags); |
+ |
+ void Allocate(int header_size, |
+ ScaleFactor element_size, |
+ Register element_count, |
+ RegisterValueType element_count_type, |
+ Register result, |
+ Register result_end, |
+ Register scratch, |
+ Label* gc_required, |
+ AllocationFlags flags); |
+ |
+ void Allocate(Register object_size, |
+ Register result, |
+ Register result_end, |
+ Register scratch, |
+ Label* gc_required, |
+ AllocationFlags flags); |
// Allocate a heap number in new space with undefined value. The |
// register scratch2 can be passed as no_reg; the others must be |
// valid registers. Returns tagged pointer in result register, or |
// jumps to gc_required if new space is full. |
- void AllocateHeapNumber(Register result, Register scratch1, Register scratch2, |
- Label* gc_required, MutableMode mode = IMMUTABLE); |
+ void AllocateHeapNumber(Register result, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* gc_required, |
+ MutableMode mode = IMMUTABLE); |
// Allocate a sequential string. All the header fields of the string object |
// are initialized. |
- void AllocateTwoByteString(Register result, Register length, |
- Register scratch1, Register scratch2, |
- Register scratch3, Label* gc_required); |
+ void AllocateTwoByteString(Register result, |
+ Register length, |
+ Register scratch1, |
+ Register scratch2, |
+ Register scratch3, |
+ Label* gc_required); |
void AllocateOneByteString(Register result, Register length, |
Register scratch1, Register scratch2, |
Register scratch3, Label* gc_required); |
@@ -587,22 +698,28 @@ |
// Allocate a raw cons string object. Only the map field of the result is |
// initialized. |
- void AllocateTwoByteConsString(Register result, Register scratch1, |
- Register scratch2, Label* gc_required); |
+ void AllocateTwoByteConsString(Register result, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* gc_required); |
void AllocateOneByteConsString(Register result, Register scratch1, |
Register scratch2, Label* gc_required); |
// Allocate a raw sliced string object. Only the map field of the result is |
// initialized. |
- void AllocateTwoByteSlicedString(Register result, Register scratch1, |
- Register scratch2, Label* gc_required); |
+ void AllocateTwoByteSlicedString(Register result, |
+ Register scratch1, |
+ Register scratch2, |
+ Label* gc_required); |
void AllocateOneByteSlicedString(Register result, Register scratch1, |
Register scratch2, Label* gc_required); |
// Copy memory, byte-by-byte, from source to destination. Not optimized for |
// long or aligned copies. |
// The contents of index and scratch are destroyed. |
- void CopyBytes(Register source, Register destination, Register length, |
+ void CopyBytes(Register source, |
+ Register destination, |
+ Register length, |
Register scratch); |
// Initialize fields with filler values. Fields starting at |current_address| |
@@ -656,7 +773,8 @@ |
void StubReturn(int argc); |
// Call a runtime routine. |
- void CallRuntime(const Runtime::Function* f, int num_arguments, |
+ void CallRuntime(const Runtime::Function* f, |
+ int num_arguments, |
SaveFPRegsMode save_doubles = kDontSaveFPRegs); |
void CallRuntimeSaveDoubles(Runtime::FunctionId id) { |
const Runtime::Function* function = Runtime::FunctionForId(id); |
@@ -664,7 +782,8 @@ |
} |
// Convenience function: Same as above, but takes the fid instead. |
- void CallRuntime(Runtime::FunctionId id, int num_arguments, |
+ void CallRuntime(Runtime::FunctionId id, |
+ int num_arguments, |
SaveFPRegsMode save_doubles = kDontSaveFPRegs) { |
CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles); |
} |
@@ -676,10 +795,12 @@ |
// Like JumpToExternalReference, but also takes care of passing the number |
// of parameters. |
void TailCallExternalReference(const ExternalReference& ext, |
- int num_arguments, int result_size); |
+ int num_arguments, |
+ int result_size); |
// Convenience function: tail call a runtime routine (jump). |
- void TailCallRuntime(Runtime::FunctionId fid, int num_arguments, |
+ void TailCallRuntime(Runtime::FunctionId fid, |
+ int num_arguments, |
int result_size); |
// Before calling a C-function from generated code, align arguments on stack. |
@@ -782,6 +903,7 @@ |
void IncrementCounter(Condition cc, StatsCounter* counter, int value); |
void DecrementCounter(Condition cc, StatsCounter* counter, int value); |
+ |
// --------------------------------------------------------------------------- |
// Debugging |
@@ -832,8 +954,10 @@ |
void JumpIfNotUniqueNameInstanceType(Operand operand, Label* not_unique_name, |
Label::Distance distance = Label::kFar); |
- void EmitSeqStringSetCharCheck(Register string, Register index, |
- Register value, uint32_t encoding_mask); |
+ void EmitSeqStringSetCharCheck(Register string, |
+ Register index, |
+ Register value, |
+ uint32_t encoding_mask); |
static int SafepointRegisterStackIndex(Register reg) { |
return SafepointRegisterStackIndex(reg.code()); |
@@ -883,29 +1007,31 @@ |
// Helper functions for generating invokes. |
void InvokePrologue(const ParameterCount& expected, |
- const ParameterCount& actual, Label* done, |
- bool* definitely_mismatches, InvokeFlag flag, |
+ const ParameterCount& actual, |
+ Label* done, |
+ bool* definitely_mismatches, |
+ InvokeFlag flag, |
Label::Distance done_distance, |
const CallWrapper& call_wrapper); |
- void FloodFunctionIfStepping(Register fun, Register new_target, |
- const ParameterCount& expected, |
- const ParameterCount& actual); |
- |
void EnterExitFramePrologue(); |
void EnterExitFrameEpilogue(int argc, bool save_doubles); |
void LeaveExitFrameEpilogue(bool restore_context); |
// Allocation support helpers. |
- void LoadAllocationTopHelper(Register result, Register scratch, |
+ void LoadAllocationTopHelper(Register result, |
+ Register scratch, |
AllocationFlags flags); |
- void UpdateAllocationTopHelper(Register result_end, Register scratch, |
+ void UpdateAllocationTopHelper(Register result_end, |
+ Register scratch, |
AllocationFlags flags); |
// Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
- void InNewSpace(Register object, Register scratch, Condition cc, |
+ void InNewSpace(Register object, |
+ Register scratch, |
+ Condition cc, |
Label* condition_met, |
Label::Distance condition_met_distance = Label::kFar); |
@@ -913,7 +1039,8 @@ |
// bitmap register points at the word with the mark bits and the mask |
// the position of the first bit. Uses ecx as scratch and leaves addr_reg |
// unchanged. |
- inline void GetMarkBits(Register addr_reg, Register bitmap_reg, |
+ inline void GetMarkBits(Register addr_reg, |
+ Register bitmap_reg, |
Register mask_reg); |
// Compute memory operands for safepoint stack slots. |
@@ -924,6 +1051,7 @@ |
// traversal. |
friend class StandardFrame; |
}; |
+ |
// The code patcher is used to patch (typically) small parts of code e.g. for |
// debugging and other types of instrumentation. When using the code patcher |
@@ -939,10 +1067,11 @@ |
MacroAssembler* masm() { return &masm_; } |
private: |
- byte* address_; // The address of the code being patched. |
- int size_; // Number of bytes of the expected patch size. |
+ byte* address_; // The address of the code being patched. |
+ int size_; // Number of bytes of the expected patch size. |
MacroAssembler masm_; // Macro assembler used to generate the code. |
}; |
+ |
// ----------------------------------------------------------------------------- |
// Static helper functions. |
@@ -952,29 +1081,38 @@ |
return Operand(object, offset - kHeapObjectTag); |
} |
+ |
// Generate an Operand for loading an indexed field from an object. |
-inline Operand FieldOperand(Register object, Register index, ScaleFactor scale, |
+inline Operand FieldOperand(Register object, |
+ Register index, |
+ ScaleFactor scale, |
int offset) { |
return Operand(object, index, scale, offset - kHeapObjectTag); |
} |
-inline Operand FixedArrayElementOperand(Register array, Register index_as_smi, |
+ |
+inline Operand FixedArrayElementOperand(Register array, |
+ Register index_as_smi, |
int additional_offset = 0) { |
int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
} |
+ |
inline Operand ContextOperand(Register context, int index) { |
return Operand(context, Context::SlotOffset(index)); |
} |
+ |
inline Operand ContextOperand(Register context, Register index) { |
return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); |
} |
+ |
inline Operand GlobalObjectOperand() { |
return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); |
} |
+ |
#ifdef GENERATED_CODE_COVERAGE |
extern void LogGeneratedCodeCoverage(const char* file_line); |
@@ -997,6 +1135,7 @@ |
#define ACCESS_MASM(masm) masm-> |
#endif |
+ |
} // namespace internal |
} // namespace v8 |