Historical info (2012) says xchd is not used by sdcc for mcs51.

https://sourceforge.net/p/sdcc/discussion/1864/thread/08531ab9/

Regards,
Xiaofan

On Wed, 28 Jul 2021, 1:49 am , <theo_sd...@borm.org> wrote:

> Hi,
>
> Currently I'm looking at making a sparse hardware re-implementation of
> an mcs51-like core. It does not have to be 100% binary compatible as
> long as it can run compiled C code.
>
> Two opcodes are a nuisance to implement in hardware:
>
> 0xd6/0xd7:  XCHD A,(Rx)
>
> these opcodes take the place of what *logically* should have been the
> following instructions:
>
> 0xd6/0xd7: DJNZ (Rx),offset
>
> Though I guess the XCHD opcodes had some use "back in the day", the DJNZ
> opcodes make more sense to me, and are much less effort to implement.
> Actually, they come for free while implementing XCHD is a special case
> in an otherwise mostly regular part of the opcode array. (There are some
> other instructions that are in odd positions imho)
>
> I've grepped my way through the sources, and found few references to
> xchd, and my impression is that these instructions will never be
> emitted, but I'd appreciate some expert input:
>
> Does the mcs51 backend ever emit XCHD instructions?
>
>
> with kind regards,
>
>
> Theo
>
>
>
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to