btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / debugger / arch / Register.h
blob46f28cea6c884b375cf8e05713d7216399eee6db
1 /*
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.
5 */
6 #ifndef REGISTER_H
7 #define REGISTER_H
10 #include <SupportDefs.h>
13 enum register_format {
14 REGISTER_FORMAT_INTEGER,
15 REGISTER_FORMAT_FLOAT,
16 REGISTER_FORMAT_SIMD
19 enum register_type {
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
29 class Register {
30 public:
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; }
46 private:
47 int32 fIndex;
48 const char* fName;
49 uint32 fBitSize;
50 uint32 fValueType;
51 register_format fFormat;
52 register_type fType;
53 bool fCalleePreserved;
58 #endif // REGISTER_H