class X86JNIMacroAssembler final : public JNIMacroAssemblerFwd<X86Assembler, PointerSize::k32> { public: explicit X86JNIMacroAssembler(ArenaAllocator* allocator) : JNIMacroAssemblerFwd(allocator) {} virtual ~X86JNIMacroAssembler() {}
// // Overridden common assembler high-level functionality //
// Emit code that will create an activation on the stack void BuildFrame(size_t frame_size,
ManagedRegister method_reg,
ArrayRef<const ManagedRegister> callee_save_regs) override;
// Emit code that will remove an activation from the stack void RemoveFrame(size_t frame_size,
ArrayRef<const ManagedRegister> callee_save_regs, bool may_suspend) override;
// Zero extension void ZeroExtend(ManagedRegister mreg, size_t size) override;
// Exploit fast access in managed code to Thread::Current() void GetCurrentThread(ManagedRegister dest) override; void GetCurrentThread(FrameOffset dest_offset) override;
// Decode JNI transition or local `jobject`. For (weak) global `jobject`, jump to slow path. void DecodeJNITransitionOrLocalJObject(ManagedRegister reg,
JNIMacroLabel* slow_path,
JNIMacroLabel* resume) override;
// Heap::VerifyObject on src. In some cases (such as a reference to this) we // know that src may not be null. void VerifyObject(ManagedRegister src, bool could_be_null) override; void VerifyObject(FrameOffset src, bool could_be_null) override;
// Jump to address held at [base+offset] (used for tail calls). void Jump(ManagedRegister base, Offset offset) override;
// Call to address held at [base+offset] void Call(ManagedRegister base, Offset offset) override; void CallFromThread(ThreadOffset32 offset) override;
// Generate fast-path for transition to Native. Go to `label` if any thread flag is set. // The implementation can use `scratch_regs` which should be callee save core registers // (already saved before this call) and must preserve all argument registers. void TryToTransitionFromRunnableToNative(
JNIMacroLabel* label, ArrayRef<const ManagedRegister> scratch_regs) override;
// Generate fast-path for transition to Runnable. Go to `label` if any thread flag is set. // The implementation can use `scratch_regs` which should be core argument registers // not used as return registers and it must preserve the `return_reg` if any. void TryToTransitionFromNativeToRunnable(JNIMacroLabel* label,
ArrayRef<const ManagedRegister> scratch_regs,
ManagedRegister return_reg) override;
// Generate suspend check and branch to `label` if there is a pending suspend request. void SuspendCheck(JNIMacroLabel* label) override;
// Generate code to check if Thread::Current()->exception_ is non-null // and branch to the `label` if it is. void ExceptionPoll(JNIMacroLabel* label) override; // Deliver pending exception. void DeliverPendingException() override;
// Create a new label that can be used with Jump/Bind calls.
std::unique_ptr<JNIMacroLabel> CreateLabel() override; // Emit an unconditional jump to the label. void Jump(JNIMacroLabel* label) override; // Emit a conditional jump to the label by applying a unary condition test to the GC marking flag. void TestGcMarking(JNIMacroLabel* label, JNIMacroUnaryCondition cond) override; // Emit a conditional jump to the label by applying a unary condition test to object's mark bit. void TestMarkBit(ManagedRegister ref, JNIMacroLabel* label, JNIMacroUnaryCondition cond) override; // Emit a conditional jump to label if the loaded value from specified locations is not zero. void TestByteAndJumpIfNotZero(uintptr_t address, JNIMacroLabel* label) override; // Code at this offset will serve as the target for the Jump call. void Bind(JNIMacroLabel* label) override;
// Set up `out_reg` to hold a `jobject` (`StackReference<Object>*` to a spilled value), // or to be null if the value is null and `null_allowed`. `in_reg` holds a possibly // stale reference that can be used to avoid loading the spilled value to // see if the value is null. void CreateJObject(ManagedRegister out_reg,
FrameOffset spilled_reference_offset,
ManagedRegister in_reg, bool null_allowed);
// Set up `out_off` to hold a `jobject` (`StackReference<Object>*` to a spilled value), // or to be null if the value is null and `null_allowed`. void CreateJObject(FrameOffset out_off,
FrameOffset spilled_reference_offset, bool null_allowed);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.