ROSE  0.9.13.72
BinaryCallingConvention.h
1 #ifndef ROSE_BinaryAnalysis_CallingConvention_H
2 #define ROSE_BinaryAnalysis_CallingConvention_H
3 
4 #include <BaseSemantics2.h>
5 #include <BinaryVariables.h>
6 #include <Partitioner2/BasicTypes.h>
7 #include <Registers.h>
8 #include <RegisterParts.h>
9 
10 #include <boost/serialization/access.hpp>
11 #include <boost/serialization/set.hpp>
12 #include <boost/serialization/string.hpp>
13 #include <boost/serialization/vector.hpp>
14 #include <Sawyer/SharedObject.h>
15 #include <Sawyer/SharedPointer.h>
16 
17 namespace Rose {
18 namespace BinaryAnalysis {
19 
20 // Forwards
21 class Disassembler;
22 
33 namespace CallingConvention {
34 
38 void initDiagnostics();
39 
44 
46 // Miscellaneous small types
48 
54 };
55 
60 };
61 
67 };
68 
69 
71 // ParameterLocation
73 
83  #undef ABSOLUTE
85 public:
87  enum Type {
92  };
93 
94 private:
95  Type type_;
96  RegisterDescriptor reg_; // The argument register, or the stack base register.
97  union {
98  int64_t offset_; // Offset from stack base register for stack-based locations.
99  rose_addr_t va_; // Absolute address
100  };
101 
102 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
103 private:
104  friend class boost::serialization::access;
105 
106  template<class S>
107  void serialize(S &s, const unsigned /*version*/) {
108  s & BOOST_SERIALIZATION_NVP(type_);
109  s & BOOST_SERIALIZATION_NVP(reg_);
110  if (STACK==type_) {
111  s & BOOST_SERIALIZATION_NVP(offset_);
112  } else {
113  s & BOOST_SERIALIZATION_NVP(va_);
114  }
115  }
116 #endif
117 
118 public:
125  : type_(NO_LOCATION), offset_(0) {}
126 
129  : type_(REGISTER), reg_(reg), offset_(0) {}
130 
133  : type_(STACK), reg_(reg), offset_(offset) {}
134 
136  explicit ParameterLocation(rose_addr_t va)
137  : type_(ABSOLUTE), va_(va) {}
138 
140  Type type() const { return type_; }
141 
145  bool isValid() const {
146  return type() != NO_LOCATION;
147  }
148 
155  return reg_;
156  }
157 
163  int64_t offset() const {
164  return STACK == type_ ? offset_ : (int64_t)0;
165  }
166 
171  rose_addr_t address() const {
172  return ABSOLUTE == type_ ? va_ : (rose_addr_t)0;
173  }
174 
178  bool operator==(const ParameterLocation &other) const {
179  return type_ == other.type_ && reg_ == other.reg_ && offset_ == other.offset_; // &va_ == &offset_
180  }
181 
185  bool operator!=(const ParameterLocation &other) const {
186  return type_ != other.type_ || reg_ != other.reg_ || offset_ != other.offset_; // &va_ == &offset_
187  }
188 
192  void print(std::ostream &out, const RegisterDictionary *regdict) const {
193  print(out, RegisterNames(regdict));
194  }
195  void print(std::ostream &out, const RegisterNames &regnames) const {
196  switch (type_) {
197  case NO_LOCATION: out <<"nowhere"; break;
198  case REGISTER: out <<regnames(reg_); break;
199  case STACK: out <<"mem[" <<regnames(reg_) <<"+" <<offset_ <<"]"; break;
200  case ABSOLUTE: out <<"mem[" <<StringUtility::addrToString(va_) <<"]"; break;
201  }
202  }
205 };
206 
207 
209 // Definition
211 
214 
219 public:
222 
223 private:
224  std::string name_; // Official short name of the convention, like "stdcall".
225  std::string comment_; // Long name, like "Windows Borland x86-32 fastcall"
226  size_t wordWidth_; // Natural width word size in bits
227  const RegisterDictionary *regDict_; // Register dictionary used when this definition was created
228  std::vector<ParameterLocation> inputParameters_; // Input (inc. in-out) parameters; additional stack-based are implied
229  std::vector<ParameterLocation> outputParameters_; // Return values and output parameters.
230  StackParameterOrder stackParameterOrder_; // Order of arguments on the stack
231  RegisterDescriptor stackPointerRegister_; // Base pointer for implied stack parameters
232  size_t nonParameterStackSize_; // Size in bytes of non-parameter stack area
233  size_t stackAlignment_; // Stack alignment in bytes (zero means unknown)
234  StackDirection stackDirection_; // Direction that stack grows from a PUSH operation
235  StackCleanup stackCleanup_; // Who cleans up stack parameters?
236  ParameterLocation thisParameter_; // Object pointer for calling conventions that are object methods
237  std::set<RegisterDescriptor> calleeSavedRegisters_; // Register that the callee must restore before returning
238  std::set<RegisterDescriptor> scratchRegisters_; // Caller-saved registers
239 
240 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
241 private:
242  friend class boost::serialization::access;
243 
244  template<class S>
245  void serialize(S &s, const unsigned /*version*/) {
246  s & BOOST_SERIALIZATION_NVP(name_);
247  s & BOOST_SERIALIZATION_NVP(comment_);
248  s & BOOST_SERIALIZATION_NVP(wordWidth_);
249  s & BOOST_SERIALIZATION_NVP(regDict_);
250  s & BOOST_SERIALIZATION_NVP(inputParameters_);
251  s & BOOST_SERIALIZATION_NVP(outputParameters_);
252  s & BOOST_SERIALIZATION_NVP(stackParameterOrder_);
253  s & BOOST_SERIALIZATION_NVP(stackPointerRegister_);
254  s & BOOST_SERIALIZATION_NVP(nonParameterStackSize_);
255  s & BOOST_SERIALIZATION_NVP(stackAlignment_);
256  s & BOOST_SERIALIZATION_NVP(stackDirection_);
257  s & BOOST_SERIALIZATION_NVP(stackCleanup_);
258  s & BOOST_SERIALIZATION_NVP(thisParameter_);
259  s & BOOST_SERIALIZATION_NVP(calleeSavedRegisters_);
260  s & BOOST_SERIALIZATION_NVP(scratchRegisters_);
261  }
262 #endif
263 
264 protected:
269  : wordWidth_(0), regDict_(NULL), stackParameterOrder_(ORDER_UNSPECIFIED), nonParameterStackSize_(0),
270  stackAlignment_(0), stackDirection_(GROWS_DOWN), stackCleanup_(CLEANUP_UNSPECIFIED) {}
271 
277  Definition(size_t wordWidth, const std::string &name, const std::string &comment, const RegisterDictionary *regDict)
278  : name_(name), comment_(comment), wordWidth_(wordWidth), regDict_(regDict), stackParameterOrder_(ORDER_UNSPECIFIED),
279  nonParameterStackSize_(0), stackAlignment_(0), stackDirection_(GROWS_DOWN), stackCleanup_(CLEANUP_UNSPECIFIED) {
280  ASSERT_require2(0 == (wordWidth & 7) && wordWidth > 0, "word size must be a positive multiple of eight");
281  }
282 
283 public:
285  static Ptr instance(size_t wordWidth, const std::string &name, const std::string &comment, const RegisterDictionary *regs) {
286  return Ptr(new Definition(wordWidth, name, comment, regs));
287  }
288 
289 public:
293  static Ptr x86_32bit_cdecl();
294  static Ptr x86_64bit_cdecl();
295  static Ptr x86_32bit_stdcall();
296  static Ptr x86_64bit_stdcall();
297  static Ptr x86_32bit_fastcall();
298  static Ptr x86_64bit_sysv();
299  static Ptr ppc_32bit_ibm();
305  static Ptr x86_cdecl(const RegisterDictionary*);
306  static Ptr x86_stdcall(const RegisterDictionary*);
307  static Ptr x86_fastcall(const RegisterDictionary*);
308  static Ptr ppc_ibm(const RegisterDictionary*);
316  const RegisterDictionary* registerDictionary() const { return regDict_; }
317  void registerDictionary(const RegisterDictionary *d) { regDict_ = d; }
328  const std::string& name() const { return name_; }
329  void name(const std::string &s) { name_ = s; }
339  const std::string& comment() const { return comment_; }
340  void comment(const std::string &s) { comment_ = s; }
352  size_t wordWidth() const { return wordWidth_; }
353  void wordWidth(size_t nBits) {
354  ASSERT_require2(nBits > 0 && 0 == (nBits & 7), "word size must be a positive multiple of eight");
355  wordWidth_ = nBits;
356  }
365  thisParameter_ = ParameterLocation();
366  }
367 
372  const std::vector<ParameterLocation>& inputParameters() const { return inputParameters_; }
373 
376 
381  void clearInputParameters() { inputParameters_.clear(); }
382 
392  }
393  void appendInputParameter(RegisterDescriptor reg, int64_t offset) {
395  }
396  void appendInputParameter(rose_addr_t va) {
398  }
405  const std::vector<ParameterLocation>& outputParameters() const { return outputParameters_; }
406 
409 
414  void clearOutputParameters() { outputParameters_.clear(); }
415 
427  }
428  void appendOutputParameter(RegisterDescriptor reg, int64_t offset) {
430  }
431  void appendOutputParameter(rose_addr_t va) {
433  }
446  StackParameterOrder stackParameterOrder() const { return stackParameterOrder_; }
447  void stackParameterOrder(StackParameterOrder x) { stackParameterOrder_ = x; }
457  const RegisterDescriptor stackPointerRegister() const { return stackPointerRegister_; }
458  void stackPointerRegister(RegisterDescriptor r) { stackPointerRegister_ = r; }
468  size_t nonParameterStackSize() const {
469  return nonParameterStackSize_;
470  }
471  void nonParameterStackSize(size_t nBytes) {
472  nonParameterStackSize_ = nBytes;
473  }
483  StackDirection stackDirection() const { return stackDirection_; }
484  void stackDirection(StackDirection x) { stackDirection_ = x; }
494  StackCleanup stackCleanup() const { return stackCleanup_; }
495  void stackCleanup(StackCleanup x) { stackCleanup_ = x; }
504  size_t stackAlignment() const { return stackAlignment_; }
505  void stackAlignment(size_t nBytes) { stackAlignment_ = nBytes; }
522  const ParameterLocation& thisParameter() const { return thisParameter_; }
523  void thisParameter(const ParameterLocation &x) { thisParameter_ = x; }
526  }
527  void thisParameter(RegisterDescriptor reg, int64_t offset) {
528  thisParameter(ParameterLocation(reg, offset));
529  }
530  void thisParameter(rose_addr_t va) {
532  }
546  const std::set<RegisterDescriptor>& calleeSavedRegisters() const { return calleeSavedRegisters_; }
547  std::set<RegisterDescriptor>& calleeSavedRegisters() { return calleeSavedRegisters_; }
552 
560  const std::set<RegisterDescriptor>& scratchRegisters() const { return scratchRegisters_; }
561  std::set<RegisterDescriptor>& scratchRegisters() { return scratchRegisters_; }
566 
577 
582  void print(std::ostream&, const RegisterDictionary *regDict = NULL) const;
583 };
584 
585 
587 // Dictionary
589 
591 typedef std::vector<Definition::Ptr> Dictionary;
592 
594 const Dictionary& dictionaryAmd64();
595 
597 const Dictionary& dictionaryArm();
598 
600 const Dictionary& dictionaryM68k();
601 
603 const Dictionary& dictionaryMips();
604 
606 const Dictionary& dictionaryPowerpc32();
607 
609 const Dictionary& dictionaryPowerpc64();
610 
612 const Dictionary& dictionaryX86();
613 
614 
616 // Analysis
618 
622 class Analysis {
623 private:
625  const RegisterDictionary *regDict_; // Names for the register parts
626  Definition::Ptr defaultCc_; // Default calling convention for called functions
627 
628  bool hasResults_; // Are the following data members initialized?
629  bool didConverge_; // Are the following data members valid (else only approximations)?
630  RegisterParts restoredRegisters_; // Registers accessed but restored
631  RegisterParts inputRegisters_; // Registers that serve as possible input parameters
632  RegisterParts outputRegisters_; // Registers that hold possible return values
633  Variables::StackVariables inputStackParameters_; // Stack variables serving as function inputs
634  Variables::StackVariables outputStackParameters_; // Stack variables serving as possible return values
635  Sawyer::Optional<int64_t> stackDelta_; // Change in stack across entire function
636  // Don't forget to update clearResults() and serialize() if you add more.
637 
638 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
639 private:
640  friend class boost::serialization::access;
641 
642  template<class S>
643  void serialize(S &s, const unsigned /*version*/) {
644  s & BOOST_SERIALIZATION_NVP(cpu_);
645  s & BOOST_SERIALIZATION_NVP(regDict_);
646  s & BOOST_SERIALIZATION_NVP(defaultCc_);
647  s & BOOST_SERIALIZATION_NVP(hasResults_);
648  s & BOOST_SERIALIZATION_NVP(didConverge_);
649  s & BOOST_SERIALIZATION_NVP(restoredRegisters_);
650  s & BOOST_SERIALIZATION_NVP(inputRegisters_);
651  s & BOOST_SERIALIZATION_NVP(outputRegisters_);
652  s & BOOST_SERIALIZATION_NVP(inputStackParameters_);
653  s & BOOST_SERIALIZATION_NVP(outputStackParameters_);
654  s & BOOST_SERIALIZATION_NVP(stackDelta_);
655  }
656 #endif
657 
658 public:
665  : regDict_(NULL), hasResults_(false), didConverge_(false) {}
666 
670  explicit Analysis(Disassembler *d)
671  : regDict_(NULL), hasResults_(false), didConverge_(false) {
672  init(d);
673  }
674 
682  : cpu_(cpu), regDict_(NULL), hasResults_(false), didConverge_(false) {}
683 
691  Definition::Ptr defaultCallingConvention() const { return defaultCc_; }
692  void defaultCallingConvention(const Definition::Ptr &x) { defaultCc_ = x; }
701 
706  bool hasResults() const { return hasResults_; }
707 
712  bool didConverge() const { return didConverge_; }
713 
718  void clearResults();
719 
724  void clearNonResults();
725 
733  const RegisterDictionary* registerDictionary() const { return regDict_; }
734  void registerDictionary(const RegisterDictionary *d) { regDict_ = d; }
741  const RegisterParts& calleeSavedRegisters() const { return restoredRegisters_; }
742 
747  const RegisterParts& inputRegisters() const { return inputRegisters_; }
748 
753  const RegisterParts& outputRegisters() const { return outputRegisters_; }
754 
758  const Variables::StackVariables& inputStackParameters() const { return inputStackParameters_; }
759 
763  const Variables::StackVariables& outputStackParameters() const { return outputStackParameters_; }
764 
769  Sawyer::Optional<int64_t> stackDelta() const { return stackDelta_; }
770 
774  bool match(const Definition::Ptr&) const;
775 
781  Dictionary match(const Dictionary&) const;
782 
787  void print(std::ostream&, bool multiLine=false) const;
788 
789 private:
790  // Finish constructing
791  void init(Disassembler*);
792 
793  // Recompute the restoredRegisters_ data member.
794  void updateRestoredRegisters(const InstructionSemantics2::BaseSemantics::StatePtr &initialState,
796 
797  // Recompute the inputRegisters_ data member after updateRestoredRegisters is computed.
798  void updateInputRegisters(const InstructionSemantics2::BaseSemantics::StatePtr &state);
799 
800  // Recompute the outputRegisters_ data member after updateRestoredRegisters is computed.
801  void updateOutputRegisters(const InstructionSemantics2::BaseSemantics::StatePtr &state);
802 
803  // Recompute the input and output stack variables
804  void updateStackParameters(const Partitioner2::FunctionPtr &function,
807 
808  // Recomputes the stack delta
809  void updateStackDelta(const InstructionSemantics2::BaseSemantics::StatePtr &initialState,
811 };
812 
814 // Free functions
816 
817 std::ostream& operator<<(std::ostream&, const Definition&);
818 std::ostream& operator<<(std::ostream&, const Analysis&);
819 
820 } // namespace
821 } // namespace
822 } // namespace
823 
824 #endif
void print(std::ostream &out, const RegisterNames &regnames) const
Print location.
void thisParameter(rose_addr_t va)
Property: Object pointer parameter.
size_t wordWidth() const
Property: Word size in bits.
const Dictionary & dictionaryX86()
Common calling conventions for 32-bit x86.
const std::vector< ParameterLocation > & outputParameters() const
Property: List of output parameters.
void registerDictionary(const RegisterDictionary *d)
Property: Register dictionary.
StackParameterOrder stackParameterOrder() const
Property: Stack parameter order.
size_t stackAlignment() const
Property: Stack alignment.
const Dictionary & dictionaryM68k()
Common calling conventions for m68k.
void print(std::ostream &out, const RegisterDictionary *regdict) const
Print location.
StackDirection stackDirection() const
Property: Direction that stack grows for a push operation.
The called function pops all stack parameters.
const Variables::StackVariables & outputStackParameters() const
Output stack parameters.
void wordWidth(size_t nBits)
Property: Word size in bits.
void stackDirection(StackDirection x)
Property: Direction that stack grows for a push operation.
void appendInputParameter(const ParameterLocation &)
Append input parameter.
const Dictionary & dictionaryArm()
Common calling conventions for ARM.
RegisterDescriptor reg() const
Register part of location.
static Ptr x86_32bit_cdecl()
Returns a predefined, cached calling convention.
const RegisterDictionary * registerDictionary() const
Property: Register dictionary.
void appendOutputParameter(rose_addr_t va)
Append output parameter.
Sawyer::SharedPointer< class Definition > DefinitionPtr
Reference counting pointer to calling convention definition.
void registerDictionary(const RegisterDictionary *d)
Property: Register dictionary.
Collection of streams.
Definition: Message.h:1595
static Ptr x86_32bit_stdcall()
Allocating constructor.
static Ptr ppc_32bit_ibm()
Allocating constructor.
void thisParameter(RegisterDescriptor reg, int64_t offset)
Property: Object pointer parameter.
ParameterLocation(RegisterDescriptor reg)
Constructs a parameter in a register location.
ParameterLocation(RegisterDescriptor reg, int64_t offset)
Constructs a parameter at a register-relative memory address.
void thisParameter(const ParameterLocation &x)
Property: Object pointer parameter.
const Dictionary & dictionaryPowerpc64()
Common calling conventions for PowerPC-64.
boost::shared_ptr< State > StatePtr
Shared-ownership pointer to a semantic state.
StackDirection
The direction in which the stack grows.
Analysis(Disassembler *d)
Construct an analyzer using a specified disassembler.
bool operator!=(const ParameterLocation &other) const
Inequality.
const Dictionary & dictionaryAmd64()
Common calling conventions for amd64 (x86-64).
void appendInputParameter(rose_addr_t va)
Append input parameter.
Definition::Ptr defaultCallingConvention() const
Property: Default calling convention.
void thisParameter(RegisterDescriptor reg)
Property: Object pointer parameter.
void stackCleanup(StackCleanup x)
Property: Who pops stack parameters.
rose_addr_t address() const
Fixed address location.
Main namespace for the ROSE library.
RegisterParts inputRegisterParts() const
Compute the set of input registers.
RegisterParts scratchRegisterParts() const
Computes the set of scratch registers.
Holds a set of registers without regard for register boundaries.
Definition: RegisterParts.h:25
StackCleanup stackCleanup() const
Property: Who pops stack parameters.
static Ptr x86_fastcall(const RegisterDictionary *)
Constructs a new pre-defined calling convention based on a register dictionary.
Sawyer::Optional< int64_t > stackDelta() const
Concrete stack delta.
bool hasResults() const
Whether a function has been analyzed.
Sawyer::SharedPointer< Definition > Ptr
Reference counting pointer to calling convention definition.
const ParameterLocation & thisParameter() const
Property: Object pointer parameter.
boost::shared_ptr< Dispatcher > DispatcherPtr
Shared-ownership pointer to a semantics instruction dispatcher.
void comment(const std::string &s)
Property: Full name of calling convention.
const RegisterParts & calleeSavedRegisters() const
Callee-saved registers.
void stackParameterOrder(StackParameterOrder x)
Property: Stack parameter order.
const RegisterParts & inputRegisters() const
Input registers.
void print(std::ostream &, bool multiLine=false) const
Print information about the analysis results.
const Dictionary & dictionaryPowerpc32()
Common calling conventions for PowerPC-32.
bool operator==(const ParameterLocation &other) const
Equality.
std::vector< Definition::Ptr > Dictionary
A ordered collection of calling convention definitions.
const Dictionary & dictionaryMips()
Common calling conventions for MIPS.
void appendOutputParameter(const ParameterLocation &)
Append output parameter.
static Ptr x86_cdecl(const RegisterDictionary *)
Constructs a new pre-defined calling convention based on a register dictionary.
static Ptr instance(size_t wordWidth, const std::string &name, const std::string &comment, const RegisterDictionary *regs)
Allocating constructor.
const Variables::StackVariables & inputStackParameters() const
Input stack parameters.
const std::set< RegisterDescriptor > & calleeSavedRegisters() const
Property: Callee-saved registers.
Describes (part of) a physical CPU register.
void appendInputParameter(RegisterDescriptor reg)
Append input parameter.
ROSE_UTIL_API std::string addrToString(uint64_t value, size_t nbits=0)
Convert a virtual address to a string.
void nonParameterStackSize(size_t nBytes)
Property: Size of non-parameter stack area.
StackParameterOrder
The order that arguments are pushed onto the stack.
bool isValid() const
Predicate to determine if location is valid.
bool didConverge() const
Whether the analysis results are valid.
std::set< RegisterDescriptor > & scratchRegisters()
Property: Scratch registers.
Sawyer::Message::Facility mlog
Facility for diagnostic output.
Prints a register name even when no dictionary is available or when the dictionary doesn't contain an...
Definition: Registers.h:360
void appendInputParameter(RegisterDescriptor reg, int64_t offset)
Append input parameter.
void analyzeFunction(const Partitioner2::Partitioner &, const Sawyer::SharedPointer< Partitioner2::Function > &)
Analyze one function.
void print(std::ostream &, const RegisterDictionary *regDict=NULL) const
Print detailed information about this calling convention.
size_t nonParameterStackSize() const
Property: Size of non-parameter stack area.
Analysis(const InstructionSemantics2::BaseSemantics::DispatcherPtr &cpu)
Construct an analysis using a specified dispatcher.
static Ptr x86_stdcall(const RegisterDictionary *)
Constructs a new pre-defined calling convention based on a register dictionary.
RegisterParts outputRegisterParts() const
Computes the set of output registers.
bool match(const Definition::Ptr &) const
Determine whether a definition matches.
const RegisterDescriptor stackPointerRegister() const
Property: Register for implied stack parameters.
RegisterParts getUsedRegisterParts() const
Returns all registers mentioned in this definition.
const RegisterParts & outputRegisters() const
Output registers.
static Ptr x86_64bit_cdecl()
Allocating constructor.
void name(const std::string &s)
Property: Short name of calling convention.
Stack parameters pushed left to right (Pascal order).
ParameterLocation(rose_addr_t va)
Constructs a parameter at a fixed memory address.
StackCleanup
Who is responsible for popping stack parameters.
const RegisterDictionary * registerDictionary() const
Property: Register dictionary.
Base class for reference counted objects.
Definition: SharedObject.h:64
void clearNonResults()
Clears everything but results.
void initDiagnostics()
Initialize diagnostics.
void clearResults()
Clear analysis results.
const std::vector< ParameterLocation > & inputParameters() const
Property: Enumerated input parameters.
Stack parameters pushed right to left (C order).
void clearInputParameters()
Erase enumerated input parameters.
void appendOutputParameter(RegisterDescriptor reg)
Append output parameter.
const std::string & name() const
Property: Short name of calling convention.
void stackAlignment(size_t nBytes)
Property: Stack alignment.
Stack parameter cleanup is unknown or unspecified.
Definition(size_t wordWidth, const std::string &name, const std::string &comment, const RegisterDictionary *regDict)
Allocating constructor.
Defines registers available for a particular architecture.
Definition: Registers.h:35
Stack parameter order is unknown or unspecified.
RegisterParts calleeSavedRegisterParts() const
Compute the set of callee-saved registers.
void defaultCallingConvention(const Definition::Ptr &x)
Property: Default calling convention.
const std::string & comment() const
Property: Full name of calling convention.
const std::set< RegisterDescriptor > & scratchRegisters() const
Property: Scratch registers.
static Ptr x86_32bit_fastcall()
Allocating constructor.
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:318
static Ptr x86_64bit_sysv()
Allocating constructor.
Virtual base class for instruction disassemblers.
Definition: Disassembler.h:48
static Ptr x86_64bit_stdcall()
Allocating constructor.
std::set< RegisterDescriptor > & calleeSavedRegisters()
Property: Callee-saved registers.
static Ptr ppc_ibm(const RegisterDictionary *)
Constructs a new pre-defined calling convention based on a register dictionary.
void stackPointerRegister(RegisterDescriptor r)
Property: Register for implied stack parameters.
void appendOutputParameter(RegisterDescriptor reg, int64_t offset)
Append output parameter.