Path: blob/master/src/hotspot/cpu/ppc/disassembler_ppc.hpp
41144 views
/*1* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2012, 2019 SAP SE. All rights reserved.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_PPC_DISASSEMBLER_PPC_HPP26#define CPU_PPC_DISASSEMBLER_PPC_HPP2728static int pd_instruction_alignment() {29return sizeof(int);30}3132static const char* pd_cpu_opts() {33return "ppc64";34}3536// Find preceding instruction.37//38// Starting at the passed location, the n-th preceding (towards lower addresses)39// location is searched, the contents of which - if interpreted as40// instructions - has the passed location as n-th successor.41// - If no such location exists, NULL is returned. The caller should then42// terminate its search and react properly.43static address find_prev_instr(address here, int n_instr);4445// special-case instruction decoding.46// There may be cases where the binutils disassembler doesn't do47// the perfect job. In those cases, decode_instruction0 may kick in48// and do it right.49// If nothing had to be done, just return "here", otherwise return "here + instr_len(here)"50static address decode_instruction0(address here, outputStream* st, address virtual_begin = NULL);5152// platform-specific instruction annotations (like value of loaded constants)53static void annotate(address pc, outputStream* st);5455#endif // CPU_PPC_DISASSEMBLER_PPC_HPP565758