Path: blob/master/src/hotspot/cpu/zero/assembler_zero.cpp
40931 views
/*1* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.2* Copyright 2007, 2008, 2009 Red Hat, Inc.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#include "precompiled.hpp"26#include "asm/assembler.inline.hpp"27#include "gc/shared/cardTableBarrierSet.hpp"28#include "gc/shared/collectedHeap.inline.hpp"29#include "interpreter/interpreter.hpp"30#include "memory/resourceArea.hpp"31#include "prims/methodHandles.hpp"32#include "runtime/biasedLocking.hpp"33#include "runtime/interfaceSupport.inline.hpp"34#include "runtime/objectMonitor.hpp"35#include "runtime/os.hpp"36#include "runtime/sharedRuntime.hpp"37#include "runtime/stubRoutines.hpp"38#include "utilities/macros.hpp"3940int AbstractAssembler::code_fill_byte() {41return 0;42}4344#ifdef ASSERT45bool AbstractAssembler::pd_check_instruction_mark() {46ShouldNotCallThis();47return false;48}49#endif5051void Assembler::pd_patch_instruction(address branch, address target, const char* file, int line) {52ShouldNotCallThis();53}5455void MacroAssembler::align(int modulus) {56while (offset() % modulus != 0)57emit_int8(AbstractAssembler::code_fill_byte());58}5960void MacroAssembler::bang_stack_with_offset(int offset) {61ShouldNotCallThis();62}6364void MacroAssembler::advance(int bytes) {65code_section()->set_end(code_section()->end() + bytes);66}6768void MacroAssembler::store_oop(jobject obj) {69code_section()->relocate(pc(), oop_Relocation::spec_for_immediate());70emit_address((address) obj);71}7273void MacroAssembler::store_Metadata(Metadata* md) {74code_section()->relocate(pc(), metadata_Relocation::spec_for_immediate());75emit_address((address) md);76}7778static void should_not_call() {79report_should_not_call(__FILE__, __LINE__);80}8182address ShouldNotCallThisStub() {83return (address) should_not_call;84}8586address ShouldNotCallThisEntry() {87return (address) should_not_call;88}899091