The bit-30 in this __flags means the address error is due to memory load, and the
bit-31 means the address error is due to memory store. (see SC_ADDRERR_RD
and SC_ADDRERR_WR in kernel arch/loongarch/include/uapi/asm/sigcontext.h).
illegal_write_test.cpp and illegal_read_test.cpp have been tested and passed.
Define static const u32 SC_ADDRERR_RD and similarly SC_ADDRERR_WR to avoid magic numbers, as the other arches did.