/*============================================================================== * FUNCTION: RTLInstDict::print * OVERVIEW: Print a textual representation of the dictionary. * PARAMETERS: std::cout - stream used for printing * RETURNS: <nothing> *============================================================================*/ void RTLInstDict::print(std::ostream& os /*= std::cout*/) { for (std::map<std::string, TableEntry>::iterator p = idict.begin(); p != idict.end(); p++) { // print the instruction name os << (*p).first << " "; // print the parameters std::list<std::string>& params = (*p).second.params; int i = params.size(); for (std::list<std::string>::iterator s = params.begin(); s != params.end(); s++,i--) os << *s << (i != 1 ? "," : ""); os << "\n"; // print the RTL RTL& rtlist = (*p).second.rtl; rtlist.print(os); os << "\n"; } #if 0 // Detailed register map os << "\nDetailed register map\n"; std::map<int, Register, std::less<int> >::iterator rr; for (rr = DetRegMap.begin(); rr != DetRegMap.end(); rr++) { int n = rr->first; Register* pr = &rr->second; os << "number " << n << " name " << pr->g_name() << " size " << std::dec << pr->g_size() << " address 0x" << std::hex << (unsigned)pr->g_address() << " mappedIndex " << std::dec << pr->g_mappedIndex() << " mappedOffset " << pr->g_mappedOffset() << " flt " << pr->isFloat() << "\n"; } #endif }