aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorgus knight <waddlesplash@gmail.com>2015-07-27 12:43:40 -0400
committergus knight <waddlesplash@gmail.com>2015-07-27 12:43:40 -0400
commit41031221c82384f40b5664b5e12b1a81eefcdfe6 (patch)
tree4a719656f75bb114a980769eea033cc9839f452c /tccasm.c
parent5e67f24e6b1566c4b1ba4b79d97b6eac150390e7 (diff)
downloadtinycc-41031221c82384f40b5664b5e12b1a81eefcdfe6.tar.gz
tinycc-41031221c82384f40b5664b5e12b1a81eefcdfe6.tar.bz2
Trim trailing spaces everywhere.
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/tccasm.c b/tccasm.c
index 3cbae19..9964ec9 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -1,6 +1,6 @@
/*
* GAS like assembler for TCC
- *
+ *
* Copyright (c) 2001-2004 Fabrice Bellard
*
* This library is free software; you can redistribute it and/or
@@ -125,7 +125,7 @@ static void asm_expr_unary(TCCState *s1, ExprValue *pe)
break;
}
}
-
+
static void asm_expr_prod(TCCState *s1, ExprValue *pe)
{
int op;
@@ -134,7 +134,7 @@ static void asm_expr_prod(TCCState *s1, ExprValue *pe)
asm_expr_unary(s1, pe);
for(;;) {
op = tok;
- if (op != '*' && op != '/' && op != '%' &&
+ if (op != '*' && op != '/' && op != '%' &&
op != TOK_SHL && op != TOK_SAR)
break;
next();
@@ -145,14 +145,14 @@ static void asm_expr_prod(TCCState *s1, ExprValue *pe)
case '*':
pe->v *= e2.v;
break;
- case '/':
+ case '/':
if (e2.v == 0) {
div_error:
tcc_error("division by zero");
}
pe->v /= e2.v;
break;
- case '%':
+ case '%':
if (e2.v == 0)
goto div_error;
pe->v %= e2.v;
@@ -186,7 +186,7 @@ static void asm_expr_logic(TCCState *s1, ExprValue *pe)
case '&':
pe->v &= e2.v;
break;
- case '|':
+ case '|':
pe->v |= e2.v;
break;
default:
@@ -224,7 +224,7 @@ static inline void asm_expr_sum(TCCState *s1, ExprValue *pe)
} else if (pe->sym && !e2.sym) {
/* OK */
} else if (pe->sym && e2.sym) {
- if (pe->sym == e2.sym) {
+ if (pe->sym == e2.sym) {
/* OK */
} else if (pe->sym->r == e2.sym->r && pe->sym->r != 0) {
/* we also accept defined symbols in the same section */
@@ -267,7 +267,7 @@ static void asm_new_label1(TCCState *s1, int label, int is_local,
if (sym->r) {
/* the label is already defined */
if (!is_local) {
- tcc_error("assembler label '%s' already defined",
+ tcc_error("assembler label '%s' already defined",
get_tok_str(label, NULL));
} else {
/* redefinition of local labels is possible */
@@ -493,7 +493,7 @@ static void asm_parse_directive(TCCState *s1)
case TOK_ASM_weak:
case TOK_ASM_hidden:
tok1 = tok;
- do {
+ do {
Sym *sym;
next();
@@ -541,7 +541,7 @@ static void asm_parse_directive(TCCState *s1)
case TOK_ASM_text:
case TOK_ASM_data:
case TOK_ASM_bss:
- {
+ {
char sname[64];
tok1 = tok;
n = 0;
@@ -591,7 +591,7 @@ static void asm_parse_directive(TCCState *s1)
}
break;
case TOK_ASM_size:
- {
+ {
Sym *sym;
next();
@@ -612,7 +612,7 @@ static void asm_parse_directive(TCCState *s1)
}
break;
case TOK_ASM_type:
- {
+ {
Sym *sym;
const char *newtype;
@@ -637,7 +637,7 @@ static void asm_parse_directive(TCCState *s1)
sym->type.t = (sym->type.t & ~VT_BTYPE) | VT_FUNC;
}
else if (s1->warn_unsupported)
- tcc_warning("change type of '%s' from 0x%x to '%s' ignored",
+ tcc_warning("change type of '%s' from 0x%x to '%s' ignored",
get_tok_str(sym->v, NULL), sym->type.t, newtype);
next();
@@ -669,7 +669,7 @@ static void asm_parse_directive(TCCState *s1)
}
break;
case TOK_ASM_previous:
- {
+ {
Section *sec;
next();
if (!last_text_section)
@@ -830,7 +830,7 @@ ST_FUNC int tcc_assemble(TCCState *s1, int do_preprocess)
cur_text_section->data_offset = ind;
- free_defines(define_start);
+ free_defines(define_start);
return ret;
}
@@ -863,7 +863,7 @@ static void tcc_assemble_inline(TCCState *s1, char *str, int len)
/* find a constraint by its number or id (gcc 3 extended
syntax). return -1 if not found. Return in *pp in char after the
constraint */
-ST_FUNC int find_constraint(ASMOperand *operands, int nb_operands,
+ST_FUNC int find_constraint(ASMOperand *operands, int nb_operands,
const char *name, const char **pp)
{
int index;
@@ -901,7 +901,7 @@ ST_FUNC int find_constraint(ASMOperand *operands, int nb_operands,
return index;
}
-static void subst_asm_operands(ASMOperand *operands, int nb_operands,
+static void subst_asm_operands(ASMOperand *operands, int nb_operands,
int nb_outputs,
CString *out_str, CString *in_str)
{
@@ -1052,12 +1052,12 @@ ST_FUNC void asm_instr(void)
token after the assembler parsing */
if (tok != ';')
expect("';'");
-
+
/* save all values in the memory */
save_regs(0);
/* compute constraints */
- asm_compute_constraints(operands, nb_operands, nb_outputs,
+ asm_compute_constraints(operands, nb_operands, nb_outputs,
clobber_regs, &out_reg);
/* substitute the operands in the asm string. No substitution is
@@ -1076,8 +1076,8 @@ ST_FUNC void asm_instr(void)
#endif
/* generate loads */
- asm_gen_code(operands, nb_operands, nb_outputs, 0,
- clobber_regs, out_reg);
+ asm_gen_code(operands, nb_operands, nb_outputs, 0,
+ clobber_regs, out_reg);
/* assemble the string with tcc internal assembler */
tcc_assemble_inline(tcc_state, astr1.data, astr1.size - 1);
@@ -1086,9 +1086,9 @@ ST_FUNC void asm_instr(void)
next();
/* store the output values if needed */
- asm_gen_code(operands, nb_operands, nb_outputs, 1,
+ asm_gen_code(operands, nb_operands, nb_outputs, 1,
clobber_regs, out_reg);
-
+
/* free everything */
for(i=0;i<nb_operands;i++) {
ASMOperand *op;
@@ -1110,7 +1110,7 @@ ST_FUNC void asm_global_instr(void)
token after the assembler parsing */
if (tok != ';')
expect("';'");
-
+
#ifdef ASM_DEBUG
printf("asm_global: \"%s\"\n", (char *)astr.data);
#endif
@@ -1119,7 +1119,7 @@ ST_FUNC void asm_global_instr(void)
/* assemble the string with tcc internal assembler */
tcc_assemble_inline(tcc_state, astr.data, astr.size - 1);
-
+
cur_text_section->data_offset = ind;
/* restore the current C token */