blob: 0e31b250fd595a3a6899fdef02e41d9f53757efb [file] [log] [blame]
Ian Rogersbdb03912011-09-14 00:55:44 -07001// Copyright 2011 Google Inc. All Rights Reserved.
2
3#ifndef ART_SRC_CONTEXT_X86_H_
4#define ART_SRC_CONTEXT_X86_H_
5
6#include "context.h"
7
8namespace art {
9namespace x86 {
10
11class X86Context : public Context {
12 public:
13 X86Context() : esp_(0), eip_(0) {}
14 virtual ~X86Context() {}
15
16 // No callee saves on X86
17 virtual void FillCalleeSaves(const Frame& fr) {}
18
19 virtual void SetSP(uintptr_t new_sp) {
20 esp_ = new_sp;
21 }
22
23 virtual void SetPC(uintptr_t new_pc) {
24 eip_ = new_pc;
25 }
26
27 virtual void DoLongJump();
28
29 private:
30 // Currently just ESP and EIP are used
31 uintptr_t esp_;
32 uintptr_t eip_;
33};
34} // namespace x86
35} // namespace art
36
37#endif // ART_SRC_CONTEXT_X86_H_