I can only answer question 2 nd .
Is the calling convention used by Windows RT in ARM used from that used by other (built-in) variants of ARM Windows?
There are three concepts that should be understood. One is the ARM Procedure Call Standard, the other is ABI, and the third is a system call agreement. In short, the ARM procedure call standard describes the use of registers in prolog / epilogue. The ABI language describes how language variables are passed. That is, double , long long , this pointer, dynamic_cast<> , etc. The first is necessary for the assembler interface with the compiler, 2 nd is needed for interaction with the compiler. 3 rd is how OS calls are made.
ARM Procedure Call Standard
The apcs.txt document helps you understand some ARM options. There are 16 options based on four different options.
- 32-bit and 26-bit PCs - the entire version after 2000 will use the 32-bit version.
- stack limit check - perhaps reformulated as MMU or MMU.
- floating point - supported on most processors after about 2005.
- Re-entrant vs non-re-entrant - choice of clean software; shared libraries?
So, although there are 16 theoretical options, there are only two of them for modern systems using MMUs. The Debian ARM hard float wiki provides information on what some Linux / gcc distributions did. I would suggest that Window RT uses hard float because they don't want to pay a price for performance to support legacy hardware. Finally, it is difficult to think that a shared library or DLL support will not be present in the RT window. So the ARM call handling standard seems to be identical to ABI Linux's tough plan.
'C / C ++' ABI
AAPCS defines how languages ββare designed to map high-level functions / methods to low-level parts. Manipulating the name ensures that the characters have canonical names so that the tool can be cross-referenced. AAPCS should theoretically interact, but problems may arise with support libraries and other system-level interfaces.
OABI / EABI
The Embedded ARM wiki gives some information about this standard. OS using MMU will use some calls to switch from user mode to system mode. As a rule, these are only library functions and are not part of the compiler. However, you may find some ARM systems that use the OABI convention . Since Microsoft is running late with the ARM game, they will either use EABI or come up with something new. For example, calling malloc() with the gcc linux hard-float compiler will not work, since the system calls will be completely different. Typically, you will have to compile -nostdlib and come up with your own C library.
I was looking a bit for search information in Visual C ++.
So, to answer your 2 nd question, there are many compilers / systems that will generate a similar prolog / epilogue. If Visual C ++ uses AAPCS , it can interact with other AAPCS compilers. You may need to create your own libraries to force another compiler to call Windows RT system calls. Other questions should be given in the manual.
Edit: GCC ARM -mabi selects ABI . aapcs-linux is AAPCS / EABI, apcs-gnu is OABI, which defines the prolog / epilogue and argument mapping. The compiler configuration selects the target OS and the type of command / back -end / CPU; therefore, we have compilers with different names, for example arm-linux-eabi-gcc , arm-linux-gnueabi-gcc`, etc.