-int code_copy_enabled = 1;
-
-#ifdef DEBUG_DISAS
-static const char *op_str[] = {
-#define DEF(s, n, copy_size) #s,
-#include "opc.h"
-#undef DEF
-};
-
-static uint8_t op_nb_args[] = {
-#define DEF(s, n, copy_size) n,
-#include "opc.h"
-#undef DEF
-};
-
-static const unsigned short opc_copy_size[] = {
-#define DEF(s, n, copy_size) copy_size,
-#include "opc.h"
-#undef DEF
-};
-
-void dump_ops(const uint16_t *opc_buf, const uint32_t *opparam_buf)
-{
- const uint16_t *opc_ptr;
- const uint32_t *opparam_ptr;
- int c, n, i;
-
- opc_ptr = opc_buf;
- opparam_ptr = opparam_buf;
- for(;;) {
- c = *opc_ptr++;
- n = op_nb_args[c];
- fprintf(logfile, "0x%04x: %s",
- (int)(opc_ptr - opc_buf - 1), op_str[c]);
- for(i = 0; i < n; i++) {
- fprintf(logfile, " 0x%x", opparam_ptr[i]);
- }
- fprintf(logfile, "\n");
- if (c == INDEX_op_end)
- break;
- opparam_ptr += n;
- }
-}
-
-#endif
-
-/* compute label info */
-static void dyngen_labels(long *gen_labels, int nb_gen_labels,
- uint8_t *gen_code_buf, const uint16_t *opc_buf)
-{
- uint8_t *gen_code_ptr;
- int c, i;
- unsigned long gen_code_addr[OPC_BUF_SIZE];
-
- if (nb_gen_labels == 0)
- return;
- /* compute the address of each op code */
-
- gen_code_ptr = gen_code_buf;
- i = 0;
- for(;;) {
- c = opc_buf[i];
- gen_code_addr[i] =(unsigned long)gen_code_ptr;
- if (c == INDEX_op_end)
- break;
- gen_code_ptr += opc_copy_size[c];
- i++;
- }
-
- /* compute the address of each label */
- for(i = 0; i < nb_gen_labels; i++) {
- gen_labels[i] = gen_code_addr[gen_labels[i]];
- }
-}
-