comment fixes (Peter Lund)
This commit is contained in:
parent
73acbe2413
commit
d6819c2c36
2 changed files with 19 additions and 19 deletions
10
libtcc1.c
10
libtcc1.c
|
@ -418,19 +418,19 @@ unsigned long long __umoddi3(unsigned long long u, unsigned long long v)
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: suppress that and patch tcc to do it */
|
/* XXX: fix tcc's code generator to do this instead */
|
||||||
long long __sardi3(long long a, int b)
|
long long __sardi3(long long a, int b)
|
||||||
{
|
{
|
||||||
return a >> b;
|
return a >> b;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: suppress that and patch tcc to do it */
|
/* XXX: fix tcc's code generator to do this instead */
|
||||||
unsigned long long __shrdi3(unsigned long long a, int b)
|
unsigned long long __shrdi3(unsigned long long a, int b)
|
||||||
{
|
{
|
||||||
return a >> b;
|
return a >> b;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: suppress that and patch tcc to do it */
|
/* XXX: fix tcc's code generator to do this instead */
|
||||||
long long __shldi3(long long a, int b)
|
long long __shldi3(long long a, int b)
|
||||||
{
|
{
|
||||||
return a << b;
|
return a << b;
|
||||||
|
@ -439,11 +439,11 @@ long long __shldi3(long long a, int b)
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
/* FPU control word for rounding to nearest mode */
|
/* FPU control word for rounding to nearest mode */
|
||||||
unsigned short __tcc_fpu_control = 0x137f;
|
unsigned short __tcc_fpu_control = 0x137f;
|
||||||
/* FPU control word for round to zero mode for int convertion */
|
/* FPU control word for round to zero mode for int conversion */
|
||||||
unsigned short __tcc_int_fpu_control = 0x137f | 0x0c00;
|
unsigned short __tcc_int_fpu_control = 0x137f | 0x0c00;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* XXX: suppress that and patch tcc to do it */
|
/* XXX: fix tcc's code generator to do this instead */
|
||||||
float __ulltof(unsigned long long a)
|
float __ulltof(unsigned long long a)
|
||||||
{
|
{
|
||||||
DWunion uu;
|
DWunion uu;
|
||||||
|
|
28
tcc.c
28
tcc.c
|
@ -266,7 +266,7 @@ static struct BufferedFile *file;
|
||||||
static int ch, tok;
|
static int ch, tok;
|
||||||
static CValue tokc;
|
static CValue tokc;
|
||||||
static CString tokcstr; /* current parsed string, if any */
|
static CString tokcstr; /* current parsed string, if any */
|
||||||
/* additionnal informations about token */
|
/* additional informations about token */
|
||||||
static int tok_flags;
|
static int tok_flags;
|
||||||
#define TOK_FLAG_BOL 0x0001 /* beginning of line before */
|
#define TOK_FLAG_BOL 0x0001 /* beginning of line before */
|
||||||
#define TOK_FLAG_BOF 0x0002 /* beginning of file before */
|
#define TOK_FLAG_BOF 0x0002 /* beginning of file before */
|
||||||
|
@ -346,7 +346,7 @@ static int tcc_ext = 1;
|
||||||
static int num_callers = 6;
|
static int num_callers = 6;
|
||||||
static const char **rt_bound_error_msg;
|
static const char **rt_bound_error_msg;
|
||||||
|
|
||||||
/* XXX: suppress that ASAP */
|
/* XXX: get rid of this ASAP */
|
||||||
static struct TCCState *tcc_state;
|
static struct TCCState *tcc_state;
|
||||||
|
|
||||||
/* give the path of the tcc libraries */
|
/* give the path of the tcc libraries */
|
||||||
|
@ -813,7 +813,7 @@ void *dlsym(void *handle, const char *symbol)
|
||||||
|
|
||||||
/* we use our own 'finite' function to avoid potential problems with
|
/* we use our own 'finite' function to avoid potential problems with
|
||||||
non standard math libs */
|
non standard math libs */
|
||||||
/* XXX: endianness dependant */
|
/* XXX: endianness dependent */
|
||||||
int ieee_finite(double d)
|
int ieee_finite(double d)
|
||||||
{
|
{
|
||||||
int *p = (int *)&d;
|
int *p = (int *)&d;
|
||||||
|
@ -1200,7 +1200,7 @@ void error(const char *fmt, ...)
|
||||||
if (s1->error_set_jmp_enabled) {
|
if (s1->error_set_jmp_enabled) {
|
||||||
longjmp(s1->error_jmp_buf, 1);
|
longjmp(s1->error_jmp_buf, 1);
|
||||||
} else {
|
} else {
|
||||||
/* XXX: suppress it someday */
|
/* XXX: eliminate this someday */
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2001,7 +2001,7 @@ void restore_parse_state(ParseState *s)
|
||||||
tokc = s->tokc;
|
tokc = s->tokc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return the number of additionnal 'ints' necessary to store the
|
/* return the number of additional 'ints' necessary to store the
|
||||||
token */
|
token */
|
||||||
static inline int tok_ext_size(int t)
|
static inline int tok_ext_size(int t)
|
||||||
{
|
{
|
||||||
|
@ -3810,7 +3810,7 @@ static inline int *macro_twosharps(const int *macro_str)
|
||||||
tok_str_add2(¯o_str1, t, &cval);
|
tok_str_add2(¯o_str1, t, &cval);
|
||||||
}
|
}
|
||||||
saved_macro_ptr = macro_ptr;
|
saved_macro_ptr = macro_ptr;
|
||||||
/* XXX: suppress the use of macro_ptr here */
|
/* XXX: get rid of the use of macro_ptr here */
|
||||||
macro_ptr = (int *)macro_str;
|
macro_ptr = (int *)macro_str;
|
||||||
for(;;) {
|
for(;;) {
|
||||||
while (*macro_ptr == TOK_TWOSHARPS) {
|
while (*macro_ptr == TOK_TWOSHARPS) {
|
||||||
|
@ -4206,7 +4206,7 @@ void save_reg(int r)
|
||||||
}
|
}
|
||||||
/* mark that stack entry as being saved on the stack */
|
/* mark that stack entry as being saved on the stack */
|
||||||
if (p->r & VT_LVAL) {
|
if (p->r & VT_LVAL) {
|
||||||
/* also suppress the bounded flag because the
|
/* also clear the bounded flag because the
|
||||||
relocation address of the function was stored in
|
relocation address of the function was stored in
|
||||||
p->c.ul */
|
p->c.ul */
|
||||||
p->r = (p->r & ~(VT_VALMASK | VT_BOUNDED)) | VT_LLOCAL;
|
p->r = (p->r & ~(VT_VALMASK | VT_BOUNDED)) | VT_LLOCAL;
|
||||||
|
@ -4802,7 +4802,7 @@ void gen_opl(int op)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle integer constant optimizations and various machine
|
/* handle integer constant optimizations and various machine
|
||||||
independant opt */
|
independent opt */
|
||||||
void gen_opic(int op)
|
void gen_opic(int op)
|
||||||
{
|
{
|
||||||
int fc, c1, c2, n;
|
int fc, c1, c2, n;
|
||||||
|
@ -5313,7 +5313,7 @@ static void gen_cast(CType *type)
|
||||||
gen_cvt_ftoi1(dbt);
|
gen_cvt_ftoi1(dbt);
|
||||||
}
|
}
|
||||||
if (dbt == VT_INT && (type->t & (VT_BTYPE | VT_UNSIGNED)) != dbt) {
|
if (dbt == VT_INT && (type->t & (VT_BTYPE | VT_UNSIGNED)) != dbt) {
|
||||||
/* additionnal cast for char/short/bool... */
|
/* additional cast for char/short/bool... */
|
||||||
vtop->type.t = dbt;
|
vtop->type.t = dbt;
|
||||||
gen_cast(type);
|
gen_cast(type);
|
||||||
}
|
}
|
||||||
|
@ -5326,7 +5326,7 @@ static void gen_cast(CType *type)
|
||||||
else
|
else
|
||||||
vtop->c.ll = vtop->c.i;
|
vtop->c.ll = vtop->c.i;
|
||||||
} else {
|
} else {
|
||||||
/* machine independant conversion */
|
/* machine independent conversion */
|
||||||
gv(RC_INT);
|
gv(RC_INT);
|
||||||
/* generate high word */
|
/* generate high word */
|
||||||
if (sbt == (VT_INT | VT_UNSIGNED)) {
|
if (sbt == (VT_INT | VT_UNSIGNED)) {
|
||||||
|
@ -6929,7 +6929,7 @@ static void expr_or(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: suppress this mess */
|
/* XXX: fix this mess */
|
||||||
static void expr_land_const(void)
|
static void expr_land_const(void)
|
||||||
{
|
{
|
||||||
expr_or();
|
expr_or();
|
||||||
|
@ -6940,7 +6940,7 @@ static void expr_land_const(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: suppress this mess */
|
/* XXX: fix this mess */
|
||||||
static void expr_lor_const(void)
|
static void expr_lor_const(void)
|
||||||
{
|
{
|
||||||
expr_land_const();
|
expr_land_const();
|
||||||
|
@ -7562,7 +7562,7 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
|
||||||
expect("field");
|
expect("field");
|
||||||
if (!notfirst)
|
if (!notfirst)
|
||||||
*cur_field = f;
|
*cur_field = f;
|
||||||
/* XXX: suppress this mess by using explicit storage field */
|
/* XXX: fix this mess by using explicit storage field */
|
||||||
type1 = f->type;
|
type1 = f->type;
|
||||||
type1.t |= (type->t & ~VT_TYPE);
|
type1.t |= (type->t & ~VT_TYPE);
|
||||||
type = &type1;
|
type = &type1;
|
||||||
|
@ -7586,7 +7586,7 @@ static void decl_designator(CType *type, Section *sec, unsigned long c,
|
||||||
f = *cur_field;
|
f = *cur_field;
|
||||||
if (!f)
|
if (!f)
|
||||||
error("too many field init");
|
error("too many field init");
|
||||||
/* XXX: suppress this mess by using explicit storage field */
|
/* XXX: fix this mess by using explicit storage field */
|
||||||
type1 = f->type;
|
type1 = f->type;
|
||||||
type1.t |= (type->t & ~VT_TYPE);
|
type1.t |= (type->t & ~VT_TYPE);
|
||||||
type = &type1;
|
type = &type1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue