1 #ifndef ROSE_BinaryAnalysis_RegisterNames_H
2 #define ROSE_BinaryAnalysis_RegisterNames_H
3 #include <featureTests.h>
6 #include <Rose/BasicTypes.h>
7 #include <Rose/BinaryAnalysis/BasicTypes.h>
8 #include <Rose/BinaryAnalysis/RegisterDescriptor.h>
10 #include <string>
12 namespace Rose {
13 namespace BinaryAnalysis {
20 public:
26  RegisterNames();
27  explicit RegisterNames(const RegisterDictionaryPtr &dict);
39  std::string operator()(RegisterDescriptor) const;
40  std::string operator()(RegisterDescriptor, const RegisterDictionaryPtr &dict) const;
45  // These are only used by operator()
46  std::string prefix = "REG";
47  std::string suffix;
48  int showOffset = -1;
49  std::string offsetPrefix = "@";
50  std::string offsetSuffix;
51  int showSize = -1;
52  std::string sizePrefix = "+";
53  std::string sizeSuffix;
54 };
56 } // namespace
57 } // namespace
58 #endif
59 #endif
int showOffset
0=>never show offset; positive=>always show; negative=>show only when non-zero
Definition: RegisterNames.h:48
std::string operator()(RegisterDescriptor) const
Obtain a name for a register descriptor.
Main namespace for the ROSE library.
RegisterDictionaryPtr dictionary
Dictionary supplied to the constructor.
Definition: RegisterNames.h:43
std::string sizeSuffix
String printed after the size when the size is printed.
Definition: RegisterNames.h:53
int showSize
0=>never; positive=>always; negative=>when offset is non-zero
Definition: RegisterNames.h:51
std::string suffix
String to print at the very end of the generated name.
Definition: RegisterNames.h:47
Describes (part of) a physical CPU register.
std::string offsetPrefix
String printed before the offset when the offset is shown.
Definition: RegisterNames.h:49
Convert a register descriptor to a name.
Definition: RegisterNames.h:19
std::string prefix
The leading part of a register name.
Definition: RegisterNames.h:46
std::string sizePrefix
String printed prior to the size when the size is printed.
Definition: RegisterNames.h:52
std::string offsetSuffix
String printed after the offset when the offset is shown.
Definition: RegisterNames.h:50