[llvm-dev] Having trouble getting started on writing a WDC 65816 backend

Jay K via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 15 09:28:59 PDT 2019


 > The subtract/borrow meaning I believe is also same mnemonic ​
 > but reversed meaning from x86.​
 > You set carry before sbc, or such.​
 > It made sense to me at the time based on elementary school math at least.​

Actually it sense in college EE learning to implement an ALU. 🙂
Subtract is adding the negative.
Two's complement negative is inverting and adding 1.
The reversed carry is that added 1.
And I guess the cleared carry is also correct then for extended precision.

 - Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190715/7388532e/attachment.html>


More information about the llvm-dev mailing list