* [Qemu-devel] 64-bit target @ 2003-06-29 12:42 Johan Rydberg 2003-06-29 13:22 ` Fabrice Bellard 0 siblings, 1 reply; 6+ messages in thread From: Johan Rydberg @ 2003-06-29 12:42 UTC (permalink / raw) To: qemu-devel Hi, what changes has to be done to make QEMU support 64-bit targets? Any big overall changes needed at all? -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing Deftones - Minerva ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] 64-bit target 2003-06-29 12:42 [Qemu-devel] 64-bit target Johan Rydberg @ 2003-06-29 13:22 ` Fabrice Bellard 2003-06-29 18:32 ` Johan Rydberg 0 siblings, 1 reply; 6+ messages in thread From: Fabrice Bellard @ 2003-06-29 13:22 UTC (permalink / raw) To: qemu-devel Johan Rydberg wrote: > Hi, > > what changes has to be done to make QEMU support 64-bit targets? > Any big overall changes needed at all? No big changes, except that you must use a soft MMU if you want to use real 64 bit pointers. Fabrice. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] 64-bit target 2003-06-29 13:22 ` Fabrice Bellard @ 2003-06-29 18:32 ` Johan Rydberg 2003-06-29 21:15 ` Fabrice Bellard 0 siblings, 1 reply; 6+ messages in thread From: Johan Rydberg @ 2003-06-29 18:32 UTC (permalink / raw) To: qemu-devel Fabrice Bellard <fabrice.bellard@free.fr> wrote: : Johan Rydberg wrote: : > Hi, : > : > what changes has to be done to make QEMU support 64-bit targets? : > Any big overall changes needed at all? : : No big changes, except that you must use a soft MMU if you want to use : real 64 bit pointers. After doing a little research it seems that dyngen can not cope with 64-bit immediates. ie PARAMn can only be as large as sizeof (void *). This must of course be fixed for a 64-bit target. Any ideas how to fix it? -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing Track No09 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] 64-bit target 2003-06-29 18:32 ` Johan Rydberg @ 2003-06-29 21:15 ` Fabrice Bellard 2003-06-29 21:28 ` Johan Rydberg 0 siblings, 1 reply; 6+ messages in thread From: Fabrice Bellard @ 2003-06-29 21:15 UTC (permalink / raw) To: qemu-devel Johan Rydberg wrote: > Fabrice Bellard <fabrice.bellard@free.fr> wrote: > > : Johan Rydberg wrote: > : > Hi, > : > > : > what changes has to be done to make QEMU support 64-bit targets? > : > Any big overall changes needed at all? > : > : No big changes, except that you must use a soft MMU if you want to use > : real 64 bit pointers. > > After doing a little research it seems that dyngen can not cope with > 64-bit immediates. ie PARAMn can only be as large as sizeof (void *). > This must of course be fixed for a 64-bit target. Any ideas how to > fix it? You can just use two parameters and load two 32 bit values. Fabrice. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] 64-bit target 2003-06-29 21:15 ` Fabrice Bellard @ 2003-06-29 21:28 ` Johan Rydberg 2003-06-30 14:35 ` Johan Rydberg 0 siblings, 1 reply; 6+ messages in thread From: Johan Rydberg @ 2003-06-29 21:28 UTC (permalink / raw) To: qemu-devel Fabrice Bellard <fabrice.bellard@free.fr> wrote: : You can just use two parameters and load two 32 bit values. Declaring T0 as a long long, and trying to set it to an immediate value results in the following code: Which is a bit of an overhead I think :) void OPPROTO op_movdi_t0_uimm (void) { 34: 83 ec 14 sub $0x14,%esp T0 = (unsigned long long) (PARAM1 << 32 | PARAM2); 37: b8 00 00 00 00 mov $0x0,%eax 38: R_386_32 __op_param1 3c: 89 04 24 mov %eax,(%esp,1) 3f: 99 cltd 40: 8b 04 24 mov (%esp,1),%eax 43: 89 54 24 04 mov %edx,0x4(%esp,1) 47: 89 c2 mov %eax,%edx 49: 31 c0 xor %eax,%eax 4b: 89 04 24 mov %eax,(%esp,1) 4e: b8 00 00 00 00 mov $0x0,%eax 4f: R_386_32 __op_param2 53: 89 54 24 04 mov %edx,0x4(%esp,1) 57: 99 cltd 58: 89 44 24 08 mov %eax,0x8(%esp,1) 5c: 89 54 24 0c mov %edx,0xc(%esp,1) 60: 8b 04 24 mov (%esp,1),%eax 63: 8b 54 24 04 mov 0x4(%esp,1),%edx 67: 0b 44 24 08 or 0x8(%esp,1),%eax 6b: 0b 54 24 0c or 0xc(%esp,1),%edx 6f: 89 c6 mov %eax,%esi 71: 89 d7 mov %edx,%edi } 73: 83 c4 14 add $0x14,%esp 76: c3 ret 77: 90 nop -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing Track No03 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] 64-bit target 2003-06-29 21:28 ` Johan Rydberg @ 2003-06-30 14:35 ` Johan Rydberg 0 siblings, 0 replies; 6+ messages in thread From: Johan Rydberg @ 2003-06-30 14:35 UTC (permalink / raw) To: qemu-devel Johan Rydberg <jrydberg@night.trouble.net> wrote: : Fabrice Bellard <fabrice.bellard@free.fr> wrote: : : : You can just use two parameters and load two 32 bit values. : : Declaring T0 as a long long, and trying to set it to an immediate : value results in the following code: Which is a bit of an overhead : I think :) Using an union like this; union fast_move { struct { USI hi; USI lo; } s; UDI d; } x; And a macro like this; #define GET_UDI_FROM_PARAMS(p1, p2) (((union fast_move) { { (USI) p1, (USI) p2 } }).d) Reduces the code: void OPPROTO op_movdi_t0_uimm (void) { T0 = GET_UDI_FROM_PARAMS (PARAM1, PARAM2); } To: 00000034 <op_movdi_t0_uimm>: 34: b8 00 00 00 00 mov $0x0,%eax 35: R_386_32 __op_param1 39: ba 00 00 00 00 mov $0x0,%edx 3a: R_386_32 __op_param2 3e: 89 c6 mov %eax,%esi 40: 89 d7 mov %edx,%edi Can you figure out how to make it move to %esi and %edi directly? I can, for one, not. -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing Various Artists - Deftones / My Own Summer (Shove It) ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-06-30 14:39 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-06-29 12:42 [Qemu-devel] 64-bit target Johan Rydberg 2003-06-29 13:22 ` Fabrice Bellard 2003-06-29 18:32 ` Johan Rydberg 2003-06-29 21:15 ` Fabrice Bellard 2003-06-29 21:28 ` Johan Rydberg 2003-06-30 14:35 ` Johan Rydberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).