8270083: -Wnonnull errors happen with GCC 11.1.1

Reviewed-by: erikj, dlong, kbarrett
This commit is contained in:
Yasumasa Suenaga 2021-07-10 05:01:23 +00:00
parent ec975c6a05
commit 68b6e11e48
9 changed files with 42 additions and 4 deletions

View file

@ -7427,6 +7427,10 @@ void Assembler::evprolq(XMMRegister dst, XMMRegister src, int shift, int vector_
emit_int24(0x72, (0xC0 | encode), shift & 0xFF);
}
// Register is a class, but it would be assigned numerical value.
// "0" is assigned for xmm0. Thus we need to ignore -Wnonnull.
PRAGMA_DIAG_PUSH
PRAGMA_NONNULL_IGNORED
void Assembler::evprord(XMMRegister dst, XMMRegister src, int shift, int vector_len) {
assert(VM_Version::supports_evex(), "requires EVEX support");
assert(vector_len == Assembler::AVX_512bit || VM_Version::supports_avx512vl(), "requires VL support");
@ -7444,6 +7448,7 @@ void Assembler::evprorq(XMMRegister dst, XMMRegister src, int shift, int vector_
int encode = vex_prefix_and_encode(xmm0->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
emit_int24(0x72, (0xC0 | encode), shift & 0xFF);
}
PRAGMA_DIAG_POP
void Assembler::evprolvd(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len) {
assert(VM_Version::supports_evex(), "requires EVEX support");