summaryrefslogtreecommitdiff
path: root/yjit_core.h
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2021-11-04 13:05:41 -0700
committerGitHub <noreply@github.com>2021-11-04 16:05:41 -0400
commit2421527d6e4737c371bca0cf7e694f8a2a0f923d (patch)
tree90621ade7e47fab78ce7c885d55aed1c99fdc434 /yjit_core.h
parent85b4cf16e2cae0577633c1acb1dc7413d58fcb5a (diff)
YJIT code pages refactoring for code GC (#5073)
* New code page allocation logic * Fix leaked globals * Fix leaked symbols, yjit asm tests * Make COUNTED_EXIT take a jit argument, so we can eliminate global ocb * Remove extra whitespace * Change block start_pos/end_pos to be pointers instead of uint32_t * Change branch end_pos and start_pos to end_addr, start_addr
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit_core.h')
-rw-r--r--yjit_core.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/yjit_core.h b/yjit_core.h
index e623ed72aa..6cd3ec0095 100644
--- a/yjit_core.h
+++ b/yjit_core.h
@@ -12,11 +12,10 @@
// Scratch registers used by YJIT
#define REG0 RAX
-#define REG1 RCX
#define REG0_32 EAX
-#define REG1_32 ECX
-
#define REG0_8 AL
+#define REG1 RCX
+#define REG1_32 ECX
// Maximum number of temp value types we keep track of
#define MAX_TEMP_TYPES 8
@@ -193,8 +192,8 @@ typedef struct yjit_branch_entry
struct yjit_block_version *block;
// Positions where the generated code starts and ends
- uint32_t start_pos;
- uint32_t end_pos;
+ uint8_t* start_addr;
+ uint8_t* end_addr;
// Context right after the branch instruction
ctx_t src_ctx;
@@ -242,8 +241,8 @@ typedef struct yjit_block_version
ctx_t ctx;
// Positions where the generated code starts and ends
- uint32_t start_pos;
- uint32_t end_pos;
+ uint8_t* start_addr;
+ uint8_t* end_addr;
// List of incoming branches (from predecessors)
branch_array_t incoming;
@@ -259,9 +258,6 @@ typedef struct yjit_block_version
// block in the system.
cme_dependency_array_t cme_dependencies;
- // Code page this block lives on
- VALUE code_page;
-
// Index one past the last instruction in the iseq
uint32_t end_idx;