Commit Graph

267 Commits

Author SHA1 Message Date
kobalicek
515d854d10 Refactored slightly some constants and operand handling in X86Assembler.
Refactored asmjit::x86 register definitions (now exported as a single symbol).
Refactored bit utilities, now using proper naming like `or_`, `and_`, `andNot`.
Refactored X86RegCount and X86RegMask to support K instead of Fp register.
Refactored X86 instruction table (won't stay for long, new tool to export it is in development).
Renamed instruction group to instruction encoding.
Added XSAVE/OSXSAVE and other CPU features to X86CpuInfo.
Added proper AVX and AVX-512 detection to X86CpuInfo.
Added support to get content of XCR0 in X86CpuInfo (callXGetBV).
Added XSAVE instruction set support (Assembler/Compiler).
Added SSE4a instruction set support (Assembler/Compiler).
Added X86KReg and X86KVar register/variable support (AVX-512).
Added X86ZmmReg and X86ZmmVar register/variable support (AVX-512).
2014-11-01 13:07:56 +01:00
kobalicek
1318c9aff7 Fixed warning related to disabledTrace(). 2014-09-29 23:09:08 +02:00
kobalicek
fd0972d9c6 Emit/Log instruction with immediate properly if memory operand has been used with Label. 2014-09-29 20:29:30 +02:00
kobalicek
80687fc47a Added kX86Cmp enum. 2014-09-29 02:52:38 +02:00
kobalicek
2c750024db Fixed ConstPool traversing bug. 2014-09-26 01:13:19 +02:00
kobalicek
0cff228354 Fixed CMakeLists.txt (again). 2014-09-22 20:06:43 +02:00
kobalicek
d9f5a525e5 Fixed cmake crashing after secondary run. 2014-09-21 21:12:45 +02:00
Petr Kobalicek
04c58c6fa2 Merge pull request #55 from kobalicek/issue_53
Fixed Issue #53
2014-09-21 20:48:24 +02:00
kobalicek
a7c501e1fe Fixed Issue #53 (assigning to RelocData has no effect after added in the RelocData list).
Refactored slightly so RelocData always uses `rd` variable name and added a scope into the buggy locations.
2014-09-21 20:41:30 +02:00
kobalicek
5185b555fe ASMJIT_OFFSET_OF should cast to int 2014-09-20 00:29:46 +02:00
kobalicek
6ca44dfb7a Fixed #52 2014-09-20 00:29:04 +02:00
kobalicek
eef8f78953 Removed contribs
Added some misc methods to Compiler.
Moved reset() from X86Var to Var.
2014-09-17 20:31:53 +02:00
kobalicek
66a863c004 Always function argument varType to architecture specific one (Fixed #49), test-case included. 2014-09-15 23:48:55 +02:00
kobalicek
cf3b6ccb5b Fixed structure alignment linker warning (MSVC) related to Operand. 2014-09-15 09:12:19 +02:00
kobalicek
9ead0cfb4c - Initial support for StaticRuntime (known base address before the code address is generated).
- Bind moved from X86Assembler to Assembler.
- Added helpers to get offset of labels (useful after the code is generated).
- Added support to cache and reuse Assembler if only Compiler is used.
- CodeGen getFeature(), setFeature() and friends are now inlined.
- Added offset to TargetNode, which is filled after the code is serialized.
2014-09-08 20:24:31 +02:00
Petr Kobalicek
d7fc62d9e9 Merge pull request #45 from xantares/mingw
CMake improvements.
2014-07-21 20:15:00 +02:00
xantares
2475e3f80a Install dll in <prefix>/bin 2014-07-17 07:13:29 +00:00
xantares
f82fd80305 Install if not ASMJIT_EMBED 2014-07-17 07:11:51 +00:00
kobalicek
104e857b6c README update. 2014-07-17 00:46:01 +02:00
kobalicek
895d33d465 Documentation fixes. 2014-07-15 21:31:23 +02:00
Petr Kobalicek
3363e4138b Merge pull request #42 from kobalicek/incremental
Incremental work with some incompatible changes - denested asmjit
2014-07-12 22:03:22 +02:00
kobalicek
fa955663e3 Changed asmjit namespaces, each architecture has now only one namespace for registers / memory operands.
Changed instruction table schema to minimize its size and added use of EFLAGS register (for scheduler).
Changed the rest of intrinsics accepting `void*` to accept `Ptr` instead.
Changed clear()/reset() concept - only `reset()` now exists and accepts a `releaseMemory` argument.
Changed unit tests to use bundled `Broken` framework.
Moved podvector and podlist to base/containers.
Added CMPS, LODS, MOVS, SCAS, STOS instructions.
Added Label::isInitialized() and Var::isInitialized().
Added X86Scheduler stub - preparing for instruction reordering.
Added support for tracing (see ASMJIT_TRACE) to allow consumers to find bugs in AsmJit quicker.
Fixed possible Zone memory leak.
Fixed and improved alloc/spill (added support for home register which asmjit honors from now).
Fixed Assembler `LEA REG, [LABEL]` bug.
Fixed [Mem, Imm] instructions with zero-sized operand to return error instead of emitting garbage.
Fixed minor bug in VMemMgr - always point to a correct hProcess so it can be used properly (#41).
2014-07-12 17:50:35 +02:00
kobalicek
a66efd5460 Minor 2014-06-07 21:57:07 +02:00
kobalicek
0dbd42f350 Line endings 2014-06-07 19:23:35 +02:00
kobalicek
c87814b225 Added librt dependency on Linux by default. 2014-06-06 22:18:51 +02:00
kobalicek
c05f11ce5c More Travis.
Fixed bug in IntUtil::isInt32().
Added possibility to disable instruction names (for static compiling).
Added ASMJIT_... wrappers also to winremoteruntime.
Fixed some instructions (wrong order in enum and x86inst.cpp).
2014-06-06 22:05:52 +02:00
kobalicek
95e9fe41d2 Reworked _InterlockedCompareExchange a bit more... 2014-06-06 12:32:45 +02:00
kobalicek
eb1a71f58a Added missing pragma for _InterlockedCompareExchange 2014-06-06 12:24:11 +02:00
kobalicek
e5387eaaca Fixed #35 (namespace x86x64 in x86regs.h not included). 2014-06-06 10:41:43 +02:00
kobalicek
c64931abdb Removed junk x86/x86defs.h (#36) 2014-06-06 10:34:19 +02:00
kobalicek
5679a1fefd Added Travis 2014-06-05 19:40:33 +02:00
kobalicek
24c7d5afbd Minor. 2014-06-05 11:09:28 +02:00
kobalicek
df618fa24d Added back interface to override default functions for memory allocation (ASMJIT_ALLOC, ASMJIT_REALLOC, ASMJIT_FREE). 2014-06-05 11:02:38 +02:00
kobalicek
db322d5dc1 Added minimalist unit testing (and removed some apps that did some tests). 2014-06-04 22:12:52 +02:00
kobalicek
02a9d6abbd Added ability to disable logging at completely at compile-time (reducing asmjit size a bit).
Added ability to disable Compiler completely at compile-time (reducing asmjit size a lot).
2014-05-30 17:02:03 +02:00
kobalicek
f77a04ba04 Doc update. 2014-05-30 14:59:07 +02:00
kobalicek
cc2909f0db Minor changes.
Added possibility to get x86/x64 instruction id by name.
2014-05-30 14:49:22 +02:00
kobalicek
5869dc4736 Reworked Zone memory allocator a bit. 2014-05-29 14:25:40 +02:00
kobalicek
6def28a509 Renamed conflicting calloc to allocZeroed. 2014-05-27 23:16:37 +02:00
kobalicek
1fdcf250d2 Split registers from x86operand so they don't have to use static initialization. 2014-05-27 23:08:27 +02:00
kobalicek
e978cda1c0 Minor. 2014-05-27 22:30:58 +02:00
kobalicek
c2257adcc4 Added base defs in Compiler that will be used for AVX code. 2014-05-27 22:30:48 +02:00
kobalicek
811e1c3a96 Removed sentinel from const-pool binary tree (NULL is used instead). 2014-05-27 22:30:29 +02:00
kobalicek
98ed103929 Reworked imm specialization a bit more (Assembler/Compiler) (Issue #34). 2014-05-26 22:14:33 +02:00
kobalicek
c6f12c2720 Reworked trampolines (64-bit), results in space saving and patchable jmp/call (Issue #33).
Added int64_t overload to prevent truncation of immediates passed to Assembler/Compiler (Issue #34).
2014-05-26 21:26:45 +02:00
kobalicek
05850cb6cb Minor. 2014-05-26 11:06:18 +02:00
kobalicek
f112305d54 Fixed bug introduced by commit 1a73e65534 2014-05-23 00:06:10 +02:00
kobalicek
1cb47ce497 Fixed repo name. 2014-05-15 21:34:02 +02:00
kobalicek
1a73e65534 - Minor reorganization of source code (split defs to operand and instruction info).
- Added JECXZ instruction.
- Doxyfile is now in project root.
- Documentation updates.
2014-05-10 21:19:50 +02:00
Petr Kobalicek
bd1a5facb8 Merge pull request #31 from bnoordhuis/fix-compiler-warning
Fix unused parameter warning by fixing function prototype.
2014-05-08 16:26:06 +02:00