From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aU3id-0007rv-MH for qemu-devel@nongnu.org; Thu, 11 Feb 2016 21:44:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aU3ia-00035j-Gw for qemu-devel@nongnu.org; Thu, 11 Feb 2016 21:44:27 -0500 Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]:36387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aU3ia-00035f-8X for qemu-devel@nongnu.org; Thu, 11 Feb 2016 21:44:24 -0500 Received: by mail-pa0-x22b.google.com with SMTP id yy13so38814882pab.3 for ; Thu, 11 Feb 2016 18:44:24 -0800 (PST) Sender: Richard Henderson References: <1455206520-6465-1-git-send-email-kbastian@mail.uni-paderborn.de> <1455206520-6465-2-git-send-email-kbastian@mail.uni-paderborn.de> From: Richard Henderson Message-ID: <56BD4701.1060106@twiddle.net> Date: Fri, 12 Feb 2016 13:44:17 +1100 MIME-Version: 1.0 In-Reply-To: <1455206520-6465-2-git-send-email-kbastian@mail.uni-paderborn.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bastian Koppelmann , qemu-devel@nongnu.org On 02/12/2016 03:01 AM, Bastian Koppelmann wrote: > +static inline void > +generate_trap(DisasContext *ctx, int class, int tin) > +{ > + TCGv_i32 classtemp = tcg_const_i32(class); > + gen_save_pc(ctx->pc); > + /* upper context cannot be saved, if the context list is empty */ > + if (class != TRAPC_SYSCALL) { > + gen_helper_svucx(cpu_env); > + } > + /* Tin is loaded into d[15] */ > + tcg_gen_movi_tl(cpu_gpr_d[15], tin); > + /* The return address in A[11] is updated. */ > + if (class == TRAPC_SYSCALL) { > + tcg_gen_movi_tl(cpu_gpr_a[11], ctx->next_pc); > + } else { > + tcg_gen_movi_tl(cpu_gpr_a[11], ctx->pc); > + } > + gen_helper_raise_exception_err(cpu_env, classtemp, 0); > + tcg_temp_free(classtemp); > +} Again, drop the inline. Missing ctx->bstate = BS_EXCP. r~