|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions |
Date: | Mon, 11 Sep 2017 19:13:39 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
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é <address@hidden> --- 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.
[Prev in Thread] | Current Thread | [Next in Thread] |