< 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::_dsin:
 85   case vmIntrinsics::_dcos:
 86   case vmIntrinsics::_dtan:
 87   case vmIntrinsics::_dlog:
 88   case vmIntrinsics::_dlog10:
 89   case vmIntrinsics::_dexp:
 90   case vmIntrinsics::_dpow:
 91   case vmIntrinsics::_Preconditions_checkIndex:
 92   case vmIntrinsics::_Preconditions_checkLongIndex:
 93   case vmIntrinsics::_Reference_get:

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

124   case vmIntrinsics::_currentThread:



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

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

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

253   case vmIntrinsics::_currentThread:
254     if (!InlineThreadNatives) return true;
255     break;



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

 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::_dsin:
 87   case vmIntrinsics::_dcos:
 88   case vmIntrinsics::_dtan:
 89   case vmIntrinsics::_dlog:
 90   case vmIntrinsics::_dlog10:
 91   case vmIntrinsics::_dexp:
 92   case vmIntrinsics::_dpow:
 93   case vmIntrinsics::_Preconditions_checkIndex:
 94   case vmIntrinsics::_Preconditions_checkLongIndex:
 95   case vmIntrinsics::_Reference_get:
 96   case vmIntrinsics::_Continuation_doYield:
 97   case vmIntrinsics::_updateCRC32:
 98   case vmIntrinsics::_updateBytesCRC32:
 99   case vmIntrinsics::_updateByteBufferCRC32:
100   case vmIntrinsics::_updateBytesAdler32:
101   case vmIntrinsics::_vectorizedMismatch:
102   case vmIntrinsics::_fmaD:
103   case vmIntrinsics::_fmaF:
104   case vmIntrinsics::_isDigit:
105   case vmIntrinsics::_isLowerCase:
106   case vmIntrinsics::_isUpperCase:
107   case vmIntrinsics::_isWhitespace:
108     return true;
109   default:
110     return false;
111   }
112 }
113 
114 bool vmIntrinsics::can_trap(vmIntrinsics::ID id) {
115   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
116   switch(id) {
117 #ifdef JFR_HAVE_INTRINSICS
118   case vmIntrinsics::_counterTime:

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

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