Attention: never use hard tabs other than 8 (eight) wide
The attached fix (libcrt.c) is just one example.  There seem
many more such introduced from latest commits that look badly
formatted in anyone else's editors and should be fixed.
General recommended policy:
- if possible, do not add new hard tabs ('\t') at all.
  Use spaces (soft tabs) instead
- in any case, configure your editor to read/write hard tabs
  with width of 8 (eight)
Also:
- Avoid merge commits (unless for very good reason).  Instead
  use "git cherry-pick" or "git rebase" to put your commits on
  top of the public branch.  ref: 2a8905c93b
Also:
- jiang: please explain what you are doing, in the commit message
  and on the list. Subscribe to the mailing list to receive feedback
  from people for your work.
  For example, what was wrong with 'parse_number'? Show a test
  case and how your version fixes it (it is slower btw).
			
			
This commit is contained in:
		
							parent
							
								
									59a22d59a2
								
							
						
					
					
						commit
						504d40a328
					
				
					 1 changed files with 56 additions and 56 deletions
				
			
		
							
								
								
									
										112
									
								
								lib/libcrt.c
									
										
									
									
									
								
							
							
						
						
									
										112
									
								
								lib/libcrt.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -530,77 +530,77 @@ long double __floatundixf(unsigned long long a)
 | 
			
		|||
 | 
			
		||||
