src/share/vm/utilities/globalDefinitions_gcc.hpp

changeset 7001
b6a8cc1e0d92
parent 6680
78bbf4d43a14
child 7535
7ae4e26cb1e0
child 7598
ddce0b7cee93
equal deleted inserted replaced
7000:631c3a4ea10c 7001:b6a8cc1e0d92
165 typedef uint8_t jubyte; 165 typedef uint8_t jubyte;
166 typedef uint16_t jushort; 166 typedef uint16_t jushort;
167 typedef uint32_t juint; 167 typedef uint32_t juint;
168 typedef uint64_t julong; 168 typedef uint64_t julong;
169 169
170 //----------------------------------------------------------------------------------------------------
171 // Special (possibly not-portable) casts
172 // Cast floats into same-size integers and vice-versa w/o changing bit-pattern
173 // %%%%%% These seem like standard C++ to me--how about factoring them out? - Ungar
174
175 inline jint jint_cast (jfloat x) { return *(jint* )&x; }
176 inline jlong jlong_cast (jdouble x) { return *(jlong* )&x; }
177 inline julong julong_cast (jdouble x) { return *(julong* )&x; }
178
179 inline jfloat jfloat_cast (jint x) { return *(jfloat* )&x; }
180 inline jdouble jdouble_cast(jlong x) { return *(jdouble*)&x; }
181 170
182 //---------------------------------------------------------------------------------------------------- 171 //----------------------------------------------------------------------------------------------------
183 // Constant for jlong (specifying an long long canstant is C++ compiler specific) 172 // Constant for jlong (specifying an long long canstant is C++ compiler specific)
184 173
185 // Build a 64bit integer constant 174 // Build a 64bit integer constant

mercurial