Open Emoun opened 3 years ago
@schoeberl can you look into this?
@schoeberl what is your opinion on this one? Should I just correct the handbook to fit?
Looking into the compiler's code, I can see that there is a format specified as CFLrt
and used by 8 branch types:
BRCFR(ND)u
, BRCFR(ND)
, BRCFT(ND)u
, BRCFT(ND)
.
The handbook documentation around the
brcf
andbrcfnd
says that these instructions use the formatsCFLi
(immediate operand) andCFLrt
(two register operands). However, for inline assembly giving them two registers will throw an error:while giving them only 1 register operand (matching
CFLrs
format) will compile with no issue and even be accepted bypatmos-llvm-objdump
as a valid instruction.So, is the documentation wrong, or is it the implementation? If the documentation is wrong, is the
CFLrt
format used by any instructions (no other instructions are in the handbook.) If the implementation is wrong, what would the semantics of theCFLrt
formats be?