From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <10afea42a3af8daf8abd3b8e8775850e@quanstro.net> References: <10afea42a3af8daf8abd3b8e8775850e@quanstro.net> Date: Tue, 1 Sep 2009 11:51:29 +1000 Message-ID: <775b8d190908311851t701d860av587b7433bea29fcf@mail.gmail.com> From: Bruce Ellis To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] 8c vlong bug Topicbox-Message-UUID: 5dbd4922-ead5-11e9-9d60-3106f5b1d025 if it's my fault i'll fix it. it did screw up mod in a subtle way but that's been fixed. brucee On Tue, Sep 1, 2009 at 11:47 AM, erik quanstrom wrot= e: > temporarly out of time on this one. =A0it appears > from the assembly output that 8c multiplies by > 0 and not 1 when computing z a second time. > nonetheless, i haven't yet seen the problem. > > #include > #include > > void > main(void) > { > =A0 =A0 =A0 =A0int three, one; > =A0 =A0 =A0 =A0uvlong twelve, z; > > =A0 =A0 =A0 =A0one =3D 1; > =A0 =A0 =A0 =A0three =3D 3; > =A0 =A0 =A0 =A0twelve =3D 12; > > =A0 =A0 =A0 =A0z =3D one*(twelve - three); > =A0 =A0 =A0 =A0print("z =3D %llud\n", z); > > =A0 =A0 =A0 =A0z =3D (twelve - three) * one; > =A0 =A0 =A0 =A0print("z =3D %llud\n", z); > > =A0 =A0 =A0 =A0exits(0); > } > > output: > > z =3D 9 > z =3D 0 > > - erik > >