code-stubs-arm.h 1.04 KB
Newer Older
1
// Copyright 2012 the V8 project authors. All rights reserved.
2 3
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
4 5 6 7 8 9 10

#ifndef V8_ARM_CODE_STUBS_ARM_H_
#define V8_ARM_CODE_STUBS_ARM_H_

namespace v8 {
namespace internal {

11 12 13 14 15
// Trampoline stub to call into native code. To call safely into native code
// in the presence of compacting GC (which can move code objects) we need to
// keep the code which called into native pinned in the memory. Currently the
// simplest approach is to generate such stub early enough so it can never be
// moved by GC
16
class DirectCEntryStub: public PlatformCodeStub {
17
 public:
18
  explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
19
  void GenerateCall(MacroAssembler* masm, Register target);
20 21

 private:
22
  Movability NeedsImmovableCode() override { return kImmovable; }
23

24
  DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
25
  DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
26 27
};

28 29
}  // namespace internal
}  // namespace v8
30 31

#endif  // V8_ARM_CODE_STUBS_ARM_H_