From 5c2f62657f41b59cbfdfa7d422120a97ec4d93f2 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 7 Apr 2023 12:45:32 +0200 Subject: [PATCH] Fixed float complex handling as parameter --- rebuild_wrappers.py | 2 +- src/include/complext.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rebuild_wrappers.py b/rebuild_wrappers.py index ccb15551..05d00d77 100755 --- a/rebuild_wrappers.py +++ b/rebuild_wrappers.py @@ -1094,7 +1094,7 @@ def main(root: str, files: Iterable[Filename], ver: str): vreg = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 2, 2, 0, 1, 0, 0] # vxmm: value is in a XMM register # E v c w i I C W u U f d D K l L p V O S N M H P A x X - vxmm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2] + vxmm = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2] # vother: value is elsewere # E v c w i I C W u U f d D K l L p V O S N M H P A x X vother = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0] diff --git a/src/include/complext.h b/src/include/complext.h index 3893268d..0866da25 100644 --- a/src/include/complext.h +++ b/src/include/complext.h @@ -12,7 +12,7 @@ typedef struct complexf_s { float r; float i;} complexf_t; inline complexf_t to_complexf(x64emu_t* emu, int i) { complexf_t ret; ret.r = emu->xmm[i].f[0]; - ret.i = emu->xmm[i+1].f[0]; + ret.i = emu->xmm[i].f[1]; return ret; } inline complex_t to_complex(x64emu_t* emu, int i) {