#include "InstrReel.hpp"

#include <spider/runtime/cpu/CPU.hpp>

#include <spider/runtime/memory/Types.hpp>

namespace spider {

    // Public Interface //

    InstrReel::InstrReel() {}

    InstrReel::~InstrReel() {}

    // Static Utils //

    u16 InstrReel::unpackInstr(u16 bcode) {
        return (bcode >> 5) & 0x1FF;
    }

    u8 InstrReel::unpackAddrMode(u16 bcode) {
        return (bcode >> 2) & 0x1F;
    }

    u8 InstrReel::unpackTypeSize(u16 bcode) {
        return bcode & 0x3;
    }

}
