Skip to content

Commit

Permalink
[ABI] Refactored AsmJit to use strong-typed enums, this breaks both A…
Browse files Browse the repository at this point in the history
…PI and ABI

[ABI] Added ABI version as an inline namespace, which forms asmjit::_abi_MAJOR_MINOR
[ABI] Added support for AVX512_FP16, 16-bit broadcast, and AVX512_FP16 tests
[ABI] Added initial support for consecutive registers into instruction database and register allocator
[ABI] Added a possibility to use temporary memory in CodeHolder's zone
[ABI] Compiler::setArg() is now deprecated, use FuncNode::setArg()
[Bug] Fixed correct RW information of instructions that only support implicit zeroing with {k}
[Bug] Fixed broadcast to be able to broadcast bcst16 operands
  • Loading branch information
kobalicek committed Dec 13, 2021
1 parent 4ec760a commit 996deae
Show file tree
Hide file tree
Showing 154 changed files with 29,354 additions and 21,007 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-config.json
Expand Up @@ -19,6 +19,10 @@
"cmd": ["asmjit_test_assembler", "--quiet"],
"optional": true
},
{
"cmd": ["asmjit_test_assembler", "--quiet", "--validate"],
"optional": true
},
{
"cmd": ["asmjit_test_emitters"],
"optional": true
Expand Down
118 changes: 62 additions & 56 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

49 changes: 18 additions & 31 deletions CMakeLists.txt
Expand Up @@ -19,9 +19,8 @@ endif()
include(CheckCXXCompilerFlag)
include(GNUInstallDirs)

# =============================================================================
# [AsmJit - Deprecated]
# =============================================================================
# AsmJit - Deprecated
# ===================

if (DEFINED ASMJIT_BUILD_EMBED)
message(DEPRECATION "ASMJIT_BUILD_EMBED is deprecated, use ASMJIT_EMBED")
Expand All @@ -33,9 +32,8 @@ if (DEFINED ASMJIT_BUILD_STATIC)
set(ASMJIT_STATIC "${ASMJIT_BUILD_STATIC}")
endif()

# =============================================================================
# [AsmJit - Configuration]
# =============================================================================
# AsmJit - Configuration
# ======================

if (NOT DEFINED ASMJIT_TEST)
set(ASMJIT_TEST FALSE)
Expand Down Expand Up @@ -84,9 +82,8 @@ set(ASMJIT_NO_FOREIGN "${ASMJIT_NO_FOREIGN}" CACHE BOOL "Disable all f
set(ASMJIT_NO_NATVIS "${ASMJIT_NO_NATVIS}" CACHE BOOL "Disable natvis support (embedding asmjit.natvis in PDB)")
set(ASMJIT_NO_CUSTOM_FLAGS "${ASMJIT_NO_CUSTOM_FLAGS}" CACHE BOOL "Disable extra compilation flags added by AsmJit to its targets")

# =============================================================================
# [AsmJit - Project]
# =============================================================================
# AsmJit - Project
# ================

set(ASMJIT_INCLUDE_DIRS "${ASMJIT_DIR}/src") # Include directory is the same as source dir.
set(ASMJIT_DEPS "") # AsmJit dependencies (libraries) for the linker.
Expand All @@ -98,9 +95,8 @@ set(ASMJIT_PRIVATE_CFLAGS_REL "") # Private compiler flags used b
set(ASMJIT_SANITIZE_CFLAGS "") # Compiler flags required by currently enabled sanitizers.
set(ASMJIT_SANITIZE_LFLAGS "") # Linker flags required by currently enabled sanitizers.

# =============================================================================
# [AsmJit - Utilities]
# =============================================================================
# AsmJit - Utilities
# ==================

function(asmjit_detect_cflags out)
set(out_array ${${out}})
Expand Down Expand Up @@ -172,9 +168,8 @@ function(asmjit_add_target target target_type)
endif()
endfunction()

# =============================================================================
# [AsmJit - Compiler Support]
# =============================================================================
# AsmJit - Compiler Support
# =========================

set(ASMJIT_INCLUDE_DIRS "${ASMJIT_DIR}/src") # Include directory is the same as source dir.
set(ASMJIT_DEPS "") # AsmJit dependencies (libraries) for the linker.
Expand Down Expand Up @@ -283,19 +278,17 @@ foreach(build_option ASMJIT_STATIC
endif()
endforeach()

# =============================================================================
# [AsmJit - Linker Support]
# =============================================================================
# AsmJit - Linker Support
# =======================

if (WIN32)
if(CMAKE_LINKER MATCHES "link\\.exe" OR CMAKE_LINKER MATCHES "lld-link\\.exe")
set(ASMJIT_LINKER_SUPPORTS_NATVIS TRUE)
endif()
endif()

# =============================================================================
# [AsmJit - Source]
# =============================================================================
# AsmJit - Source
# ===============

set(ASMJIT_SRC_LIST
asmjit/asmjit.h
Expand Down Expand Up @@ -324,7 +317,6 @@ set(ASMJIT_SRC_LIST
asmjit/core/constpool.h
asmjit/core/cpuinfo.cpp
asmjit/core/cpuinfo.h
asmjit/core/datatypes.h
asmjit/core/emithelper.cpp
asmjit/core/emithelper_p.h
asmjit/core/emitter.cpp
Expand All @@ -335,7 +327,6 @@ set(ASMJIT_SRC_LIST
asmjit/core/environment.h
asmjit/core/errorhandler.cpp
asmjit/core/errorhandler.h
asmjit/core/features.h
asmjit/core/formatter.cpp
asmjit/core/formatter.h
asmjit/core/func.cpp
Expand Down Expand Up @@ -401,8 +392,6 @@ set(ASMJIT_SRC_LIST
asmjit/x86/x86emithelper.cpp
asmjit/x86/x86emithelper_p.h
asmjit/x86/x86emitter.h
asmjit/x86/x86features.cpp
asmjit/x86/x86features.h
asmjit/x86/x86formatter.cpp
asmjit/x86/x86formatter_p.h
asmjit/x86/x86func.cpp
Expand Down Expand Up @@ -439,9 +428,8 @@ if (NOT ${CMAKE_VERSION} VERSION_LESS "3.8.0")
source_group(TREE "${ASMJIT_DIR}" FILES ${ASMJIT_SRC})
endif()

# =============================================================================
# [AsmJit - Summary]
# =============================================================================
# AsmJit - Summary
# ================

message("** AsmJit Summary **")
message(" ASMJIT_DIR=${ASMJIT_DIR}")
Expand All @@ -454,9 +442,8 @@ message(" ASMJIT_PRIVATE_CFLAGS=${ASMJIT_PRIVATE_CFLAGS}")
message(" ASMJIT_PRIVATE_CFLAGS_DBG=${ASMJIT_PRIVATE_CFLAGS_DBG}")
message(" ASMJIT_PRIVATE_CFLAGS_REL=${ASMJIT_PRIVATE_CFLAGS_REL}")

# =============================================================================
# [AsmJit - Targets]
# =============================================================================
# AsmJit - Targets
# ================

if (NOT ASMJIT_EMBED)
# Add AsmJit target.
Expand Down
8 changes: 3 additions & 5 deletions README.md
Expand Up @@ -47,12 +47,10 @@ TODO

* [ ] Core:
* [ ] Add support for user external buffers in CodeBuffer / CodeHolder.
* [ ] Register allocator doesn't understand register pairs, affected instructions:
* [ ] v4fmaddps, v4fmaddss, v4fnmaddps, v4fnmaddss
* [ ] vp4dpwssd, vp4dpwssds
* [ ] vp2intersectd, vp2intersectq
* [ ] Ports:
* [ ] ARM/Thumb/AArch64 support.
* [ ] 32-bit ARM/Thumb port.
* [ ] 64-bit ARM (AArch64) port.
* [ ] RISC-V port.

Support
-------
Expand Down

0 comments on commit 996deae

Please sign in to comment.