src/share/vm/utilities/globalDefinitions_sparcWorks.hpp

changeset 7001
b6a8cc1e0d92
parent 3156
f08d439fab8c
child 7535
7ae4e26cb1e0
child 7624
6a4b9e574124
equal deleted inserted replaced
7000:631c3a4ea10c 7001:b6a8cc1e0d92
181 typedef unsigned char jubyte; 181 typedef unsigned char jubyte;
182 typedef unsigned short jushort; 182 typedef unsigned short jushort;
183 typedef unsigned int juint; 183 typedef unsigned int juint;
184 typedef unsigned long long julong; 184 typedef unsigned long long julong;
185 185
186 //----------------------------------------------------------------------------------------------------
187 // Special (possibly not-portable) casts
188 // Cast floats into same-size integers and vice-versa w/o changing bit-pattern
189
190 inline jint jint_cast (jfloat x) { return *(jint* )&x; }
191 inline jlong jlong_cast (jdouble x) { return *(jlong* )&x; }
192
193 inline jfloat jfloat_cast (jint x) { return *(jfloat* )&x; }
194 inline jdouble jdouble_cast(jlong x) { return *(jdouble*)&x; }
195 186
196 //---------------------------------------------------------------------------------------------------- 187 //----------------------------------------------------------------------------------------------------
197 // Constant for jlong (specifying an long long constant is C++ compiler specific) 188 // Constant for jlong (specifying an long long constant is C++ compiler specific)
198 189
199 // Build a 64bit integer constant 190 // Build a 64bit integer constant

mercurial