From: Troy G. <tro...@gm...> - 2010-11-23 03:11:51
|
First, my compliments to the team who has worked on xmlvm. Can someone tell me why I get this in the cross compiled code (Java -> Objective C)? ERROR("dex:add-long"); I also noticed when cross compiling some code with longs, I get overflow warnings in xCode. For example, I cross compile this statement in Java to Objective C: long l = 6221821273427820544; to _r13.l = 6221821273427820544; //xCode complains about this line Instead of using the "long" data type in Objective C, has "long long" been considered. This seems like it might fix the above issue. Thanks for any help! |
From: Arno P. <ar...@pu...> - 2010-11-23 04:38:18
|
On 11/22/10 7:11 PM, Troy Gaines wrote: > Can someone tell me why I get this in the cross compiled code (Java -> > Objective C)? > > ERROR("dex:add-long"); It means that there is currently no support for this instruction. I just added it because it was simple to fix. > I also noticed when cross compiling some code with longs, I get overflow > warnings in xCode. > > For example, I cross compile this statement in Java to Objective C: > > long l = 6221821273427820544; > > to > > _r13.l = 6221821273427820544; //xCode complains about this line > > > Instead of using the "long" data type in Objective C, has "long long" > been considered. This seems like it might fix the above issue. Wow! Now that is interesting. You are right: under iOS sizeof(long) == 4 whereas sizeof(long long) == 8. I am surprised that no one ran into this problem before. Anyways, I fixed both problems in the repository. Thanks for reporting this! Arno |
From: Panayotis K. <pan...@pa...> - 2010-11-23 06:57:58
|
On Nov 23, 2010, at 6:07 AM, Arno Puder wrote: > > Wow! Now that is interesting. You are right: under iOS sizeof(long) == 4 > whereas sizeof(long long) == 8. I am surprised that no one ran into this > problem before. > > Anyways, I fixed both problems in the repository. Thanks for reporting this! > > Arno Is this the "correct" behavior for arm6/7 archs? (I don't know, I just ask) |
From: Arno P. <ar...@pu...> - 2010-11-23 07:28:52
|
In Java sizeof(long) == 8, so you have to map it to something equivalent on the target platform. For iOS this is 'long long'. Arno On Nov 22, 2010, at 10:58 PM, Panayotis Katsaloulis <pan...@pa...> wrote: > > On Nov 23, 2010, at 6:07 AM, Arno Puder wrote: > >> >> Wow! Now that is interesting. You are right: under iOS sizeof(long) == 4 >> whereas sizeof(long long) == 8. I am surprised that no one ran into this >> problem before. >> >> Anyways, I fixed both problems in the repository. Thanks for reporting this! >> >> Arno > > > Is this the "correct" behavior for arm6/7 archs? > (I don't know, I just ask) > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Troy G. <tro...@gm...> - 2010-11-23 15:51:12
|
Ok, thanks for the quick fix! You guys work fast. :) I did see one other thing that might be a problem as well related to this issue. In xmlvm.m, there is this line of code which is used to allocate the correct array size. Seems like it might need to be sizeof(long long). case 8: // long sizeOfBaseType = sizeof(long); Also, I see these all throughout my code. I'm not sure if they're an issue yet. Is there a way I can implement these? ERROR("dex:neg-long"); ERROR("dex:shr-long-2addr"); ERROR("dex:ushr-int-2addr"); ERROR("dex:ushr-int"); Thanks again! On Tue, Nov 23, 2010 at 1:28 AM, Arno Puder <ar...@pu...> wrote: > In Java sizeof(long) == 8, so you have to map it to something > equivalent on the target platform. For iOS this is 'long long'. > > Arno > > On Nov 22, 2010, at 10:58 PM, Panayotis Katsaloulis > <pan...@pa...> wrote: > > > > > On Nov 23, 2010, at 6:07 AM, Arno Puder wrote: > > > >> > >> Wow! Now that is interesting. You are right: under iOS sizeof(long) == 4 > >> whereas sizeof(long long) == 8. I am surprised that no one ran into this > >> problem before. > >> > >> Anyways, I fixed both problems in the repository. Thanks for reporting > this! > >> > >> Arno > > > > > > Is this the "correct" behavior for arm6/7 archs? > > (I don't know, I just ask) > > > ------------------------------------------------------------------------------ > > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > > Tap into the largest installed PC base & get more eyes on your game by > > optimizing for Intel(R) Graphics Technology. Get started today with the > > Intel(R) Software Partner Program. Five $500 cash prizes are up for > grabs. > > http://p.sf.net/sfu/intelisp-dev2dev > > _______________________________________________ > > xmlvm-users mailing list > > xml...@li... > > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |
From: Arno P. <ar...@pu...> - 2010-11-23 17:58:22
|
On 11/23/10 7:50 AM, Troy Gaines wrote: > Ok, thanks for the quick fix! You guys work fast. :) only because the issues you reported are easy to fix. Don't expect those turnaround times for more complicated problems. ;) > I did see one other thing that might be a problem as well related to > this issue. > > In xmlvm.m, there is this line of code which is used to allocate the > correct array size. Seems like it might need to be sizeof(long long). > > case 8: // long > sizeOfBaseType = sizeof(long); You are right. Just fixed it. > Also, I see these all throughout my code. I'm not sure if they're an > issue yet. Is there a way I can implement these? > > ERROR("dex:neg-long"); > ERROR("dex:shr-long-2addr"); > ERROR("dex:ushr-int-2addr"); > ERROR("dex:ushr-int"); Just added these missing instructions as well. Arno |