From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzt0w-0001iu-4M for qemu-devel@nongnu.org; Tue, 02 Jun 2015 16:42:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzt0s-0003nv-2i for qemu-devel@nongnu.org; Tue, 02 Jun 2015 16:42:22 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:33179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzt0r-0003np-To for qemu-devel@nongnu.org; Tue, 02 Jun 2015 16:42:18 -0400 Received: by qkhg32 with SMTP id g32so108299780qkh.0 for ; Tue, 02 Jun 2015 13:42:17 -0700 (PDT) Sender: Richard Henderson Message-ID: <556E1525.9020302@twiddle.net> Date: Tue, 02 Jun 2015 13:42:13 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1433193897-24110-1-git-send-email-aurelien@aurel32.net> <1433193897-24110-10-git-send-email-aurelien@aurel32.net> <556DE2D7.5000005@twiddle.net> <20150602190534.GD26129@aurel32.net> In-Reply-To: <20150602190534.GD26129@aurel32.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/13] target-s390x: implement TRANSLATE EXTENDED instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org, Alexander Graf On 06/02/2015 12:05 PM, Aurelien Jarno wrote: >> But why don't we just pass and return (most) of the data to the helper? Like >> >> C(0xb2a5, TRE, RRE, Z, 0, r2, r1_P, 0, tre, 0) >> >> potential_page_fault(s); >> gen_helper_tre(o->out, cpu_env, o->out, o->out2, o->in2); >> return_low128(o->out2); >> set_cc_static(s); > > My point was that we need to pass 4 values (reg0, r1, r1+1 and r2) and > return 3 values (r1, r1+1 and cc), so it's probably better to pass all > of them the same way. It's the strategy chosen for other similar > instructions (e.g mvcl), except for cc. > > I'll change that in the next version. The reg0 and cc data is at a fixed location, and are therefore more amenable to passing implicitly. It's r1, r1+1, and r2 that are in varying locations, and therefore you either have to pass their register number or their contents. For mvcl, there are 5 return values, so we're pretty much stuck passing register numbers. r~