summaryrefslogtreecommitdiffstats
path: root/byterun/fix_code.c
diff options
context:
space:
mode:
authorLuc Maranget <luc.maranget@inria.fr>2000-10-02 14:18:05 +0000
committerLuc Maranget <luc.maranget@inria.fr>2000-10-02 14:18:05 +0000
commitab97fd0dccd4f1761b209ca7ed8e6f9f9a2763b1 (patch)
treeb5c98d572fd196ee68a160e177c9b9785fb40e80 /byterun/fix_code.c
parent89f252d93e85bbbfe2ed06c0cc2c256c1ddb49b7 (diff)
or-pat avec variables et compil du switch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/fix_code.c')
-rw-r--r--byterun/fix_code.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index 6496ee4db..5da63c62a 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -108,8 +108,9 @@ void thread_code (code_t code, asize_t len)
/* Instructions with two operands */
l[APPTERM] = l[CLOSURE] = l[PUSHGETGLOBALFIELD] =
- l[GETGLOBALFIELD] = l[MAKEBLOCK] = l[C_CALLN] = 2;
-
+ l[GETGLOBALFIELD] = l[MAKEBLOCK] = l[C_CALLN] =
+ l[BEQ] = l[BNEQ] = l[BLTINT] = l[BLEINT] = l[BGTINT] = l[BGEINT] =
+ l[BULTINT] = l[BUGEINT] = 2;
len /= sizeof(opcode_t);
for (p = code; p < code + len; /*nothing*/) {
opcode_t instr = *p;
@@ -117,6 +118,7 @@ void thread_code (code_t code, asize_t len)
fatal_error_arg ("Fatal error in fix_code: bad opcode (%lx)\n",
(char *)(long)instr);
}
+
*p++ = (opcode_t)(instr_table[instr] - instr_base);
if (instr == SWITCH) {
uint32 sizes = *p++;