diff options
author | David Phillips <david@sighup.nz> | 2019-04-14 18:54:50 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-08-03 12:43:46 +1200 |
commit | 36566268c9ead4a3d53730e66460a38a92820f3d (patch) | |
tree | 55fbb6bb3341d9a8ef068604b0db6a610732f13d /output.c | |
parent | 0b7bf68ade7a646377acbc7eb535ba1133d18475 (diff) | |
download | toy-cpu-assembler-36566268c9ead4a3d53730e66460a38a92820f3d.tar.xz |
Small tidy up of headers, misc output
Diffstat (limited to 'output.c')
-rw-r--r-- | output.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -141,7 +141,7 @@ int output_single(FILE *f, struct label *labels, size_t labels_count, struct ins len = generate_single_jr_type(&i, inst.inst.jr); break; case INST_TYPE_JI: - if ( inst.inst.ji.imm_is_ident + if ( inst.inst.ji.imm_is_ident && look_up_label(labels, labels_count, &inst.inst.ji.imm.value, inst.inst.ji.imm.label)) return 1; @@ -193,8 +193,6 @@ int output(FILE *fout, struct label *labels, size_t label_count, struct instruct fprintf(fout, "v2.0 raw\n"); #endif - printf("output: have %d instructions\n", insts_count); - for (i = 0; i < insts_count; i++) if (output_single(fout, labels, label_count, insts[i])) return 1; |