From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25563 invoked by alias); 10 May 2006 21:02:46 -0000 Received: (qmail 25555 invoked by uid 22791); 10 May 2006 21:02:45 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 21:02:43 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4AL2fGx014252 for ; Wed, 10 May 2006 17:02:41 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4AL2f7W026412 for ; Wed, 10 May 2006 17:02:41 -0400 Received: from [172.16.14.227] (IDENT:mUQpFp5uu8YRRVYay+qRc5TRyn7pD4vz@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4AL2fAc008545 for ; Wed, 10 May 2006 17:02:41 -0400 Message-ID: <446254F1.402@redhat.com> Date: Wed, 10 May 2006 21:02:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] trace_counter and GETMEM*, SETMEM* Content-Type: multipart/mixed; boundary="------------020405000802010007050305" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00022.txt.bz2 This is a multi-part message in MIME format. --------------020405000802010007050305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 272 I've committed the attached patch which makes cgen_bi_endian_cpu::trace_counter a virtual method in order to allow hooks in inherited classes. It also fixes an astonishing bug in that some of the GETMEM* and SETMEM* methods were reading/writing to insn memory. Dave --------------020405000802010007050305 Content-Type: text/plain; name="sid-cgen-cpu.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-cgen-cpu.ChangeLog" Content-length: 266 2006-05-10 Dave Brolley * cgen-cpu.h (trace_counter): Now virtual. (SETMEMBI): Write to data memory (class cgen_bi_endian_cpu, class cgen_bi_endian_cpu) (class cgen_bi_endian_cpu, class cgen_bi_endian_cpu): Read/write from data memory. --------------020405000802010007050305 Content-Type: text/plain; name="sid-cgen-cpu.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-cgen-cpu.patch.txt" Content-length: 2906 Index: sid/component/cgen-cpu/cgen-cpu.h =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/cgen-cpu.h,v retrieving revision 1.16 diff -c -p -r1.16 cgen-cpu.h *** sid/component/cgen-cpu/cgen-cpu.h 28 Oct 2005 19:53:33 -0000 1.16 --- sid/component/cgen-cpu/cgen-cpu.h 10 May 2006 20:54:25 -0000 *************** protected: *** 80,86 **** struct disassemble_info *info); static int cgen_symbol_at_address(bfd_vma addr, struct disassemble_info * info); // Counter tracing support ! void trace_counter (PCADDR pc); public: // Called by semantic code to perform branches. --- 80,86 ---- struct disassemble_info *info); static int cgen_symbol_at_address(bfd_vma addr, struct disassemble_info * info); // Counter tracing support ! virtual void trace_counter (PCADDR pc); public: // Called by semantic code to perform branches. *************** public: *** 128,134 **** inline void SETMEMBI(PCADDR pc, ADDR addr, BI value) { ! return this->write_insn_memory_1 (pc, addr, value); } inline void SETMEMQI(PCADDR pc, ADDR addr, QI value) --- 128,134 ---- inline void SETMEMBI(PCADDR pc, ADDR addr, BI value) { ! return this->write_data_memory_1 (pc, addr, value); } inline void SETMEMQI(PCADDR pc, ADDR addr, QI value) *************** public: *** 200,226 **** inline SF GETMEMSF(PCADDR pc, IADDR addr) { ! SI iv = this->read_insn_memory_4 (pc, addr); return * (SF *)(char *)(& iv); } inline void SETMEMSF(PCADDR pc, ADDR addr, SF value) { SI iv = * (SI *)(char *)(& value); ! return this->write_insn_memory_4 (pc, addr, iv); } inline DF GETMEMDF(PCADDR pc, IADDR addr) { ! DI iv = this->read_insn_memory_8 (pc, addr); return * (DF *)(char *)(& iv); } inline void SETMEMDF(PCADDR pc, ADDR addr, DF value) { DI iv = * (DI *)(char *)(& value); ! return this->write_insn_memory_8 (pc, addr, iv); } // IMEM: instruction memory calls --- 200,226 ---- inline SF GETMEMSF(PCADDR pc, IADDR addr) { ! SI iv = this->read_data_memory_4 (pc, addr); return * (SF *)(char *)(& iv); } inline void SETMEMSF(PCADDR pc, ADDR addr, SF value) { SI iv = * (SI *)(char *)(& value); ! return this->write_data_memory_4 (pc, addr, iv); } inline DF GETMEMDF(PCADDR pc, IADDR addr) { ! DI iv = this->read_data_memory_8 (pc, addr); return * (DF *)(char *)(& iv); } inline void SETMEMDF(PCADDR pc, ADDR addr, DF value) { DI iv = * (DI *)(char *)(& value); ! return this->write_data_memory_8 (pc, addr, iv); } // IMEM: instruction memory calls --------------020405000802010007050305--