nios2: Library functions Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan <lftan@altera.com>