Back out "[lss] Perform ARM syscall-number specification in C code instead of in asm"
Summary:
Original commit changeset: (D14306505)
1. build release version of crashy
2. trigger a native crash
3. can't find `Finish writing minidump` in logcat
attach agdb:
{P61468831}
@@ -2575,12 +2575,14 @@ struct kernel_statfs {
#define LSS_REG(r,a) register long __r##r __asm__("r"#r) = (long)a
#undef LSS_BODY
#define LSS_BODY(type,name,args...) \
- LSS_REG(7, __NR_##name); \
register long __res_r0 __asm__("r0"); \
long __res; \
- __asm__ __volatile__ ("swi 0x0\n" \
+ __asm__ __volatile__ ("push {r7}\n" \
+ "mov r7, %1\n" \
+ "swi 0x0\n" \
+ "pop {r7}\n" \
: "=r"(__res_r0) \
- : "r"(__r7) , ## args \
+ : "i"(__NR_##name) , ## args \
: "lr", "memory"); \
__res = __res_r0; \
LSS_RETURN(type, __res)
