diff options
| author | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2015-11-17 19:09:35 +0000 |
|---|---|---|
| committer | Edmund Grimley Evans <Edmund.Grimley.Evans@gmail.com> | 2015-11-17 19:09:35 +0000 |
| commit | 569fba6db9c12916bd2802a7ee46dc5609118e0b (patch) | |
| tree | 8dc680cf47393c8eadb8563e4a842ce1e6656c01 /i386-asm.c | |
| parent | 3712c958f4ef31ce006edeab6c34875ea5ae08f8 (diff) | |
| download | tinycc-569fba6db9c12916bd2802a7ee46dc5609118e0b.tar.gz tinycc-569fba6db9c12916bd2802a7ee46dc5609118e0b.tar.bz2 | |
Merge the integer members of union CValue into "uint64_t i".
Diffstat (limited to 'i386-asm.c')
| -rw-r--r-- | i386-asm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1301,7 +1301,7 @@ ST_FUNC void subst_asm_operand(CString *add_str, cstr_ccat(add_str, '$'); if (r & VT_SYM) { cstr_cat(add_str, get_tok_str(sv->sym->v, NULL)); - if (sv->c.i != 0) { + if ((uint32_t)sv->c.i != 0) { cstr_ccat(add_str, '+'); } else { return; @@ -1310,10 +1310,10 @@ ST_FUNC void subst_asm_operand(CString *add_str, val = sv->c.i; if (modifier == 'n') val = -val; - snprintf(buf, sizeof(buf), "%d", sv->c.i); + snprintf(buf, sizeof(buf), "%d", (int)sv->c.i); cstr_cat(add_str, buf); } else if ((r & VT_VALMASK) == VT_LOCAL) { - snprintf(buf, sizeof(buf), "%d(%%ebp)", sv->c.i); + snprintf(buf, sizeof(buf), "%d(%%ebp)", (int)sv->c.i); cstr_cat(add_str, buf); } else if (r & VT_LVAL) { reg = r & VT_VALMASK; @@ -1431,7 +1431,7 @@ ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands, if (op->is_llong) { SValue sv; sv = *op->vt; - sv.c.ul += 4; + sv.c.i += 4; load(TREG_XDX, &sv); } } @@ -1457,7 +1457,7 @@ ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands, if (op->is_llong) { SValue sv; sv = *op->vt; - sv.c.ul += 4; + sv.c.i += 4; store(TREG_XDX, &sv); } } |
