summaryrefslogtreecommitdiff
path: root/asmrun/roots.c
diff options
context:
space:
mode:
Diffstat (limited to 'asmrun/roots.c')
-rw-r--r--asmrun/roots.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/asmrun/roots.c b/asmrun/roots.c
index f5ff1591e8..c1d3db003a 100644
--- a/asmrun/roots.c
+++ b/asmrun/roots.c
@@ -100,7 +100,11 @@ void caml_oldify_local_roots (void)
frame_descr * d;
uintnat h;
int i, j, n, ofs;
+#ifdef Stack_grows_upwards
+ short * p; /* PR#4339: stack offsets are negative in this case */
+#else
unsigned short * p;
+#endif
value glob;
value * root;
struct global_root * gr;
@@ -229,7 +233,11 @@ void caml_do_local_roots(scanning_action f, char * bottom_of_stack,
frame_descr * d;
uintnat h;
int i, j, n, ofs;
+#ifdef Stack_grows_upwards
+ short * p; /* PR#4339: stack offsets are negative in this case */
+#else
unsigned short * p;
+#endif
value * root;
struct caml__roots_block *lr;