Path: blob/master/src/hotspot/cpu/zero/assembler_zero.hpp
40931 views
/*1* Copyright (c) 1997, 2019, 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#ifndef CPU_ZERO_ASSEMBLER_ZERO_HPP26#define CPU_ZERO_ASSEMBLER_ZERO_HPP2728// In normal, CPU-specific ports of HotSpot these two classes are used29// for generating assembly language. We don't do any of this in zero,30// of course, but we do sneak entry points around in CodeBuffers so we31// generate those here.3233class Assembler : public AbstractAssembler {34public:35Assembler(CodeBuffer* code) : AbstractAssembler(code) {}3637public:38void pd_patch_instruction(address branch, address target, const char* file, int line);3940//---< calculate length of instruction >---41static unsigned int instr_len(unsigned char *instr) { return 1; }4243//---< longest instructions >---44static unsigned int instr_maxlen() { return 1; }45};4647class MacroAssembler : public Assembler {48public:49MacroAssembler(CodeBuffer* code) : Assembler(code) {}5051public:52void align(int modulus);53void bang_stack_with_offset(int offset);54bool needs_explicit_null_check(intptr_t offset);55bool uses_implicit_null_check(void* address);56void advance(int bytes);57void store_oop(jobject obj);58void store_Metadata(Metadata* obj);59};6061address ShouldNotCallThisStub();62address ShouldNotCallThisEntry();6364#endif // CPU_ZERO_ASSEMBLER_ZERO_HPP656667