Hi,
I'm in the middle of porting a high performance 3d app to a CE 4.2 device, I'm currently using eVC4. Would using Visual Studio 2005 (with the plugin) give me better code generation than eVC 4 At the moment I am unable to do inline asm (__asm) for ARM4I using eVC4. Would this be possible in 2005
Many thanks,
Steven Haggerty.

2005 C/C++ codegen vs eVC4
Liangxiao Zhu - MSFT
Is there a way I can send a mouse/stylus click to a control in .NET CF 1 I have a numericupdown control that I'd like to cause a click event on.
Thanks.
evdberg
Perhaps you could mix the two dev environments together. For starters, you can run your inline asm-code through the Gnu ARM compiler, parse it for the machine code, and then convert it to the __emit() intrinsics. If this is feasible, then perhaps a VS 2005 build tool can be added that automates the process (call Gnu, parse out the result, and convert to a myemits.h C++ header).
This way you don't have to settle for the inferior codegen.
Let me know what you come up with... sounds like an interesting struggle.
Brian
Eduardo Cobuci
amduke
Thanks for you comments and appologies for the long delay, our game has just gone alpha so I've had my hands full.
Re: Your points.
1. The code we want to inline is very small, but called relatively frequent (eg. Fixed Point maths, Vector / Matrix maths). With these functions the call overhead (packaging up arguments into registers, push / popping regs, guaranteed pipeline flush and possible I$ miss) will outweigh the performance gains from using asm.
2. This sounds like it may show promise, but is not a patch on having proper inline asm, where you can actually use the uncomming variable names as registers. I don't really want to have to go back to machine code again :)
If there is *no* chance of eVC ever having inline ARM asm, I may have to have another look at GNU C/C++ V4 weighing up how much I could gain from inline asm vs what would be lost with GNU's inferior codegen.
Thanks,
Steve.
Rich S
While inline asm would be a welcome addition to the ARM compiler in Visual Studio, there are other options worth investigating.
1. Write functions in assembly code and assemble using the ARM assembler (armasm.exe), then link the object in with your existing code. (Refer to Jeff's aforementioned blog entry for a tip on how to integrate this into a project build.)
2. If the assembly code is short and reasonably static then determine the instruction encodings for each instruction, and use the C compiler's __emit intrinsic. This will inject the encoding directly into your program. A useful technique is to wrap sequences of __emit by a function that has been declared as __declspec(naked) so you can know the values for the incoming argument registers and not have a function prolog/epilog getting in the way. MFC for Windows CE uses this technique, so you can dig into its sources for an example. (I think it's in something like olecall.cpp--I don't have the sources handy at the moment).
is4me2
The newer compiler is capable of producing better code than the old, but as for whether is will be better in your specific case, you'll have to profile to be sure. One advantage that you may find is that the new compiler/linker are capable of Link Time Code Generation, which may help by inlining methods from different c/cpp source files, or using faster calling conventions. I'd suggest downloading the Beta2 drop or the August CTP if you have access.
Unfortunately, inline ARM assembly is still not possible. I'm not on the compiler team, but I think this is definitely on their radar. VS2005 can compile ARM asm as part of the project fairly simply, check out this blog entry: http://blogs.msdn.com/jeffabraham/archive/2005/03/31/404283.aspx. You could also do this as a custom build step, but custom build tools are a little more flexible.
I'm following up with our compiler team, but I haven't gotten a response yet. Can you please send me an email at jabraham at microsoft dot com with further details of your scenario, and I'll pass it along to them
Hope this helps,
Jeff Abraham
Visual Studio
Alan Churchill