Skip to content

Commit d2812f7

Browse files
lewurmAndrew Haley
authored andcommitted
8254072: AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build
Reviewed-by: ihse, aph
1 parent 120aec7 commit d2812f7

File tree

8 files changed

+23
-21
lines changed

8 files changed

+23
-21
lines changed

make/hotspot/lib/CompileJvm.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ DISABLED_WARNINGS_clang := tautological-compare \
9595

9696
DISABLED_WARNINGS_xlc := tautological-compare shift-negative-value
9797

98-
DISABLED_WARNINGS_microsoft := 4100 4127 4201 4244 4291 4351 \
98+
DISABLED_WARNINGS_microsoft := 4100 4127 4146 4201 4244 4291 4351 \
9999
4511 4512 4514 4624 4996
100100

101101
################################################################################

src/hotspot/cpu/aarch64/assembler_aarch64.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class Instruction_aarch64 {
217217

218218
static void patch(address a, int msb, int lsb, uint64_t val) {
219219
int nbits = msb - lsb + 1;
220-
guarantee(val < (1U << nbits), "Field too big for insn");
220+
guarantee(val < (1ULL << nbits), "Field too big for insn");
221221
assert_cond(msb >= lsb);
222222
unsigned mask = (1U << nbits) - 1;
223223
val <<= lsb;
@@ -445,8 +445,8 @@ class Address {
445445
}
446446

447447
Register base() const {
448-
guarantee((_mode == base_plus_offset | _mode == base_plus_offset_reg
449-
| _mode == post | _mode == post_reg),
448+
guarantee((_mode == base_plus_offset || _mode == base_plus_offset_reg
449+
|| _mode == post || _mode == post_reg),
450450
"wrong mode");
451451
return _base;
452452
}

src/hotspot/cpu/aarch64/frame_aarch64.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,11 +662,12 @@ intptr_t* frame::real_fp() const {
662662

663663
#undef DESCRIBE_FP_OFFSET
664664

665-
#define DESCRIBE_FP_OFFSET(name) \
666-
{ \
667-
uintptr_t *p = (uintptr_t *)fp; \
668-
printf("0x%016lx 0x%016lx %s\n", (uintptr_t)(p + frame::name##_offset), \
669-
p[frame::name##_offset], #name); \
665+
#define DESCRIBE_FP_OFFSET(name) \
666+
{ \
667+
uintptr_t *p = (uintptr_t *)fp; \
668+
printf(INTPTR_FORMAT " " INTPTR_FORMAT " %s\n", \
669+
(uintptr_t)(p + frame::name##_offset), \
670+
p[frame::name##_offset], #name); \
670671
}
671672

672673
static THREAD_LOCAL uintptr_t nextfp;

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ bool MacroAssembler::try_merge_ldst(Register rt, const Address &adr, size_t size
18301830
return true;
18311831
} else {
18321832
assert(size_in_bytes == 8 || size_in_bytes == 4, "only 8 bytes or 4 bytes load/store is supported.");
1833-
const unsigned mask = size_in_bytes - 1;
1833+
const uint64_t mask = size_in_bytes - 1;
18341834
if (adr.getMode() == Address::base_plus_offset &&
18351835
(adr.offset() & mask) == 0) { // only supports base_plus_offset.
18361836
code()->set_last_insn(pc());
@@ -2894,7 +2894,7 @@ void MacroAssembler::merge_ldst(Register rt,
28942894
// Overwrite previous generated binary.
28952895
code_section()->set_end(prev);
28962896

2897-
const int sz = prev_ldst->size_in_bytes();
2897+
const size_t sz = prev_ldst->size_in_bytes();
28982898
assert(sz == 8 || sz == 4, "only supports 64/32bit merging.");
28992899
if (!is_store) {
29002900
BLOCK_COMMENT("merged ldr pair");

src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ class NativeLdSt : public NativeInstruction {
655655
return 0;
656656
}
657657
}
658-
size_t size_in_bytes() { return 1 << size(); }
658+
size_t size_in_bytes() { return 1ULL << size(); }
659659
bool is_not_pre_post_index() { return (is_ldst_ur() || is_ldst_unsigned_offset()); }
660660
bool is_load() {
661661
assert(Instruction_aarch64::extract(uint_at(0), 23, 22) == 0b01 ||

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,8 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
14981498

14991499
// Generate stack overflow check
15001500
if (UseStackBanging) {
1501-
__ bang_stack_with_offset(StackOverflow::stack_shadow_zone_size());
1501+
assert(StackOverflow::stack_shadow_zone_size() == (int)StackOverflow::stack_shadow_zone_size(), "must be same");
1502+
__ bang_stack_with_offset((int)StackOverflow::stack_shadow_zone_size());
15021503
} else {
15031504
Unimplemented();
15041505
}
@@ -2445,7 +2446,7 @@ void SharedRuntime::generate_deopt_blob() {
24452446
__ sub(sp, sp, r19);
24462447

24472448
// Push interpreter frames in a loop
2448-
__ mov(rscratch1, (address)0xDEADDEAD); // Make a recognizable pattern
2449+
__ mov(rscratch1, (uint64_t)0xDEADDEAD); // Make a recognizable pattern
24492450
__ mov(rscratch2, rscratch1);
24502451
Label loop;
24512452
__ bind(loop);

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,14 +1305,14 @@ class StubGenerator: public StubCodeGenerator {
13051305

13061306
// Scan over array at a for count oops, verifying each one.
13071307
// Preserves a and count, clobbers rscratch1 and rscratch2.
1308-
void verify_oop_array (size_t size, Register a, Register count, Register temp) {
1308+
void verify_oop_array (int size, Register a, Register count, Register temp) {
13091309
Label loop, end;
13101310
__ mov(rscratch1, a);
13111311
__ mov(rscratch2, zr);
13121312
__ bind(loop);
13131313
__ cmp(rscratch2, count);
13141314
__ br(Assembler::HS, end);
1315-
if (size == (size_t)wordSize) {
1315+
if (size == wordSize) {
13161316
__ ldr(temp, Address(a, rscratch2, Address::lsl(exact_log2(size))));
13171317
__ verify_oop(temp);
13181318
} else {
@@ -1343,7 +1343,7 @@ class StubGenerator: public StubCodeGenerator {
13431343
// disjoint_int_copy_entry is set to the no-overlap entry point
13441344
// used by generate_conjoint_int_oop_copy().
13451345
//
1346-
address generate_disjoint_copy(size_t size, bool aligned, bool is_oop, address *entry,
1346+
address generate_disjoint_copy(int size, bool aligned, bool is_oop, address *entry,
13471347
const char *name, bool dest_uninitialized = false) {
13481348
Register s = c_rarg0, d = c_rarg1, count = c_rarg2;
13491349
RegSet saved_reg = RegSet::of(s, d, count);
@@ -1409,7 +1409,7 @@ class StubGenerator: public StubCodeGenerator {
14091409
// the hardware handle it. The two dwords within qwords that span
14101410
// cache line boundaries will still be loaded and stored atomicly.
14111411
//
1412-
address generate_conjoint_copy(size_t size, bool aligned, bool is_oop, address nooverlap_target,
1412+
address generate_conjoint_copy(int size, bool aligned, bool is_oop, address nooverlap_target,
14131413
address *entry, const char *name,
14141414
bool dest_uninitialized = false) {
14151415
Register s = c_rarg0, d = c_rarg1, count = c_rarg2;
@@ -1660,7 +1660,7 @@ class StubGenerator: public StubCodeGenerator {
16601660
address generate_disjoint_oop_copy(bool aligned, address *entry,
16611661
const char *name, bool dest_uninitialized) {
16621662
const bool is_oop = true;
1663-
const size_t size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
1663+
const int size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
16641664
return generate_disjoint_copy(size, aligned, is_oop, entry, name, dest_uninitialized);
16651665
}
16661666

@@ -1678,7 +1678,7 @@ class StubGenerator: public StubCodeGenerator {
16781678
address nooverlap_target, address *entry,
16791679
const char *name, bool dest_uninitialized) {
16801680
const bool is_oop = true;
1681-
const size_t size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
1681+
const int size = UseCompressedOops ? sizeof (jint) : sizeof (jlong);
16821682
return generate_conjoint_copy(size, aligned, is_oop, nooverlap_target, entry,
16831683
name, dest_uninitialized);
16841684
}

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ void TemplateInterpreterGenerator::bang_stack_shadow_pages(bool native_call) {
11201120
// an interpreter frame with greater than a page of locals, so each page
11211121
// needs to be checked. Only true for non-native.
11221122
if (UseStackBanging) {
1123-
const int n_shadow_pages = StackOverflow::stack_shadow_zone_size() / os::vm_page_size();
1123+
const int n_shadow_pages = (int)(StackOverflow::stack_shadow_zone_size() / os::vm_page_size());
11241124
const int start_page = native_call ? n_shadow_pages : 1;
11251125
const int page_size = os::vm_page_size();
11261126
for (int pages = start_page; pages <= n_shadow_pages ; pages++) {

0 commit comments

Comments
 (0)