On 09/11/2017 06:44 PM, Kamil Rytarowski wrote:
On 11.09.2017 23:33, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
---
cleaning while here :)
accel/tcg/user-exec.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 2a975eaf69..484a3f5f8f 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -25,15 +25,6 @@
#include "exec/cpu_ldst.h"
#include "translate-all.h"
-#undef EAX
-#undef ECX
-#undef EDX
-#undef EBX
-#undef ESP
-#undef EBP
-#undef ESI
-#undef EDI
-#undef EIP
#ifdef __linux__
#include <sys/ucontext.h>
#endif
@@ -131,6 +122,15 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned
long address,
}
#if defined(__i386__)
+#undef EAX
+#undef ECX
+#undef EDX
+#undef EBX
+#undef ESP
+#undef EBP
+#undef ESI
+#undef EDI
+#undef EIP
#if defined(__NetBSD__)
#include <ucontext.h>
Why to move under i386?
I tracked the origin of these #defines in op-i386.c (7bfdb6d18c7b) and
thought the Exx naming was for i386 while the x86_64 uses the Rxx naming
(RAX .. RIP) so you'd only have them on i386 arch.
However it seems I didn't realize you can access x86_64 registers in
32-bit mode via the EAX .. EIP naming, as you see I'm not confident with
this CISC arch :S
So I guess it's best to ignore this patch?
SmartOS pollutes namespace with these symbols on x86_64.
you should provide some VM :P
I plan to test this project soon:
https://www.packer.io/docs/builders/qemu.html
Regards,
Phil.