qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] small correction
@ 2004-07-20 10:49 Jani Monoses
  2004-07-20 19:29 ` Fabrice Bellard
  0 siblings, 1 reply; 2+ messages in thread
From: Jani Monoses @ 2004-07-20 10:49 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 112 bytes --]

io_mem_read and io_mem_write's second dimension is 3 not 4 since there are 3
functions - byte,word,dword.

Jani

[-- Attachment #2: ,l.diff --]
[-- Type: text/x-diff, Size: 1214 bytes --]

Index: exec-all.h
===================================================================
RCS file: /cvsroot/qemu/qemu/exec-all.h,v
retrieving revision 1.21
diff -u -r1.21 exec-all.h
--- exec-all.h	10 Jul 2004 15:15:39 -0000	1.21
+++ exec-all.h	20 Jul 2004 10:47:37 -0000
@@ -382,8 +382,8 @@
 
 #endif
 
-extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
-extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
+extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][3];
+extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][3];
 extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
 
 #ifdef __powerpc__
Index: exec.c
===================================================================
RCS file: /cvsroot/qemu/qemu/exec.c,v
retrieving revision 1.44
diff -u -r1.44 exec.c
--- exec.c	5 Jul 2004 21:25:10 -0000	1.44
+++ exec.c	20 Jul 2004 10:47:39 -0000
@@ -115,8 +115,8 @@
 #endif
 
 /* io memory support */
-CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
-CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
+CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][3];
+CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][3];
 void *io_mem_opaque[IO_MEM_NB_ENTRIES];
 static int io_mem_nb;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] small correction
  2004-07-20 10:49 [Qemu-devel] small correction Jani Monoses
@ 2004-07-20 19:29 ` Fabrice Bellard
  0 siblings, 0 replies; 2+ messages in thread
From: Fabrice Bellard @ 2004-07-20 19:29 UTC (permalink / raw)
  To: qemu-devel

This is not a bug. It is an optimisation to have 16 byte alignment for 
faster array accesses.

Fabrice.

Jani Monoses wrote:
> io_mem_read and io_mem_write's second dimension is 3 not 4 since there are 3
> functions - byte,word,dword.
> 
> Jani
> 
> 
> ------------------------------------------------------------------------
> 
> Index: exec-all.h
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/exec-all.h,v
> retrieving revision 1.21
> diff -u -r1.21 exec-all.h
> --- exec-all.h	10 Jul 2004 15:15:39 -0000	1.21
> +++ exec-all.h	20 Jul 2004 10:47:37 -0000
> @@ -382,8 +382,8 @@
>  
>  #endif
>  
> -extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
> -extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
> +extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][3];
> +extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][3];
>  extern void *io_mem_opaque[IO_MEM_NB_ENTRIES];
>  
>  #ifdef __powerpc__
> Index: exec.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/exec.c,v
> retrieving revision 1.44
> diff -u -r1.44 exec.c
> --- exec.c	5 Jul 2004 21:25:10 -0000	1.44
> +++ exec.c	20 Jul 2004 10:47:39 -0000
> @@ -115,8 +115,8 @@
>  #endif
>  
>  /* io memory support */
> -CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4];
> -CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4];
> +CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][3];
> +CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][3];
>  void *io_mem_opaque[IO_MEM_NB_ENTRIES];
>  static int io_mem_nb;
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-20 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-20 10:49 [Qemu-devel] small correction Jani Monoses
2004-07-20 19:29 ` Fabrice Bellard

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).