Skip to contentSkip to conversation

small correction

Qemu-devel Jani Monoses 2 participants 2 messages Jul 20, 2004

lore
Share & tools
lore
#0 lore raw

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

exec-all.h +2 -2
diff -u -r1.21 exec-all.h
@@ -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

exec.c +2 -2
diff -u -r1.44 exec.c
@@ -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;
 
#1 lore raw

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

Fabrice.

Quoted 52 lines · Jani Monoses

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 +2 -2
@@ -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 +2 -3
@@ -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
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel