2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
9 #include <ObjectList.h>
11 #include "CfaRuleSet.h"
20 void SetLocation(target_addr_t targetLocation
,
21 target_addr_t initialLocation
);
23 status_t
Init(uint32 registerCount
);
24 status_t
SaveInitialRuleSet();
26 status_t
PushRuleSet();
27 status_t
PopRuleSet();
29 target_addr_t
TargetLocation() const
30 { return fTargetLocation
; }
32 target_addr_t
Location() const
34 void SetLocation(target_addr_t location
);
36 uint32
CodeAlignment() const
37 { return fCodeAlignment
; }
38 void SetCodeAlignment(uint32 alignment
);
40 int32
DataAlignment() const
41 { return fDataAlignment
; }
42 void SetDataAlignment(int32 alignment
);
44 uint32
ReturnAddressRegister() const
45 { return fReturnAddressRegister
; }
46 void SetReturnAddressRegister(uint32 reg
);
48 CfaCfaRule
* GetCfaCfaRule() const
49 { return fRuleSet
->GetCfaCfaRule(); }
50 CfaRule
* RegisterRule(uint32 index
) const
51 { return fRuleSet
->RegisterRule(index
); }
53 void RestoreRegisterRule(uint32 reg
);
56 typedef BObjectList
<CfaRuleSet
> RuleSetList
;
59 target_addr_t fTargetLocation
;
60 target_addr_t fLocation
;
61 uint32 fCodeAlignment
;
63 uint32 fReturnAddressRegister
;
65 CfaRuleSet
* fInitialRuleSet
;
66 RuleSetList fRuleSetStack
;
71 #endif // CFA_CONTEXT_H