Commit Graph

602 Commits

Author SHA1 Message Date
Chris Eagle
a03e908611 Fix initial state of segment registers (#751)
* Remove glib from samples makefile

* changes to 16 bit segment registers needs to update segment base as well as segment selector

* change how x86 segment registers are set in 16-bit mode

* more appropriate solution to initial state of x86 segment registers in 16-bit mode

* remove commented lines
2017-02-09 23:49:54 +08:00
Chris Eagle
f05984961b Fix 16-bit address computations (#747)
* Remove glib from samples makefile

* changes to 16 bit segment registers needs to update segment base as well as segment selector

* change how x86 segment registers are set in 16-bit mode
2017-02-08 09:37:41 +08:00
vardyh
7f9251511e MSVC port (vardyh) (#746)
* unicorn: use waitable timer to implement usleep() on Windows

Signed-off-by: vardyh <vardyh.dev@gmail.com>

* atomic: implement barrier() for msvc

Signed-off-by: vardyh <vardyh.dev@gmail.com>
2017-02-07 21:31:35 +08:00
Parker Thompson
053ecd7bf4 Added ARM coproc registers (#684)
* Added ARM coproc registers

* Added regression test for vfp
2017-01-25 11:56:19 +08:00
Nguyen Anh Quynh
ef52d9a9d1 cleanup qemu/include/qemu/module.h 2017-01-25 00:20:08 +08:00
xorstream
e08d1bf7c6 Arm issue fix. (#738)
* Fix for MIPS issue.

* Sparc support added.

* M68K support added.

* Arm support ported.

* Fix issue with VS2015 shlobj.h file

* Arm issue fix.
2017-01-24 17:45:01 +08:00
xorstream
8e45102b43 Arm support ported. (#736)
* Fix for MIPS issue.

* Sparc support added.

* M68K support added.

* Arm support ported.

* Fix issue with VS2015 shlobj.h file
2017-01-23 23:30:57 +08:00
xorstream
2695a0ffe8 M68K support added. (#735)
* Fix for MIPS issue.

* Sparc support added.

* M68K support added.
2017-01-23 14:40:02 +08:00
xorstream
a40921ce32 Sparc support added. (#734)
* Fix for MIPS issue.

* Sparc support added.
2017-01-23 13:29:41 +08:00
xorstream
69ae8f7987 Fix for MIPS issue. (#733) 2017-01-23 12:39:34 +08:00
Nguyen Anh Quynh
2ecbe89cc1 cleanup Sparc unused code 2017-01-23 12:34:00 +08:00
Nguyen Anh Quynh
e4c7c3dbe4 cleanup Sparc unused code 2017-01-23 12:33:39 +08:00
Nguyen Anh Quynh
0680b85920 cleanup Monitor related code 2017-01-23 10:07:01 +08:00
Nguyen Anh Quynh
81b8a685be cleanup 2017-01-23 10:06:49 +08:00
Nguyen Anh Quynh
55d472c62c cleanup Monitor related code 2017-01-23 00:53:31 +08:00
Nguyen Anh Quynh
b3faed1df9 cleanup 2017-01-23 00:30:13 +08:00
Nguyen Anh Quynh
a95fdbc5aa cleanup qemu/include/exec/memory.h 2017-01-22 23:21:47 +08:00
Nguyen Anh Quynh
5de0785a1b cleanup qemu/memory.c 2017-01-22 23:07:17 +08:00
xorstream
e46f86c80b Merging with current msvc. 2017-01-23 01:07:06 +11:00
xorstream
72a497bc14 Added MIPS support and projects for all samples. 2017-01-23 01:05:08 +11:00
Nguyen Anh Quynh
206819bd98 cleanup after msvc port 2017-01-22 21:27:17 +08:00
xorstream
1a9ebbecde isnan() fix for msvc2013 onwards (#729)
* Changed some MSVC compatibility defines based on MSVC version.

* Added prebuild_script.bat to remove leftover configure generated files before building.

Also added project files and MSVC copies of configure generated files for all supported CPUs.

* Moved ./bindings/msvc_native into ./msvc

* Remove old project dir.

* isnan() fix for msvc2013 onwards
2017-01-22 16:14:05 +08:00
xorstream
03dcce40b2 isnan() fix for msvc2013 onwards 2017-01-22 18:13:28 +11:00
Nguyen Anh Quynh
49c904a629 cleanup qemu/configure 2017-01-22 05:57:29 +08:00
Nguyen Anh Quynh
d04cc8671d cleanup qemu/configure 2017-01-22 05:56:37 +08:00
Nguyen Anh Quynh
2a1b9d8e1b cleanup qemu/Makefile.objs 2017-01-21 21:50:12 +08:00
xorstream
9fac29d154 Changed some MSVC compatibility defines based on MSVC version. (#724) 2017-01-21 20:21:27 +08:00
Nguyen Anh Quynh
0d51163abc cleanup qemu/util/qemu-timer-common.c 2017-01-21 14:55:35 +08:00
Nguyen Anh Quynh
45717c61ba cleanup qemu/util/qemu-timer-common.c 2017-01-21 14:53:33 +08:00
Nguyen Anh Quynh
647c97ddc3 ffs() is redundant 2017-01-21 11:11:22 +08:00
Nguyen Anh Quynh
5d0797afe7 ffs() is redundant 2017-01-21 11:10:48 +08:00
Nguyen Anh Quynh
c8550b86f0 fix conflicts 2017-01-21 11:06:05 +08:00
Nguyen Anh Quynh
fa12120d75 termios.h & strings.h are not needed 2017-01-21 11:02:17 +08:00
xorstream
770c5616e2 Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
xorstream
df41c49e2d Fixed warning about {} initialisers. 2017-01-21 11:41:11 +11:00
xorstream
429bfca48e Fixes for MSVC native support to still work with GCC/GNU. 2017-01-21 01:07:10 +11:00
xorstream
8840d5b42b Save copies of generated qapi files. 2017-01-21 00:30:50 +11:00
xorstream
fac6a66860 platform.h move #3 2017-01-21 00:13:21 +11:00
xorstream
1aaf57ca54 Some more little edits to prepare for pull request. 2017-01-20 22:46:32 +11:00
xorstream
b0ae2138fb Merge remote-tracking branch 'unicorn-engine/master' into msvc_native 2017-01-20 22:37:51 +11:00
Nguyen Anh Quynh
ac68745a9c we dont need to handle VGA & Migration memories 2017-01-20 17:03:39 +08:00
Nguyen Anh Quynh
fff532fc20 timer is redundant 2017-01-20 16:46:58 +08:00
Nguyen Anh Quynh
6daa8581cd win32_start_routine() looks broken. TODO 2017-01-20 16:12:49 +08:00
xorstream
ee294eebb0 Fixed double free in win32 threads and changed free() to g_free(). (#722) 2017-01-20 16:03:35 +08:00
Nguyen Anh Quynh
c6de7930c9 remove mutex code 2017-01-20 15:44:03 +08:00
xorstream
92392e0f57 Merge with current master. 2017-01-20 18:22:28 +11:00
Nguyen Anh Quynh
42771848d6 no more spinlock 2017-01-20 14:57:33 +08:00
Nguyen Anh Quynh
a7fca49f7a delete qemu/include/qemu/notify.h 2017-01-20 14:47:41 +08:00
xorstream
002151874a Unicorn interface working with test app in 32bit and 64bit builds. 2017-01-20 17:27:22 +11:00
Nguyen Anh Quynh
b887c3bb25 delete qemu/include/exec/poison.h 2017-01-20 13:58:50 +08:00
Nguyen Anh Quynh
94e55f45c1 del qemu/target-m68k/m68k-semi.c 2017-01-20 11:52:31 +08:00
Nguyen Anh Quynh
b678512fc1 remove kvm stuffs 2017-01-20 01:03:59 +08:00
Nguyen Anh Quynh
7e2234237c del qemu/scripts/dump-guest-memory.py 2017-01-19 20:56:07 +08:00
xorstream
1aeaf5c40d This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
Nguyen Anh Quynh
b9b82591a1 cleanup 2017-01-19 18:07:30 +08:00
Nguyen Anh Quynh
8a5b12c6f9 more cleanup in qemu/include/hw/ 2017-01-19 15:20:06 +08:00
Nguyen Anh Quynh
287e047fdb delete sparc32_dma.h & arm-semi.c 2017-01-19 15:10:41 +08:00
Nguyen Anh Quynh
f4f756e6dd cleanup qemu/include/qemu/module.h 2017-01-19 15:00:25 +08:00
Nguyen Anh Quynh
7789a06d2d cleanup qemu/default-configs/ 2017-01-19 14:52:30 +08:00
Nguyen Anh Quynh
86e5d29b74 more cleanup qemu/configure 2017-01-19 14:15:00 +08:00
Nguyen Anh Quynh
f2691b0107 more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
Nguyen Anh Quynh
37410d02f1 cleanup qemu/configure 2017-01-19 14:02:50 +08:00
Nguyen Anh Quynh
9735c6e28e cleanup qemu/include/elf.h 2017-01-19 13:46:17 +08:00
Nguyen Anh Quynh
a6fa35430a del qemu/include/qapi/opts-visitor.h 2017-01-19 13:23:48 +08:00
Nguyen Anh Quynh
d836ec62fc del qemu/include/hw/irq.h 2017-01-19 13:14:15 +08:00
Nguyen Anh Quynh
0640b35943 mips: remove qemu/hw/mips/mips_int.c 2017-01-19 13:07:28 +08:00
Nguyen Anh Quynh
a154b251e3 cleanup 2017-01-19 12:18:46 +08:00
Nguyen Anh Quynh
326a9a5fba cleanup qemu docs 2017-01-18 15:23:40 +08:00
Elton G
47150b6df3 reg_read and reg_write now work with registers W0 through W30 in Aarch64 (#716)
* reg_read and reg_write now work with registers W0 through W30 in Aarch64 emulaton

* Added a regress test for the ARM64 reg_read and reg_write on 32-bit registers (W0-W30)
Added a new macro in uc_priv.h (WRITE_DWORD_TO_QWORD), in order to write to the lower 32 bits of a 64 bit value without overwriting the whole value when using reg_write

* Fixed WRITE_DWORD macro

reg_write would zero out the high order bits when writing to 32 bit registers

e.g. uc.reg_write(UC_X86_REG_EAX, 0) would also set register RAX to zero
2017-01-15 20:13:35 +08:00
Nguyen Anh Quynh
7512ff57de more cleanup 2017-01-10 16:29:47 +08:00
Nguyen Anh Quynh
c1f39c3db2 cleanup qemu/util code 2017-01-10 12:57:12 +08:00
Nguyen Anh Quynh
af165d254c clean all qobject json code 2017-01-09 16:09:53 +08:00
Nguyen Anh Quynh
16894fdb6c cleanup some qemu/util code 2017-01-09 15:48:21 +08:00
Nguyen Anh Quynh
52cb0ba78e cleanup more synchronization code 2017-01-09 14:05:39 +08:00
Nguyen Anh Quynh
d7ead1135d cleanup 2017-01-09 13:28:28 +08:00
Nguyen Anh Quynh
ffa97dc2a1 cleanup qemu/configure 2017-01-08 01:35:19 +08:00
Agustin Gianni
a63a34bfbc Allow the client to write to CPSR 2017-01-05 00:00:15 +01:00
Nguyen Anh Quynh
2e8fa1dbf6 glib_compat: add guint64 type 2017-01-02 01:24:54 +08:00
Nguyen Anh Quynh
3fa50fc06a macro GPOINTER_TO_UINT 2017-01-02 01:00:11 +08:00
Nguyen Anh Quynh
d5f513cbfe Merge branch 'master' into noglib2 2016-12-27 22:49:59 +08:00
cojocar
428cb83060 Support for MCLASS ARM cpu (Cortex-M3) (#700)
Support for Cortex-M ARM CPU already exists in Qemu. This patch just
exposes a "cortex-m3" CPU.

"uc_open(UC_ARCH_ARM, UC_MODE_THUMB | UC_MODE_MCLASS, &uc);"
Instantiates a CPU with this feature on.

Signed-off-by: Lucian Cojocar <lucian@cojocar.com>
2016-12-27 22:49:06 +08:00
Nguyen Anh Quynh
3fb078c555 glib_compat: add COPYING_GLIB 2016-12-27 10:15:08 +08:00
Nguyen Anh Quynh
9b809601ec glib_compat: code style 2016-12-27 00:13:27 +08:00
Nguyen Anh Quynh
520f335a2a glib_compat: lift string functions from glib. remove unused API g_win32_error_message() 2016-12-26 22:36:47 +08:00
Nguyen Anh Quynh
c5b8fbfbc6 glib_compat: FALSE = 0 2016-12-26 22:02:34 +08:00
Nguyen Anh Quynh
e4382c0467 glib_compat: lift hash functions from glib 2016-12-26 20:12:01 +08:00
Nguyen Anh Quynh
fba6046fd0 glib_compat: lift g_list_sort() & g_slist_sort() from glib code 2016-12-26 18:32:02 +08:00
Nguyen Anh Quynh
cb40e6a3f5 glib_compat: some minor fixes 2016-12-26 18:13:46 +08:00
Nguyen Anh Quynh
6b57da1fc2 glib_compat: make the API compatible with glib 2016-12-26 01:35:42 +08:00
Nguyen Anh Quynh
5777c4f3fd Merge branch 'noglib' of https://github.com/unicorn-engine/unicorn into noglib 2016-12-22 12:13:53 +08:00
Nguyen Anh Quynh
9371ae7dd7 cleanup glib_compat 2016-12-22 12:13:31 +08:00
Chris Eagle
fccbcfd4c2 revert to use of g_free to make future qemu integrations easier (#695)
* revert to use of g_free to make future qemu integrations easier

* bracing
2016-12-21 22:28:36 +08:00
Nguyen Anh Quynh
6a2eb14ff3 Merge pull request #693 from cseagle/noglib
add g_free to make future integration easier
2016-12-21 08:50:52 +08:00
Chris Eagle
bfaf8f3441 add g_free to make future integration easier 2016-12-20 12:27:15 -08:00
Nguyen Anh Quynh
14d04493f1 Merge branch 'noglib' of https://github.com/cseagle/unicorn into noglib 2016-12-20 11:33:46 +08:00
Nguyen Anh Quynh
6d747d1a13 remove pkg-config dependency 2016-12-20 11:30:26 +08:00
Chris Eagle
f8f9e993a8 merge upstream/noglib and update some glib related types 2016-12-19 12:32:06 -08:00
Chris Eagle
e07e57a862 battling git 2016-12-19 12:10:02 -08:00
Chris Eagle
e53c295f61 please the gods of brace 2016-12-19 12:02:01 -08:00
Chris Eagle
71bda8e012 stick to gint/guint rather than int32_t/uint32_t 2016-12-19 09:43:35 -08:00
Nguyen Anh Quynh
bd1632e60c fix an warning 'control may reach end of non-void function' 2016-12-20 00:21:02 +08:00
Nguyen Anh Quynh
16bbe4fb88 do not redefine GHashTable 2016-12-20 00:19:13 +08:00
Nguyen Anh Quynh
04e2e7e845 glib_compat.c: code style 2016-12-19 22:18:33 +08:00
Nguyen Anh Quynh
b19f1607c6 Revert "remove qemu/util/qemu-timer-common.c"
This reverts commit 934fa2c90f.
2016-12-19 20:31:38 +08:00
Nguyen Anh Quynh
b680ee11f8 Revert "remove qemu/util/qemu-timer-common.c"
This reverts commit 934fa2c90f.
2016-12-19 20:30:46 +08:00
Nguyen Anh Quynh
5f81c00559 Merge branch 'noglib' of https://github.com/cseagle/unicorn into cseagle-noglib 2016-12-19 17:32:27 +08:00
Nguyen Anh Quynh
934fa2c90f remove qemu/util/qemu-timer-common.c 2016-12-19 17:29:25 +08:00
Chris Eagle
5690b7b68f annotate the hash functions 2016-12-18 19:45:09 -08:00
Chris Eagle
c7bd120650 imlpement key destroy and value destroy callbacks in hash tables 2016-12-18 15:28:11 -08:00
Chris Eagle
e46545f722 remove glib dependency by provide compatible replacements 2016-12-18 14:56:58 -08:00
Nguyen Anh Quynh
e1b65a6edb cleanup unused code 2016-11-19 23:48:23 +08:00
Nguyen Anh Quynh
1f65b76fbd fix some compilation warnings regarding typcase of (CPUState *) 2016-10-26 17:05:26 +08:00
Nguyen Anh Quynh
c59e06d798 mips: fix some compilation warnings 2016-10-22 13:36:37 +08:00
Nguyen Anh Quynh
4083b87032 add new hook type UC_HOOK_MEM_READ_AFTER, adapted from PR #399 by @farmdve. updated all bindings, except Ruby & Haskell 2016-10-22 11:19:55 +08:00
Nguyen Anh Quynh
2a608c778e sparc: fix an compilation warning 2016-10-21 22:32:02 +08:00
Fish
ad7ae63e92 Remove unmapped/freed memory regions from the object property list.
This commit fixes the following issues:
- Any unmapped/free'd memory regions (MemoryRegion instances) are not
  removed from the object property linked list of its owner (which is
  always qdev_get_machine(uc)). This issue makes adding new memory
  mapping by calling mem_map() or mem_map_ptr() slower as more and more
  memory pages are mapped and unmapped - yes, even if those memory pages
  are unmapped, they still impact the speed of future memory page
  mappings due to this issue.
- FlatView is not reconstructed after a memory region is freed during
  unmapping, which leads to a use-after-free the next time a new memory
  region is mapped in address_space_update_topology().
2016-10-20 03:48:58 -07:00
Nguyen Anh Quynh
b7cdbe7a88 Merge branch 'feat/reg_save_restore' of https://github.com/rhelmot/unicorn into rhelmot-feat/reg_save_restore 2016-10-07 09:57:07 +08:00
danghvu
fb9cd97504 memleak: Fix m68k memleak 2016-10-03 14:47:03 -05:00
danghvu
84d99412bc memleak: Fix Sparc memory leak 2016-10-03 14:23:27 -05:00
Nguyen Anh Quynh
7d15a60b25 arm64: disable deadcode introduced by PR #643 2016-09-29 12:34:44 +08:00
Nguyen Anh Quynh
507d557aa5 arm: disable deadcode introduced by PR #643 2016-09-29 12:33:16 +08:00
Ryan Hileman
cb615fdba7 remove uc->cpus 2016-09-23 07:38:21 -07:00
Nguyen Anh Quynh
69d976375e Merge branch 'fix/self_modifying' of https://github.com/rhelmot/unicorn into rhelmot-fix/self_modifying 2016-08-30 21:20:22 +08:00
Nguyen Anh Quynh
8b030ae51a fix for issue #523 2016-08-27 21:49:11 +08:00
Nguyen Anh Quynh
89c9ea5f8f Merge branch 'fix/eflags' of https://github.com/rhelmot/unicorn into rhelmot-fix/eflags 2016-08-24 16:13:31 +08:00
Nguyen Anh Quynh
40ea64af19 Merge branch 'feat/xmm_regs' of https://github.com/rhelmot/unicorn into rhelmot-feat/xmm_regs 2016-08-23 06:52:45 +08:00
Nguyen Anh Quynh
8e1102f741 Merge pull request #620 from rhelmot/feat/invalid_floatx80_check
Port patch from upstream to check for invalid long double encodings
2016-08-21 09:48:26 +08:00
Andrew Dutcher
1f5d14df4d Port patch from upstream to check for invalid long double encodings 2016-08-20 11:31:46 -07:00
Andrew Dutcher
0ef2b5fd71 New feature: registers can be bulk saved/restored in an opaque blob 2016-08-20 04:14:07 -07:00
Ryan Hileman
f99030179c fix free() -> g_free() 2016-08-11 07:49:19 -07:00
Andrew Dutcher
3a1f231e8f eflags patch 2016-08-09 19:38:44 -07:00
Andrew Dutcher
97b10da133 Undo the disaster that was the patch to unicorn github issue #266 and fix it correctly. makes normal self-modifying code work. 2016-08-09 19:35:20 -07:00
Andrew Dutcher
4a8f52ae7f support xmm registers 2016-08-09 19:34:34 -07:00
Nguyen Anh Quynh
fd39ec465b arm: sync env.uc->thumb with env.thumb in arm_reg_write() 2016-07-30 13:21:44 +08:00
Nguyen Anh Quynh
a59f54ca72 Merge branch 'master' of https://github.com/esanfelix/unicorn into esanfelix-master 2016-07-30 13:18:37 +08:00
Nguyen Anh Quynh
c61aff1dbe mips: remove an unused variable 2016-07-15 15:12:15 +08:00
danghvu
bb8f894872 windows: Remove unnecessary mman inclusion (issue #587) 2016-07-11 13:35:49 -05:00
Hoang-Vu Dang
b9a10152f1 memleak: code_gen_buffer using g_free for non-linux 2016-07-11 10:13:13 -05:00
danghvu
27e0699ef5 mips: Fix memleak 2016-07-09 20:16:00 -05:00
danghvu
117a318188 memleak: missing from refactoring 2016-07-08 12:49:43 -05:00
danghvu
6b9f17f2f7 memleak: refactor unicorn_common.h, move stuff to uc_close 2016-07-08 11:16:23 -05:00
danghvu
ada1c13662 Fix memleak: do not re-initialize halt_cond 2016-07-06 01:49:10 -05:00
Hoang-Vu Dang
de5786f98d Fix memleak: code_gen_buffer 2016-07-05 23:48:02 -05:00
Hoang-Vu Dang
9a2a5b15d8 Rename unhandled CPU exception 2016-07-05 11:10:39 -05:00
Hoang-Vu Dang
9cdca5a32b Unhandled interrupt will halt execution 2016-07-04 17:07:57 -05:00
Eloi Sanfelix
3a1c13fda9 Set thumb mode based on PC value in ARM. Mask off last bit of PC. 2016-06-17 13:46:34 +02:00
Nguyen Anh Quynh
40ac55cf74 Merge branch 'drop-zlib' of https://github.com/radare/unicorn into radare-drop-zlib 2016-06-15 16:41:13 +07:00
pancake
fe96e8325b Remove unused zlib dependency 2016-06-15 09:24:16 +02:00
mkravchik
4b45869437 Reading and writing NEON registers 2016-05-04 11:23:32 +03:00
Nguyen Anh Quynh
f4723916df remove qemu_cond_destroy from qemu/header_gen.py 2016-04-23 10:23:09 +08:00
Nguyen Anh Quynh
72ba554738 qemu_thread_join() takes only 1 arg 2016-04-23 10:17:04 +08:00
Nguyen Anh Quynh
3a742fb6f6 fix conflicts when merging no-thread to master 2016-04-23 10:06:57 +08:00
Nguyen Anh Quynh
8932463f9d arm: qutie emulation on EXCP_YIELD exception. this fixes testcase 004-segmentation_fault_1 in #520 2016-04-20 12:04:15 +08:00
Nguyen Anh Quynh
cc6cbc5cf7 Merge branch 'memleak' into m2 2016-04-18 12:48:13 +08:00
Nguyen Anh Quynh
ba31be79f4 update qemu/powerpc.h 2016-04-17 23:37:25 +08:00
Nguyen Anh Quynh
47a7bb3c9f Merge branch 'smaller_nothreads' of https://github.com/cseagle/unicorn into cseagle-smaller_nothreads 2016-04-17 23:37:06 +08:00
Nguyen Anh Quynh
721f17eb74 Merge branch 'batch_reg' of https://github.com/lunixbochs/unicorn into lunixbochs-batch_reg 2016-04-06 09:39:22 +08:00
Nguyen Anh Quynh
70da2485fc x86: comment out restore_eflags() because it breaks some executions. see #505 2016-04-06 09:36:06 +08:00
Ryan Hileman
acd88856e1 add batched reg access 2016-04-04 20:51:38 -07:00
Ryan Hileman
66619fc6cd remove call to restore_eflags (#496) 2016-04-03 23:08:17 -07:00
Chris Eagle
3add48feb5 Merge branch 'master' into smaller_nothreads 2016-03-25 19:47:52 -07:00
Chris Eagle
6991d69dad merge from upstream 2016-03-25 19:46:44 -07:00
Ryan Hileman
977863401e static -> dynamic code buffer, and shrink 32M->8M 2016-03-25 18:28:03 -07:00
Chris Eagle
9467254fc0 strip out per cpu thread code 2016-03-25 17:24:28 -07:00
Ryan Hileman
f0af8f8282 execute cpus in same thread as uc_emu_start()
note: I'm sure this makes some dead code
2016-03-23 22:50:56 -07:00
Chris Eagle
4c4203cec8 fix x86 segment setup by updating cached segment registers on reg_write 2016-03-22 23:54:30 -07:00
Nguyen Anh Quynh
859111f8f5 x86: return immediately after handling FPSW/FPCW/FPTAG registers 2016-03-20 18:15:41 +08:00
Nguyen Anh Quynh
fb1ebac000 Merge branch 'master' into m1 2016-03-09 15:13:42 +08:00
Hiroyuki UEKAWA
c5888e5670 move macros in qemu/target-*/unicorn*.c to uc_priv.h 2016-03-02 12:43:02 +09:00
Hiroyuki UEKAWA
1cd3c3093b fix WRITE_BYTE_H 2016-03-02 10:51:50 +09:00
Jonas Zaddach
5fa6705d7a Fixed restoring of eflags after helper call 2016-02-29 22:57:41 +01:00
Nguyen Anh Quynh
b69feb8d0b Merge branch 'master' into memleak2 2016-02-15 15:52:10 +08:00
Nguyen Anh Quynh
8962adc9c5 sparc: use power_down to terminate emulation, rather than using trap. this fix hangup issue of tests/regress/sparc_reg.py 2016-02-15 15:51:14 +08:00
Nguyen Anh Quynh
3bd7fa4bfe chmod -x qemu/target-i386/unicorn.c 2016-02-12 13:48:58 +08:00
coco
95beec805c fixed memcpy that should be memmove 2016-02-11 16:38:50 +01:00
Nguyen Anh Quynh
b6897e2015 fix a compilation warning 2016-02-11 09:19:08 +08:00
Nguyen Anh Quynh
6478a24404 Merge branch 'gdt_idt' of https://github.com/cseagle/unicorn into cseagle-gdt_idt 2016-02-06 17:31:42 +08:00
Nguyen Anh Quynh
e73cbf1c88 arm: UC_QUERY_MODE return hardware mode (see issue #397) 2016-02-06 09:47:57 +08:00
Chris Eagle
dec3615d12 ldtr and tr limit is 20 bits, not 16 bits 2016-02-04 19:26:47 -08:00
Chris Eagle
b49358524f fix reg_read casting for x86 segment registers 2016-02-04 19:22:39 -08:00
Chris Eagle
4cb43be5bf fix reg_read casting for x86 segment registers 2016-02-04 19:20:59 -08:00
Chris Eagle
49b9f4f8da uc_x86_mmr type available in qemu/target-i386/unicorn.c 2016-02-04 19:09:41 -08:00
Chris Eagle
c339ced218 file perms 2016-02-04 17:18:24 -08:00
Chris Eagle
f3dc2522a0 read/write of x86 segment registers should modify selector field not base field 2016-02-04 17:17:40 -08:00
Chris Eagle
59f7bf3be7 file perms 2016-02-04 16:48:27 -08:00
Chris Eagle
e59382e030 updated gdtr/idtr/ldtr/tr read/write code 2016-02-04 16:44:52 -08:00
Chris Eagle
9977054a15 add support for setting gdtr, idtr, ldtr, and tr programatically 2016-02-03 09:22:29 -08:00
Nguyen Anh Quynh
20b01a6933 fix merge conflict 2016-02-01 12:08:38 +08:00
Nguyen Anh Quynh
cfaac6921b c89 2016-02-01 12:05:46 +08:00
danghvu
36e53ad8a1 Fix arm & arm64 memleaks 2016-01-31 16:22:20 -06:00
Nguyen Anh Quynh
c8569d8128 arm: fix change PC feature. now tests/regress/callback-pc.py passes 2016-01-28 16:03:19 +08:00
Nguyen Anh Quynh
5a04bcb115 allow to change PC during callback. this solves issue #210 2016-01-28 14:06:17 +08:00
Nguyen Anh Quynh
e750a4e97c when uc_mem_exec() remove EXE permission, quit current TB & continue emulating with TB flushed. this fixes issue in PR #378 2016-01-28 00:56:55 +08:00
Nguyen Anh Quynh
48ab148d1c Merge branch 'hook' 2016-01-26 22:52:29 +08:00
Nguyen Anh Quynh
2341f5dd1a code style 2016-01-26 17:37:48 +08:00
Willi Ballenthin
a640b76b94 qemu-thread-posix: bail on mutex errors
partially addresses #400
2016-01-24 22:46:13 -05:00
Nguyen Anh Quynh
6f3d48077e rename UC_QUERY_ARM_MODE to a more generic name UC_QUERY_MODE. make all bindings support this new constant 2016-01-24 01:08:23 +08:00
Nguyen Anh Quynh
4dbad9aa9b add new API uc_query() to query internal status of emulator at runtime 2016-01-23 17:14:44 +08:00
Nguyen Anh Quynh
38d1443504 Merge branch 'hook-refactor' of https://github.com/lunixbochs/unicorn into lunixbochs-hook-refactor 2016-01-23 13:24:12 +08:00
Ryan Hileman
2ac1281f82 rework code/block tracing 2016-01-22 19:07:50 -08:00
Nguyen Anh Quynh
249e2ac0a0 Merge branch 'hook-refactor' of https://github.com/lunixbochs/unicorn into lunixbochs-hook-refactor 2016-01-23 10:58:37 +08:00
Ryan Hileman
0886ae8ede rework code/block tracing 2016-01-22 18:42:27 -08:00
Ryan Hileman
93052f6566 refactor to allow multiple hooks for one type 2016-01-22 18:41:43 -08:00
xorstream
b4b83ff207 moar fixes 2016-01-23 12:56:47 +11:00
xorstream
d8aaa2f44c Fixes to runtime arm mask checks 2016-01-23 12:44:12 +11:00
xorstream
678d645b80 Fix uc_mode usage in source code 2016-01-23 12:29:22 +11:00
xorstream
8763d426c2 Fix uc_mode usage in source code 2016-01-23 12:08:49 +11:00
Nguyen Anh Quynh
6490b4f2a9 arm64: fix the issue of multiple definition of aarch64_tb_set_jmp_target (issue #387) 2016-01-22 22:44:18 +08:00
Nguyen Anh Quynh
309abbe453 remove qemu/config-all-disas.mak 2016-01-22 17:11:57 +08:00
Nguyen Anh Quynh
3eb51116b9 arm64: fix the access to tcg_op_defs[] in arm64 backend (issue #387) 2016-01-22 11:35:01 +08:00
Nguyen Anh Quynh
840eb54f05 Revert "arm64: fix the access to tcg_op_defs[] in arm64 backend (issue #387)"
This reverts commit 3000ca6abf.
2016-01-22 11:33:36 +08:00
Nguyen Anh Quynh
3000ca6abf arm64: fix the access to tcg_op_defs[] in arm64 backend (issue #387) 2016-01-22 11:33:28 +08:00
Nguyen Anh Quynh
07bd81bda6 do not redefine tb_set_jmp_target1. this partly fixes issue #387 2016-01-22 11:29:22 +08:00
Nguyen Anh Quynh
839ef672b0 only declare use_idiv_instructions_rt when __ARM_ARCH_EXT_IDIV__ is not defined 2016-01-19 00:19:28 +08:00
Nguyen Anh Quynh
3b52af4fbd avoid confusion between macro & variable use_idiv_instructions (ARM backend) 2016-01-18 23:53:50 +08:00
Nguyen Anh Quynh
d9249b91c2 add some missing symbols for ARM backend 2016-01-18 20:42:45 +08:00
petevine
8db7f79daf Finish adding getauxval 2016-01-18 12:48:49 +01:00
petevine
1bf85461c2 Add getauxval.c back 2016-01-18 12:47:32 +01:00
Nguyen Anh Quynh
7695fb1578 x86: no need to reset env->invalid_error in x86_reg_reset() as we always do that in cpu_exec() 2016-01-12 01:01:11 +08:00
farmdve
c9f4bd27cc Reset env->invalid_error before executing a translation block. 2016-01-11 18:12:57 +02:00
Nguyen Anh Quynh
a0aa26d6ee c89 2016-01-10 23:34:36 +08:00
Nguyen Anh Quynh
580bc7b56a cleanup 2016-01-10 23:10:00 +08:00
farmdve
036763d6ae Fix memory leaks as reported by DrMemory and Valgrind.
ARM and probably the rest of the arches have significant memory leaks as
they have no release interface.

Additionally, DrMemory does not have 64-bit support and thus I can't
test the 64-bit version under Windows. Under Linux valgrind supports
both 32-bit and 64-bit but there are different macros and code for Linux
and Windows.
2016-01-08 01:42:56 +02:00
Nguyen Anh Quynh
13726b3d40 Merge branch 'master' into cygwin 2016-01-07 23:17:32 +07:00
farmdve
2304bbfc96 Remove more instances of tcg_register_jit 2016-01-07 16:39:41 +02:00
Nguyen Anh Quynh
bfeb08d1ba fix some compilation warning 2016-01-06 14:11:21 +08:00
Nguyen Anh Quynh
e8a295991f update qemu/header_gen.py 2016-01-06 00:44:29 +07:00
Nguyen Anh Quynh
e0cb02569e remove unused tcg_register_jit() and related code 2016-01-05 16:02:34 +07:00
Nguyen Anh Quynh
075ccadbe9 x86: set s->pc in disas_insn() early to fix uninitialized read issue. bug reported by @farmdve 2016-01-03 08:25:51 +07:00
Nguyen Anh Quynh
19930b0514 spaces 2016-01-01 14:15:01 +08:00
Nguyen Anh Quynh
b3ebd1b7cb Merge branch 'master' of https://github.com/iroiro123/unicorn into iroiro123-master 2016-01-01 14:01:39 +08:00
Nguyen Anh Quynh
f935469658 mips: handle memory redirect for all APIs. this fixes issue #347 2015-12-28 15:19:30 +08:00
Nguyen Anh Quynh
f10d79e95f x86: fix a compilation warning on unused variable 2015-12-28 13:06:25 +08:00
Nguyen Anh Quynh
b5feddbf1e indentation 2015-12-28 13:04:59 +08:00
Nguyen Anh Quynh
99b401c609 Merge branch 'la-fixed' of https://github.com/JCYang/unicorn into JCYang-la-fixed 2015-12-28 12:21:31 +08:00
Spl3en
bb375e4fa9 Reset correctly the register CR0 in protected mode by calling cpu_x86_update_cr0 instead of setting it manually. 2015-12-25 04:55:15 +01:00
Spl3en
9ca993d8aa Restore the protected mode check. 2015-12-24 18:39:19 +01:00
Spl3en
4c3ad139ea (Fix #341) SYSENTER instruction is not properly hooked with uc_hook_add in x86 emulation.
helper_sysenter in qemu/target-i386/seg_helper.c didn't check properly if a call interrupt callback was registred.
It has been fixed by copying the helper_syscall behavior.
2015-12-24 16:00:22 +01:00
Nguyen Anh Quynh
ed319bda0b x86: identity map guest address to host address. this fixes issue #300 2015-12-24 09:51:17 +08:00
Nguyen Anh Quynh
4117a111eb mips: handle hook callback for blikely instruction properly. this fixes issue #330, #331 2015-12-23 01:40:03 +08:00
JC Yang
8ef018a2cb Fix possible wrong conditional branch in generated host code by fixing
the tcg_liveness_analysis().
Refer to https://github.com/unicorn-engine/unicorn/issues/287 for further info.
2015-12-21 18:01:01 +08:00
Hiroyuki Uekawa
6445c80b29 Build for Cygwin 2015-12-20 22:00:35 +09:00
Nguyen Anh Quynh
b72671c6d5 sparc, arm, m68k: check for exit request after every hooked instruction 2015-12-20 12:28:15 +08:00
Nguyen Anh Quynh
4f268febb4 mips: check for exit request after every hooked instruction. this fix issue #329 2015-12-20 12:23:36 +08:00
Nguyen Anh Quynh
771f9f7c3b fix conflicts when merging map-ptr branch to master branch 2015-12-17 08:12:02 +08:00
Nguyen Anh Quynh
8d3265d9e1 mips: remove unused variable is_bc_slot 2015-12-16 23:06:17 +08:00
xorstream
395251d3e8 Fix codehook for MIPS instructions in delay slot 2015-12-15 17:02:56 +11:00
Nguyen Anh Quynh
74aeef217c Merge branch 'master' of https://github.com/unicorn-engine/unicorn 2015-12-13 13:11:54 +08:00
Nguyen Anh Quynh
bc63102e50 mips: only patch instruction size when there is a callback on the instruction. this fixes issue #282 2015-12-13 13:11:40 +08:00
farmdve
8b79a872d0 Fix segfault introduced in my previous commits. 2015-12-11 22:35:25 +02:00