-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/src/lj_mcode.c b/src/lj_mcode.c | ||
index 163aada4..c456da00 100644 | ||
--- a/src/lj_mcode.c | ||
+++ b/src/lj_mcode.c | ||
@@ -124,6 +124,24 @@ static int mcode_setprot(void *p, size_t sz, int prot) | ||
return mprotect(p, sz, prot); | ||
} | ||
|
||
+#elif LJ_TARGET_BAREMETAL | ||
+#define MCPROT_RW (1 << 0) | ||
+#define MCPROT_RX (1 << 1) | ||
+#define MCPROT_RWX (1 << 2) | ||
+ | ||
+static void *mcode_alloc_at(jit_State *J, uintptr_t hint, size_t sz, int prot) | ||
+{ | ||
+ return NULL; | ||
+} | ||
+ | ||
+static void mcode_free(jit_State *J, void *p, size_t sz) | ||
+{ | ||
+} | ||
+ | ||
+static int mcode_setprot(void *p, size_t sz, int prot) | ||
+{ | ||
+ return 0; | ||
+} | ||
#else | ||
|
||
#error "Missing OS support for explicit placement of executable memory" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters