general purpose register in RISC-V

The 32 bit version of the RISC-V architecture treats all registers identically so the assembly language programmer is free to use any register as he/she wishes. The only exception is register x0, which always contains zero, and can be used as a destination when the data should be discarded. 
However, there is a RISC-V “standard calling convention” which speci2ies how registers will normally be used by the compiler and most assembly language programmers will follow this convention. 
In the “C” (Compressed Instructions) extension, 16 bit instructions are supported, and each compressed instruction is a shorter, abbreviated form of a 32-bit instruction. The compressed instruction set was designed under the assumption that the registers will be used in the standard ways and only the most common instructions are given 16 bit equivalents. As such, the registers are not treated identically in the compressed instruction set. 
For example, the 32 bit “call” instruction (JAL) can save the return address in any register, although the standard conventions mandate that register x1 will always be used to save the return address. Making use of this convention, the 16 bit version of the instruction (C.JAL) saves the return address in x1 and only this register. There is no compressed instruction to save the return address in any other register, which is reasonable since this is not something normally done. 
The names of the general purpose registers are x0, x1, ... x31. The registers are also given second, alternate names. The assembler will accept either name, so the programmer can use whichever name seems clearest. 
Here are the registers: 
Name |  Other Name | Description | Saved Across Calls
----- | ----- | ----- | ----- 
x0 | zero | Zero | 
x1 | ra | Return Address | 
x2 | sp | Stack Pointer | yes / callee saved 
x3 | gp | Global Pointer | 
x4 | tp | Thread Pointer | 
x5 | t0 | Temp | 
x6 | t1 | Temp | 
x7 | t2 | Temp | 
x8 | s0,fp | Saved Reg / Frame Pointer | yes / callee saved
x9 | s1 | Saved Reg | yes / callee saved
x10 | a0 | Function argument 
x11 | a1 | Function argument
x12 | a2 | Function argument
x13 | a3 | Function argument
x14 | a4 | Function argument
x15 | a5 | Function argument 
x16 | a6 | Function argument
x17 | a7 | Function argument
x18 | s2 | Saved Reg | yes / callee saved
x19 | s3 | Saved Reg | yes / callee saved
x20 | s4 | Saved Reg | yes / callee saved
x21 | s5 | Saved Reg | yes / callee saved
x22 | s6 | Saved Reg | yes / callee saved
x23 | s7 | Saved Reg | yes / callee saved
x24 | s8 | Saved Reg | yes / callee saved
x25 | s9 | Saved Reg | yes / callee saved
x26 | s10 | Saved Reg | yes / callee saved
x27 | s11 | Saved Reg | yes / callee saved
x28 | t3 | Temp | 
x29 | t4 | Temp | 
x30 | t5 | Temp | 
x31 | t6 | Temp | 

The compressed instructions are designed to allow easy access to 8 registers, namely x8, x9, ... x15.