< prev index next >

src/java.base/unix/native/libjava/jlong_md.h

Print this page
rev 12879 : 8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti
   1 /*
   2  * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  48 /* comparison operators */
  49 #define jlong_ltz(ll)   ((ll)<0)
  50 #define jlong_gez(ll)   ((ll)>=0)
  51 #define jlong_gtz(ll)   ((ll)>0)
  52 #define jlong_eqz(a)    ((a) == 0)
  53 #define jlong_eq(a, b)  ((a) == (b))
  54 #define jlong_ne(a,b)   ((a) != (b))
  55 #define jlong_ge(a,b)   ((a) >= (b))
  56 #define jlong_le(a,b)   ((a) <= (b))
  57 #define jlong_lt(a,b)   ((a) < (b))
  58 #define jlong_gt(a,b)   ((a) > (b))
  59 
  60 #define jlong_zero      ((jlong) 0)
  61 #define jlong_one       ((jlong) 1)
  62 #define jlong_minus_one ((jlong) -1)
  63 
  64 /* For static variables initialized to zero */
  65 #define jlong_zero_init  ((jlong) 0L)
  66 
  67 #ifdef _LP64
  68 #define jlong_to_ptr(a) ((void*)(a))
  69 #define ptr_to_jlong(a) ((jlong)(a))




  70 #else
  71 #define jlong_to_ptr(a) ((void*)(int)(a))
  72 #define ptr_to_jlong(a) ((jlong)(int)(a))




  73 #endif
  74 
  75 #define jint_to_jlong(a)        ((jlong)(a))
  76 #define jlong_to_jint(a)        ((jint)(a))
  77 
  78 /* Useful on machines where jlong and jdouble have different endianness. */
  79 #define jlong_to_jdouble_bits(a)
  80 #define jdouble_to_jlong_bits(a)
  81 
  82 #define jlong_to_int(a)     ((int)(a))
  83 #define int_to_jlong(a)     ((jlong)(a))
  84 #define jlong_to_uint(a)    ((unsigned int)(a))
  85 #define uint_to_jlong(a)    ((jlong)(a))
  86 #define jlong_to_ptrdiff(a) ((ptrdiff_t)(a))
  87 #define ptrdiff_to_jlong(a) ((jlong)(a))
  88 #define jlong_to_size(a)    ((size_t)(a))
  89 #define size_to_jlong(a)    ((jlong)(a))
  90 #define long_to_jlong(a)    ((jlong)(a))
  91 
  92 #endif /* !_SOLARIS_JLONG_MD_H_ */
   1 /*
   2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  48 /* comparison operators */
  49 #define jlong_ltz(ll)   ((ll)<0)
  50 #define jlong_gez(ll)   ((ll)>=0)
  51 #define jlong_gtz(ll)   ((ll)>0)
  52 #define jlong_eqz(a)    ((a) == 0)
  53 #define jlong_eq(a, b)  ((a) == (b))
  54 #define jlong_ne(a,b)   ((a) != (b))
  55 #define jlong_ge(a,b)   ((a) >= (b))
  56 #define jlong_le(a,b)   ((a) <= (b))
  57 #define jlong_lt(a,b)   ((a) < (b))
  58 #define jlong_gt(a,b)   ((a) > (b))
  59 
  60 #define jlong_zero      ((jlong) 0)
  61 #define jlong_one       ((jlong) 1)
  62 #define jlong_minus_one ((jlong) -1)
  63 
  64 /* For static variables initialized to zero */
  65 #define jlong_zero_init  ((jlong) 0L)
  66 
  67 #ifdef _LP64
  68   #ifndef jlong_to_ptr
  69     #define jlong_to_ptr(a) ((void*)(a))
  70   #endif
  71   #ifndef ptr_to_jlong
  72     #define ptr_to_jlong(a) ((jlong)(a))
  73   #endif
  74 #else
  75   #ifndef jlong_to_ptr
  76     #define jlong_to_ptr(a) ((void*)(int)(a))
  77   #endif
  78   #ifndef ptr_to_jlong
  79     #define ptr_to_jlong(a) ((jlong)(int)(a))
  80   #endif
  81 #endif
  82 
  83 #define jint_to_jlong(a)        ((jlong)(a))
  84 #define jlong_to_jint(a)        ((jint)(a))
  85 
  86 /* Useful on machines where jlong and jdouble have different endianness. */
  87 #define jlong_to_jdouble_bits(a)
  88 #define jdouble_to_jlong_bits(a)
  89 
  90 #define jlong_to_int(a)     ((int)(a))
  91 #define int_to_jlong(a)     ((jlong)(a))
  92 #define jlong_to_uint(a)    ((unsigned int)(a))
  93 #define uint_to_jlong(a)    ((jlong)(a))
  94 #define jlong_to_ptrdiff(a) ((ptrdiff_t)(a))
  95 #define ptrdiff_to_jlong(a) ((jlong)(a))
  96 #define jlong_to_size(a)    ((size_t)(a))
  97 #define size_to_jlong(a)    ((jlong)(a))
  98 #define long_to_jlong(a)    ((jlong)(a))
  99 
 100 #endif /* !_SOLARIS_JLONG_MD_H_ */
< prev index next >