patches/uClibc/20080801/300-fix-asm.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Sep 04 17:27:16 2009 +0200 (2009-09-04)
changeset 1512 439a6b292917
permissions -rw-r--r--
TODO: update

Add TODO list for m4, autoconf, automake and libtool.
Building our own versions would remove burden from the users
who have older versions on their distributions, and are not
ready/able/allowed to upgrade.
     1 Index: uClibc/ldso/ldso/sparc/dl-sysdep.h
     2 ===================================================================
     3 --- uClibc/ldso/ldso/sparc/dl-sysdep.h	(revision 23055)
     4 +++ uClibc/ldso/ldso/sparc/dl-sysdep.h	(working copy)
     5 @@ -141,7 +141,7 @@
     6  static __inline__ Elf32_Addr
     7  elf_machine_load_address (void)
     8  {
     9 -	register Elf32_Addr *pc __asm__ ("%o7"), *got __asm ("%l7");
    10 +	register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
    11  
    12  	__asm__ ("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t"
    13  	       "call 1f\n\t"
    14 Index: uClibc/libc/sysdeps/linux/i386/bits/mathinline.h
    15 ===================================================================
    16 --- uClibc/libc/sysdeps/linux/i386/bits/mathinline.h	(revision 23055)
    17 +++ uClibc/libc/sysdeps/linux/i386/bits/mathinline.h	(working copy)
    18 @@ -299,12 +299,12 @@
    19    __extension__ long long int __p = (long long int) __x;		      \
    20    if (__x == (long double) __p)						      \
    21      {									      \
    22 -      __asm __volatile__						      \
    23 +      __asm__ __volatile__						      \
    24  	("fscale"							      \
    25  	 : "=t" (__value) : "0" (1.0), "u" (__x));			      \
    26        return __value;							      \
    27      }									      \
    28 -  __asm __volatile__							      \
    29 +  __asm__ __volatile__							      \
    30      ("fld	%%st(0)\n\t"						      \
    31       "frndint			# int(x)\n\t"				      \
    32       "fxch\n\t"								      \
    33 @@ -312,7 +312,7 @@
    34       "f2xm1			# 2^(fract(x)) - 1\n\t"			      \
    35       : "=t" (__value), "=u" (__exponent) : "0" (__x));			      \
    36    __value += 1.0;							      \
    37 -  __asm __volatile__							      \
    38 +  __asm__ __volatile__							      \
    39      ("fscale"								      \
    40       : "=t" (__value) : "0" (__value), "u" (__exponent));		      \
    41    return __value)
    42 @@ -321,7 +321,7 @@
    43  #  define __sincos_code \
    44    register long double __cosr;						      \
    45    register long double __sinr;						      \
    46 -  __asm __volatile__							      \
    47 +  __asm__ __volatile__							      \
    48      ("fsincos\n\t"							      \
    49       "fnstsw	%%ax\n\t"						      \
    50       "testl	$0x400, %%eax\n\t"					      \
    51 @@ -373,7 +373,7 @@
    52    register long double __value;						      \
    53    register long double __exponent;					      \
    54    register long double __temp;						      \
    55 -  __asm __volatile__							      \
    56 +  __asm__ __volatile__							      \
    57      ("fldl2e			# e^x - 1 = 2^(x * log2(e)) - 1\n\t"	      \
    58       "fmul	%%st(1)		# x * log2(e)\n\t"			      \
    59       "fst	%%st(1)\n\t"						      \
    60 @@ -383,7 +383,7 @@
    61       "f2xm1			# 2^(fract(x * log2(e))) - 1\n\t"	      \
    62       "fscale			# 2^(x * log2(e)) - 2^(int(x * log2(e)))\n\t" \
    63       : "=t" (__value), "=u" (__exponent) : "0" (__x));			      \
    64 -  __asm __volatile__							      \
    65 +  __asm__ __volatile__							      \
    66      ("fscale			# 2^int(x * log2(e))\n\t"		      \
    67       : "=t" (__temp) : "0" (1.0), "u" (__exponent));			      \
    68    __temp -= 1.0;							      \
    69 @@ -398,7 +398,7 @@
    70  #  define __exp_code \
    71    register long double __value;						      \
    72    register long double __exponent;					      \
    73 -  __asm __volatile__							      \
    74 +  __asm__ __volatile__							      \
    75      ("fldl2e			# e^x = 2^(x * log2(e))\n\t"		      \
    76       "fmul	%%st(1)		# x * log2(e)\n\t"			      \
    77       "fst	%%st(1)\n\t"						      \
    78 @@ -408,7 +408,7 @@
    79       "f2xm1			# 2^(fract(x * log2(e))) - 1\n\t"	      \
    80       : "=t" (__value), "=u" (__exponent) : "0" (__x));			      \
    81    __value += 1.0;							      \
    82 -  __asm __volatile__							      \
    83 +  __asm__ __volatile__							      \
    84      ("fscale"								      \
    85       : "=t" (__value) : "0" (__value), "u" (__exponent));		      \
    86    return __value
    87 @@ -421,7 +421,7 @@
    88  __inline_mathcodeNP (tan, __x, \
    89    register long double __value;						      \
    90    register long double __value2 __attribute__ ((__unused__));		      \
    91 -  __asm __volatile__							      \
    92 +  __asm__ __volatile__							      \
    93      ("fptan"								      \
    94       : "=t" (__value2), "=u" (__value) : "0" (__x));			      \
    95    return __value)
    96 @@ -435,7 +435,7 @@
    97  #else
    98  # define __atan2_code \
    99    register long double __value;						      \
   100 -  __asm __volatile__							      \
   101 +  __asm__ __volatile__							      \
   102      ("fpatan"								      \
   103       : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)");		      \
   104    return __value
   105 @@ -449,7 +449,7 @@
   106  #if defined __FAST_MATH__ && !__GNUC_PREREQ (3, 5)
   107  __inline_mathcodeNP2 (fmod, __x, __y, \
   108    register long double __value;						      \
   109 -  __asm __volatile__							      \
   110 +  __asm__ __volatile__							      \
   111      ("1:	fprem\n\t"						      \
   112       "fnstsw	%%ax\n\t"						      \
   113       "sahf\n\t"								      \
   114 @@ -552,7 +552,7 @@
   115  #ifdef __FAST_MATH__
   116  # define __ldexp_code \
   117    register long double __value;						      \
   118 -  __asm __volatile__							      \
   119 +  __asm__ __volatile__							      \
   120      ("fscale"								      \
   121       : "=t" (__value) : "0" (__x), "u" ((long double) __y));		      \
   122    return __value
   123 @@ -581,7 +581,7 @@
   124    if (__fabsl (__x) >= 1.0 - 0.5 * __M_SQRT2)				      \
   125      __value = logl (1.0 + __x);						      \
   126    else									      \
   127 -    __asm __volatile__							      \
   128 +    __asm__ __volatile__							      \
   129        ("fldln2\n\t"							      \
   130         "fxch\n\t"							      \
   131         "fyl2xp1"							      \
   132 @@ -611,7 +611,7 @@
   133  __inline_mathcodeNP(logb, __x, \
   134    register long double __value;						      \
   135    register long double __junk;						      \
   136 -  __asm __volatile__							      \
   137 +  __asm__ __volatile__							      \
   138      ("fxtract\n\t"							      \
   139       : "=t" (__junk), "=u" (__value) : "0" (__x));			      \
   140    return __value)
   141 @@ -699,7 +699,7 @@
   142  __inline_mathcodeNP2 (drem, __x, __y, \
   143    register double __value;						      \
   144    register int __clobbered;						      \
   145 -  __asm __volatile__							      \
   146 +  __asm__ __volatile__							      \
   147      ("1:	fprem1\n\t"						      \
   148       "fstsw	%%ax\n\t"						      \
   149       "sahf\n\t"								      \
   150 Index: uClibc/libc/sysdeps/linux/x86_64/sigaction.c
   151 ===================================================================
   152 --- uClibc/libc/sysdeps/linux/x86_64/sigaction.c	(revision 23055)
   153 +++ uClibc/libc/sysdeps/linux/x86_64/sigaction.c	(working copy)
   154 @@ -135,7 +135,7 @@
   155  
   156  #define RESTORE(name, syscall) RESTORE2 (name, syscall)
   157  # define RESTORE2(name, syscall) \
   158 -asm						\
   159 +__asm__						\
   160    (						\
   161     ".text\n" \
   162     "__" #name ":\n"				\
   163 Index: uClibc/libc/sysdeps/linux/mips/sigaction.c
   164 ===================================================================
   165 --- uClibc/libc/sysdeps/linux/mips/sigaction.c	(revision 23055)
   166 +++ uClibc/libc/sysdeps/linux/mips/sigaction.c	(working copy)
   167 @@ -140,7 +140,7 @@
   168  
   169  #define RESTORE(name, syscall) RESTORE2 (name, syscall)
   170  #define RESTORE2(name, syscall) \
   171 -asm						\
   172 +__asm__						\
   173    (						\
   174     ".align 4\n"					\
   175     "__" #name ":\n"				\