summaryrefslogtreecommitdiff
path: root/i386-asm.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2015-12-26 18:15:30 +0800
committerThomas Preud'homme <robotux@celest.fr>2015-12-26 18:15:30 +0800
commit9b58ceece89525bc832012f7b877de5615b12829 (patch)
tree9c085e51cc8754463d27fac5d516fe9d7533c3c6 /i386-asm.c
parent2946895a376add9d940bdbe4391e97cb846d26d1 (diff)
Imported Upstream version 0.9.27~git20151225.f15c0a9
Diffstat (limited to 'i386-asm.c')
-rw-r--r--i386-asm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/i386-asm.c b/i386-asm.c
index a524658..68a7861 100644
--- a/i386-asm.c
+++ b/i386-asm.c
@@ -2,7 +2,7 @@
* i386 specific functions for TCC assembler
*
* Copyright (c) 2001, 2002 Fabrice Bellard
- * Copyright (c) 2009 Frédéric Feret (x86_64 support)
+ * Copyright (c) 2009 Frédéric Feret (x86_64 support)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -330,7 +330,7 @@ static void parse_operand(TCCState *s1, Operand *op)
next();
if (tok != TOK_PPNUM)
goto reg_error;
- p = tokc.cstr->data;
+ p = tokc.str.data;
reg = p[0] - '0';
if ((unsigned)reg >= 8 || p[1] != '\0')
goto reg_error;
@@ -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);
}
}