1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +02:00

rtl: propagate OP_DST to scheme

* libguile/instructions.c (scm_rtl_instruction_list): Add an element to
  the list to indicate that an instruction outputs to its first
  argument.

* module/system/vm/assembler.scm:
* module/system/vm/disassembler.scm: Adapt.
This commit is contained in:
Andy Wingo 2013-07-19 09:55:20 +02:00
parent ee0a2b5135
commit 2a294c7cd3
3 changed files with 7 additions and 2 deletions

View file

@ -41,6 +41,10 @@ struct scm_instruction {
};
SCM_SYMBOL (sym_left_arrow, "<-");
SCM_SYMBOL (sym_bang, "!");
#define OP_HAS_ARITY (1U << 0)
#define FOR_EACH_INSTRUCTION_WORD_TYPE(M) \
@ -274,6 +278,7 @@ SCM_DEFINE (scm_rtl_instruction_list, "rtl-instruction-list", 0, 0, 0,
case 1:
tail = scm_cons (word_type_symbols[WORD_TYPE (0, meta)], tail);
default:
tail = scm_cons ((meta & OP_DST) ? sym_left_arrow : sym_bang, tail);
tail = scm_cons (scm_from_int (ip[i].opcode), tail);
tail = scm_cons (ip[i].symname, tail);
break;