2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2014, Rene Gollent, rene@gollent.com.
4 * Distributed under the terms of the MIT License.
10 #include <SupportDefs.h>
13 enum register_format
{
14 REGISTER_FORMAT_INTEGER
,
15 REGISTER_FORMAT_FLOAT
,
20 REGISTER_TYPE_INSTRUCTION_POINTER
,
21 REGISTER_TYPE_STACK_POINTER
,
22 REGISTER_TYPE_RETURN_ADDRESS
,
23 REGISTER_TYPE_GENERAL_PURPOSE
,
24 REGISTER_TYPE_SPECIAL_PURPOSE
,
25 REGISTER_TYPE_EXTENDED
31 Register(int32 index
, const char* name
,
32 uint32 bitSize
, uint32 valueType
,
33 register_type type
, bool calleePreserved
);
34 // name will not be cloned
35 Register(const Register
& other
);
37 int32
Index() const { return fIndex
; }
38 const char* Name() const { return fName
; }
39 uint32
ValueType() const { return fValueType
; }
40 register_format
Format() const { return fFormat
; }
41 uint32
BitSize() const { return fBitSize
; }
42 register_type
Type() const { return fType
; }
43 bool IsCalleePreserved() const
44 { return fCalleePreserved
; }
51 register_format fFormat
;
53 bool fCalleePreserved
;