mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
add tablgen backend for really simple instruction selector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b92de1e7d
commit
01b6a6f279
@ -23,6 +23,7 @@
|
||||
#include "RegisterInfoEmitter.h"
|
||||
#include "InstrInfoEmitter.h"
|
||||
#include "InstrSelectorEmitter.h"
|
||||
#include "SimpleInstrSelEmitter.h"
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
@ -35,7 +36,7 @@ enum ActionType {
|
||||
GenRegisterEnums, GenRegister, GenRegisterHeader,
|
||||
GenInstrEnums, GenInstrs, GenInstrSelector,
|
||||
PrintEnums,
|
||||
Parse,
|
||||
Parse, GenSimpInstrSel,
|
||||
};
|
||||
|
||||
namespace {
|
||||
@ -57,6 +58,8 @@ namespace {
|
||||
"Generate instruction descriptions"),
|
||||
clEnumValN(GenInstrSelector, "gen-instr-selector",
|
||||
"Generate an instruction selector"),
|
||||
clEnumValN(GenSimpInstrSel, "gen-simp-instr-sel",
|
||||
"Generate a simple instruction selector"),
|
||||
clEnumValN(PrintEnums, "print-enums",
|
||||
"Print enum values for a class"),
|
||||
clEnumValN(Parse, "parse",
|
||||
@ -471,6 +474,9 @@ int main(int argc, char **argv) {
|
||||
*Out << "\n";
|
||||
break;
|
||||
}
|
||||
case GenSimpInstrSel:
|
||||
SimpleInstrSelEmitter(Records).run(*Out);
|
||||
break;
|
||||
default:
|
||||
assert(1 && "Invalid Action");
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user