From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmicW-0001XH-7y for qemu-devel@nongnu.org; Mon, 27 Apr 2015 08:58:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmicR-0008Mb-9x for qemu-devel@nongnu.org; Mon, 27 Apr 2015 08:58:44 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:35514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmicR-0008MJ-5T for qemu-devel@nongnu.org; Mon, 27 Apr 2015 08:58:39 -0400 Received: by igbyr2 with SMTP id yr2so61560333igb.0 for ; Mon, 27 Apr 2015 05:58:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <553E2571.2000700@msgid.tls.msk.ru> References: <553E2571.2000700@msgid.tls.msk.ru> From: Peter Maydell Date: Mon, 27 Apr 2015 13:58:18 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH target-arm 2/2] arm: cpu.h: Delete unused cpu_pc_from_tb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: QEMU Trivial , Peter Crosthwaite , QEMU Developers , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Peter Crosthwaite On 27 April 2015 at 13:02, Michael Tokarev wrote: > 27.04.2015 04:38, Peter Crosthwaite wrote: >> No code uses the cpu_pc_from_tb() function. Delete. >> >> Signed-off-by: Peter Crosthwaite >> --- >> target-arm/cpu.h | 9 --------- >> 1 file changed, 9 deletions(-) >> >> diff --git a/target-arm/cpu.h b/target-arm/cpu.h >> index 7069103..c9c5d30 100644 >> --- a/target-arm/cpu.h >> +++ b/target-arm/cpu.h >> @@ -1874,15 +1874,6 @@ static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc, >> >> #include "exec/exec-all.h" >> >> -static inline void cpu_pc_from_tb(CPUARMState *env, TranslationBlock *tb) > > This function is also used in target-tricore/cpu.h, and is mentioned > in comments in tcg/tcg.h. Should these be removed as well? The tcg/tcg.h comment should be updated: * Otherwise, we gave up on execution of this TB before it started, and * the caller must fix up the CPU state by calling the CPU's * synchronize_from_tb() method with the next-TB pointer we return. * (falling back to calling the CPU's set_pc() method with tb->pc * if no synchronize_from_tb() method exists.) That's a bit clunky though, which suggests we should have a cpu_synchronize_from_tb() inline function in qom/cpu.h which does the CPUClass *cc = CPU_GET_CLASS(cpu); if (cc->synchronize_from_tb) { cc->synchronize_from_tb(cpu, tb); } else { assert(cc->set_pc); cc->set_pc(cpu, tb->pc); } bit that cpu-exec.c currently open-codes. -- PMM