Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8259560: Zero m68k: "static assertion failed: align" after JDK-8252049
Reviewed-by: dholmes
  • Loading branch information
shipilev committed Jan 13, 2021
1 parent efc36be commit a99df45b7c63de36bdae0a3add76de10d61e3da0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
@@ -202,7 +202,12 @@ void ciMethodData::load_data() {
// _extra_data_size = extra_data_limit - extra_data_base
// total_size = _data_size + _extra_data_size
// args_data_limit = data_base + total_size - parameter_data_size

#ifndef ZERO
// Some Zero platforms do not have expected alignment, and do not use
// this code. static_assert would still fire and fail for them.
static_assert(sizeof(_orig) % HeapWordSize == 0, "align");
#endif
Copy::disjoint_words_atomic((HeapWord*) &mdo->_compiler_counters,
(HeapWord*) &_orig,
sizeof(_orig) / HeapWordSize);
@@ -1984,7 +1984,11 @@ class MethodData : public Metadata {

public:
CompilerCounters() : _nof_decompiles(0), _nof_overflow_recompiles(0), _nof_overflow_traps(0) {
#ifndef ZERO
// Some Zero platforms do not have expected alignment, and do not use
// this code. static_assert would still fire and fail for them.
static_assert(sizeof(_trap_hist) % HeapWordSize == 0, "align");
#endif
uint size_in_words = sizeof(_trap_hist) / HeapWordSize;
Copy::zero_to_words((HeapWord*) &_trap_hist, size_in_words);
}

1 comment on commit a99df45

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on a99df45 Jan 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.