From 58981bad953a124f6e7dea212946445974d32182 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Tue, 14 Apr 2015 17:19:08 +0100 Subject: [PATCH] 8076467: AARCH64: assertion fail with -XX:+UseG1GC Don't call encoding unless bool is true. Reviewed-by: kvn --- hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp | 2 ++ hotspot/src/cpu/aarch64/vm/register_aarch64.hpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp index 4087a187512..871cc33d279 100644 --- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp @@ -39,6 +39,8 @@ class InterpreterMacroAssembler: public MacroAssembler { protected: protected: + using MacroAssembler::call_VM_leaf_base; + // Interpreter specific version of call_VM_base virtual void call_VM_leaf_base(address entry_point, int number_of_arguments); diff --git a/hotspot/src/cpu/aarch64/vm/register_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/register_aarch64.hpp index fdcc502ca8b..1e22e935278 100644 --- a/hotspot/src/cpu/aarch64/vm/register_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/register_aarch64.hpp @@ -60,7 +60,10 @@ class RegisterImpl: public AbstractRegisterImpl { bool has_byte_register() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_byte_registers; } const char* name() const; int encoding_nocheck() const { return (intptr_t)this; } - unsigned long bit(bool yes = true) const { return yes << encoding(); } + + // Return the bit which represents this register. This is intended + // to be ORed into a bitmask: for usage see class RegSet below. + unsigned long bit(bool should_set = true) const { return should_set ? 1 << encoding() : 0; } }; // The integer registers of the aarch64 architecture