29.05.2013 1:26, Michael Ring пишет:
I did the changes, parts of the opcodes now work fine, I think I have found the 
problem with the li
+ and + mfc0 op-codes, if last parameter is 0 then the asm statement is 
generated wrong:

This works:
     and    $a0,$a0,1

this does not work:
     and    $a0,$a0,0

result is:

pic32mx1xxfxxxb.s:107: Error: absolute expression required `and $a0,$a0,'

So it is the value of operand that matters. I'll try to look at it, probably a bug in the parsing part, because the output part doesn't have anything suspicious.

I am now having troubles with the syntax for mfc0 and mtc0:

mfc0    $t0,$12, 1 //_CP0_STATUS

gets translated to:

mfc0 $t0,$t4,1

which the assembler does not like, it needs $12 and not $t4:

pic32mx1xxfxxxb.s:37: Error: Illegal operands `mfc0 $t0,$t4,1'

Any ideas what to do here?

This one is more complicated, we need at least to prevent register name translation (since $12 is a coprocessor register, not a general-purpose one), at most handle such registers as a different register type.

Regards,
Sergei
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to