A number of x86 registers were removed for #1440, causing a change in
numbering for many other registers. This is causing inconveniences at
the moment, e.g. it's not possible to use the Unicorn2 shared library
as a drop-in replacement for the Unicorn1 one.
Restore the old numbering.
Fixes#1492.
* x86: setup FS & GS base
* Fixed base register writes for x64, removed then for x16/x32 (the don't exist there?)
* FS reg comes before GS so the base regs do so, too
* added shebang to const_generator.py
* Added base regs to and added 'all' support to const_generator
Co-authored-by: naq <aquynh@gmail.com>
* renamed gem unicorn to unicorn-engine
* renamed modules to unicornengine
* renamed Module Unicorn to UnicornEngine and the gem unicorn-engine to unicornengine
* unicornengine -> unicorn_engine
In order to reduce rounding problems from calculations, FPU stack
registers for x86 architectures contain values stored in an
80-bit extended precision format.
As a result, reading and writing to these registers requires
specific handling.
This update brings the Ruby bindings in line with the Python
bindings by supporting reading and writing the FPU stack registers
using 2-element arrays: [mantissa, exponent]
The mantissa array element contains the first 64 bits of the FPU
stack register.
The exponent array element contains the last 16 bits of the FPU
stack register.
* fix mem_unmap and query for Ruby bindings
* ruby bindings: fix issues with GC freeing callbacks while we still have references to them
* ruby bindings: add test for garbage collection of hooks
* ruby bindings: let the VM garbage collect hooks properly this time
* ruby bindings: update garbage collection test to make sure Proc is garbage collected after Uc is collected
* ruby bindings: fix m_uc_hook_add to return the ruby VALUE with proper memory management instead of making another one with bad memory management
* ruby bindings: fix cb_hook_intr signature
* add architecture query
* ruby bindings: only treat certain x86 registers specially if we're actually on x86
* only treat certain x86 registers specially if we're actually on x86 (uc_reg_read and uc_reg_write)
* ruby bindings: read and write ARM64's 128-bit NEON registers