-
Notifications
You must be signed in to change notification settings - Fork 0
/
Abix86.h
23 lines (20 loc) · 902 Bytes
/
Abix86.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "Abi.h"
namespace cchips {
class AbiX86 : public Abi
{
public:
AbiX86();
virtual bool isGeneralPurposeRegister(cs_x86_op* operand) const override;
virtual bool isNopInstruction(const CapInsn& insn) const override;
virtual std::size_t getRegSize(x86_reg reg_op) const override;
virtual bool isX86() const override { return true; }
virtual bool isX64() const override { return false; }
const std::vector<std::pair<x86_reg, uint32_t>>& getReg2Size() const override { return _reg2SizeMap; }
private:
static std::map<x86_reg, std::pair<x86_reg, uint32_t>> _reg2parentMap;
static std::vector<std::pair<x86_reg, uint32_t>> _reg2SizeMap;
static std::vector<std::pair<x86_reg, std::string>> _reg2NameMap;
//CallingConvention::ID fetchDefaultCC() const;
};
} // namespace cchips