Complete RV32 support for Linux (v2)

Changes from prior pull request:
Use unsigned comparison for valid syscall number in entry_32.S
On 12/18/2014 04:59 PM, Albert Ou wrote:
> In arch/riscv/include/asm/uaccess.h
> <https://github.com/ucb-bar/riscv-linux/pull/9#discussion-diff-22074803>:
> 
>> +			"2:\n"					\
>> +			"	lw %2, 4(%3)\n"			\
>> +			"3:\n"					\
>> +			"	.section .fixup,\"ax\"\n"	\
>> +			"	.balign 4\n"			\
>> +			"4:\n"					\
>> +			"	li %0, %4\n"			\
>> +			"	li %1, 0\n"			\
>> +			"	jump 3b\n"			\
>> +			"	.previous\n"			\
>> +			"	.section __ex_table,\"a\"\n"	\
>> +			"	.balign 4\n"			\
>> +			"	.dword 1b, 4b\n"		\
>> +			"	.dword 2b, 4b\n"		\
>> +			"	.previous"			\
>> +			: "+r" (err), "=r" (__lo), "=&r" (__hi) \
> 
> I believe that the register constraint for |__lo| must include the |&|
> early-clobber modifier. Otherwise, gcc might allocate |__lo| in the same
> register as |ptr|, which would the cause the second |lw| to read from an
> incorrect address.
> On the other hand, the |&| modifier for |__hi| can be eliminated since
> |ptr| is no longer used after that point.
> 

Yes, I agree on both counts.


> (It's not necessary to open another pull request for this simple change;
> I can easily update the patch myself before merging.)
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ucb-bar/riscv-linux/pull/9/files#r22074803>.
>