OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 #endif | 1478 #endif |
1479 } | 1479 } |
1480 | 1480 |
1481 | 1481 |
1482 | 1482 |
1483 #ifdef GENERATED_CODE_COVERAGE | 1483 #ifdef GENERATED_CODE_COVERAGE |
1484 extern void LogGeneratedCodeCoverage(const char* file_line); | 1484 extern void LogGeneratedCodeCoverage(const char* file_line); |
1485 #define CODE_COVERAGE_STRINGIFY(x) #x | 1485 #define CODE_COVERAGE_STRINGIFY(x) #x |
1486 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1486 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1487 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1487 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1488 #define ACCESS_MASM(masm) { \ | 1488 #define ACCESS_MASM(masm) { \ |
1489 byte* x64_coverage_function = \ | 1489 Address x64_coverage_function = FUNCTION_ADDR(LogGeneratedCodeCoverage); \ |
1490 reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \ | 1490 masm->pushfq(); \ |
1491 masm->pushfd(); \ | 1491 masm->Pushad(); \ |
1492 masm->pushad(); \ | 1492 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ |
1493 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ | 1493 masm->Call(x64_coverage_function, RelocInfo::EXTERNAL_REFERENCE); \ |
1494 masm->call(x64_coverage_function, RelocInfo::RUNTIME_ENTRY); \ | 1494 masm->pop(rax); \ |
1495 masm->pop(rax); \ | 1495 masm->Popad(); \ |
1496 masm->popad(); \ | 1496 masm->popfq(); \ |
1497 masm->popfd(); \ | 1497 } \ |
1498 } \ | |
1499 masm-> | 1498 masm-> |
1500 #else | 1499 #else |
1501 #define ACCESS_MASM(masm) masm-> | 1500 #define ACCESS_MASM(masm) masm-> |
1502 #endif | 1501 #endif |
1503 | 1502 |
1504 } } // namespace v8::internal | 1503 } } // namespace v8::internal |
1505 | 1504 |
1506 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1505 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |