Path: blob/master/src/hotspot/cpu/s390/disassembler_s390.hpp
40930 views
/*1* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2016, 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_S390_DISASSEMBLER_S390_HPP26#define CPU_S390_DISASSEMBLER_S390_HPP2728static int pd_instruction_alignment() {29return 2;30}3132static const char* pd_cpu_opts() {33return "s390";34}3536static bool valid_opcodes[256];37static bool is_valid_opcode_at(address here);3839// Find preceding instruction.40//41// Starting at the passed location, the n-th preceding (towards lower addresses)42// location is searched, the contents of which - if interpreted as43// instructions - has the passed location as n-th successor.44// - If multiple such locations exist between (here-n*instr_maxlen()) and here,45// the most distant location is selected.46// - If no such location exists, NULL is returned. The caller should then47// terminate its search and react properly.48static address find_prev_instr(address here, int n_instr);49static int count_instr(address begin, address end);5051// special-case instruction decoding.52// There may be cases where the binutils disassembler doesn't do53// the perfect job. In those cases, decode_instruction0 may kick in54// and do it right.55// If nothing had to be done, just return "here", otherwise return "here + instr_len(here)"56static address decode_instruction0(address here, outputStream* st, address virtual_begin = NULL);5758// platform-specific instruction annotations (like value of loaded constants)59static void annotate(address pc, outputStream* st);6061#endif // CPU_S390_DISASSEMBLER_S390_HPP626364