<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Paul Breed's Activities</title><link>https://community.arm.com/members/paul-breed</link><description>Paul Breed's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>Cortex-a9 banked registers</title><link>https://community.arm.com/developer/ip-products/processors/f/cortex-a-forum/47693/cortex-a9-banked-registers</link><pubDate>Tue, 22 Sep 2020 18:07:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:af750593-a452-4ec4-a404-aaa56f93461d</guid><dc:creator>Paul Breed</dc:creator><description>&lt;p&gt;Using cortex-a9 (zynq 7010)&lt;br /&gt;With the gcc toolchain.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m working on porting our RTOS scheduler to this platform.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;In a privileged exception state (SVC,IRQ,FIQ etc..)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;trying to restore a saved context.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ldm r0,{r0-r12,sp,lr,pc}^&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;code&gt;Does not seem to be restoring the user/system mode sp and lr.&lt;br /&gt;I thought that the ^ would force this to operate on the user/system registers, not the banked registers.&lt;br /&gt;&lt;br /&gt;The following code DOES work,&lt;br /&gt;I&amp;#39;m just trying to understand why the code above does not.&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;add r0,#52
ldm r0,{sp,lr}^ /* This works why doesn&amp;#39;;&amp;#39;t it work in the previous statement */
nop
sub r0,#52  
ldr r1,[r0,#60]
mov lr,r1
ldm r0,{r0-r12} 
movs pc,lr&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://community.arm.com/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Tue, 22 Sep 2020 05:35:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:db90633f-e790-4a46-900d-2a061fe52d06</guid><dc:creator /><description>Ask a question in a forum.</description></item></channel></rss>