jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h

Print this page




  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  */
  26 
  27 #include "jfdlibm.h"
  28 
  29 #ifdef __NEWVALID       /* special setup for Sun test regime */
  30 #if defined(i386) || defined(i486) || \
  31         defined(intel) || defined(x86) || \
  32         defined(i86pc) || defined(_M_IA64)
  33 #define _LITTLE_ENDIAN
  34 #endif
  35 #endif
  36 
  37 #ifdef _LITTLE_ENDIAN
  38 #define __HI(x) *(1+(int*)&x)
  39 #define __LO(x) *(int*)&x
  40 #define __HIp(x) *(1+(int*)x)
  41 #define __LOp(x) *(int*)x
  42 #else
  43 #define __HI(x) *(int*)&x
  44 #define __LO(x) *(1+(int*)&x)
  45 #define __HIp(x) *(int*)x
  46 #define __LOp(x) *(1+(int*)x)
  47 #endif
  48 
  49 #ifdef __STDC__
  50 #define __P(p)  p
  51 #else
  52 #define __P(p)  ()




  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  */
  26 
  27 #include "jfdlibm.h"
  28 
  29 #ifdef __NEWVALID       /* special setup for Sun test regime */
  30 #if defined(i386) || defined(i486) || \
  31         defined(intel) || defined(x86) || \
  32         defined(i86pc) || defined(_M_IA64) || defined(ia64)
  33 #define _LITTLE_ENDIAN
  34 #endif
  35 #endif
  36 
  37 #ifdef _LITTLE_ENDIAN
  38 #define __HI(x) *(1+(int*)&x)
  39 #define __LO(x) *(int*)&x
  40 #define __HIp(x) *(1+(int*)x)
  41 #define __LOp(x) *(int*)x
  42 #else
  43 #define __HI(x) *(int*)&x
  44 #define __LO(x) *(1+(int*)&x)
  45 #define __HIp(x) *(int*)x
  46 #define __LOp(x) *(1+(int*)x)
  47 #endif
  48 
  49 #ifdef __STDC__
  50 #define __P(p)  p
  51 #else
  52 #define __P(p)  ()