From: Panayotis K. <pan...@pa...> - 2011-04-03 22:40:47
|
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? |
From: Arno P. <ar...@pu...> - 2011-04-03 22:47:54
|
documentation for DEX instructions can be found here: http://www.netmite.com/android/mydroid/dalvik/docs/dalvik-bytecode.html "Floating point remainder after division. This function is different than IEEE 754 remainder and is defined as result == a - roundTowardZero(a / b) * b" On 4/3/11 3:40 PM, Panayotis Katsaloulis 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... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Sascha H. <sa...@xm...> - 2011-04-03 22:49:43
|
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...> 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... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |
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 |
From: Panayotis K. <pan...@pa...> - 2011-04-03 23:17:50
|
On Apr 4, 2011, at 2:02 AM, Arno Puder wrote: > > 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 No problem |
From: Sascha H. <sa...@xm...> - 2011-04-03 23:25:52
|
If this works, you should be also able to do this with double (replace .f with .d and truncf with tunc). On Mon, Apr 4, 2011 at 1:17 AM, Panayotis Katsaloulis < pan...@pa...> wrote: > > On Apr 4, 2011, at 2:02 AM, Arno Puder wrote: > > > > > 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 > > > No problem > > > > ------------------------------------------------------------------------------ > 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 > |
From: Panayotis K. <pan...@pa...> - 2011-04-04 15:29:17
|
On 04 Απρ 2011, at 2:25 π.μ., Sascha Haeberling wrote: > If this works, you should be also able to do this with double (replace .f with .d and truncf with tunc). No, it doesn't work, I get this exception when parsing ERROR: XsltRunner: Could not create transformer for xmlvm2objc.xsl: Failed to compile stylesheet. 1 error detected. Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.simontuffs.onejar.Boot.run(Boot.java:306) at com.simontuffs.onejar.Boot.main(Boot.java:159) Caused by: java.lang.NullPointerException at org.xmlvm.proc.XsltRunner.runXSLT(XsltRunner.java:87) at org.xmlvm.proc.out.ObjectiveCOutputProcess.genObjC(ObjectiveCOutputProcess.java:100) at org.xmlvm.proc.out.ObjectiveCOutputProcess.process(ObjectiveCOutputProcess.java:59) at org.xmlvm.proc.XmlvmProcessImpl.preprocess(XmlvmProcessImpl.java:212) at org.xmlvm.proc.out.IPhoneOutputProcess.process(IPhoneOutputProcess.java:65) at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:139) at org.xmlvm.Main.main(Main.java:54) ... 6 more /Users/teras/Works/Development/Mobile/Active/EggWars/nbproject/xcode.xml:179: The following error occurred while executing this line: /Users/teras/Works/Development/Mobile/Active/EggWars/nbproject/xcode.xml:99: Java returned: 1 |