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_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/frames.h" | 10 #include "src/frames.h" |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; | 1061 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
1062 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); | 1062 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
1063 } | 1063 } |
1064 | 1064 |
1065 | 1065 |
1066 inline Operand ContextOperand(Register context, int index) { | 1066 inline Operand ContextOperand(Register context, int index) { |
1067 return Operand(context, Context::SlotOffset(index)); | 1067 return Operand(context, Context::SlotOffset(index)); |
1068 } | 1068 } |
1069 | 1069 |
1070 | 1070 |
| 1071 inline Operand ContextOperand(Register context, Register index) { |
| 1072 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); |
| 1073 } |
| 1074 |
| 1075 |
1071 inline Operand GlobalObjectOperand() { | 1076 inline Operand GlobalObjectOperand() { |
1072 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); | 1077 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); |
1073 } | 1078 } |
1074 | 1079 |
1075 | 1080 |
1076 #ifdef GENERATED_CODE_COVERAGE | 1081 #ifdef GENERATED_CODE_COVERAGE |
1077 extern void LogGeneratedCodeCoverage(const char* file_line); | 1082 extern void LogGeneratedCodeCoverage(const char* file_line); |
1078 #define CODE_COVERAGE_STRINGIFY(x) #x | 1083 #define CODE_COVERAGE_STRINGIFY(x) #x |
1079 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1084 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1080 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1085 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
(...skipping 10 matching lines...) Expand all Loading... |
1091 } \ | 1096 } \ |
1092 masm-> | 1097 masm-> |
1093 #else | 1098 #else |
1094 #define ACCESS_MASM(masm) masm-> | 1099 #define ACCESS_MASM(masm) masm-> |
1095 #endif | 1100 #endif |
1096 | 1101 |
1097 | 1102 |
1098 } } // namespace v8::internal | 1103 } } // namespace v8::internal |
1099 | 1104 |
1100 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1105 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |