The handbook defines the register calling convention.
In section "4.2 Register Usage Conventions" it says:
r20 through r31 are callee-saved saved registers.
However, if we look in section "2.3 Register Files" figure 2.2(a) r20 is given the label (scratch) as if it is caller-saved.
It clearly cannot be both.
Looking at the compiler, I can see that PatmosRegisterInfo.cpp defines Patmos::R21 through Patmos::R28 as calleesaved (in the function PatmosRegisterInfo::getCalleeSavedRegs).
Therefore, I suspect section 4.2 is wrong and should have r21 as the first callee-saved register.
The handbook defines the register calling convention.
In section "4.2 Register Usage Conventions" it says:
However, if we look in section "2.3 Register Files" figure 2.2(a) r20 is given the label
(scratch)
as if it is caller-saved. It clearly cannot be both.Looking at the compiler, I can see that
PatmosRegisterInfo.cpp
definesPatmos::R21
throughPatmos::R28
as calleesaved (in the functionPatmosRegisterInfo::getCalleeSavedRegs
).Therefore, I suspect section 4.2 is wrong and should have r21 as the first callee-saved register.