< prev index next >

src/hotspot/share/classfile/vmIntrinsics.cpp

Print this page

 58 inline bool match_F_SN(jshort flags) {
 59   const int req = JVM_ACC_STATIC | JVM_ACC_NATIVE;
 60   const int neg = JVM_ACC_SYNCHRONIZED;
 61   return (flags & (req | neg)) == req;
 62 }
 63 
 64 bool vmIntrinsics::preserves_state(vmIntrinsics::ID id) {
 65   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
 66   switch(id) {
 67 #ifdef JFR_HAVE_INTRINSICS
 68   case vmIntrinsics::_counterTime:
 69 #endif
 70   case vmIntrinsics::_currentTimeMillis:
 71   case vmIntrinsics::_nanoTime:
 72   case vmIntrinsics::_floatToRawIntBits:
 73   case vmIntrinsics::_intBitsToFloat:
 74   case vmIntrinsics::_doubleToRawLongBits:
 75   case vmIntrinsics::_longBitsToDouble:
 76   case vmIntrinsics::_getClass:
 77   case vmIntrinsics::_isInstance:

 78   case vmIntrinsics::_currentThread:

 79   case vmIntrinsics::_dabs:
 80   case vmIntrinsics::_fabs:
 81   case vmIntrinsics::_iabs:
 82   case vmIntrinsics::_labs:
 83   case vmIntrinsics::_dsqrt:
 84   case vmIntrinsics::_dsqrt_strict:
 85   case vmIntrinsics::_dsin:
 86   case vmIntrinsics::_dcos:
 87   case vmIntrinsics::_dtan:
 88   case vmIntrinsics::_dlog:
 89   case vmIntrinsics::_dlog10:
 90   case vmIntrinsics::_dexp:
 91   case vmIntrinsics::_dpow:
 92   case vmIntrinsics::_Preconditions_checkIndex:
 93   case vmIntrinsics::_Preconditions_checkLongIndex:
 94   case vmIntrinsics::_Reference_get:

 95   case vmIntrinsics::_updateCRC32:
 96   case vmIntrinsics::_updateBytesCRC32:
 97   case vmIntrinsics::_updateByteBufferCRC32:
 98   case vmIntrinsics::_updateBytesAdler32:
 99   case vmIntrinsics::_vectorizedMismatch:
100   case vmIntrinsics::_fmaD:
101   case vmIntrinsics::_fmaF:
102   case vmIntrinsics::_isDigit:
103   case vmIntrinsics::_isLowerCase:
104   case vmIntrinsics::_isUpperCase:
105   case vmIntrinsics::_isWhitespace:
106     return true;
107   default:
108     return false;
109   }
110 }
111 
112 bool vmIntrinsics::can_trap(vmIntrinsics::ID id) {
113   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
114   switch(id) {
115 #ifdef JFR_HAVE_INTRINSICS
116   case vmIntrinsics::_counterTime:
117   case vmIntrinsics::_getClassId:
118 #endif
119   case vmIntrinsics::_currentTimeMillis:
120   case vmIntrinsics::_nanoTime:
121   case vmIntrinsics::_floatToRawIntBits:
122   case vmIntrinsics::_intBitsToFloat:
123   case vmIntrinsics::_doubleToRawLongBits:
124   case vmIntrinsics::_longBitsToDouble:

125   case vmIntrinsics::_currentThread:



126   case vmIntrinsics::_dabs:
127   case vmIntrinsics::_fabs:
128   case vmIntrinsics::_iabs:
129   case vmIntrinsics::_labs:
130   case vmIntrinsics::_dsqrt:
131   case vmIntrinsics::_dsqrt_strict:
132   case vmIntrinsics::_dsin:
133   case vmIntrinsics::_dcos:
134   case vmIntrinsics::_dtan:
135   case vmIntrinsics::_dlog:
136   case vmIntrinsics::_dlog10:
137   case vmIntrinsics::_dexp:
138   case vmIntrinsics::_dpow:
139   case vmIntrinsics::_updateCRC32:
140   case vmIntrinsics::_updateBytesCRC32:
141   case vmIntrinsics::_updateByteBufferCRC32:
142   case vmIntrinsics::_vectorizedMismatch:
143   case vmIntrinsics::_fmaD:
144   case vmIntrinsics::_fmaF:
145     return false;

214     case vmIntrinsics::_compareToUL:
215     case vmIntrinsics::_equalsL:
216     case vmIntrinsics::_equalsU:
217     case vmIntrinsics::_equalsC:
218     case vmIntrinsics::_getCharStringU:
219     case vmIntrinsics::_putCharStringU:
220     case vmIntrinsics::_compressStringC:
221     case vmIntrinsics::_compressStringB:
222     case vmIntrinsics::_inflateStringC:
223     case vmIntrinsics::_inflateStringB:
224     case vmIntrinsics::_getAndAddInt:
225     case vmIntrinsics::_getAndAddLong:
226     case vmIntrinsics::_getAndSetInt:
227     case vmIntrinsics::_getAndSetLong:
228     case vmIntrinsics::_getAndSetReference:
229     case vmIntrinsics::_loadFence:
230     case vmIntrinsics::_storeFence:
231     case vmIntrinsics::_fullFence:
232     case vmIntrinsics::_hasNegatives:
233     case vmIntrinsics::_Reference_get:

234       break;
235     default:
236       return true;
237     }
238   }
239 
240   switch (id) {
241   case vmIntrinsics::_isInstance:
242   case vmIntrinsics::_isAssignableFrom:
243   case vmIntrinsics::_getModifiers:
244   case vmIntrinsics::_isInterface:
245   case vmIntrinsics::_isArray:
246   case vmIntrinsics::_isPrimitive:
247   case vmIntrinsics::_isHidden:
248   case vmIntrinsics::_getSuperclass:
249   case vmIntrinsics::_Class_cast:
250   case vmIntrinsics::_getLength:
251   case vmIntrinsics::_newArray:
252   case vmIntrinsics::_getClass:
253     if (!InlineClassNatives) return true;
254     break;

255   case vmIntrinsics::_currentThread:
256     if (!InlineThreadNatives) return true;
257     break;



258   case vmIntrinsics::_floatToRawIntBits:
259   case vmIntrinsics::_intBitsToFloat:
260   case vmIntrinsics::_doubleToRawLongBits:
261   case vmIntrinsics::_longBitsToDouble:
262   case vmIntrinsics::_ceil:
263   case vmIntrinsics::_floor:
264   case vmIntrinsics::_rint:
265   case vmIntrinsics::_dabs:
266   case vmIntrinsics::_fabs:
267   case vmIntrinsics::_iabs:
268   case vmIntrinsics::_labs:
269   case vmIntrinsics::_dsqrt:
270   case vmIntrinsics::_dsqrt_strict:
271   case vmIntrinsics::_dsin:
272   case vmIntrinsics::_dcos:
273   case vmIntrinsics::_dtan:
274   case vmIntrinsics::_dlog:
275   case vmIntrinsics::_dexp:
276   case vmIntrinsics::_dpow:
277   case vmIntrinsics::_dlog10:

 58 inline bool match_F_SN(jshort flags) {
 59   const int req = JVM_ACC_STATIC | JVM_ACC_NATIVE;
 60   const int neg = JVM_ACC_SYNCHRONIZED;
 61   return (flags & (req | neg)) == req;
 62 }
 63 
 64 bool vmIntrinsics::preserves_state(vmIntrinsics::ID id) {
 65   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
 66   switch(id) {
 67 #ifdef JFR_HAVE_INTRINSICS
 68   case vmIntrinsics::_counterTime:
 69 #endif
 70   case vmIntrinsics::_currentTimeMillis:
 71   case vmIntrinsics::_nanoTime:
 72   case vmIntrinsics::_floatToRawIntBits:
 73   case vmIntrinsics::_intBitsToFloat:
 74   case vmIntrinsics::_doubleToRawLongBits:
 75   case vmIntrinsics::_longBitsToDouble:
 76   case vmIntrinsics::_getClass:
 77   case vmIntrinsics::_isInstance:
 78   case vmIntrinsics::_currentThread0:
 79   case vmIntrinsics::_currentThread:
 80   case vmIntrinsics::_scopeLocalCache:
 81   case vmIntrinsics::_dabs:
 82   case vmIntrinsics::_fabs:
 83   case vmIntrinsics::_iabs:
 84   case vmIntrinsics::_labs:
 85   case vmIntrinsics::_dsqrt:
 86   case vmIntrinsics::_dsqrt_strict:
 87   case vmIntrinsics::_dsin:
 88   case vmIntrinsics::_dcos:
 89   case vmIntrinsics::_dtan:
 90   case vmIntrinsics::_dlog:
 91   case vmIntrinsics::_dlog10:
 92   case vmIntrinsics::_dexp:
 93   case vmIntrinsics::_dpow:
 94   case vmIntrinsics::_Preconditions_checkIndex:
 95   case vmIntrinsics::_Preconditions_checkLongIndex:
 96   case vmIntrinsics::_Reference_get:
 97   case vmIntrinsics::_Continuation_doYield:
 98   case vmIntrinsics::_updateCRC32:
 99   case vmIntrinsics::_updateBytesCRC32:
100   case vmIntrinsics::_updateByteBufferCRC32:
101   case vmIntrinsics::_updateBytesAdler32:
102   case vmIntrinsics::_vectorizedMismatch:
103   case vmIntrinsics::_fmaD:
104   case vmIntrinsics::_fmaF:
105   case vmIntrinsics::_isDigit:
106   case vmIntrinsics::_isLowerCase:
107   case vmIntrinsics::_isUpperCase:
108   case vmIntrinsics::_isWhitespace:
109     return true;
110   default:
111     return false;
112   }
113 }
114 
115 bool vmIntrinsics::can_trap(vmIntrinsics::ID id) {
116   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
117   switch(id) {
118 #ifdef JFR_HAVE_INTRINSICS
119   case vmIntrinsics::_counterTime:

120 #endif
121   case vmIntrinsics::_currentTimeMillis:
122   case vmIntrinsics::_nanoTime:
123   case vmIntrinsics::_floatToRawIntBits:
124   case vmIntrinsics::_intBitsToFloat:
125   case vmIntrinsics::_doubleToRawLongBits:
126   case vmIntrinsics::_longBitsToDouble:
127   case vmIntrinsics::_currentThread0:
128   case vmIntrinsics::_currentThread:
129   case vmIntrinsics::_scopeLocalCache:
130   case vmIntrinsics::_setScopeLocalCache:
131   case vmIntrinsics::_setCurrentThread:
132   case vmIntrinsics::_dabs:
133   case vmIntrinsics::_fabs:
134   case vmIntrinsics::_iabs:
135   case vmIntrinsics::_labs:
136   case vmIntrinsics::_dsqrt:
137   case vmIntrinsics::_dsqrt_strict:
138   case vmIntrinsics::_dsin:
139   case vmIntrinsics::_dcos:
140   case vmIntrinsics::_dtan:
141   case vmIntrinsics::_dlog:
142   case vmIntrinsics::_dlog10:
143   case vmIntrinsics::_dexp:
144   case vmIntrinsics::_dpow:
145   case vmIntrinsics::_updateCRC32:
146   case vmIntrinsics::_updateBytesCRC32:
147   case vmIntrinsics::_updateByteBufferCRC32:
148   case vmIntrinsics::_vectorizedMismatch:
149   case vmIntrinsics::_fmaD:
150   case vmIntrinsics::_fmaF:
151     return false;

220     case vmIntrinsics::_compareToUL:
221     case vmIntrinsics::_equalsL:
222     case vmIntrinsics::_equalsU:
223     case vmIntrinsics::_equalsC:
224     case vmIntrinsics::_getCharStringU:
225     case vmIntrinsics::_putCharStringU:
226     case vmIntrinsics::_compressStringC:
227     case vmIntrinsics::_compressStringB:
228     case vmIntrinsics::_inflateStringC:
229     case vmIntrinsics::_inflateStringB:
230     case vmIntrinsics::_getAndAddInt:
231     case vmIntrinsics::_getAndAddLong:
232     case vmIntrinsics::_getAndSetInt:
233     case vmIntrinsics::_getAndSetLong:
234     case vmIntrinsics::_getAndSetReference:
235     case vmIntrinsics::_loadFence:
236     case vmIntrinsics::_storeFence:
237     case vmIntrinsics::_fullFence:
238     case vmIntrinsics::_hasNegatives:
239     case vmIntrinsics::_Reference_get:
240     case vmIntrinsics::_Continuation_doYield:
241       break;
242     default:
243       return true;
244     }
245   }
246 
247   switch (id) {
248   case vmIntrinsics::_isInstance:
249   case vmIntrinsics::_isAssignableFrom:
250   case vmIntrinsics::_getModifiers:
251   case vmIntrinsics::_isInterface:
252   case vmIntrinsics::_isArray:
253   case vmIntrinsics::_isPrimitive:
254   case vmIntrinsics::_isHidden:
255   case vmIntrinsics::_getSuperclass:
256   case vmIntrinsics::_Class_cast:
257   case vmIntrinsics::_getLength:
258   case vmIntrinsics::_newArray:
259   case vmIntrinsics::_getClass:
260     if (!InlineClassNatives) return true;
261     break;
262   case vmIntrinsics::_currentThread0:
263   case vmIntrinsics::_currentThread:
264     if (!InlineThreadNatives) return true;
265     break;
266   case vmIntrinsics::_scopeLocalCache:
267   case vmIntrinsics::_setScopeLocalCache:
268   case vmIntrinsics::_setCurrentThread:
269   case vmIntrinsics::_floatToRawIntBits:
270   case vmIntrinsics::_intBitsToFloat:
271   case vmIntrinsics::_doubleToRawLongBits:
272   case vmIntrinsics::_longBitsToDouble:
273   case vmIntrinsics::_ceil:
274   case vmIntrinsics::_floor:
275   case vmIntrinsics::_rint:
276   case vmIntrinsics::_dabs:
277   case vmIntrinsics::_fabs:
278   case vmIntrinsics::_iabs:
279   case vmIntrinsics::_labs:
280   case vmIntrinsics::_dsqrt:
281   case vmIntrinsics::_dsqrt_strict:
282   case vmIntrinsics::_dsin:
283   case vmIntrinsics::_dcos:
284   case vmIntrinsics::_dtan:
285   case vmIntrinsics::_dlog:
286   case vmIntrinsics::_dexp:
287   case vmIntrinsics::_dpow:
288   case vmIntrinsics::_dlog10:
< prev index next >