Hi All,
I've been working on a VLE project (written in asm) and I am running in to an annoying issue with certain registers not able to perform tasks.
For example, a simple compare command...
se_cmp r29,r26 << That is ok
se_cmp r29,r10 << That creates an error 'Invalid register specified".
I have the VLE reference manual but I cannot find where it discusses what combination of registers are valid to use in situations like this.
Does anyone have any pointers?
Thanks.
Ok thanks Lukas.
Hi,
copied from http://www.freescale.com/files/32bit/doc/ref_manual/VLEPEM.pdf , page 23:
"VLE instructions use GPRs and SPRs with the following limitations:
• Most VLE instructions using 16-bit formats are limited to addressing GPR0–GPR7 and
GPR24–GPR31. Move instructions are provided to transfer register contents between these
registers and GPR8–GPR23.
• VLE compare and bit test instructions using the 16-bit formats implicitly set their results in CR0."
That's because there are only 4 bits to specify a GPR in VLE instruction.
Regards,
Lukas