From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEDwO-0006hL-8m for qemu-devel@nongnu.org; Sun, 21 Oct 2018 09:38:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEDwJ-0003Dc-Ut for qemu-devel@nongnu.org; Sun, 21 Oct 2018 09:38:47 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:38808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEDwJ-0003Ca-MC for qemu-devel@nongnu.org; Sun, 21 Oct 2018 09:38:43 -0400 Received: by mail-wr1-x442.google.com with SMTP id d10-v6so2443314wrs.5 for ; Sun, 21 Oct 2018 06:38:43 -0700 (PDT) From: Richard Henderson References: <20181019010625.25294-1-cota@braap.org> <20181019010625.25294-8-cota@braap.org> <38c8c109-c231-696e-2fb8-4fae6f3fb641@linaro.org> Message-ID: Date: Sun, 21 Oct 2018 14:38:38 +0100 MIME-Version: 1.0 In-Reply-To: <38c8c109-c231-696e-2fb8-4fae6f3fb641@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 07/56] target/m68k: rename cpu_halted to cpu_halt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" , qemu-devel@nongnu.org Cc: Paolo Bonzini , Laurent Vivier On 10/21/18 1:53 PM, Richard Henderson wrote: > On 10/19/18 2:05 AM, Emilio G. Cota wrote: >> To avoid a name clash with the soon-to-be-defined cpu_halted() helper. >> >> Cc: Laurent Vivier >> Signed-off-by: Emilio G. Cota >> --- >> target/m68k/translate.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) > > Although for this usage it's probably better to avoid the > tcg_global_mem_new_i32 and just use tcg_gen_st_i32. And, as I read further, you need to convert this use to a helper call. Otherwise you've still got an unlocked direct modification to cpu->halted from within the TCG generated code. There are several other targets that do the same thing: alpha, cris, hppa, mips, microblaze, ppc. And typically they will do exactly the same thing: set the flag and then raise the halt exception. r~