*/
#define YASM_LIB_INTERNAL
#include "util.h"
-/*@unused@*/ RCSID("$IdPath: yasm/libyasm/bytecode.c,v 1.94 2003/05/04 22:15:09 peter Exp $");
+/*@unused@*/ RCSID("$IdPath$");
#include "coretype.h"
#include "file.h"
if (dist < precbc1->offset + precbc1->len) {
intn = yasm_intnum_new_uint(precbc1->offset + precbc1->len
- dist);
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL, precbc1->line);
return intn;
}
dist -= precbc1->offset + precbc1->len;
} else {
if (precbc1) {
intn = yasm_intnum_new_uint(precbc1->offset + precbc1->len);
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL, precbc1->line);
return intn;
} else {
return yasm_intnum_new_uint(0);
*/
#define YASM_LIB_INTERNAL
#include "util.h"
-/*@unused@*/ RCSID("$IdPath: yasm/libyasm/expr.c,v 1.64 2003/03/15 21:59:55 peter Exp $");
+/*@unused@*/ RCSID("$IdPath$");
#include "coretype.h"
#include "bitvect.h"
for (i=first_int_term+1, o=first_int_term+1; i<e->numterms; i++) {
if (e->terms[i].type == YASM_EXPR_INT) {
yasm_intnum_calc(e->terms[first_int_term].data.intn, e->op,
- e->terms[i].data.intn);
+ e->terms[i].data.intn, e->line);
fold_numterms--;
level_numterms--;
/* make sure to delete folded intnum */
e->terms[first_int_term] = sube->terms[j]; /* struc */
} else {
yasm_intnum_calc(e->terms[first_int_term].data.intn,
- e->op, sube->terms[j].data.intn);
+ e->op, sube->terms[j].data.intn,
+ e->line);
/* make sure to delete folded intnum */
yasm_intnum_delete(sube->terms[j].data.intn);
}
*/
#define YASM_LIB_INTERNAL
#include "util.h"
-/*@unused@*/ RCSID("$IdPath: yasm/libyasm/intnum.c,v 1.25 2003/03/17 00:03:02 peter Exp $");
+/*@unused@*/ RCSID("$IdPath$");
#include <ctype.h>
/*@-nullderef -nullpass -branchstate@*/
void
-yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand)
+yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
+ unsigned long lindex)
{
wordptr result = (wordptr)NULL, op1 = (wordptr)NULL, op2 = (wordptr)NULL;
wordptr spare = (wordptr)NULL;
} else
acc->val.ul = acc->val.ul != operand->val.ul;
break;
+ case YASM_EXPR_SEG:
+ yasm__error(lindex, N_("invalid use of '%s'"), "SEG");
+ break;
+ case YASM_EXPR_WRT:
+ yasm__error(lindex, N_("invalid use of '%s'"), "WRT");
+ break;
+ case YASM_EXPR_SEGOFF:
+ yasm__error(lindex, N_("invalid use of '%s'"), ":");
+ break;
case YASM_EXPR_IDENT:
if (result)
BitVector_Copy(result, op1);
* \file intnum.h
* \brief YASM integer number interface.
*
- * $IdPath: yasm/libyasm/intnum.h,v 1.15 2003/03/13 06:54:19 peter Exp $
+ * $IdPath$
*
* Copyright (C) 2001 Peter Johnson
*
* \param acc intnum accumulator
* \param op operation
* \param operand intnum operand
+ * \param lindex line index (of expression)
*/
-void yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand);
+void yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
+ unsigned long lindex);
/** Simple value check for 0.
* \param acc intnum
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <util.h>
-/*@unused@*/ RCSID("$IdPath: yasm/modules/optimizers/basic/basic-optimizer.c,v 1.33 2003/03/26 05:07:57 peter Exp $");
+/*@unused@*/ RCSID("$IdPath$");
#define YASM_LIB_INTERNAL
#define YASM_BC_INTERNAL
if (dist < precbc1->offset + precbc1->len) {
intn = yasm_intnum_new_uint(precbc1->offset +
precbc1->len - dist);
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL,
+ precbc1->line);
return intn;
}
dist -= precbc1->offset + precbc1->len;
if (precbc1) {
if (precbc1->opt_flags == BCFLAG_DONE) {
intn = yasm_intnum_new_uint(precbc1->offset + precbc1->len);
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL, precbc1->line);
return intn;
} else {
return NULL;