src/cpu/zero/vm/stack_zero.hpp

changeset 1866
348346af6676
parent 1860
0c5b3cf3c1f5
child 1907
c18cbe5936b8
equal deleted inserted replaced
1865:d6e880569997 1866:348346af6676
40 40
41 bool needs_setup() const { 41 bool needs_setup() const {
42 return _base == NULL; 42 return _base == NULL;
43 } 43 }
44 44
45 int suggest_size(Thread *thread) const;
46
45 void setup(void *mem, size_t size) { 47 void setup(void *mem, size_t size) {
46 assert(needs_setup(), "already set up"); 48 assert(needs_setup(), "already set up");
47 assert(!(size & WordAlignmentMask), "unaligned"); 49 assert(!(size & WordAlignmentMask), "unaligned");
48 50
49 _base = (intptr_t *) mem; 51 _base = (intptr_t *) mem;
65 void set_sp(intptr_t *new_sp) { 67 void set_sp(intptr_t *new_sp) {
66 assert(_top >= new_sp && new_sp >= _base, "bad stack pointer"); 68 assert(_top >= new_sp && new_sp >= _base, "bad stack pointer");
67 _sp = new_sp; 69 _sp = new_sp;
68 } 70 }
69 71
72 int total_words() const {
73 return _top - _base;
74 }
70 int available_words() const { 75 int available_words() const {
71 return _sp - _base; 76 return _sp - _base;
72 } 77 }
73 78
74 void push(intptr_t value) { 79 void push(intptr_t value) {
87 } 92 }
88 93
89 int shadow_pages_size() const { 94 int shadow_pages_size() const {
90 return _shadow_pages_size; 95 return _shadow_pages_size;
91 } 96 }
97 int abi_stack_available(Thread *thread) const;
92 98
93 public: 99 public:
94 void overflow_check(int required_words, TRAPS); 100 void overflow_check(int required_words, TRAPS);
95 static void handle_overflow(TRAPS); 101 static void handle_overflow(TRAPS);
96 102

mercurial