commit c12bae156bbb7ea12f7b9370d5a3e661a2a35645 Author: Roberto E. Vargas Caballero <k...@shike2.com> AuthorDate: Wed Jun 22 16:38:15 2016 +0200 Commit: Roberto E. Vargas Caballero <k...@shike2.com> CommitDate: Wed Jun 22 16:41:15 2016 +0200
[cc2] Update the value of sym->u.inst When we call to setlabel() it means that this label is pointing to this instruction, so we have to make the label points to the instruction too, and not only the instruction to the label. diff --git a/cc2/code.c b/cc2/code.c index 8d4bc69..8b433c9 100644 --- a/cc2/code.c +++ b/cc2/code.c @@ -84,6 +84,7 @@ setlabel(Symbol *sym) return; code(0, NULL, NULL, NULL); pc->label = sym; + sym->u.inst = pc; } void