<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 28, 2024 at 7:54 AM Tim McNerney <<a href="mailto:mc@media.mit.edu" target="_blank">mc@media.mit.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"><div dir="ltr"><div><div>CCL already has 32-bit ARM support. There is no OS interfacing work to do here (only work to make up for the <i>lack</i> of OS). </div></div></div></div></div></blockquote><div><br></div><div>The Cortex-M processors execute Thumb-1 or Thumb-2 instructions which are different from 32-bit ARM instructions.  The Cortex-A designs and older designs from ARM with a "T" in their name support both the 32-bit ARM and Thumb instructions.</div><div><br></div><div>On a Cortex-A and other processors that support both ISAs, code can switch between ISA states with the BX or BLX instruction setting the lower bit of the destination to 1 or 0 to specify either the Thumb or ARM ISA.  If someone wants to add a backend to the Cortex-M, starting with a working ARM backend and switching the code generator to using Thumb would seem like a possible way to start.</div><div><br></div><div>Anyone interested in the history of the ARM instruction set and how Thumb came to be might like this YouTube video<br></div><div><br></div><div><a href="https://www.youtube.com/watch?v=_6sh097Dk5k">https://www.youtube.com/watch?v=_6sh097Dk5k</a></div><br></div></div>