How to save register in interrupt function?

My chip architecture does not support hardware saving context. How to save register when an interrupt occurs? The interrupt function is neither a caller nor a callee.

This depends on the architecture. There are several choices::
a) several control registers where you swap the register value with a CR value. This gives access to a stack where you can dump as much stuff as you need. Generally these come with a second control register that points at the register set you need to pick up to deal with the interrupt.
b) a control register points at a stack that is known present, and there is a semi-special instruction which deposits one or more registers on that stack.
c) a bank of control registers (say 4) is automatically swapped in when the privilege bit is set {there are more variants on this one}

Thanks!
My architecture is simple, like b).It doesn’t have privilege mode.
I think interrupt function like callee func. Complier will save callee reg. User(who write intrerrupt function) need save caller reg.

You may want to use a trampoline that handles register save/restore so the
handler can be written in std HLL.

Assuming you can get the interrupt to transfer control to INTERRUPTk below::

// this piece of code trampolines safely into the handler.
INTERUPTk::
// save caller saved registers on stack (save 16 registers shown)
ST R0,[SP+0]
ST R1,[SP+8]

ST R15,[SP+120]
// Now the caller saved registers are on the stack and safe,
// at this point we can switch to standard ABI calling convention
LD R1,[argument1]
LD R2,[argument2]

CALL handlerK
ST R1,[result]
// Now we restore the 16 caller saved registers and exit
LD R0,[SP+0]

LD R15,[SP+120]
RETI // return from interrupt.
// end of trampoline

trampoline may not even be needed, have a look at avr8 or risc-v __attribute__((interrupt)) that will save anything necessary for a standard C functions.