1 /* ----------------------------------------------------------------------- *
3 * Copyright 1996-2009 The NASM Authors - All Rights Reserved
4 * See the file AUTHORS included with the NASM distribution for
5 * the specific copyright holders.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
19 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * ----------------------------------------------------------------------- */
35 * parser.c source line parser for the Netwide Assembler
55 extern int in_abs_seg; /* ABSOLUTE segment flag */
56 extern int32_t abs_seg; /* ABSOLUTE segment */
57 extern int32_t abs_offset; /* ABSOLUTE segment offset */
59 static int is_comma_next(void);
62 static struct tokenval tokval;
64 static struct location *location; /* Pointer to current line's segment,offset */
66 void parser_global_info(struct location * locp)
71 static int prefix_slot(enum prefixes prefix)
101 error(ERR_PANIC, "Invalid value %d passed to prefix_slot()", prefix);
106 static void process_size_override(insn * result, int operand)
108 if (tasm_compatible_mode) {
109 switch ((int)tokval.t_integer) {
110 /* For TASM compatibility a size override inside the
111 * brackets changes the size of the operand, not the
112 * address type of the operand as it does in standard
113 * NASM syntax. Hence:
115 * mov eax,[DWORD val]
117 * is valid syntax in TASM compatibility mode. Note that
118 * you lose the ability to override the default address
119 * type for the instruction, but we never use anything
120 * but 32-bit flat model addressing in our code.
123 result->oprs[operand].type |= BITS8;
126 result->oprs[operand].type |= BITS16;
130 result->oprs[operand].type |= BITS32;
133 result->oprs[operand].type |= BITS64;
136 result->oprs[operand].type |= BITS80;
139 result->oprs[operand].type |= BITS128;
143 "invalid operand size specification");
147 /* Standard NASM compatible syntax */
148 switch ((int)tokval.t_integer) {
150 result->oprs[operand].eaflags |= EAF_TIMESTWO;
153 result->oprs[operand].eaflags |= EAF_REL;
156 result->oprs[operand].eaflags |= EAF_ABS;
159 result->oprs[operand].disp_size = 8;
160 result->oprs[operand].eaflags |= EAF_BYTEOFFS;
165 if (result->prefixes[PPS_ASIZE] &&
166 result->prefixes[PPS_ASIZE] != tokval.t_integer)
168 "conflicting address size specifications");
170 result->prefixes[PPS_ASIZE] = tokval.t_integer;
173 result->oprs[operand].disp_size = 16;
174 result->oprs[operand].eaflags |= EAF_WORDOFFS;
178 result->oprs[operand].disp_size = 32;
179 result->oprs[operand].eaflags |= EAF_WORDOFFS;
182 result->oprs[operand].disp_size = 64;
183 result->oprs[operand].eaflags |= EAF_WORDOFFS;
186 error(ERR_NONFATAL, "invalid size specification in"
187 " effective address");
193 insn *parse_line(int pass, char *buffer, insn * result,
194 efunc errfunc, evalfunc evaluate, ldfunc ldef)
198 struct eval_hints hints;
201 bool insn_is_label = false;
206 result->forw_ref = false;
210 stdscan_bufptr = buffer;
211 i = stdscan(NULL, &tokval);
213 result->label = NULL; /* Assume no label */
214 result->eops = NULL; /* must do this, whatever happens */
215 result->operands = 0; /* must initialize this */
217 if (i == 0) { /* blank line - ignore */
218 result->opcode = -1; /* and no instruction either */
221 if (i != TOKEN_ID && i != TOKEN_INSN && i != TOKEN_PREFIX &&
222 (i != TOKEN_REG || (REG_SREG & ~nasm_reg_flags[tokval.t_integer]))) {
223 error(ERR_NONFATAL, "label or instruction expected"
224 " at start of line");
229 if (i == TOKEN_ID || (insn_is_label && i == TOKEN_INSN)) {
230 /* there's a label here */
232 result->label = tokval.t_charptr;
233 i = stdscan(NULL, &tokval);
234 if (i == ':') { /* skip over the optional colon */
235 i = stdscan(NULL, &tokval);
237 error(ERR_WARNING | ERR_WARN_OL | ERR_PASS1,
238 "label alone on a line without a colon might be in error");
240 if (i != TOKEN_INSN || tokval.t_integer != I_EQU) {
242 * FIXME: location->segment could be NO_SEG, in which case
243 * it is possible we should be passing 'abs_seg'. Look into this.
244 * Work out whether that is *really* what we should be doing.
245 * Generally fix things. I think this is right as it is, but
246 * am still not certain.
248 ldef(result->label, in_abs_seg ? abs_seg : location->segment,
249 location->offset, NULL, true, false);
254 result->opcode = -1; /* this line contains just a label */
258 for (j = 0; j < MAXPREFIX; j++)
259 result->prefixes[j] = P_none;
262 while (i == TOKEN_PREFIX ||
263 (i == TOKEN_REG && !(REG_SREG & ~nasm_reg_flags[tokval.t_integer])))
268 * Handle special case: the TIMES prefix.
270 if (i == TOKEN_PREFIX && tokval.t_integer == P_TIMES) {
273 i = stdscan(NULL, &tokval);
275 evaluate(stdscan, NULL, &tokval, NULL, pass0, error, NULL);
277 if (!value) { /* but, error in evaluator */
278 result->opcode = -1; /* unrecoverable parse error: */
279 return result; /* ignore this instruction */
281 if (!is_simple(value)) {
283 "non-constant argument supplied to TIMES");
286 result->times = value->value;
287 if (value->value < 0 && pass0 == 2) {
288 error(ERR_NONFATAL, "TIMES value %d is negative",
294 int slot = prefix_slot(tokval.t_integer);
295 if (result->prefixes[slot]) {
296 if (result->prefixes[slot] == tokval.t_integer)
298 "instruction has redundant prefixes");
301 "instruction has conflicting prefixes");
303 result->prefixes[slot] = tokval.t_integer;
304 i = stdscan(NULL, &tokval);
308 if (i != TOKEN_INSN) {
312 for (j = 0; j < MAXPREFIX; j++)
313 if ((pfx = result->prefixes[j]) != P_none)
316 if (i == 0 && pfx != P_none) {
318 * Instruction prefixes are present, but no actual
319 * instruction. This is allowed: at this point we
320 * invent a notional instruction of RESB 0.
322 result->opcode = I_RESB;
323 result->operands = 1;
324 result->oprs[0].type = IMMEDIATE;
325 result->oprs[0].offset = 0L;
326 result->oprs[0].segment = result->oprs[0].wrt = NO_SEG;
329 error(ERR_NONFATAL, "parser: instruction expected");
335 result->opcode = tokval.t_integer;
336 result->condition = tokval.t_inttwo;
339 * INCBIN cannot be satisfied with incorrectly
340 * evaluated operands, since the correct values _must_ be known
341 * on the first pass. Hence, even in pass one, we set the
342 * `critical' flag on calling evaluate(), so that it will bomb
343 * out on undefined symbols.
345 if (result->opcode == I_INCBIN) {
346 critical = (pass0 < 2 ? 1 : 2);
349 critical = (pass == 2 ? 2 : 0);
351 if (result->opcode == I_DB || result->opcode == I_DW ||
352 result->opcode == I_DD || result->opcode == I_DQ ||
353 result->opcode == I_DT || result->opcode == I_DO ||
354 result->opcode == I_DY || result->opcode == I_INCBIN) {
355 extop *eop, **tail = &result->eops, **fixptr;
359 result->eops_float = false;
362 * Begin to read the DB/DW/DD/DQ/DT/DO/INCBIN operands.
365 i = stdscan(NULL, &tokval);
368 else if (first && i == ':') {
369 insn_is_label = true;
374 eop = *tail = nasm_malloc(sizeof(extop));
377 eop->type = EOT_NOTHING;
381 /* is_comma_next() here is to distinguish this from
382 a string used as part of an expression... */
383 if (i == TOKEN_STR && is_comma_next()) {
384 eop->type = EOT_DB_STRING;
385 eop->stringval = tokval.t_charptr;
386 eop->stringlen = tokval.t_inttwo;
387 i = stdscan(NULL, &tokval); /* eat the comma */
388 } else if (i == TOKEN_STRFUNC) {
390 const char *funcname = tokval.t_charptr;
391 enum strfunc func = tokval.t_integer;
392 i = stdscan(NULL, &tokval);
395 i = stdscan(NULL, &tokval);
397 if (i != TOKEN_STR) {
399 "%s must be followed by a string constant",
401 eop->type = EOT_NOTHING;
403 eop->type = EOT_DB_STRING_FREE;
405 string_transform(tokval.t_charptr, tokval.t_inttwo,
406 &eop->stringval, func);
407 if (eop->stringlen == (size_t)-1) {
408 error(ERR_NONFATAL, "invalid string for transform");
409 eop->type = EOT_NOTHING;
412 if (parens && i && i != ')') {
413 i = stdscan(NULL, &tokval);
415 error(ERR_NONFATAL, "unterminated %s function",
420 i = stdscan(NULL, &tokval);
421 } else if (i == '-' || i == '+') {
422 char *save = stdscan_bufptr;
424 sign = (i == '-') ? -1 : 1;
425 i = stdscan(NULL, &tokval);
426 if (i != TOKEN_FLOAT) {
427 stdscan_bufptr = save;
428 i = tokval.t_type = token;
433 } else if (i == TOKEN_FLOAT) {
435 eop->type = EOT_DB_STRING;
436 result->eops_float = true;
437 switch (result->opcode) {
457 error(ERR_NONFATAL, "floating-point constant"
458 " encountered in DY instruction");
462 error(ERR_NONFATAL, "floating-point constant"
463 " encountered in unknown instruction");
465 * fix suggested by Pedro Gimeno... original line
467 * eop->type = EOT_NOTHING;
472 eop = nasm_realloc(eop, sizeof(extop) + eop->stringlen);
475 eop->stringval = (char *)eop + sizeof(extop);
476 if (!eop->stringlen ||
477 !float_const(tokval.t_charptr, sign,
478 (uint8_t *)eop->stringval,
479 eop->stringlen, error))
480 eop->type = EOT_NOTHING;
481 i = stdscan(NULL, &tokval); /* eat the comma */
483 /* anything else, assume it is an expression */
487 value = evaluate(stdscan, NULL, &tokval, NULL,
488 critical, error, NULL);
490 if (!value) { /* error in evaluator */
491 result->opcode = -1; /* unrecoverable parse error: */
492 return result; /* ignore this instruction */
494 if (is_unknown(value)) {
495 eop->type = EOT_DB_NUMBER;
496 eop->offset = 0; /* doesn't matter what we put */
497 eop->segment = eop->wrt = NO_SEG; /* likewise */
498 } else if (is_reloc(value)) {
499 eop->type = EOT_DB_NUMBER;
500 eop->offset = reloc_value(value);
501 eop->segment = reloc_seg(value);
502 eop->wrt = reloc_wrt(value);
505 "operand %d: expression is not simple"
506 " or relocatable", oper_num);
511 * We're about to call stdscan(), which will eat the
512 * comma that we're currently sitting on between
513 * arguments. However, we'd better check first that it
516 if (i == 0) /* also could be EOL */
519 error(ERR_NONFATAL, "comma expected after operand %d",
521 result->opcode = -1; /* unrecoverable parse error: */
522 return result; /* ignore this instruction */
526 if (result->opcode == I_INCBIN) {
528 * Correct syntax for INCBIN is that there should be
529 * one string operand, followed by one or two numeric
532 if (!result->eops || result->eops->type != EOT_DB_STRING)
533 error(ERR_NONFATAL, "`incbin' expects a file name");
534 else if (result->eops->next &&
535 result->eops->next->type != EOT_DB_NUMBER)
536 error(ERR_NONFATAL, "`incbin': second parameter is",
538 else if (result->eops->next && result->eops->next->next &&
539 result->eops->next->next->type != EOT_DB_NUMBER)
540 error(ERR_NONFATAL, "`incbin': third parameter is",
542 else if (result->eops->next && result->eops->next->next &&
543 result->eops->next->next->next)
545 "`incbin': more than three parameters");
549 * If we reach here, one of the above errors happened.
550 * Throw the instruction away.
554 } else /* DB ... */ if (oper_num == 0)
555 error(ERR_WARNING | ERR_PASS1,
556 "no operand for data declaration");
558 result->operands = oper_num;
563 /* right. Now we begin to parse the operands. There may be up to four
564 * of these, separated by commas, and terminated by a zero token. */
566 for (operand = 0; operand < MAX_OPERANDS; operand++) {
567 expr *value; /* used most of the time */
568 int mref; /* is this going to be a memory ref? */
569 int bracket; /* is it a [] mref, or a & mref? */
572 result->oprs[operand].disp_size = 0; /* have to zero this whatever */
573 result->oprs[operand].eaflags = 0; /* and this */
574 result->oprs[operand].opflags = 0;
576 i = stdscan(NULL, &tokval);
578 break; /* end of operands: get out of here */
579 else if (first && i == ':') {
580 insn_is_label = true;
584 result->oprs[operand].type = 0; /* so far, no override */
585 while (i == TOKEN_SPECIAL) { /* size specifiers */
586 switch ((int)tokval.t_integer) {
588 if (!setsize) /* we want to use only the first */
589 result->oprs[operand].type |= BITS8;
594 result->oprs[operand].type |= BITS16;
600 result->oprs[operand].type |= BITS32;
605 result->oprs[operand].type |= BITS64;
610 result->oprs[operand].type |= BITS80;
615 result->oprs[operand].type |= BITS128;
620 result->oprs[operand].type |= BITS256;
624 result->oprs[operand].type |= TO;
627 result->oprs[operand].type |= STRICT;
630 result->oprs[operand].type |= FAR;
633 result->oprs[operand].type |= NEAR;
636 result->oprs[operand].type |= SHORT;
639 error(ERR_NONFATAL, "invalid operand size specification");
641 i = stdscan(NULL, &tokval);
644 if (i == '[' || i == '&') { /* memory reference */
646 bracket = (i == '[');
647 i = stdscan(NULL, &tokval); /* then skip the colon */
648 while (i == TOKEN_SPECIAL || i == TOKEN_PREFIX) {
649 process_size_override(result, operand);
650 i = stdscan(NULL, &tokval);
652 } else { /* immediate operand, or register */
654 bracket = false; /* placate optimisers */
657 if ((result->oprs[operand].type & FAR) && !mref &&
658 result->opcode != I_JMP && result->opcode != I_CALL) {
659 error(ERR_NONFATAL, "invalid use of FAR operand specifier");
662 value = evaluate(stdscan, NULL, &tokval,
663 &result->oprs[operand].opflags,
664 critical, error, &hints);
666 if (result->oprs[operand].opflags & OPFLAG_FORWARD) {
667 result->forw_ref = true;
669 if (!value) { /* error in evaluator */
670 result->opcode = -1; /* unrecoverable parse error: */
671 return result; /* ignore this instruction */
673 if (i == ':' && mref) { /* it was seg:offset */
675 * Process the segment override.
677 if (value[1].type != 0 || value->value != 1 ||
678 REG_SREG & ~nasm_reg_flags[value->type])
679 error(ERR_NONFATAL, "invalid segment override");
680 else if (result->prefixes[PPS_SEG])
682 "instruction has conflicting segment overrides");
684 result->prefixes[PPS_SEG] = value->type;
685 if (!(REG_FSGS & ~nasm_reg_flags[value->type]))
686 result->oprs[operand].eaflags |= EAF_FSGS;
689 i = stdscan(NULL, &tokval); /* then skip the colon */
690 while (i == TOKEN_SPECIAL || i == TOKEN_PREFIX) {
691 process_size_override(result, operand);
692 i = stdscan(NULL, &tokval);
694 value = evaluate(stdscan, NULL, &tokval,
695 &result->oprs[operand].opflags,
696 critical, error, &hints);
698 if (result->oprs[operand].opflags & OPFLAG_FORWARD) {
699 result->forw_ref = true;
701 /* and get the offset */
702 if (!value) { /* but, error in evaluator */
703 result->opcode = -1; /* unrecoverable parse error: */
704 return result; /* ignore this instruction */
709 if (mref && bracket) { /* find ] at the end */
711 error(ERR_NONFATAL, "parser: expecting ]");
713 } else { /* we got the required ] */
714 i = stdscan(NULL, &tokval);
715 if (i != 0 && i != ',') {
716 error(ERR_NONFATAL, "comma or end of line expected");
720 } else { /* immediate operand */
721 if (i != 0 && i != ',' && i != ':') {
722 error(ERR_NONFATAL, "comma, colon or end of line expected");
724 } else if (i == ':') {
725 result->oprs[operand].type |= COLON;
729 do { /* error recovery */
730 i = stdscan(NULL, &tokval);
731 } while (i != 0 && i != ',');
734 /* now convert the exprs returned from evaluate() into operand
737 if (mref) { /* it's a memory reference */
739 int b, i, s; /* basereg, indexreg, scale */
740 int64_t o; /* offset */
742 b = i = -1, o = s = 0;
743 result->oprs[operand].hintbase = hints.base;
744 result->oprs[operand].hinttype = hints.type;
746 if (e->type && e->type <= EXPR_REG_END) { /* this bit's a register */
747 if (e->value == 1) /* in fact it can be basereg */
749 else /* no, it has to be indexreg */
750 i = e->type, s = e->value;
753 if (e->type && e->type <= EXPR_REG_END) { /* it's a 2nd register */
754 if (b != -1) /* If the first was the base, ... */
755 i = e->type, s = e->value; /* second has to be indexreg */
757 else if (e->value != 1) { /* If both want to be index */
759 "beroset-p-592-invalid effective address");
766 if (e->type != 0) { /* is there an offset? */
767 if (e->type <= EXPR_REG_END) { /* in fact, is there an error? */
769 "beroset-p-603-invalid effective address");
773 if (e->type == EXPR_UNKNOWN) {
774 result->oprs[operand].opflags |= OPFLAG_UNKNOWN;
775 o = 0; /* doesn't matter what */
776 result->oprs[operand].wrt = NO_SEG; /* nor this */
777 result->oprs[operand].segment = NO_SEG; /* or this */
779 e++; /* go to the end of the line */
781 if (e->type == EXPR_SIMPLE) {
785 if (e->type == EXPR_WRT) {
786 result->oprs[operand].wrt = e->value;
789 result->oprs[operand].wrt = NO_SEG;
791 * Look for a segment base type.
793 if (e->type && e->type < EXPR_SEGBASE) {
795 "beroset-p-630-invalid effective address");
799 while (e->type && e->value == 0)
801 if (e->type && e->value != 1) {
803 "beroset-p-637-invalid effective address");
808 result->oprs[operand].segment =
809 e->type - EXPR_SEGBASE;
812 result->oprs[operand].segment = NO_SEG;
813 while (e->type && e->value == 0)
817 "beroset-p-650-invalid effective address");
825 result->oprs[operand].wrt = NO_SEG;
826 result->oprs[operand].segment = NO_SEG;
829 if (e->type != 0) { /* there'd better be nothing left! */
831 "beroset-p-663-invalid effective address");
836 /* It is memory, but it can match any r/m operand */
837 result->oprs[operand].type |= MEMORY_ANY;
839 if (b == -1 && (i == -1 || s == 0)) {
840 int is_rel = globalbits == 64 &&
841 !(result->oprs[operand].eaflags & EAF_ABS) &&
843 !(result->oprs[operand].eaflags & EAF_FSGS)) ||
844 (result->oprs[operand].eaflags & EAF_REL));
846 result->oprs[operand].type |= is_rel ? IP_REL : MEM_OFFS;
848 result->oprs[operand].basereg = b;
849 result->oprs[operand].indexreg = i;
850 result->oprs[operand].scale = s;
851 result->oprs[operand].offset = o;
852 } else { /* it's not a memory reference */
853 if (is_just_unknown(value)) { /* it's immediate but unknown */
854 result->oprs[operand].type |= IMMEDIATE;
855 result->oprs[operand].opflags |= OPFLAG_UNKNOWN;
856 result->oprs[operand].offset = 0; /* don't care */
857 result->oprs[operand].segment = NO_SEG; /* don't care again */
858 result->oprs[operand].wrt = NO_SEG; /* still don't care */
860 if(optimizing >= 0 && !(result->oprs[operand].type & STRICT))
863 result->oprs[operand].type |= SBYTE16 | SBYTE32 | SBYTE64;
865 } else if (is_reloc(value)) { /* it's immediate */
866 result->oprs[operand].type |= IMMEDIATE;
867 result->oprs[operand].offset = reloc_value(value);
868 result->oprs[operand].segment = reloc_seg(value);
869 result->oprs[operand].wrt = reloc_wrt(value);
870 if (is_simple(value)) {
871 if (reloc_value(value) == 1)
872 result->oprs[operand].type |= UNITY;
873 if (optimizing >= 0 &&
874 !(result->oprs[operand].type & STRICT)) {
875 int64_t v64 = reloc_value(value);
876 int32_t v32 = (int32_t)v64;
877 int16_t v16 = (int16_t)v32;
879 if (v64 >= -128 && v64 <= 127)
880 result->oprs[operand].type |= SBYTE64;
881 if (v32 >= -128 && v32 <= 127)
882 result->oprs[operand].type |= SBYTE32;
883 if (v16 >= -128 && v16 <= 127)
884 result->oprs[operand].type |= SBYTE16;
887 } else { /* it's a register */
890 if (value->type >= EXPR_SIMPLE || value->value != 1) {
891 error(ERR_NONFATAL, "invalid operand type");
897 * check that its only 1 register, not an expression...
899 for (i = 1; value[i].type; i++)
900 if (value[i].value) {
901 error(ERR_NONFATAL, "invalid operand type");
906 /* clear overrides, except TO which applies to FPU regs */
907 if (result->oprs[operand].type & ~TO) {
909 * we want to produce a warning iff the specified size
910 * is different from the register size
912 rs = result->oprs[operand].type & SIZE_MASK;
916 result->oprs[operand].type &= TO;
917 result->oprs[operand].type |= REGISTER;
918 result->oprs[operand].type |= nasm_reg_flags[value->type];
919 result->oprs[operand].basereg = value->type;
921 if (rs && (result->oprs[operand].type & SIZE_MASK) != rs)
922 error(ERR_WARNING | ERR_PASS1,
923 "register size specification ignored");
928 result->operands = operand; /* set operand count */
930 /* clear remaining operands */
931 while (operand < MAX_OPERANDS)
932 result->oprs[operand++].type = 0;
935 * Transform RESW, RESD, RESQ, REST, RESO, RESY into RESB.
937 switch (result->opcode) {
939 result->opcode = I_RESB;
940 result->oprs[0].offset *= 2;
943 result->opcode = I_RESB;
944 result->oprs[0].offset *= 4;
947 result->opcode = I_RESB;
948 result->oprs[0].offset *= 8;
951 result->opcode = I_RESB;
952 result->oprs[0].offset *= 10;
955 result->opcode = I_RESB;
956 result->oprs[0].offset *= 16;
959 result->opcode = I_RESB;
960 result->oprs[0].offset *= 32;
969 static int is_comma_next(void)
976 i = stdscan(NULL, &tv);
978 return (i == ',' || i == ';' || !i);
981 void cleanup_insn(insn * i)
985 while ((e = i->eops)) {
987 if (e->type == EOT_DB_STRING_FREE)
988 nasm_free(e->stringval);