Commit 2ce2dbcb authored by mingodad's avatar mingodad
Browse files

Revert "Fix some errors on arm64-asm.c, rename some variables, fix several code style declarations"

This reverts commit 61537d89.
parent d33f582e
This diff is collapsed.
This diff is collapsed.
......@@ -9,9 +9,9 @@
#define CONFIG_TCC_ASM
#define NB_ASM_REGS 16
ST_FUNC void g(TCCState *S, int c);
ST_FUNC void gen_le16(TCCState *S, int c);
ST_FUNC void gen_le32(TCCState *S, int c);
ST_FUNC void g(TCCState* S, int c);
ST_FUNC void gen_le16(TCCState* S, int c);
ST_FUNC void gen_le32(TCCState* S, int c);
/*************************************************************/
#else
......@@ -19,74 +19,74 @@ ST_FUNC void gen_le32(TCCState *S, int c);
#define USING_GLOBALS
#include "tcc.h"
static void asm_error(TCCState *S)
static void asm_error(void)
{
tcc_error(S, "ARM asm not implemented.");
tcc_error("ARM asm not implemented.");
}
/* XXX: make it faster ? */
ST_FUNC void g(TCCState *S, int c)
ST_FUNC void g(TCCState* S, int c)
{
int ind1;
if (S->nocode_wanted)
if (nocode_wanted)
return;
ind1 = S->ind + 1;
ind1 = ind + 1;
if (ind1 > cur_text_section->data_allocated)
section_realloc(S, cur_text_section, ind1);
cur_text_section->data[S->ind] = c;
S->ind = ind1;
section_realloc(cur_text_section, ind1);
cur_text_section->data[ind] = c;
ind = ind1;
}
ST_FUNC void gen_le16 (TCCState *S, int i)
ST_FUNC void gen_le16 (TCCState* S, int i)
{
g(S, i);
g(S, i>>8);
}
ST_FUNC void gen_le32 (TCCState *S, int i)
ST_FUNC void gen_le32 (TCCState* S, int i)
{
gen_le16(S, i);
gen_le16(S, i>>16);
}
ST_FUNC void gen_expr32(TCCState *S, ExprValue *pe)
ST_FUNC void gen_expr32(TCCState* S, ExprValue *pe)
{
gen_le32(S, pe->v);
}
ST_FUNC void asm_opcode(TCCState *S, int opcode)
{
asm_error(S);
asm_error();
}
ST_FUNC void subst_asm_operand(TCCState *S, CString *add_str, SValue *sv, int modifier)
ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier)
{
asm_error(S);
asm_error();
}
/* generate prolog and epilog code for asm statement */
ST_FUNC void asm_gen_code(TCCState *S, ASMOperand *operands, int nb_operands,
ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands,
int nb_outputs, int is_output,
uint8_t *clobber_regs,
int out_reg)
{
}
ST_FUNC void asm_compute_constraints(TCCState *S, ASMOperand *operands,
ST_FUNC void asm_compute_constraints(ASMOperand *operands,
int nb_operands, int nb_outputs,
const uint8_t *clobber_regs,
int *pout_reg)
{
}
ST_FUNC void asm_clobber(TCCState *S, uint8_t *clobber_regs, const char *str)
ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
{
asm_error(S);
asm_error();
}
ST_FUNC int asm_parse_regvar (TCCState *S, int t)
ST_FUNC int asm_parse_regvar (int t)
{
asm_error(S);
asm_error();
return -1;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -282,7 +282,7 @@ static inline int get_reg_shift(TCCState *S)
static int asm_parse_numeric_reg(TCCState *S, int t, unsigned int *type)
{
int reg = -1;
if (t >= TOK_IDENT && t < S->tok_ident) {
if (t >= TOK_IDENT && t < S->tccpp_tok_ident) {
const char *s = S->tccpp_table_ident[t - TOK_IDENT]->str;
char c;
*type = OP_REG64;
......@@ -318,24 +318,24 @@ static int asm_parse_numeric_reg(TCCState *S, int t, unsigned int *type)
}
#endif
static int asm_parse_reg(TCCState *S, unsigned int *type)
static int asm_parse_reg(TCCState* S, unsigned int *type)
{
int reg = 0;
*type = 0;
if (S->tok != '%')
if (S->tccpp_tok != '%')
goto error_32;
next(S);
if (S->tok >= TOK_ASM_eax && S->tok <= TOK_ASM_edi) {
reg = S->tok - TOK_ASM_eax;
if (S->tccpp_tok >= TOK_ASM_eax && S->tccpp_tok <= TOK_ASM_edi) {
reg = S->tccpp_tok - TOK_ASM_eax;
*type = OP_REG32;
#ifdef TCC_TARGET_X86_64
} else if (S->tok >= TOK_ASM_rax && S->tok <= TOK_ASM_rdi) {
reg = S->tok - TOK_ASM_rax;
} else if (S->tccpp_tok >= TOK_ASM_rax && S->tccpp_tok <= TOK_ASM_rdi) {
reg = S->tccpp_tok - TOK_ASM_rax;
*type = OP_REG64;
} else if (S->tok == TOK_ASM_rip) {
} else if (S->tccpp_tok == TOK_ASM_rip) {
reg = -2; /* Probably should use different escape code. */
*type = OP_REG64;
} else if ((reg = asm_parse_numeric_reg(S, S->tok, type)) >= 0
} else if ((reg = asm_parse_numeric_reg(S, S->tccpp_tok, type)) >= 0
&& (*type == OP_REG32 || *type == OP_REG64)) {
;
#endif
......@@ -354,15 +354,15 @@ static void parse_operand(TCCState *S, Operand *op)
const char *p;
indir = 0;
if (S->tok == '*') {
if (S->tccpp_tok == '*') {
next(S);
indir = OP_INDIR;
}
if (S->tok == '%') {
if (S->tccpp_tok == '%') {
next(S);
if (S->tok >= TOK_ASM_al && S->tok <= TOK_ASM_db7) {
reg = S->tok - TOK_ASM_al;
if (S->tccpp_tok >= TOK_ASM_al && S->tccpp_tok <= TOK_ASM_db7) {
reg = S->tccpp_tok - TOK_ASM_al;
op->type = 1 << (reg >> 3); /* WARNING: do not change constant order */
op->reg = reg & 7;
if ((op->type & OP_REG) && op->reg == TREG_XAX)
......@@ -371,21 +371,21 @@ static void parse_operand(TCCState *S, Operand *op)
op->type |= OP_CL;
else if (op->type == OP_REG16 && op->reg == TREG_XDX)
op->type |= OP_DX;
} else if (S->tok >= TOK_ASM_dr0 && S->tok <= TOK_ASM_dr7) {
} else if (S->tccpp_tok >= TOK_ASM_dr0 && S->tccpp_tok <= TOK_ASM_dr7) {
op->type = OP_DB;
op->reg = S->tok - TOK_ASM_dr0;
} else if (S->tok >= TOK_ASM_es && S->tok <= TOK_ASM_gs) {
op->reg = S->tccpp_tok - TOK_ASM_dr0;
} else if (S->tccpp_tok >= TOK_ASM_es && S->tccpp_tok <= TOK_ASM_gs) {
op->type = OP_SEG;
op->reg = S->tok - TOK_ASM_es;
} else if (S->tok == TOK_ASM_st) {
op->reg = S->tccpp_tok - TOK_ASM_es;
} else if (S->tccpp_tok == TOK_ASM_st) {
op->type = OP_ST;
op->reg = 0;
next(S);
if (S->tok == '(') {
if (S->tccpp_tok == '(') {
next(S);
if (S->tok != TOK_PPNUM)
if (S->tccpp_tok != TOK_PPNUM)
goto reg_error;
p = S->tokc.str.data;
p = S->tccpp_tokc.str.data;
reg = p[0] - '0';
if ((unsigned)reg >= 8 || p[1] != '\0')
goto reg_error;
......@@ -397,19 +397,19 @@ static void parse_operand(TCCState *S, Operand *op)
op->type |= OP_ST0;
goto no_skip;
#ifdef TCC_TARGET_X86_64
} else if (S->tok >= TOK_ASM_spl && S->tok <= TOK_ASM_dil) {
} else if (S->tccpp_tok >= TOK_ASM_spl && S->tccpp_tok <= TOK_ASM_dil) {
op->type = OP_REG8 | OP_REG8_LOW;
op->reg = 4 + S->tok - TOK_ASM_spl;
} else if ((op->reg = asm_parse_numeric_reg(S, S->tok, &op->type)) >= 0) {
op->reg = 4 + S->tccpp_tok - TOK_ASM_spl;
} else if ((op->reg = asm_parse_numeric_reg(S, S->tccpp_tok, &op->type)) >= 0) {
;
#endif
} else {
reg_error:
tcc_error(S, "unknown register %%%s", get_tok_str(S, S->tok, &S->tokc));
tcc_error(S, "unknown register %%%s", get_tok_str(S, S->tccpp_tok, &S->tccpp_tokc));
}
next(S);
no_skip: ;
} else if (S->tok == '$') {
} else if (S->tccpp_tok == '$') {
/* constant value */
next(S);
asm_expr(S, &e);
......@@ -433,19 +433,19 @@ static void parse_operand(TCCState *S, Operand *op)
op->reg = -1;
op->reg2 = -1;
op->shift = 0;
if (S->tok != '(') {
if (S->tccpp_tok != '(') {
asm_expr(S, &e);
op->e = e;
} else {
next(S);
if (S->tok == '%') {
if (S->tccpp_tok == '%') {
unget_tok(S, '(');
op->e.v = 0;
op->e.sym = NULL;
} else {
/* bracketed offset expression */
asm_expr(S, &e);
if (S->tok != ')')
if (S->tccpp_tok != ')')
expect(S, ")");
next(S);
op->e.v = e.v;
......@@ -453,18 +453,18 @@ static void parse_operand(TCCState *S, Operand *op)
}
op->e.pcrel = 0;
}
if (S->tok == '(') {
if (S->tccpp_tok == '(') {
unsigned int type = 0;
next(S);
if (S->tok != ',') {
if (S->tccpp_tok != ',') {
op->reg = asm_parse_reg(S, &type);
}
if (S->tok == ',') {
if (S->tccpp_tok == ',') {
next(S);
if (S->tok != ',') {
if (S->tccpp_tok != ',') {
op->reg2 = asm_parse_reg(S, &type);
}
if (S->tok == ',') {
if (S->tccpp_tok == ',') {
next(S);
op->shift = get_reg_shift(S);
}
......@@ -480,7 +480,7 @@ static void parse_operand(TCCState *S, Operand *op)
}
/* XXX: unify with C code output ? */
ST_FUNC void gen_expr32(TCCState *S, ExprValue *pe)
ST_FUNC void gen_expr32(TCCState* S, ExprValue *pe)
{
if (pe->pcrel)
/* If PC-relative, always set VT_SYM, even without symbol,
......@@ -491,14 +491,14 @@ ST_FUNC void gen_expr32(TCCState *S, ExprValue *pe)
}
#ifdef TCC_TARGET_X86_64
ST_FUNC void gen_expr64(TCCState *S, ExprValue *pe)
ST_FUNC void gen_expr64(TCCState* S, ExprValue *pe)
{
gen_addr64(S, pe->sym ? VT_SYM : 0, pe->sym, pe->v);
}
#endif
/* XXX: unify with C code output ? */
static void gen_disp32(TCCState *S, ExprValue *pe)
static void gen_disp32(TCCState* S, ExprValue *pe)
{
Sym *sym = pe->sym;
ElfSym *esym = elfsym(S, sym);
......@@ -507,7 +507,7 @@ static void gen_disp32(TCCState *S, ExprValue *pe)
that the TCC compiler behaves differently here because
it always outputs a relocation to ease (future) code
elimination in the linker */
gen_le32(S, pe->v + esym->st_value - S->ind - 4);
gen_le32(S, pe->v + esym->st_value - S->tccgen_ind - 4);
} else {
if (sym && sym->type.t == VT_VOID) {
sym->type.t = VT_FUNC;
......@@ -518,7 +518,7 @@ static void gen_disp32(TCCState *S, ExprValue *pe)
}
/* generate the modrm operand */
static inline int asm_modrm(TCCState *S, int reg, Operand *op)
static inline int asm_modrm(TCCState* S, int reg, Operand *op)
{
int mod, reg1, reg2, sib_reg1;
......@@ -538,7 +538,7 @@ static inline int asm_modrm(TCCState *S, int reg, Operand *op)
ExprValue *pe = &op->e;
g(S, 0x05 + (reg << 3));
gen_addrpc32(S, pe->sym ? VT_SYM : 0, pe->sym, pe->v);
return S->ind;
return S->tccgen_ind;
#endif
} else {
sib_reg1 = op->reg;
......@@ -581,7 +581,7 @@ static inline int asm_modrm(TCCState *S, int reg, Operand *op)
#define REX_X 0x42
#define REX_B 0x41
static void asm_rex(TCCState *S, int width64, Operand *ops, int nb_ops, int *op_type,
static void asm_rex(TCCState* S, int width64, Operand *ops, int nb_ops, int *op_type,
int regi, int rmi)
{
unsigned char rex = width64 ? 0x48 : 0;
......@@ -705,13 +705,13 @@ ST_FUNC void asm_opcode(TCCState *S, int opcode)
seg_prefix = 0;
alltypes = 0;
for(;;) {
if (S->tok == ';' || S->tok == TOK_LINEFEED)
if (S->tccpp_tok == ';' || S->tccpp_tok == TOK_LINEFEED)
break;
if (nb_ops >= MAX_OPERANDS) {
tcc_error(S, "incorrect number of operands");
}
parse_operand(S, pop);
if (S->tok == ':') {
if (S->tccpp_tok == ':') {
if (pop->type != OP_SEG || seg_prefix)
tcc_error(S, "incorrect prefix");
seg_prefix = segment_prefixes[pop->reg];
......@@ -723,7 +723,7 @@ ST_FUNC void asm_opcode(TCCState *S, int opcode)
}
pop++;
nb_ops++;
if (S->tok != ',')
if (S->tccpp_tok != ',')
break;
next(S);
}
......@@ -1038,7 +1038,7 @@ again:
esym = elfsym(S, ops[0].e.sym);
if (!esym || esym->st_shndx != cur_text_section->sh_num)
goto no_short_jump;
jmp_disp = ops[0].e.v + esym->st_value - S->ind - 2 - (v >= 0xff);
jmp_disp = ops[0].e.v + esym->st_value - S->tccgen_ind - 2 - (v >= 0xff);
if (jmp_disp == (int8_t)jmp_disp) {
/* OK to generate jump */
ops[0].e.sym = 0;
......@@ -1136,12 +1136,12 @@ again:
/* after immediate operands, adjust pc-relative address */
if (pc)
add32le(cur_text_section->data + pc - 4, pc - S->ind);
add32le(cur_text_section->data + pc - 4, pc - S->tccgen_ind);
}
/* return the constraint priority (we allocate first the lowest
numbered constraints) */
static inline int constraint_priority(TCCState *S, const char *str)
static inline int constraint_priority(TCCState* S, const char *str)
{
int priority, c, pr;
......@@ -1200,7 +1200,7 @@ static const char *skip_constraint_modifiers(const char *p)
/* If T (a token) is of the form "%reg" returns the register
number and type, otherwise return -1. */
ST_FUNC int asm_parse_regvar (TCCState *S, int t)
ST_FUNC int asm_parse_regvar (TCCState* S, int t)
{
const char *s;
Operand op;
......@@ -1225,7 +1225,7 @@ ST_FUNC int asm_parse_regvar (TCCState *S, int t)
#define is_reg_allocated(reg) (regs_allocated[reg] & reg_mask)
ST_FUNC void asm_compute_constraints(TCCState *S, ASMOperand *operands,
ST_FUNC void asm_compute_constraints(TCCState* S, ASMOperand *operands,
int nb_operands, int nb_outputs,
const uint8_t *clobber_regs,
int *pout_reg)
......@@ -1471,7 +1471,7 @@ ST_FUNC void asm_compute_constraints(TCCState *S, ASMOperand *operands,
#endif
}
ST_FUNC void subst_asm_operand(TCCState *S, CString *add_str,
ST_FUNC void subst_asm_operand(TCCState* S, CString *add_str,
SValue *sv, int modifier)
{
int r, reg, size, val;
......@@ -1593,7 +1593,7 @@ ST_FUNC void subst_asm_operand(TCCState *S, CString *add_str,
}
/* generate prolog and epilog code for asm statement */
ST_FUNC void asm_gen_code(TCCState *S, ASMOperand *operands, int nb_operands,
ST_FUNC void asm_gen_code(TCCState* S, ASMOperand *operands, int nb_operands,
int nb_outputs, int is_output,
uint8_t *clobber_regs,
int out_reg)
......@@ -1697,7 +1697,7 @@ ST_FUNC void asm_gen_code(TCCState *S, ASMOperand *operands, int nb_operands,
}
}
ST_FUNC void asm_clobber(TCCState *S, uint8_t *clobber_regs, const char *str)
ST_FUNC void asm_clobber(TCCState* S, uint8_t *clobber_regs, const char *str)
{
int reg;
#ifdef TCC_TARGET_X86_64
......
This diff is collapsed.
......@@ -233,7 +233,7 @@ PUB_FUNC char *tcc_fileextension (const char *name)
return e ? e : strchr(b, 0);
}
ST_FUNC char *tcc_load_text(TCCState *S, int fd)
ST_FUNC char *tcc_load_text(TCCState* S, int fd)
{
int len = lseek(fd, 0, SEEK_END);
char *buf = load_data(S, fd, 0, len + 1);
......@@ -275,12 +275,12 @@ PUB_FUNC void *tcc_mallocz_base(unsigned long size)
#ifndef MEM_DEBUG
PUB_FUNC void tcc_free(TCCState *S, void *ptr)
PUB_FUNC void tcc_free(TCCState* S, void *ptr)
{
free(ptr);
}
PUB_FUNC void *tcc_malloc(TCCState *S, unsigned long size)
PUB_FUNC void *tcc_malloc(TCCState* S, unsigned long size)
{
void *ptr;
ptr = malloc(size);
......@@ -289,7 +289,7 @@ PUB_FUNC void *tcc_malloc(TCCState *S, unsigned long size)
return ptr;
}
PUB_FUNC void *tcc_mallocz(TCCState *S, unsigned long size)
PUB_FUNC void *tcc_mallocz(TCCState* S, unsigned long size)
{
void *ptr;
ptr = tcc_malloc(S, size);
......@@ -298,7 +298,7 @@ PUB_FUNC void *tcc_mallocz(TCCState *S, unsigned long size)
return ptr;
}
PUB_FUNC void *tcc_realloc(TCCState *S, void *ptr, unsigned long size)
PUB_FUNC void *tcc_realloc(TCCState* S, void *ptr, unsigned long size)
{
void *ptr1;
ptr1 = realloc(ptr, size);
......@@ -307,7 +307,7 @@ PUB_FUNC void *tcc_realloc(TCCState *S, void *ptr, unsigned long size)
return ptr1;
}
PUB_FUNC char *tcc_strdup(TCCState *S, const char *str)
PUB_FUNC char *tcc_strdup(TCCState* S, const char *str)
{
char *ptr;
ptr = tcc_malloc(S, strlen(str) + 1);
......@@ -361,7 +361,7 @@ static mem_debug_header_t *malloc_check(void *ptr, const char *msg)
return header;
}
PUB_FUNC void *tcc_malloc_debug(TCCState *S, unsigned long size, const char *file, int line)
PUB_FUNC void *tcc_malloc_debug(TCCState* S, unsigned long size, const char *file, int line)
{
int ofs;
mem_debug_header_t *header;
......@@ -392,7 +392,7 @@ PUB_FUNC void *tcc_malloc_debug(TCCState *S, unsigned long size, const char *fil
return MEM_USER_PTR(header);
}
PUB_FUNC void tcc_free_debug(TCCState *S, void *ptr)
PUB_FUNC void tcc_free_debug(TCCState* S, void *ptr)
{
mem_debug_header_t *header;
if (!ptr)
......@@ -409,7 +409,7 @@ PUB_FUNC void tcc_free_debug(TCCState *S, void *ptr)
free(header);
}
PUB_FUNC void *tcc_mallocz_debug(TCCState *S, unsigned long size, const char *file, int line)
PUB_FUNC void *tcc_mallocz_debug(TCCState* S, unsigned long size, const char *file, int line)
{
void *ptr;
ptr = tcc_malloc_debug(S, size,file,line);
......@@ -417,7 +417,7 @@ PUB_FUNC void *tcc_mallocz_debug(TCCState *S, unsigned long size, const char *fi
return ptr;
}
PUB_FUNC void *tcc_realloc_debug(TCCState *S, void *ptr, unsigned long size, const char *file, int line)
PUB_FUNC void *tcc_realloc_debug(TCCState* S, void *ptr, unsigned long size, const char *file, int line)
{
mem_debug_header_t *header;
int mem_debug_chain_update = 0;
......@@ -443,7 +443,7 @@ PUB_FUNC void *tcc_realloc_debug(TCCState *S, void *ptr, unsigned long size, con
return MEM_USER_PTR(header);
}
PUB_FUNC char *tcc_strdup_debug(TCCState *S, const char *str, const char *file, int line)
PUB_FUNC char *tcc_strdup_debug(TCCState* S, const char *str, const char *file, int line)
{
char *ptr;
ptr = tcc_malloc_debug(S, strlen(str) + 1, file, line);
......@@ -532,7 +532,7 @@ int vio_close(vio_fd *fd) {
/********************************************************/
/* dynarrays */
ST_FUNC void dynarray_add(TCCState *S, void *ptab, int *nb_ptr, void *data)
ST_FUNC void dynarray_add(TCCState* S, void *ptab, int *nb_ptr, void *data)
{
int nb, nb_alloc;
void **pp;
......@@ -552,7 +552,7 @@ ST_FUNC void dynarray_add(TCCState *S, void *ptab, int *nb_ptr, void *data)
*nb_ptr = nb;
}
ST_FUNC void dynarray_reset(TCCState *S, void *pp, int *n)
ST_FUNC void dynarray_reset(TCCState* S, void *pp, int *n)
{
void **p;
for (p = *(void***)pp; *n; ++p, --*n)
......@@ -608,7 +608,7 @@ static void tcc_split_path(TCCState *S, void *p_ary, int *p_nb_ary, const char *
/* error1() modes */
enum { ERROR_WARN, ERROR_NOABORT, ERROR_ERROR };
static void error1(TCCState *S, int mode, const char *fmt, va_list ap)
static void error1(TCCState* S, int mode, const char *fmt, va_list ap)
{
BufferedFile **pf, *f;
CString cs;
......@@ -650,7 +650,7 @@ static void error1(TCCState *S, int mode, const char *fmt, va_list ap)
cstr_printf(S, &cs, "In file included from %s:%d:\n",
(*pf)->filename, (*pf)->line_num);
cstr_printf(S, &cs, "%s:%d: ",
f->filename, (*pf)->line_num - !!(S->tok_flags & TOK_FLAG_BOL));
f->filename, (*pf)->line_num - !!(S->tccpp_tok_flags & TOK_FLAG_BOL));
} else if (S->current_filename) {
cstr_printf(S, &cs, "%s: ", S->current_filename);
}
......@@ -699,7 +699,7 @@ LIBTCCAPI void *tcc_get_error_opaque(TCCState *S)
}
/* error without aborting current compilation */
PUB_FUNC void _tcc_error_noabort(TCCState *S, const char *fmt, ...)
PUB_FUNC void _tcc_error_noabort(TCCState* S, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
......@@ -707,14 +707,14 @@ PUB_FUNC void _tcc_error_noabort(TCCState *S, const char *fmt, ...)
va_end(ap);
}
PUB_FUNC void _tcc_error(TCCState *S, const char *fmt, ...)
PUB_FUNC void _tcc_error(TCCState* S, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
for (;;) error1(S, ERROR_ERROR, fmt, ap);
}
PUB_FUNC void _tcc_warning(TCCState *S, const char *fmt, ...)
PUB_FUNC void _tcc_warning(TCCState* S, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
......@@ -744,10 +744,10 @@ ST_FUNC void tcc_open_bf(TCCState *S, const char *filename, int initlen)
bf->fd = -1;
bf->prev = S->tccpp_file;
S->tccpp_file = bf;
S->tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF;
S->tccpp_tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF;
}
ST_FUNC void tcc_close(TCCState *S)
ST_FUNC void tcc_close(TCCState* S)
{
BufferedFile *bf = S->tccpp_file;
if (bf->fd > 0) {
......@@ -1388,7 +1388,7 @@ static const char *skip_linker_arg(const char **str)
return s2;
}
static void copy_linker_arg(TCCState *S, char **pp, const char *s, int sep)
static void copy_linker_arg(TCCState* S, char **pp, const char *s, int sep)
{
const char *q = s;
char *p = *pp;
......@@ -1723,7 +1723,7 @@ static void args_parser_add_file(TCCState *S, const char* filename, int filetype
dynarray_add(S, &S->files, &S->nb_files, f);
}
static int args_parser_make_argv(TCCState *S, const char *r, int *argc, char ***argv)
static int args_parser_make_argv(TCCState* S, const char *r, int *argc, char ***argv)
{
int ret = 0, q, c;
CString str;
......
This diff is collapsed.