Common: Cleanup memory and misc includes.
This commit is contained in:
parent
3a771a13dc
commit
2d044a67c9
|
@ -5,8 +5,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common_types.h"
|
#include "common_types.h"
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
|
|
||||||
#define b2(x) ( (x) | ( (x) >> 1) )
|
#define b2(x) ( (x) | ( (x) >> 1) )
|
||||||
#define b4(x) ( b2(x) | ( b2(x) >> 2) )
|
#define b4(x) ( b2(x) | ( b2(x) >> 2) )
|
||||||
|
@ -43,8 +41,6 @@
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(_M_X64)
|
#if defined(__x86_64__) || defined(_M_X64)
|
||||||
#define Crash() __asm__ __volatile__("int $3")
|
#define Crash() __asm__ __volatile__("int $3")
|
||||||
#elif defined(_M_ARM)
|
#elif defined(_M_ARM)
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#ifndef __func__
|
#ifndef __func__
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <chrono>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
namespace Log {
|
namespace Log {
|
||||||
|
|
|
@ -3,14 +3,17 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
|
||||||
#include "common/common_funcs.h"
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/memory_util.h"
|
#include "common/memory_util.h"
|
||||||
#include "common/string_util.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
|
#include "common/common_funcs.h"
|
||||||
|
#include "common/string_util.h"
|
||||||
|
#else
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT)
|
#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT)
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef _WIN32
|
#include <cstddef>
|
||||||
#include <sys/mman.h>
|
|
||||||
#endif
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
void* AllocateExecutableMemory(size_t size, bool low = true);
|
void* AllocateExecutableMemory(size_t size, bool low = true);
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common/common_funcs.h"
|
#include <cstddef>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <string.h>
|
#include <cerrno>
|
||||||
|
#include <cstring>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Neither Android nor OS X support TLS
|
// Neither Android nor OS X support TLS
|
||||||
|
|
|
@ -17,12 +17,16 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(_MSC_VER)
|
||||||
|
#include <cstdlib>
|
||||||
|
#elif defined(__linux__)
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
// GCC 4.6+
|
// GCC 4.6+
|
||||||
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -9,9 +9,6 @@
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
|
|
||||||
#include "core/hle/config_mem.h"
|
|
||||||
#include "core/hle/shared_page.h"
|
|
||||||
#include "core/hw/hw.h"
|
|
||||||
#include "core/mem_map.h"
|
#include "core/mem_map.h"
|
||||||
#include "core/memory.h"
|
#include "core/memory.h"
|
||||||
#include "core/memory_setup.h"
|
#include "core/memory_setup.h"
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
|
||||||
namespace Memory {
|
namespace Memory {
|
||||||
|
|
Reference in New Issue