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_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; | 1015 int offset = FixedArray::kHeaderSize + additional_offset * kPointerSize; |
1016 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); | 1016 return FieldOperand(array, index_as_smi, times_half_pointer_size, offset); |
1017 } | 1017 } |
1018 | 1018 |
1019 | 1019 |
1020 inline Operand ContextOperand(Register context, int index) { | 1020 inline Operand ContextOperand(Register context, int index) { |
1021 return Operand(context, Context::SlotOffset(index)); | 1021 return Operand(context, Context::SlotOffset(index)); |
1022 } | 1022 } |
1023 | 1023 |
1024 | 1024 |
| 1025 inline Operand ContextOperand(Register context, Register index) { |
| 1026 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); |
| 1027 } |
| 1028 |
| 1029 |
1025 inline Operand GlobalObjectOperand() { | 1030 inline Operand GlobalObjectOperand() { |
1026 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); | 1031 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); |
1027 } | 1032 } |
1028 | 1033 |
1029 | 1034 |
1030 #ifdef GENERATED_CODE_COVERAGE | 1035 #ifdef GENERATED_CODE_COVERAGE |
1031 extern void LogGeneratedCodeCoverage(const char* file_line); | 1036 extern void LogGeneratedCodeCoverage(const char* file_line); |
1032 #define CODE_COVERAGE_STRINGIFY(x) #x | 1037 #define CODE_COVERAGE_STRINGIFY(x) #x |
1033 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1038 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1034 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1039 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
(...skipping 10 matching lines...) Expand all Loading... |
1045 } \ | 1050 } \ |
1046 masm-> | 1051 masm-> |
1047 #else | 1052 #else |
1048 #define ACCESS_MASM(masm) masm-> | 1053 #define ACCESS_MASM(masm) masm-> |
1049 #endif | 1054 #endif |
1050 | 1055 |
1051 | 1056 |
1052 } } // namespace v8::internal | 1057 } } // namespace v8::internal |
1053 | 1058 |
1054 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1059 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |