28#ifndef __ARCH_GENERIC_DECODER_HH__
29#define __ARCH_GENERIC_DECODER_HH__
36#include "params/InstDecoder.hh"
53 template <
typename MoreBytesType>
73 return *
static_cast<Type *
>(
this);
80 return *
static_cast<const Type *
>(
this);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
virtual StaticInstPtr decode(PCStateBase &pc)=0
Decode an instruction or fetch it from the code cache.
virtual StaticInstPtr fetchRomMicroop(MicroPC micropc, StaticInstPtr curMacroop)
virtual void takeOverFrom(InstDecoder *old)
Take over the state from an old decoder when switching CPUs.
InstDecoder(const InstDecoderParams ¶ms, MoreBytesType *mb_buf)
void * moreBytesPtr() const
size_t moreBytesSize() const
bool needMoreBytes() const
Can the decoder accept more data?
bool instReady() const
Is an instruction ready to be decoded?
virtual void moreBytes(const PCStateBase &pc, Addr fetchPC)=0
Feed data to the decoder.
Abstract superclass for simulation objects.
static constexpr std::enable_if_t< std::is_integral_v< T >, int > floorLog2(T x)
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.