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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 } | 942 } |
943 | 943 |
944 inline Operand ContextOperand(Register context, int index) { | 944 inline Operand ContextOperand(Register context, int index) { |
945 return Operand(context, Context::SlotOffset(index)); | 945 return Operand(context, Context::SlotOffset(index)); |
946 } | 946 } |
947 | 947 |
948 inline Operand ContextOperand(Register context, Register index) { | 948 inline Operand ContextOperand(Register context, Register index) { |
949 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); | 949 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); |
950 } | 950 } |
951 | 951 |
952 inline Operand GlobalObjectOperand() { | 952 inline Operand NativeContextOperand() { |
953 return ContextOperand(esi, Context::GLOBAL_OBJECT_INDEX); | 953 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); |
954 } | 954 } |
955 | 955 |
956 #ifdef GENERATED_CODE_COVERAGE | 956 #ifdef GENERATED_CODE_COVERAGE |
957 extern void LogGeneratedCodeCoverage(const char* file_line); | 957 extern void LogGeneratedCodeCoverage(const char* file_line); |
958 #define CODE_COVERAGE_STRINGIFY(x) #x | 958 #define CODE_COVERAGE_STRINGIFY(x) #x |
959 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 959 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
960 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 960 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
961 #define ACCESS_MASM(masm) { \ | 961 #define ACCESS_MASM(masm) { \ |
962 byte* ia32_coverage_function = \ | 962 byte* ia32_coverage_function = \ |
963 reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \ | 963 reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \ |
964 masm->pushfd(); \ | 964 masm->pushfd(); \ |
965 masm->pushad(); \ | 965 masm->pushad(); \ |
966 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ | 966 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ |
967 masm->call(ia32_coverage_function, RelocInfo::RUNTIME_ENTRY); \ | 967 masm->call(ia32_coverage_function, RelocInfo::RUNTIME_ENTRY); \ |
968 masm->pop(eax); \ | 968 masm->pop(eax); \ |
969 masm->popad(); \ | 969 masm->popad(); \ |
970 masm->popfd(); \ | 970 masm->popfd(); \ |
971 } \ | 971 } \ |
972 masm-> | 972 masm-> |
973 #else | 973 #else |
974 #define ACCESS_MASM(masm) masm-> | 974 #define ACCESS_MASM(masm) masm-> |
975 #endif | 975 #endif |
976 | 976 |
977 } // namespace internal | 977 } // namespace internal |
978 } // namespace v8 | 978 } // namespace v8 |
979 | 979 |
980 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 980 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |