8276215: Intrinsics matchers should handle native method flags better

Reviewed-by: dholmes, kvn
This commit is contained in:
Aleksey Shipilev 2021-11-10 10:45:51 +00:00
parent 0f463a7bf7
commit a3f710efbe
2 changed files with 79 additions and 29 deletions

View file

@ -33,13 +33,13 @@
// These are flag-matching functions:
inline bool match_F_R(jshort flags) {
const int req = 0;
const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED;
const int neg = JVM_ACC_STATIC | JVM_ACC_SYNCHRONIZED | JVM_ACC_NATIVE;
return (flags & (req | neg)) == req;
}
inline bool match_F_Y(jshort flags) {
const int req = JVM_ACC_SYNCHRONIZED;
const int neg = JVM_ACC_STATIC;
const int neg = JVM_ACC_STATIC | JVM_ACC_NATIVE;
return (flags & (req | neg)) == req;
}
@ -51,7 +51,7 @@ inline bool match_F_RN(jshort flags) {
inline bool match_F_S(jshort flags) {
const int req = JVM_ACC_STATIC;
const int neg = JVM_ACC_SYNCHRONIZED;
const int neg = JVM_ACC_SYNCHRONIZED | JVM_ACC_NATIVE;
return (flags & (req | neg)) == req;
}