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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 } | 1032 } |
1033 | 1033 |
1034 inline Operand ContextOperand(Register context, Register index) { | 1034 inline Operand ContextOperand(Register context, Register index) { |
1035 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); | 1035 return Operand(context, index, times_pointer_size, Context::SlotOffset(0)); |
1036 } | 1036 } |
1037 | 1037 |
1038 inline Operand NativeContextOperand() { | 1038 inline Operand NativeContextOperand() { |
1039 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); | 1039 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); |
1040 } | 1040 } |
1041 | 1041 |
1042 #ifdef GENERATED_CODE_COVERAGE | |
1043 extern void LogGeneratedCodeCoverage(const char* file_line); | |
1044 #define CODE_COVERAGE_STRINGIFY(x) #x | |
1045 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | |
1046 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | |
1047 #define ACCESS_MASM(masm) { \ | |
1048 byte* ia32_coverage_function = \ | |
1049 reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \ | |
1050 masm->pushfd(); \ | |
1051 masm->pushad(); \ | |
1052 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ | |
1053 masm->call(ia32_coverage_function, RelocInfo::RUNTIME_ENTRY); \ | |
1054 masm->pop(eax); \ | |
1055 masm->popad(); \ | |
1056 masm->popfd(); \ | |
1057 } \ | |
1058 masm-> | |
1059 #else | |
1060 #define ACCESS_MASM(masm) masm-> | 1042 #define ACCESS_MASM(masm) masm-> |
1061 #endif | |
1062 | 1043 |
1063 } // namespace internal | 1044 } // namespace internal |
1064 } // namespace v8 | 1045 } // namespace v8 |
1065 | 1046 |
1066 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1047 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |