c++ - What is the Windows RT on ARM native code calling convention? -


i couldn't find documentation on windows rt on arm calling convention used visual studio c++. microsoft using arm's aapcs?

if microsoft using aapcs/eabi windows rt on arm, using arm's c++ abi (which derived itanium c++ abi)? maybe arm exception handling abi?

does calling convention used windows rt on arm differ used other (embedded) arm windows variants?

is there reliable way detect windows rt on arm through predefined compiler macros?

update: added question regarding c++ abi.

unlike windows ce (which uses original apcs aka old abi), windows rt on arm uses eabi. more specifically, variant uses floating-point registers pass floating-point data , 8-byte stack/argument alignment.

if take following function:

int g(float x) {   return x; } 

and compile vs2012's arm compiler, following assembly:

|g| proc     vcvt.s32.f32 s0,s0     vmov        r0,s0     bx          lr     endp  ; |g| 

you can see it's using s0 , not r0 argument.

the 1 vs2008 (which can used target older windows ce versions) produces this:

str     lr, [sp,#-4]! ldr     r3, =__imp___stoi ldr     r3, [r3] mov     lr, pc bx      r3 ldr     pc, [sp],#4 

this code calling helper function perform conversion.

the windows ce compiler shipped windows compact 7 supports both old calling convention (called "cdecl" ms) , eabi. see what's new in platform builder 7.

edit: noticed added question c++. microsoft not use itanium-style c++ abi, since implementation predates it. can read microsoft's implementation in openrce articles (1, 2) , follow-up recon presentation. see original description designer jan gray: pdf.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -