Lines Matching defs:dv
110 yasm_dataval *dv;
114 STAILQ_FOREACH(dv, &bc_data->datahead, link) {
115 switch (dv->type) {
117 if (yasm_value_finalize(&dv->data.val, prev_bc)) {
125 intn = yasm_expr_get_intnum(&dv->data.val.abs, 0);
135 if (yasm_intnum_sign(intn) == -1 && dv->type == DV_ULEB128)
142 if (dv->multiple) {
144 if (yasm_value_finalize_expr(&val, dv->multiple, prev_bc, 0))
150 dv->multiple = val.abs;
167 yasm_dataval *dv;
173 STAILQ_FOREACH(dv, &bc_data->datahead, link) {
174 switch (dv->type) {
179 len = dv->data.val.size/8;
182 len = dv->data.raw.len;
186 intn = yasm_expr_get_intnum(&dv->data.val.abs, 0);
189 len = yasm_intnum_size_leb128(intn, dv->type == DV_SLEB128);
192 len = dv->data.val.size/8;
196 if (!yasm_dv_get_multiple(dv, &multiple))
212 yasm_dataval *dv;
217 STAILQ_FOREACH(dv, &bc_data->datahead, link) {
218 if (yasm_dv_get_multiple(dv, &multiple) || multiple == 0)
220 switch (dv->type) {
224 val_len = dv->data.val.size/8;
226 if (output_value(&dv->data.val, *bufp, val_len,
235 memcpy(*bufp, dv->data.raw.contents, dv->data.raw.len);
236 *bufp += dv->data.raw.len;
241 intn = yasm_expr_get_intnum(&dv->data.val.abs, 234);
247 dv->type == DV_SLEB128);
250 val_len = dv->data.val.size/8;
268 yasm_dataval *dv, *dv2, *dvo;
279 STAILQ_FOREACH(dv, datahead, link) {
280 if (dv->multiple && dv->type != DV_EMPTY && len > 0) {
286 switch (dv->type) {
292 intn = yasm_expr_get_intnum(&dv->data.val.abs, 0);
293 if (intn && dv->type == DV_VALUE && (arch || size == 1))
295 else if (intn && dv->type == DV_ULEB128)
297 else if (intn && dv->type == DV_SLEB128)
310 dvo->multiple = dv->multiple;
314 rlen = dv->data.raw.len;
324 if (dv->multiple && dv->type != DV_EMPTY && len > 0) {
328 dvo->multiple = dv->multiple;
343 dv = STAILQ_FIRST(datahead);
346 while (dv && dvo) {
347 if (dv->multiple && dv->type != DV_EMPTY && len > 0) {
351 switch (dv->type) {
357 intn = yasm_expr_get_intnum(&dv->data.val.abs, 0);
358 if (intn && dv->type == DV_VALUE && (arch || size == 1)) {
367 yasm_value_delete(&dv->data.val);
369 } else if (intn && dv->type == DV_ULEB128) {
373 yasm_value_delete(&dv->data.val);
374 } else if (intn && dv->type == DV_SLEB128) {
378 yasm_value_delete(&dv->data.val);
382 dvo->type = dv->type;
383 dvo->data.val = dv->data.val; /* structure copy */
390 rlen = dv->data.raw.len;
391 memcpy(&dvo->data.raw.contents[len], dv->data.raw.contents,
393 yasm_xfree(dv->data.raw.contents);
409 if (dv->multiple && dv->type != DV_EMPTY && len > 0) {
416 dv2 = STAILQ_NEXT(dv, link);
417 yasm_xfree(dv);
418 dv = dv2;
427 yasm_dataval *dv;
430 STAILQ_FOREACH(dv, datahead, link) {
431 switch (dv->type) {
433 dv->type = sign ? DV_SLEB128 : DV_ULEB128;
484 yasm_dv_get_value(yasm_dataval *dv)
486 if (dv
488 return &dv->data.val;
492 yasm_dv_set_multiple(yasm_dataval *dv, yasm_expr *e)
494 if (dv->multiple)
495 dv->multiple = yasm_expr_create_tree( dv->multiple, YASM_EXPR_MUL, e,
498 dv->multiple = e;
502 yasm_dv_get_multiple(yasm_dataval *dv, unsigned long *multiple)
507 if (dv->multiple) {
508 num = yasm_expr_get_intnum(&dv->multiple, 0);
550 yasm_dvs_append(yasm_datavalhead *headp, yasm_dataval *dv)
552 if (dv) {
553 STAILQ_INSERT_TAIL(headp, dv, link);
554 return dv;