From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bn0Lt-0000QO-KN for qemu-devel@nongnu.org; Tue, 20 Jul 2004 15:32:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bn0Lr-0000Pn-M6 for qemu-devel@nongnu.org; Tue, 20 Jul 2004 15:32:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bn0Lr-0000Pk-CY for qemu-devel@nongnu.org; Tue, 20 Jul 2004 15:32:35 -0400 Received: from [193.252.22.23] (helo=mwinf0804.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bn0Iz-0007JX-6K for qemu-devel@nongnu.org; Tue, 20 Jul 2004 15:29:37 -0400 Received: from bellard.org (ATuileries-112-1-1-66.w80-11.abo.wanadoo.fr [80.11.167.66]) by mwinf0804.wanadoo.fr (SMTP Server) with ESMTP id 93CEA180034E for ; Tue, 20 Jul 2004 21:29:35 +0200 (CEST) Message-ID: <40FD72A9.7050400@bellard.org> Date: Tue, 20 Jul 2004 21:29:45 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] small correction References: <20040720134912.3efb2ec3.jani@iv.ro> In-Reply-To: <20040720134912.3efb2ec3.jani@iv.ro> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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