This is implemented for gint only currently; on Vhex, _Exit() is likely
just going to be a syscall. For CASIOWIN, this is slightly more
difficult, as there is no native exit syscall.
On sh-generic targets, the headers <bits/cpucap.h> (in C) and
<bits/asm/cpucap.h> (in assembler) provide definitions to acces the
__cpucap symbol which provides information on the CPU.
Currently, a single capability __CPUCAP_SH4ALDSP is defined; it
represents the SH4 extended instructions together with the integrated
DSP instructions. The main uses of this capability are [movua.l]
(unaligned reads) and [ldrc] (built-in tight loops).
Capabilities are initialized to 0 (their safest default) and the runtime
can enable them based on what hardware is running.
This won't build on vhex-x86 but that can be left for another time. The
previous approach did not work because the __SUPPORT flags are not
defined when interfacing the library.
These macros cannot be tested properly until support for *printf and
*scanf is added (support for *printf currently exists but with a
temporary implementation), so this is LDEPS.
The size of the types has been checked though, so the definitions here
should be correct, the rest is printf/scanf logic.
This is enough to support the standard and likely the C++ library and
external programs to port, but also the most we can do without a proper
locale data storage and more target-specific developments that aren't a
priority right now.