summaryrefslogtreecommitdiff
path: root/kernel/byterun/coq_fix_code.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/byterun/coq_fix_code.c')
-rw-r--r--kernel/byterun/coq_fix_code.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/byterun/coq_fix_code.c b/kernel/byterun/coq_fix_code.c
index 3fded663..1be3e651 100644
--- a/kernel/byterun/coq_fix_code.c
+++ b/kernel/byterun/coq_fix_code.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <caml/config.h>
#include <caml/misc.h>
#include <caml/mlvalues.h>
@@ -146,21 +147,21 @@ value coq_tcode_of_code (value code, value size) {
};
*q++ = VALINSTR(instr);
if (instr == SWITCH) {
- uint32 i, sizes, const_size, block_size;
+ uint32_t i, sizes, const_size, block_size;
COPY32(q,p); p++;
sizes=*q++;
- const_size = sizes & 0xFFFF;
- block_size = sizes >> 16;
+ const_size = sizes & 0xFFFFFF;
+ block_size = sizes >> 24;
sizes = const_size + block_size;
for(i=0; i<sizes; i++) { COPY32(q,p); p++; q++; };
} else if (instr == CLOSUREREC || instr==CLOSURECOFIX) {
- uint32 i, n;
+ uint32_t i, n;
COPY32(q,p); p++; /* ndefs */
n = 3 + 2*(*q); /* ndefs, nvars, start, typlbls,lbls*/
q++;
for(i=1; i<n; i++) { COPY32(q,p); p++; q++; };
} else {
- uint32 i, ar;
+ uint32_t i, ar;
ar = arity[instr];
for(i=0; i<ar; i++) { COPY32(q,p); p++; q++; };
}