If all you want to do is run a few lines of assembler, then it would be easiest to use the compiler's asm statement. This is described in the gcc documentation that comes with the kit. You can also find examples of this within the HAL.
If you really want to write the entire function in assembler, then you will need to ensure that the function adheres to the processors "application binary interface". This is described in the appendix of the Nios II Processor Reference Handbook, which is also supplied with the kit.
To make the call from C++ rather than C you should declare the function as "extern C", e.g.:
extern "c"
{
extern void my_asm_func (void);
}
That way you don't have to worry about the effects of the C++ mangler.