From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwnRf-0002SK-Kc for qemu-devel@nongnu.org; Thu, 25 Aug 2011 23:51:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwnRe-0006po-Ay for qemu-devel@nongnu.org; Thu, 25 Aug 2011 23:51:03 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:52275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwnRe-0006ph-6H for qemu-devel@nongnu.org; Thu, 25 Aug 2011 23:51:02 -0400 Received: by pzk37 with SMTP id 37so4287277pzk.29 for ; Thu, 25 Aug 2011 20:51:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1314308722-14495-7-git-send-email-rth@twiddle.net> References: <1314308722-14495-1-git-send-email-rth@twiddle.net> <1314308722-14495-7-git-send-email-rth@twiddle.net> Date: Fri, 26 Aug 2011 04:51:00 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 6/6] target-alpha: Add high-resolution access to wall clock and an alarm. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Paolo Bonzini , qemu-devel@nongnu.org On 25 August 2011 22:45, Richard Henderson wrote: > @@ -1604,6 +1607,12 @@ static void gen_mfpr(int ra, int regno) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return; > =C2=A0 =C2=A0 } > > + =C2=A0 =C2=A0if (regno =3D=3D 250) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0/* WALL_TIME */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0gen_helper_get_time(cpu_ir[ra]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0return; > + =C2=A0 =C2=A0} > + > =C2=A0 =C2=A0 /* The basic registers are data only, and unknown registers > =C2=A0 =C2=A0 =C2=A0 =C2=A0are read-zero, write-ignore. =C2=A0*/ > =C2=A0 =C2=A0 if (data =3D=3D 0) { > @@ -1650,6 +1659,11 @@ static ExitStatus gen_mtpr(DisasContext *ctx, int = rb, int regno) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 gen_helper_halt(tmp); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return EXIT_PC_STALE; > > + =C2=A0 =C2=A0case 251: > + =C2=A0 =C2=A0 =C2=A0 =C2=A0/* ALARM */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0gen_helper_set_alarm(tmp); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0break; > + > =C2=A0 =C2=A0 default: > =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* The basic registers are data only, and unk= nown registers > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0are read-zero, write-ignore. =C2= =A0*/ Don't you need some magic around helper calls that read/write the time to keep -icount working? I don't understand this but Paolo does... -- PMM