unsigned long long __fixunssfdi (float a1)
 | 
			
		||||
{
 | 
			
		||||
	register union float_long fl1;
 | 
			
		||||
	register int exp;
 | 
			
		||||
	register unsigned long l;
 | 
			
		||||
	int s;
 | 
			
		||||
	fl1.f = a1;
 | 
			
		||||
    register union float_long fl1;
 | 
			
		||||
    register int exp;
 | 
			
		||||
    register unsigned long l;
 | 
			
		||||
    int s;
 | 
			
		||||
    fl1.f = a1;
 | 
			
		||||
 | 
			
		||||
	if (fl1.l == 0)
 | 
			
		||||
		return 0;
 | 
			
		||||
    if (fl1.l == 0)
 | 
			
		||||
	return 0;
 | 
			
		||||
 | 
			
		||||
	exp = EXP (fl1.l) - EXCESS - 24;
 | 
			
		||||
    exp = EXP (fl1.l) - EXCESS - 24;
 | 
			
		||||
 | 
			
		||||
	l = MANT(fl1.l);
 | 
			
		||||
	s = SIGN(fl1.l)? -1: 1;
 | 
			
		||||
	if (exp >= 64)
 | 
			
		||||
		return (unsigned long long)-1;
 | 
			
		||||
	else if (exp >= 0)
 | 
			
		||||
		return ((unsigned long long)l << exp)*s;
 | 
			
		||||
	else if (exp >= -23)
 | 
			
		||||
		return (l >> -exp)*s;
 | 
			
		||||
	else
 | 
			
		||||
		return 0;
 | 
			
		||||
    l = MANT(fl1.l);
 | 
			
		||||
    s = SIGN(fl1.l)? -1: 1;
 | 
			
		||||
    if (exp >= 64)
 | 
			
		||||
	return (unsigned long long)-1;
 | 
			
		||||
    else if (exp >= 0)
 | 
			
		||||
	return ((unsigned long long)l << exp)*s;
 | 
			
		||||
    else if (exp >= -23)
 | 
			
		||||
	return (l >> -exp)*s;
 | 
			
		||||
    else
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
unsigned long long __fixunsdfdi (double a1)
 | 
			
		||||
{
 | 
			
		||||
	register union double_long dl1;
 | 
			
		||||
	register int exp;
 | 
			
		||||
	register unsigned long long l;
 | 
			
		||||
	int s;
 | 
			
		||||
	dl1.d = a1;
 | 
			
		||||
    register union double_long dl1;
 | 
			
		||||
    register int exp;
 | 
			
		||||
    register unsigned long long l;
 | 
			
		||||
    int s;
 | 
			
		||||
    dl1.d = a1;
 | 
			
		||||
 | 
			
		||||
	if (dl1.ll == 0)
 | 
			
		||||
		return (0);
 | 
			
		||||
    if (dl1.ll == 0)
 | 
			
		||||
	return (0);
 | 
			
		||||
 | 
			
		||||
	exp = EXPD (dl1) - EXCESSD - 53;
 | 
			
		||||
    exp = EXPD (dl1) - EXCESSD - 53;
 | 
			
		||||
 | 
			
		||||
	l = MANTD_LL(dl1);
 | 
			
		||||
	s = SIGND(dl1)? -1: 1;
 | 
			
		||||
	if (exp >= 64)
 | 
			
		||||
		return (unsigned long long)-1;
 | 
			
		||||
	else if (exp >= 0)
 | 
			
		||||
		return (l << exp)*s;
 | 
			
		||||
	else if (exp >= -52)
 | 
			
		||||
		return (l >> -exp)*s;
 | 
			
		||||
	else
 | 
			
		||||
		return 0;
 | 
			
		||||
    l = MANTD_LL(dl1);
 | 
			
		||||
    s = SIGND(dl1)? -1: 1;
 | 
			
		||||
    if (exp >= 64)
 | 
			
		||||
	return (unsigned long long)-1;
 | 
			
		||||
    else if (exp >= 0)
 | 
			
		||||
	return (l << exp)*s;
 | 
			
		||||
    else if (exp >= -52)
 | 
			
		||||
	return (l >> -exp)*s;
 | 
			
		||||
    else
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
unsigned long long __fixunsxfdi (long double a1)
 | 
			
		||||
{
 | 
			
		||||
	register union ldouble_long dl1;
 | 
			
		||||
	register int exp;
 | 
			
		||||
	register unsigned long long l;
 | 
			
		||||
	int s;
 | 
			
		||||
	dl1.ld = a1;
 | 
			
		||||
    register union ldouble_long dl1;
 | 
			
		||||
    register int exp;
 | 
			
		||||
    register unsigned long long l;
 | 
			
		||||
    int s;
 | 
			
		||||
    dl1.ld = a1;
 | 
			
		||||
 | 
			
		||||
	if (dl1.l.lower == 0 && dl1.l.upper == 0)
 | 
			
		||||
		return (0);
 | 
			
		||||
    if (dl1.l.lower == 0 && dl1.l.upper == 0)
 | 
			
		||||
	return (0);
 | 
			
		||||
 | 
			
		||||
	exp = EXPLD (dl1) - EXCESSLD - 64;
 | 
			
		||||
	s = SIGNLD(dl1)? -1: 1;
 | 
			
		||||
	l = dl1.l.lower;
 | 
			
		||||
    exp = EXPLD (dl1) - EXCESSLD - 64;
 | 
			
		||||
    s = SIGNLD(dl1)? -1: 1;
 | 
			
		||||
    l = dl1.l.lower;
 | 
			
		||||
 | 
			
		||||
	if (exp >= 64)
 | 
			
		||||
		return (unsigned long long)-1;
 | 
			
		||||
	else if (exp >= 0)
 | 
			
		||||
		return ((unsigned long long)l << exp)*s;
 | 
			
		||||
	else if (exp >= -64)
 | 
			
		||||
		return (l >> -exp)*s;
 | 
			
		||||
	else
 | 
			
		||||
		return 0;
 | 
			
		||||
    if (exp >= 64)
 | 
			
		||||
	return (unsigned long long)-1;
 | 
			
		||||
    else if (exp >= 0)
 | 
			
		||||
	return ((unsigned long long)l << exp)*s;
 | 
			
		||||
    else if (exp >= -64)
 | 
			
		||||
	return (l >> -exp)*s;
 | 
			
		||||
    else
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
long long __fixsfdi (float a1)
 | 
			
		||||
| 
						 | 
				
			
			@ -640,7 +640,7 @@ extern void abort(void);
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
enum __va_arg_type {
 | 
			
		||||
		__va_gen_reg, __va_float_reg, __va_ld_reg, __va_stack
 | 
			
		||||
    __va_gen_reg, __va_float_reg, __va_ld_reg, __va_stack
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
//This should be in sync with the declaration on our include/stdarg.h
 | 
			
		||||
| 
						 | 
				
			
			@ -691,7 +691,7 @@ void *__va_arg(__va_list_struct *ap,
 | 
			
		|||
        size = 8;
 | 
			
		||||
        goto use_overflow_area;
 | 
			
		||||
 | 
			
		||||
	case __va_ld_reg:
 | 
			
		||||
    case __va_ld_reg:
 | 
			
		||||
        ap->overflow_arg_area = (char*)((intptr_t)(ap->overflow_arg_area + align - 1) & -(intptr_t)align);
 | 
			
		||||
    case __va_stack:
 | 
			
		||||
    use_overflow_area:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue