java.lang.Object
com.yasuenag.ffmasm.AsmBuilder<T>
- Type Parameters:
T
- Implementation of AsmBuilder
- Direct Known Subclasses:
AArch64AsmBuilder
,AMD64AsmBuilder
Base class of assembly builder.
- Author:
- Yasumasa Suenaga
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder class for AArch64static final class
Builder class for AMD64static final class
Builder class for AVXstatic final record
static final class
Builder class for SSE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ByteBuffer
ByteBuffer which includes code content.protected final Map
<String, Set<AsmBuilder.PendingJump>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild
(Linker.Option... options) Build as a MethodHandlebuild
(String name, JitDump jitdump, Linker.Option... options) Build as a MethodHandlebuild
(String name, Linker.Option... options) Build as a MethodHandleprotected T
castToT()
Cast "this" to "T" without unchecked warning.Get MemorySegment which is associated with this builder.getMemorySegment
(String name) Get MemorySegment which is associated with this builder.getMemorySegment
(String name, JitDump jitdump) Get MemorySegment which is associated with this builder.
-
Field Details
-
byteBuf
ByteBuffer which includes code content. -
labelMap
-
pendingLabelMap
-
-
Constructor Details
-
AsmBuilder
-
-
Method Details
-
castToT
-
build
Build as a MethodHandle- Parameters:
options
- Linker options to pass to downcallHandle().- Returns:
- MethodHandle for this assembly
- Throws:
IllegalStateException
- when label(s) are not defined even if they are used
-
build
Build as a MethodHandle- Parameters:
name
- Method nameoptions
- Linker options to pass to downcallHandle().- Returns:
- MethodHandle for this assembly
- Throws:
IllegalStateException
- when label(s) are not defined even if they are used
-
build
Build as a MethodHandle- Parameters:
name
- Method namejitdump
- JitDump instance which should be written.options
- Linker options to pass to downcallHandle().- Returns:
- MethodHandle for this assembly
- Throws:
IllegalStateException
- when label(s) are not defined even if they are used
-
getMemorySegment
Get MemorySegment which is associated with this builder.- Returns:
- MemorySegment of this builder
- Throws:
IllegalStateException
- when label(s) are not defined even if they are used
-
getMemorySegment
Get MemorySegment which is associated with this builder.- Parameters:
name
- Method name- Returns:
- MemorySegment of this builder
- Throws:
IllegalStateException
- when label(s) are not defined even if they are used
-
getMemorySegment
Get MemorySegment which is associated with this builder.- Parameters:
name
- Method namejitdump
- JitDump instance which should be written.- Returns:
- MemorySegment of this builder
- Throws:
IllegalStateException
- when label(s) are not defined even if they are used
-