diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-16 15:51:37 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-16 15:52:09 +0900 |
commit | a160b2f56716f70fa3e485ae89875da48baefc1d (patch) | |
tree | 40509f60a3052683c24bca4f24cac8c7d9f127d5 | |
parent | 7069f64c419ebb9a7fd3e48d81454148ed4b2fba (diff) |
Make COROUTINE_REGISTERS compile-time only not to be a global symbol
-rw-r--r-- | coroutine/amd64/Context.h | 2 | ||||
-rw-r--r-- | coroutine/arm32/Context.h | 2 | ||||
-rw-r--r-- | coroutine/arm64/Context.h | 2 | ||||
-rw-r--r-- | coroutine/ppc64le/Context.h | 6 | ||||
-rw-r--r-- | coroutine/win32/Context.h | 2 | ||||
-rw-r--r-- | coroutine/win64/Context.h | 2 | ||||
-rw-r--r-- | coroutine/x86/Context.h | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/coroutine/amd64/Context.h b/coroutine/amd64/Context.h index 1801c1e2c5..4ae31d157b 100644 --- a/coroutine/amd64/Context.h +++ b/coroutine/amd64/Context.h @@ -16,7 +16,7 @@ extern "C" { #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = 6; +enum {COROUTINE_REGISTERS = 6}; typedef struct { diff --git a/coroutine/arm32/Context.h b/coroutine/arm32/Context.h index 60732df7a0..d2bb582be6 100644 --- a/coroutine/arm32/Context.h +++ b/coroutine/arm32/Context.h @@ -16,7 +16,7 @@ extern "C" { #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = 9; +enum {COROUTINE_REGISTERS = 9}; typedef struct { diff --git a/coroutine/arm64/Context.h b/coroutine/arm64/Context.h index 03b91fd937..ed646e818b 100644 --- a/coroutine/arm64/Context.h +++ b/coroutine/arm64/Context.h @@ -16,7 +16,7 @@ extern "C" { #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = 0xb0 / 8; +enum {COROUTINE_REGISTERS = 0xb0 / 8}; typedef struct { diff --git a/coroutine/ppc64le/Context.h b/coroutine/ppc64le/Context.h index de592f5a46..5971cd8a9b 100644 --- a/coroutine/ppc64le/Context.h +++ b/coroutine/ppc64le/Context.h @@ -9,9 +9,11 @@ extern "C" { #define COROUTINE __attribute__((noreturn)) void -const size_t COROUTINE_REGISTERS = +enum { + COROUTINE_REGISTERS = 19 /* 18 general purpose registers (r14-r31) and 1 return address */ - + 4; /* space for fiber_entry() to store the link register */ + + 4 /* space for fiber_entry() to store the link register */ +}; typedef struct { diff --git a/coroutine/win32/Context.h b/coroutine/win32/Context.h index aa9f17ddab..779a9a8938 100644 --- a/coroutine/win32/Context.h +++ b/coroutine/win32/Context.h @@ -17,7 +17,7 @@ extern "C" { #define COROUTINE __declspec(noreturn) void __fastcall /* This doesn't include thread information block */ -const size_t COROUTINE_REGISTERS = 4; +enum {COROUTINE_REGISTERS = 4}; typedef struct { diff --git a/coroutine/win64/Context.h b/coroutine/win64/Context.h index 16a8f583ab..1c78dd5b14 100644 --- a/coroutine/win64/Context.h +++ b/coroutine/win64/Context.h @@ -16,7 +16,7 @@ extern "C" { #define COROUTINE __declspec(noreturn) void -const size_t COROUTINE_REGISTERS = 8; +enum {COROUTINE_REGISTERS = 8}; const size_t COROUTINE_XMM_REGISTERS = 1+10*2; typedef struct diff --git a/coroutine/x86/Context.h b/coroutine/x86/Context.h index b077227a1d..b471ecd9fe 100644 --- a/coroutine/x86/Context.h +++ b/coroutine/x86/Context.h @@ -16,7 +16,7 @@ extern "C" { #define COROUTINE __attribute__((noreturn, fastcall)) void -const size_t COROUTINE_REGISTERS = 4; +enum {COROUTINE_REGISTERS = 4}; typedef struct { |