Go to the documentation of this file.
104 int main(
int argc,
char* argv[]) {
116 string bemFile =
options.bemFile();
149 cout <<
"X = unused bit" << endl;
150 cout <<
"I = immediate bit" << endl;
151 cout <<
"S = socket code bit" << endl;
152 cout <<
"R = register index bit" << endl << endl;
154 cout <<
"Total instruction width: " << bem.
width() << endl << endl;
196 if (icField != NULL) {
197 cout <<
" limm cntrl: " << field.
width();
198 }
else if (moveSlot != NULL) {
199 cout <<
" move slot " << moveSlot->
name() <<
": "
200 << moveSlot->
width();
201 }
else if (immSlot != NULL) {
202 cout <<
" limm slot " << immSlot->
name() <<
": "
205 assert(dstRegField != NULL);
206 cout <<
" dst reg field: " << dstRegField->
width();
228 cout <<
"Immediate Control Field" << endl << endl;
229 cout <<
"Position: " << icField.
bitPosition() << endl;
230 cout <<
"Width: " << icField.
width() << endl;
231 cout <<
"Encodings:" << endl;
235 for (
int i = 0; i < icField.
extraBits(); i++) {
236 extraBits.append(
"X");
243 <<
" : " << iTemp << endl;
257 cout <<
"Long Immediate Destination Register Field" << endl << endl;
258 cout <<
"Position: " << field.
bitPosition() << endl;
259 cout <<
"Width: " << field.
width() << endl << endl;
261 cout <<
"Usage" << endl;
265 cout << iTemp <<
": " << iu << endl;
279 cout <<
"Move Slot: " << moveSlot.
name() << endl << endl;
280 cout <<
"Position: " << moveSlot.
bitPosition() << endl;
281 cout <<
"Width: " << moveSlot.
width() << endl << endl;
307 if (grdField != NULL) {
308 cout <<
" grd field: " << grdField->
width();
309 }
else if (srcField != NULL) {
310 cout <<
" src field: " << srcField->
width();
313 cout <<
" dst field: " << dstField->
width();
336 for (
int i = 0; i < grdField.
extraBits(); i++) {
337 extraBits.append(
"X");
340 cout <<
"Guard field encodings:" << endl;
346 <<
" : always-true" << endl;
353 <<
" : always-false" << endl;
363 cout <<
"non-inverted ";
375 cout <<
"non-inverted ";
407 cout <<
" : NOP" << endl;
449 cout <<
" : socket " << enc.
socketName() << endl;
513 for (
int i = 0; i < unusedBits; i++) {
573 cout <<
"Source field encodings:" << endl;
596 cout <<
" : short immediate" << endl;
611 cout <<
" : bridge " << enc.
bridgeName() << endl;
629 cout <<
"Destination field encodings:" << endl;
639 cout <<
"------------------------------------------------------------"
652 for (
int i = 0; i < times; i++) {
virtual int childFieldCount() const
NOPEncoding & noOperationEncoding() const
virtual void printHelp() const
std::string operationName() const
int rfPortCodeCount() const
void setSourceFile(const std::string &fileName)
static void printSlotFieldEncodings(const SlotField &slotField)
FUGuardEncoding & fuGuardEncoding(int index) const
static string portCodeDescription(const RFPortCode &code)
std::string registerFile() const
int longImmDstRegisterFieldCount() const
FUPortCode & fuPortCode(int index) const
bool hasImmediateEncoding() const
bool isGuardInverted() const
int instructionTemplateCount() const
bool hasImmediateControlField() const
bool hasGuardField() const
RFPortCode & rfPortCode(int index) const
int fuPortCodeCount() const
UnconditionalGuardEncoding & unconditionalGuardEncoding(bool inverted) const
bool hasNoOperationEncoding() const
virtual int width() const
SocketEncoding & socketEncoding(int index) const
static std::string fileOfPath(const std::string pathName)
static void printMoveSlotLayout(const MoveSlot &moveSlot)
std::string unitName() const
#define assert(condition)
static void printPattern(const std::string &pattern, int times)
GPRGuardEncoding & gprGuardEncoding(int index) const
virtual int width() const
bool hasSourceField() const
static std::string toBinary(unsigned int source, unsigned int stringWidth=0)
std::string functionUnit() const
std::string instructionTemplate(int index) const
GuardField & guardField() const
static void printImmediateControlField(const BinaryEncoding &bem)
ImmediateEncoding & immediateEncoding() const
bool hasDestinationField() const
virtual int width() const =0
IUPortCode & iuPortCode(int index) const
virtual int width(const TCEString &templateName) const
std::string socketName() const
static void printLImmDstRegisterField(const LImmDstRegisterField &field)
static void printMoveSlot(const MoveSlot &moveSlot)
std::string immediateUnit(const std::string &instructionTemplate) const
virtual int width() const
bool hasSocketCodes() const
static void printSeparator()
virtual int width() const
std::string bridgeName() const
unsigned int encoding() const
bool hasUnconditionalGuardEncoding(bool inverted) const
BinaryEncoding::Position componentIDPosition() const
virtual int width() const
unsigned int encoding() const
virtual int width() const
SourceField & sourceField() const
static void printBEMInfo(const BinaryEncoding &bem, const std::string &bemFile)
std::string errorMessage() const
void parse(char *argv[], int argc)
int encodingWidth() const
static MachInfoCmdLineOptions options
int gprGuardEncodingCount() const
int socketIDWidth() const
int iuPortCodeCount() const
int fuGuardEncodingCount() const
virtual InstructionField & childField(int position) const
bool hasOperation() const
int bridgeEncodingCount() const
int socketEncodingCount() const
static void printInstructionLayout(const BinaryEncoding &bem)
ImmediateControlField & immediateControlField() const
static void printDestinationFieldEncodings(const MoveSlot &moveSlot)
MoveSlot & moveSlot(int index) const
virtual InstructionField & childField(int position) const
DestinationField & destinationField() const
BridgeEncoding & bridgeEncoding(const std::string &bridge) const
SocketCodeTable * parent() const
int moveSlotCount() const
int registerIndex() const
static void printGuardFieldEncodings(const MoveSlot &moveSlot)
SocketCodeTable & socketCodes() const
unsigned int encoding() const
LImmDstRegisterField & longImmDstRegisterField(int index) const
virtual int childFieldCount() const
virtual int width() const
static void printSourceFieldEncodings(const MoveSlot &moveSlot)
std::string portName() const
int main(int argc, char *argv[])
BinaryEncoding * readBinaryEncoding()
static string portCodeBits(const PortCode &code)