blob: 07a4c0b8868bb3c2785066100825d47f91709647 [file] [log] [blame]
Ian Rogersbdb03912011-09-14 00:55:44 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
3#ifndef ART_SRC_CONTEXT_ARM_H_
4#define ART_SRC_CONTEXT_ARM_H_
5
6#include "constants_arm.h"
7#include "context.h"
8
9namespace art {
10namespace arm {
11
12class ArmContext : public Context {
13 public:
14 ArmContext();
15 virtual ~ArmContext() {}
16
17 virtual void FillCalleeSaves(const Frame& fr);
18
19 virtual void SetSP(uintptr_t new_sp) {
20 gprs_[SP] = new_sp;
21 }
22
23 virtual void SetPC(uintptr_t new_pc) {
24 gprs_[PC] = new_pc;
25 }
26
Ian Rogersd6b1f612011-09-27 13:38:14 -070027 virtual uintptr_t GetGPR(uint32_t reg) {
28 CHECK_GE(reg, 0u);
29 CHECK_LT(reg, 16u);
30 return gprs_[reg];
31 }
32
Ian Rogersbdb03912011-09-14 00:55:44 -070033 virtual void DoLongJump();
34
35 private:
36 uintptr_t gprs_[16];
Ian Rogers15fdb8c2011-09-25 15:45:07 -070037 uint32_t fprs_[32];
Ian Rogersbdb03912011-09-14 00:55:44 -070038};
39
40} // namespace arm
41} // namespace art
42
43#endif // ART_SRC_CONTEXT_ARM_H_