Code cleanup: removing config.h and cleaning up platform.h
This commit is contained in:
@@ -426,12 +426,12 @@ uint64_t ResolveFunctionSymbol(void* raw_context, uint64_t symbol_info_ptr) {
|
||||
|
||||
// Overwrite the call site.
|
||||
// The return address points to ReloadRCX work after the call.
|
||||
#if XE_LIKE_WIN32
|
||||
#if XE_PLATFORM_WIN32
|
||||
uint64_t return_address = reinterpret_cast<uint64_t>(_ReturnAddress());
|
||||
#else
|
||||
uint64_t return_address =
|
||||
reinterpret_cast<uint64_t>(__builtin_return_address(0));
|
||||
#endif // XE_LIKE_WIN32
|
||||
#endif // XE_PLATFORM_WIN32
|
||||
#pragma pack(push, 1)
|
||||
struct Asm {
|
||||
uint16_t mov_rax;
|
||||
@@ -507,12 +507,12 @@ uint64_t ResolveFunctionAddress(void* raw_context, uint32_t target_address) {
|
||||
uint64_t addr = reinterpret_cast<uint64_t>(x64_fn->machine_code());
|
||||
|
||||
// Add an IC slot, if there is room.
|
||||
#if XE_LIKE_WIN32
|
||||
#if XE_PLATFORM_WIN32
|
||||
uint64_t return_address = reinterpret_cast<uint64_t>(_ReturnAddress());
|
||||
#else
|
||||
uint64_t return_address =
|
||||
reinterpret_cast<uint64_t>(__builtin_return_address(0));
|
||||
#endif // XE_LIKE_WIN32
|
||||
#endif // XE_PLATFORM_WIN32
|
||||
#pragma pack(push, 1)
|
||||
struct Asm {
|
||||
uint16_t cmp_rdx;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "poly/main.h"
|
||||
#include "poly/poly.h"
|
||||
|
||||
#if !XE_LIKE_WIN32
|
||||
#if !XE_PLATFORM_WIN32
|
||||
#include <dirent.h>
|
||||
#endif // !WIN32
|
||||
#include <gflags/gflags.h>
|
||||
@@ -319,7 +319,7 @@ class TestRunner {
|
||||
bool DiscoverTests(std::wstring& test_path,
|
||||
std::vector<std::wstring>& test_files) {
|
||||
// TODO(benvanik): use PAL instead of this.
|
||||
#if XE_LIKE_WIN32
|
||||
#if XE_PLATFORM_WIN32
|
||||
std::wstring search_path = test_path;
|
||||
search_path.append(L"\\*.s");
|
||||
WIN32_FIND_DATA ffd;
|
||||
|
||||
@@ -29,12 +29,12 @@ int main(std::vector<std::wstring>& args) {
|
||||
}
|
||||
int ret = Catch::Session().run(int(args.size()), narrow_argv);
|
||||
if (ret) {
|
||||
#if XE_LIKE_WIN32
|
||||
#if XE_PLATFORM_WIN32
|
||||
// Visual Studio kills the console on shutdown, so prevent that.
|
||||
if (poly::debugging::IsDebuggerAttached()) {
|
||||
poly::debugging::Break();
|
||||
}
|
||||
#endif // XE_LIKE_WIN32
|
||||
#endif // XE_PLATFORM_WIN32
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user