[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions
From: |
Kamil Rytarowski |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions |
Date: |
Tue, 12 Sep 2017 00:37:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; NetBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 12.09.2017 00:13, Philippe Mathieu-Daudé wrote:
> 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?
>
A typical 64-bit x86_64 OS can run 32-bit programs and reuse x86 32-bit
headers.
>>
>> SmartOS pollutes namespace with these symbols on x86_64.
>>
>
> you should provide some VM :P
>
Hope to see it too.
> I plan to test this project soon:
> https://www.packer.io/docs/builders/qemu.html
>
> Regards,
>
> Phil.
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/, Philippe Mathieu-Daudé, 2017/09/11
- [Qemu-devel] [PATCH v2 1/5] tcg: Move softmmu_template.h to the accel/tcg/ folder, Philippe Mathieu-Daudé, 2017/09/11
- [Qemu-devel] [PATCH v2 2/5] tcg: move user-exec to accel/tcg/, Philippe Mathieu-Daudé, 2017/09/11
- [Qemu-devel] [PATCH v2 3/5] tcg: move tcg-runtime to accel/tcg/, Philippe Mathieu-Daudé, 2017/09/11
- [Qemu-devel] [PATCH v2 4/5] tcg: move atomic_template.h to accel/tcg/, Philippe Mathieu-Daudé, 2017/09/11
- [Qemu-devel] [PATCH v2 5/5] tcg: restrict i386 regs definitions, Philippe Mathieu-Daudé, 2017/09/11
- Re: [Qemu-devel] [PATCH v2 0/5] move user-exec, tcg-runtime, atomic_template.h to accel/tcg/, Richard Henderson, 2017/09/12