mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +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 "RegisterInfoEmitter.h"
|
||||||
#include "InstrInfoEmitter.h"
|
#include "InstrInfoEmitter.h"
|
||||||
#include "InstrSelectorEmitter.h"
|
#include "InstrSelectorEmitter.h"
|
||||||
|
#include "SimpleInstrSelEmitter.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -35,7 +36,7 @@ enum ActionType {
|
|||||||
GenRegisterEnums, GenRegister, GenRegisterHeader,
|
GenRegisterEnums, GenRegister, GenRegisterHeader,
|
||||||
GenInstrEnums, GenInstrs, GenInstrSelector,
|
GenInstrEnums, GenInstrs, GenInstrSelector,
|
||||||
PrintEnums,
|
PrintEnums,
|
||||||
Parse,
|
Parse, GenSimpInstrSel,
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -57,6 +58,8 @@ namespace {
|
|||||||
"Generate instruction descriptions"),
|
"Generate instruction descriptions"),
|
||||||
clEnumValN(GenInstrSelector, "gen-instr-selector",
|
clEnumValN(GenInstrSelector, "gen-instr-selector",
|
||||||
"Generate an instruction selector"),
|
"Generate an instruction selector"),
|
||||||
|
clEnumValN(GenSimpInstrSel, "gen-simp-instr-sel",
|
||||||
|
"Generate a simple instruction selector"),
|
||||||
clEnumValN(PrintEnums, "print-enums",
|
clEnumValN(PrintEnums, "print-enums",
|
||||||
"Print enum values for a class"),
|
"Print enum values for a class"),
|
||||||
clEnumValN(Parse, "parse",
|
clEnumValN(Parse, "parse",
|
||||||
@ -471,6 +474,9 @@ int main(int argc, char **argv) {
|
|||||||
*Out << "\n";
|
*Out << "\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GenSimpInstrSel:
|
||||||
|
SimpleInstrSelEmitter(Records).run(*Out);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(1 && "Invalid Action");
|
assert(1 && "Invalid Action");
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user