2001-07-24
2001-07-24 12:33:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
440a123f606c3a46dd6c388cbb37a7acf586698b
(22 lines)
(+21/-1)
[
Show
| Annotate
]
Branch: 7.9
Moved a few generic simple operator opcode optimizations.
Rev: src/interpret.c:1.231
5:
\*/
/**/
#include "global.h"
- RCSID("$Id: interpret.c,v 1.230 2001/07/21 09:29:29 hubbe Exp $");
+ RCSID("$Id: interpret.c,v 1.231 2001/07/24 12:33:48 grubba Exp $");
#include "interpret.h"
#include "object.h"
#include "program.h"
230: Inside #if defined(HAVE_COMPUTED_GOTO)
/* Initialize the fcode_to_opcode table. */
eval_instruction(NULL);
#endif /* HAVE_COMPUTED_GOTO */
+ #if defined(PIKE_USE_MACHINE_CODE) && !defined(PIKE_DEBUG)
+ /* Simple operator opcodes... */
+ #define SET_INSTR_ADDRESS(X, Y) (instrs[(X)-F_OFFSET].address = (void *)Y)
+ SET_INSTR_ADDRESS(F_COMPL, o_compl);
+ SET_INSTR_ADDRESS(F_LSH, o_lsh);
+ SET_INSTR_ADDRESS(F_RSH, o_rsh);
+ SET_INSTR_ADDRESS(F_SUBTRACT, o_subtract);
+ SET_INSTR_ADDRESS(F_AND, o_and);
+ SET_INSTR_ADDRESS(F_OR, o_or);
+ SET_INSTR_ADDRESS(F_XOR, o_xor);
+ SET_INSTR_ADDRESS(F_MULTIPLY, o_multiply);
+ SET_INSTR_ADDRESS(F_DIVIDE, o_divide);
+ SET_INSTR_ADDRESS(F_MOD, o_mod);
+ SET_INSTR_ADDRESS(F_CAST, o_cast);
+ SET_INSTR_ADDRESS(F_CAST_TO_INT, o_cast_to_int);
+ SET_INSTR_ADDRESS(F_CAST_TO_STRING, o_cast_to_string);
+ SET_INSTR_ADDRESS(F_RANGE, o_range);
+ SET_INSTR_ADDRESS(F_SSCANF, o_sscanf);
+ #endif /* PIKE_USE_MACHINE_CODE && !PIKE_DEBUG */
}