Skip to content

Commit

Permalink
Add cast
Browse files Browse the repository at this point in the history
  • Loading branch information
KaperD committed Dec 8, 2021
1 parent df94a57 commit cf65b02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/assembler_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ class Address {
static bool offset_ok_for_immed(int64_t offset, int shift) {
unsigned mask = (1 << shift) - 1;
if (offset < 0 || offset & mask) {
return (uabs(offset) < (1 << (20 - 12))); // Unscaled offset
return (uabs((long)offset) < (1 << (20 - 12))); // Unscaled offset
} else {
return ((offset >> shift) < (1 << (21 - 10 + 1))); // Scaled, unsigned offset
}
Expand Down

0 comments on commit cf65b02

Please sign in to comment.