Full write up: https://gist.github.com/mshockwave/66e98d099256deefc062633909bb7b5b The existing CodeEmitterGen infrastructure is unable to generate encoder function for ISAs with variable-length instructions. This patch introduces a new infrastructure to support variable-length instruction encoding, including a new TableGen syntax for writing instruction encoding directives and a new TableGen backend component, VarLenCodeEmitterGen, built on top of CodeEmitterGen. Differential Revision: https://reviews.llvm.org/D115128
26 lines
835 B
C++
26 lines
835 B
C++
//===- VarLenCodeEmitterGen.h - CEG for variable-length insts ---*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declare the CodeEmitterGen component for variable-length
|
|
// instructions. See the .cpp file for more details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_UTILS_TABLEGEN_VARLENCODEEMITTERGEN_H
|
|
#define LLVM_UTILS_TABLEGEN_VARLENCODEEMITTERGEN_H
|
|
|
|
namespace llvm {
|
|
|
|
class RecordKeeper;
|
|
class raw_ostream;
|
|
|
|
void emitVarLenCodeEmitter(RecordKeeper &R, raw_ostream &OS);
|
|
|
|
} // end namespace llvm
|
|
#endif
|