Commit Graph

414 Commits

Author SHA1 Message Date
kobalicek
c59847629d Use casting to suppress -Wbitwise-instead-of-logical warning instead of suppressing it globally 2022-07-02 10:03:51 +02:00
Orvid King
d3fbf7c9bc
Fix an instance of -Wdeprecated-copy (#376) 2022-06-29 00:34:28 +02:00
kobalicek
35f92e8706 [Bug] The compiler should not bail when there is data before the FuncEnd node 2022-06-27 12:10:40 +02:00
kobalicek
70209cddd7 [Bug] Added a missing JitAllocator::query() (fixes #375) 2022-06-25 21:28:19 +02:00
kobalicek
06d0badec5 Suppress -Wbitwise-instead-of-logical warning that was introduced by clang 14 2022-06-22 00:30:34 +02:00
kobalicek
d0cdd70168 [Bug] Fixed incorrect encoding of LDRSH instruction with [base+imm] addressing (AArch64) (fixes #372) 2022-06-20 09:16:39 +02:00
kobalicek
24863770d6 [Doc] Updated documentation to use new API (fixes not fixed #368) 2022-06-17 12:35:21 +02:00
kobalicek
4244182486 [Doc] Updated documentation to use new API instead of the removed one (fixes #368) 2022-06-17 12:32:34 +02:00
kobalicek
d925605671 [Bug] Fixed incorrect encoding of LDRSB and LDRSH with [base+index] (AArch64) (fixes #370) 2022-06-17 12:26:34 +02:00
kobalicek
33a31f04e8 [Bug] Fixed queryFeatures() to properly return AVX-512 requirements of shift instructions that use memory operands
[Bug] Fixed queryFeatures() to properly return AVX-512 requirements of some floating-point conversion instructions
[Opt] Slightly improved the performance of BitWordIterator and friends possibly taking advantage of BMI extensions
[API] Removed BitWordFlipIterator that was never used by the library
[Enh] Log the whole instruction if the validation fails in asmjit::Builder
2022-06-05 22:59:38 +02:00
kobalicek
a4cb51b532 [Bug] Fixed not cloberring YMM|ZMM registers in function calls that preserve only low 128-bits of vector registers 2022-04-10 00:32:57 +02:00
kobalicek
8fdee13aea [Opt] Added a feature to the Compiler to remove dead moves (moves to itself) when it's provable that it's safe 2022-04-06 13:20:00 +02:00
Adrian Vogelsgesang
752eb38a4d
[Bug] Fix formatting of anonymous labels (#362)
Anonymous labels accidentally called `sb.append` instead of
`sb.appendFormat` which messes up the label's formatting.
2022-04-05 13:18:10 +02:00
Adrian Vogelsgesang
a876e4d1cd
Fixed typos in comments (#361) 2022-04-02 00:26:56 +02:00
kobalicek
e41f1c0fd7 Cleaned up AArch64 RAPass to not shadow variables in _rewrite() (Fixes #359) 2022-04-01 00:41:54 +02:00
kobalicek
7342f7d78d Added a pseudo instruction 'loadAddressOf()' to load a memory address into a register (Compiler/AArch64) 2022-03-27 22:33:35 +02:00
kobalicek
21a31b8a33 [Bug] Fixed incorrect control flow information of 'b' instruction (AArch64) (Fixes #358) 2022-03-20 22:40:31 +01:00
kobalicek
d754de58c2 [Bug] Fixed logging without ARM condition codes when logged via a64::Assembler 2022-03-20 19:27:04 +01:00
kobalicek
f1a399c4fe [Bug] Fixed invalid operand order in AArch64 register move (Compiler) 2022-03-15 10:37:18 +01:00
kobalicek
6efd4d563d Added missing baseReg() and indexReg() to arm::Mem operand 2022-02-24 22:39:07 +01:00
kobalicek
a4e1e88374 [Bug] Do not link to pthread library on Android (there is no such library) 2022-02-20 17:38:27 +01:00
kobalicek
62ffe595a2 [Bug] Fixed RM features reported by queryRWInfo (X86) 2022-02-19 21:43:07 +01:00
kobalicek
28c4d8c528 [Opt] Optimized memory footprint of Compiler when generating huge code 2022-02-16 16:42:32 +01:00
kobalicek
23ddf56b00 [ABI] Initial AArch64 support 2022-02-09 17:08:40 +01:00
kobalicek
45b0114781 [ABI] Added the possibility to retrieve stack locations of virtual registers and explicit stack allocations after compilation 2022-02-09 17:08:36 +01:00
kobalicek
9a92d2f972 [Bug] Removed invalid assumption in zonetree (fixes #352) 2022-01-18 09:53:31 +01:00
kobalicek
2a706fd2ba Reworked unaligned memory access to work better with GCC 11 2021-12-14 20:01:37 +01:00
kobalicek
2cfa686ebd [API] Fixed most static analysis issues reported by clang
[Bug] Workarounded GCC 11 issue affecting unaligned loads/stores (most likely a compiler bug)
2021-12-14 01:19:28 +01:00
kobalicek
996deae327 [ABI] Refactored AsmJit to use strong-typed enums, this breaks both API 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
2021-12-13 19:34:56 +01:00
Kian Meng Ang
4ec760a3d1
Fixed typos in documentation (#348) 2021-11-13 09:24:21 +01:00
tetzank
d0d14ac774
[Bug] Fixed compile-time issue with ASMJIT_NONCOPYABLE/NONCONSTRUCTIBLE for GCC 11 in C++20 mode (#343)
* fixed GCC 11 compilation in C++20 mode (don't use template parameters in constructors/operator assignment)
* refactored ASMJIT_NONCOPYABLE/NONCONSTRUCTIBLE (variadic macros not needed)
2021-09-03 14:52:26 +02:00
kobalicek
d02235b834 Refactored naming of data types in formatted text, which is now part of architecture traits 2021-06-27 00:39:53 +02:00
kobalicek
0a709c7a28 In addition to LEA, allow CL* and PREFETCH* instructions to have memory operand of any size 2021-06-27 00:39:18 +02:00
kobalicek
c329fa7ce0 [Bug] Don't emit useless 'sub esp, 0' after calling a void function (Compiler) 2021-06-24 23:51:48 +02:00
kobalicek
78de7d9c81 [Bug] Fixed a bug introduced by the previous commit (enable /dev/shm on non-android targets) 2021-05-18 15:17:22 +02:00
kobalicek
8ee4c76ee3 [Bug] Fixed android build (Android doesn't provide shm_open() and shm_unlink() functions) 2021-05-16 22:08:06 +02:00
kobalicek
0dd16b0a98 [Bug] Fixed RW metadata of KXNORx and KXORx instructions (Compiler) 2021-04-13 19:01:36 +02:00
kobalicek
a4dd0b2d8b [ABI] Build improvements - replaced ASMJIT_BUIlD_X86 with ASMJIT_NO_X86 and other changes... 2021-03-21 14:42:47 +01:00
kobalicek
e7a728018e [Bug] Fixed X86 instruction info query asserting on MMX variation of pextrw (Fixes #330) 2021-03-19 09:31:12 +01:00
kobalicek
e822fba53e [ABI] Added the possibility to use AVX512 in Compiler and FuncFrame 2021-03-17 18:05:48 +01:00
kobalicek
7836449c30 Added asmjit_test_perf, which replaces asmjit_bench and provides much better performance overview
Removed asmjit_test_opcode (not needed anymore as we have asmjit_test_assembler and asmjit_test_perf)
2021-03-13 23:05:48 +01:00
kobalicek
c9cebc67bc Split assembler tests so they can compile much faster with GCC 2021-03-13 14:28:05 +01:00
kobalicek
8b35b4cffb Added support for PROT_MAX() in VirtMem::alloc() and refactored VirtMem a bit 2021-03-06 09:05:42 +01:00
kobalicek
19f1768dbe [Bug] Don't allocate k0 register (x86::Compiler) 2021-03-04 01:37:22 +01:00
kobalicek
a305905d32 [Bug] Return reported error in BaseCompiler::_newInvokeNode() 2021-02-28 11:42:08 +01:00
kobalicek
5a5fb8af4c [Bug] Fixed VPERMQ incorrectly reporting AVX2 instead of AVX512-F features (X86 features API) 2021-02-09 02:41:57 +01:00
kobalicek
2ab380e0bd [Bug] [Critical] [ABI] Update that fixes all problems discovered by comparison with LLVM-MC
Fixed POP Sreg instruction, which was incorrectly implemented to emit nothing
Fixed CVTSD2SI, CVTSS2SI, CVTTSD2SI, and CVTTSS2SI instructions to not consider the size of the memory operand when calculagint REX.W prefix
Fixed VCMPPD, VCMPPS, VCMPSD, VCMPSS, VPCMPEQ*, VPCMPGT* instructions to always force EVEX prefix when the first operand is K register
Fixed ENDBR32 and ENDBR64 instructions (wrong opcode)
Fixed CLRSSBSY and RSTORSSP instructions (wrong logic in Assembler)
Fixed SLDT, SMSW, and STR instructions to not consider memory size when determining prefixes
Fixed UD0 and UD1 instructions to consider both operands
Fixed VCVTNE2PS2BF16, VCVTNEPS2BF16, and VDPBF16PS instructions (incorrect calculation of LL field) (AVX512)
Fixed VCVTPD2DQ, VCVTPD2PS, VCVTPD2UDQ, VCVTQQ2PS, VCVTTOD2DQ, VCVTTPD2UDQ, VCVTUQQ2PS in AVX512 case (incorrect calculation of LL field)
Fixed VGATHERPF* and VSCATTERPF* instructions (some instructions were encoded incorrectly by not considering the memory index register type in LL field)
Fixed VPBLENDVB (incorrect calculation of LL field)
Fixed VPEXTRW to use use a shorter encoding when possible (vpextrw r32, xmm, imm)
Fixed VPSLLD, VPSLLQ, VPSLLW, VPSRAD, VPSRAQ, VPSRAW, VPSRLD, VPSRLQ, VPSRLW instructions to always force EVEX prefix when the instruction is RMI (AVX512)
Fixed the accepted memory operand size of MMX PUNPCKL??? instructions from m64 to m32 (only affects validation)
Added explicit forms to XSAVE* and XRSTOR* instructions
Added HRESET and UINTR instructions
Changed MOV and all ARITH instructions to output the same binary as LLVM in 'reg, reg' case (it used an alternative encoding initially)
Renamed LRET to RETF
Renamed VBLENDM* instructions to VPBLENDM* (the name was incorrect)
Renamed VPBROADCASTMB2D to VPBROADCASTMW2D (the name was incorrect)
Renamed SYSEXIT64 to SYSEXITQ and SYSRET64 to SYSRETQ
Removed non-standard IRETW (use IRET, IRETD, or IRETQ to select the form)
2021-02-03 09:36:11 +01:00
kobalicek
f36ea0c031 [ABI] Added ljmp, lcall, and lret instructions (fixes #310) 2021-01-27 21:05:04 +01:00
kobalicek
71fb24cb11 BaseEmitter::commentf() shouldn't format string, which will be discarded by the emitter (fixes #306) 2021-01-26 14:28:48 +01:00
kobalicek
6678143772 [ABI] X86/X64 GP registers should use the real type (GpbLo, GpbHi, Gpw, Gpd, Gpq) and not just Gp (fixes #292) 2021-01-26 14:25:24 +01:00