Bug 1639153 - Part 6.2: Establish dependency from tls for x86 callWithABI div/mod...
[gecko.git] / js / src / jit / BaselineFrameInfo-inl.h
blobf5670ff95a65754cc78734581a8de9ab39560e4c
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef jit_BaselineFrameInfo_inl_h
8 #define jit_BaselineFrameInfo_inl_h
10 namespace js {
11 namespace jit {
13 void CompilerFrameInfo::pop(StackAdjustment adjust) {
14 spIndex--;
15 StackValue* popped = &stack[spIndex];
17 if (adjust == AdjustStack && popped->kind() == StackValue::Stack) {
18 masm.addToStackPtr(Imm32(sizeof(Value)));
20 // Assert when anything uses this value.
21 popped->reset();
24 void CompilerFrameInfo::popn(uint32_t n, StackAdjustment adjust) {
25 uint32_t poppedStack = 0;
26 for (uint32_t i = 0; i < n; i++) {
27 if (peek(-1)->kind() == StackValue::Stack) {
28 poppedStack++;
30 pop(DontAdjustStack);
32 if (adjust == AdjustStack && poppedStack > 0) {
33 masm.addToStackPtr(Imm32(sizeof(Value) * poppedStack));
37 } // namespace jit
38 } // namespace js
40 #endif /* jit_BaselineFrameInfo_inl_h */