From: Arno P. <ar...@pu...> - 2011-04-03 23:02:53
|
actually, result == a - truncf(a / b) * b. <xsl:template match="dex:rem-float|dex:rem-float-2addr"> <xsl:text> _r</xsl:text> <xsl:value-of select="@vx"/> <xsl:text>.f = _r</xsl:text> <xsl:value-of select="@vy"/> <xsl:text>.f - truncf(_r</xsl:text> <xsl:value-of select="@vy"/> <xsl:text>.f / _r</xsl:text> <xsl:value-of select="@vz"/> <xsl:text>.f) * _r</xsl:text> <xsl:value-of select="@vz"/> <xsl:text>.f;&nl;</xsl:text> </xsl:template> Panayotis: can you please add this to the ObjC stylesheet and I will do this for the C stylesheet (I have some other uncommitted changes so it is not convenient for me to commit). Arno On 4/3/11 3:49 PM, Sascha Haeberling wrote: > My guess is something like this: > > <xsl:template match="dex:rem-float|dex:rem-float-2addr"> > <xsl:text> _r</xsl:text> > <xsl:value-of select="@vx"/> > <xsl:text>.f = _r</xsl:text> > <xsl:value-of select="@vy"/> > <xsl:text>.f % _r</xsl:text> > <xsl:value-of select="@vz"/> > <xsl:text>.f; > </xsl:text> > </xsl:template> > > Although I am a bit puzzled that we implemented these 2addr instructions > like this so far, as they should only have two registers. Will double check. > > // Sascha > > On Mon, Apr 4, 2011 at 12:40 AM, Panayotis Katsaloulis > <pan...@pa... <mailto:pan...@pa...>> wrote: > > Hello all > > I was using some float->byte conversion and I got this exception: > 'XMLVM missing byte code instruction', reason: 'dex:rem-float-2addr' > > How can this be mplemented? > > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > _______________________________________________ > xmlvm-users mailing list > xml...@li... > <mailto:xml...@li...> > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > > > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |