VirtualBox

source: vbox/trunk/src/VBox/Disassembler/DisasmCore-armv8.cpp@ 99241

Last change on this file since 99241 was 99241, checked in by vboxsync, 18 months ago

Disassembler: ARMv8 skeleton, bugref:10394

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: DisasmCore-armv8.cpp 99241 2023-03-30 16:11:16Z vboxsync $ */
2/** @file
3 * VBox Disassembler - Core Components.
4 */
5
6/*
7 * Copyright (C) 2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28
29/*********************************************************************************************************************************
30* Header Files *
31*********************************************************************************************************************************/
32#define LOG_GROUP LOG_GROUP_DIS
33#include <VBox/dis.h>
34#include <VBox/err.h>
35#include <VBox/log.h>
36#include <iprt/assert.h>
37#include <iprt/param.h>
38#include <iprt/string.h>
39#include <iprt/stdarg.h>
40#include "DisasmInternal-armv8.h"
41
42
43/*********************************************************************************************************************************
44* Defined Constants And Macros *
45*********************************************************************************************************************************/
46
47
48/*********************************************************************************************************************************
49* Internal Functions *
50*********************************************************************************************************************************/
51/** @name Parsers
52 * @{ */
53static FNDISPARSEARMV8 disArmV8ParseIllegal;
54/** @} */
55
56
57/*********************************************************************************************************************************
58* Global Variables *
59*********************************************************************************************************************************/
60/** Parser opcode table for full disassembly. */
61static PFNDISPARSEARMV8 const g_apfnDisasm[IDX_ParseMax] =
62{
63 disArmV8ParseIllegal,
64};
65
66static size_t disArmV8ParseIllegal(size_t offInstr, PCDISOPCODE pOp, PDISSTATE pDis, PDISOPPARAM pParam, uint8_t cBitStart, uint8_t cBits)
67{
68 RT_NOREF_PV(pOp); RT_NOREF_PV(pParam); RT_NOREF_PV(pDis);
69 AssertFailed();
70 return offInstr;
71}
72
73
74/**
75 * Internal worker for DISInstrEx and DISInstrWithPrefetchedBytes.
76 *
77 * @returns VBox status code.
78 * @param pDis Initialized disassembler state.
79 * @param paOneByteMap The one byte opcode map to use.
80 * @param pcbInstr Where to store the instruction size. Can be NULL.
81 */
82DECLHIDDEN(int) disInstrWorkerArmV8(PDISSTATE pDis, PCDISOPCODE paOneByteMap, uint32_t *pcbInstr)
83{
84 RT_NOREF(pDis, paOneByteMap, pcbInstr);
85 return VERR_NOT_IMPLEMENTED;
86}
87
88
89/**
90 * Inlined worker that initializes the disassembler state.
91 *
92 * @returns The primary opcode map to use.
93 * @param pDis The disassembler state.
94 * @param uInstrAddr The instruction address.
95 * @param enmCpuMode The CPU mode.
96 * @param fFilter The instruction filter settings.
97 * @param pfnReadBytes The byte reader, can be NULL.
98 * @param pvUser The user data for the reader.
99 */
100DECLHIDDEN(PCDISOPCODE) disInitializeStateArmV8(PDISSTATE pDis, DISCPUMODE enmCpuMode, uint32_t fFilter)
101{
102 RT_NOREF(pDis, enmCpuMode, fFilter);
103 return NULL;
104}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette