comparison src/lwasm.c @ 74:c8c772ef5df9

Checkpointing object target implementation
author lost
date Thu, 08 Jan 2009 01:18:40 +0000
parents 309810f39ab7
children 2fe5fd7d65a3
comparison
equal deleted inserted replaced
73:4b37f17624a7 74:c8c772ef5df9
63 void lwasm_emit(asmstate_t *as, lwasm_line_t *l, int b) 63 void lwasm_emit(asmstate_t *as, lwasm_line_t *l, int b)
64 { 64 {
65 as -> addr += 1; 65 as -> addr += 1;
66 as -> addr &= 0xffff; 66 as -> addr &= 0xffff;
67 67
68 if (as -> outformat == OUTPUT_OBJ && !(as -> csect))
69 {
70 register_error(as, l, 1, "Output not allowed outside sections with obj target");
71 return;
72 }
73 if (as -> outformat == OUTPUT_OBJ && as -> csect -> flags & SECTION_BSS)
74 {
75 register_error(as, l, 1, "Output not allowed inside BSS sections");
76 return;
77 }
68 if (as -> passnum == 1) 78 if (as -> passnum == 1)
69 return; 79 return;
70 80
71 81
72 if (l -> codelen >= l -> codesize) 82 if (l -> codelen >= l -> codesize)