codegen: fix architecture detection on MSVC

This commit is contained in:
David Hrdlička
2020-12-17 00:47:03 +01:00
parent 548dc2a410
commit 144b19b941
14 changed files with 14 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
#ifdef __amd64__ #if defined __amd64__ || defined _M_X64
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -36,7 +36,7 @@
* Boston, MA 02111-1307 * Boston, MA 02111-1307
* USA. * USA.
*/ */
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86 || defined _M_X64 #if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>

View File

@@ -112,7 +112,7 @@ uint8_t *codeblock_allocator_get_ptr(mem_block_t *block)
void codegen_allocator_clean_blocks(struct mem_block_t *block) void codegen_allocator_clean_blocks(struct mem_block_t *block)
{ {
#if defined __ARM_EABI__ || defined _ARM_ || defined __aarch64__ #if defined __ARM_EABI__ || defined _ARM_ || defined __aarch64__ || defined _M_ARM || defined _M_ARM64
while (1) while (1)
{ {
__clear_cache(&mem_block_alloc[block->offset], &mem_block_alloc[block->offset + MEM_BLOCK_SIZE]); __clear_cache(&mem_block_alloc[block->offset], &mem_block_alloc[block->offset + MEM_BLOCK_SIZE]);

View File

@@ -13,7 +13,7 @@
Due to the chaining, the total memory size is limited by the range of a jump Due to the chaining, the total memory size is limited by the range of a jump
instruction. ARMv7 is restricted to +/- 32 MB, ARMv8 to +/- 128 MB, x86 to instruction. ARMv7 is restricted to +/- 32 MB, ARMv8 to +/- 128 MB, x86 to
+/- 2GB. As a result, total memory size is limited to 32 MB on ARMv7*/ +/- 2GB. As a result, total memory size is limited to 32 MB on ARMv7*/
#if defined __ARM_EABI__ || _ARM_ #if defined __ARM_EABI__ || defined _ARM_ || defined _M_ARM
#define MEM_BLOCK_NR 32768 #define MEM_BLOCK_NR 32768
#else #else
#define MEM_BLOCK_NR 131072 #define MEM_BLOCK_NR 131072

View File

@@ -1,4 +1,4 @@
#if defined __ARM_EABI__ || defined _ARM_ #if defined __ARM_EABI__ || defined _ARM_ || defined _M_ARM
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>

View File

@@ -1,4 +1,4 @@
#ifdef __aarch64__ #if defined __aarch64__ || defined _M_ARM64
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>

View File

@@ -1,4 +1,4 @@
#ifdef __aarch64__ #if defined __aarch64__ || defined _M_ARM64
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>

View File

@@ -1,4 +1,4 @@
#ifdef __aarch64__ #if defined __aarch64__ || defined _M_ARM64
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>

View File

@@ -1,4 +1,4 @@
#if defined __ARM_EABI__ || defined _ARM_ #if defined __ARM_EABI__ || defined _ARM_ || defined _M_ARM
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>

View File

@@ -1,4 +1,4 @@
#if defined __ARM_EABI__ || defined _ARM_ #if defined __ARM_EABI__ || defined _ARM_ || defined _M_ARM
#include <math.h> #include <math.h>
#include <stdint.h> #include <stdint.h>

View File

@@ -1,4 +1,4 @@
#ifdef __amd64__ #if defined __amd64__ || defined _M_X64
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>

View File

@@ -1,4 +1,4 @@
#ifdef __amd64__ #if defined __amd64__ || defined _M_X64
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>

View File

@@ -1,4 +1,4 @@
#ifdef __amd64__ #if defined __amd64__ || defined _M_X64
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>

View File

@@ -1,4 +1,4 @@
#ifdef __amd64__ #if defined __amd64__ || defined _M_X64
#include <stdint.h> #include <stdint.h>
#include <86box/86box.h> #include <86box/86box.h>