__svc_indirect_r7 keyword behaves like
__svc_indirect, but uses
r7 instead of
__svc_indirect_r7 is a function qualifier. It affects the type of a
Is the immediate value used in the
It is an expression evaluating to an integer in the range:
0 to 224–1 (a 24-bit value) in an ARM instruction.
0-255 (an 8-bit value) in a 16-bit Thumb instruction.
Is the value passed in
r7to the handler to determine the function to perform.
Thumb applications on ARM Linux use
__svc_indirect_r7 to make kernel syscalls.
You can also use this feature to implement indirect SVCs.
long __svc_indirect_r7(0) \ SVC_write(unsigned, int fd, const char * buf, size_t count); #define write(fd, buf, count) SVC_write(4, (fd), (buf), (count))
write(fd, buf, count);
When an ARM architecture variant or ARM architecture-based processor that does not
SVC instruction is specified on the command line using the
--cpu option, the compiler generates an error.