<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Register not saved on stack in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893916#M4803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I checked your command like settings, I can see you use -mcpu=e200z3, but MPC5644A has e200z4 core. From my point of view, all lines which uses e200z3 core should be switched to e200z4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 May 2019 10:44:24 GMT</pubDate>
    <dc:creator>martin_kovar</dc:creator>
    <dc:date>2019-05-20T10:44:24Z</dc:date>
    <item>
      <title>Register not saved on stack</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893915#M4802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having an issue with register r31 not being saved on stack. When I compile this code:&lt;/P&gt;&lt;P&gt;--------------------&lt;/P&gt;&lt;P&gt;#include "MPC5644A.h"&lt;/P&gt;&lt;P&gt;void HaltPeripherals(void) {&lt;BR /&gt; uint32_t i;&lt;/P&gt;&lt;P&gt;ETPU.ECR_A.B.FEND = 1;&lt;BR /&gt; for(i = 0; i &amp;lt; 32; i++) {&lt;BR /&gt; ETPU.CHAN[i].CR.B.CPR = 0;&lt;BR /&gt; }&lt;BR /&gt; ETPU.CISR_A.R = 0xFFFFFFFF;&lt;BR /&gt; ETPU.CIOSR_A.R = 0xFFFFFFFF;&lt;/P&gt;&lt;P&gt;PIT.TIMER[0].TCTRL.B.TEN = 0x0;&lt;BR /&gt; PIT.TIMER[1].TCTRL.B.TEN = 0x0;&lt;BR /&gt; PIT.TIMER[2].TCTRL.B.TEN = 0x0;&lt;BR /&gt; PIT.PITMCR.B.MDIS = 1; &lt;BR /&gt; &lt;BR /&gt; ESCI_A.LCR.B.LIN = 0;&lt;BR /&gt; ESCI_A.CR2.B.MDIS = 1;&lt;BR /&gt; ESCI_B.LCR.B.LIN = 0;&lt;BR /&gt; ESCI_B.CR2.B.MDIS = 1;&lt;/P&gt;&lt;P&gt;ETPU.ECR_A.B.MDIS = 0;&lt;/P&gt;&lt;P&gt;CAN_A.MCR.B.MDIS = 0;&lt;BR /&gt; CAN_C.MCR.B.MDIS = 0;&lt;BR /&gt; for(i = 0; i &amp;lt; 364; i++) {&lt;BR /&gt; INTC.PSR[i].R = 0;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;--------------------&lt;/P&gt;&lt;P&gt;It generates this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0: 18 21 06 f0 e_stwu r1,-16(r1)&lt;BR /&gt; 4: 70 f8 e3 fc e_lis r7,50172&lt;BR /&gt; 8: 1b c1 09 08 e_stmw r30,8(r1)&lt;BR /&gt; c: 48 14 se_li r4,1&lt;BR /&gt; e: c5 57 se_lwz r5,20(r7)&lt;BR /&gt; 10: 48 06 se_li r6,0&lt;BR /&gt; 12: 74 85 f8 00 e_rlwimi r5,r4,31,0,0&lt;BR /&gt; 16: 48 04 se_li r4,0&lt;BR /&gt; 18: d5 57 se_stw r5,20(r7)&lt;BR /&gt; 1a: 4a 07 se_li r7,32&lt;BR /&gt; 1c: 00 b7 se_mtctr r7&lt;BR /&gt; 1e: 18 e6 80 40 e_addi r7,r6,64&lt;BR /&gt; 22: 71 78 e3 fc e_lis r11,50172&lt;BR /&gt; 26: 6c 47 se_slwi r7,4&lt;BR /&gt; 28: 48 03 se_li r3,0&lt;BR /&gt; 2a: 7c e7 5a 14 add r7,r7,r11&lt;BR /&gt; 2e: 20 06 se_addi r6,1&lt;BR /&gt; 30: c0 57 se_lwz r5,0(r7)&lt;BR /&gt; 32: 74 85 e0 86 e_rlwimi r5,r4,28,2,3&lt;BR /&gt; 36: d0 57 se_stw r5,0(r7)&lt;BR /&gt; 38: 7a 20 ff e6 e_bdnz 1e &amp;lt;HaltPeripherals+0x1e&amp;gt;&lt;BR /&gt; 3c: 70 f8 e3 ff e_lis r7,50175&lt;BR /&gt; 40: 71 40 58 00 e_li r10,-327680&lt;BR /&gt; 44: 2c 06 se_bmaski r6,0&lt;BR /&gt; 46: 70 10 78 00 e_li r0,-32768&lt;BR /&gt; 4a: 54 cb 02 00 e_stw r6,512(r11)&lt;BR /&gt; 4e: 71 80 60 00 e_li r12,-262144&lt;BR /&gt; 52: 54 cb 02 20 e_stw r6,544(r11)&lt;BR /&gt; 56: 71 20 58 00 e_li r9,-327680&lt;BR /&gt; 5a: 50 c7 01 08 e_lwz r6,264(r7)&lt;BR /&gt; 5e: 19 29 d1 40 e_ori r9,r9,16384&lt;BR /&gt; 62: 74 66 07 fe e_rlwimi r6,r3,0,31,31&lt;BR /&gt; 66: 71 00 60 00 e_li r8,-262144&lt;BR /&gt; 6a: 54 c7 01 08 e_stw r6,264(r7)&lt;BR /&gt; 6e: 19 08 d1 80 e_ori r8,r8,32768&lt;BR /&gt; 72: 53 e7 01 18 e_lwz r31,280(r7)&lt;BR /&gt; 76: 70 9f e7 f4 e_lis r4,65524&lt;BR /&gt; 7a: 74 7f 07 fe e_rlwimi r31,r3,0,31,31&lt;BR /&gt; 7e: 48 1e se_li r30,1&lt;BR /&gt; 80: 57 e7 01 18 e_stw r31,280(r7)&lt;BR /&gt; 84: 48 06 se_li r6,0&lt;BR /&gt; 86: 73 e0 01 6c e_li r31,364&lt;BR /&gt; 8a: 65 04 se_bseti r4,16&lt;BR /&gt; 8c: 00 bf se_mtctr r31&lt;BR /&gt; 8e: 48 05 se_li r5,0&lt;BR /&gt; 90: 53 e7 01 28 e_lwz r31,296(r7)&lt;BR /&gt; 94: 74 7f 07 fe e_rlwimi r31,r3,0,31,31&lt;BR /&gt; 98: 57 e7 01 28 e_stw r31,296(r7)&lt;BR /&gt; 9c: c0 f7 se_lwz r31,0(r7)&lt;BR /&gt; 9e: 77 df 0f bc e_rlwimi r31,r30,1,30,30&lt;BR /&gt; a2: d0 f7 se_stw r31,0(r7)&lt;BR /&gt; a4: 50 ea 00 0c e_lwz r7,12(r10)&lt;BR /&gt; a8: 74 67 c1 ce e_rlwimi r7,r3,24,7,7&lt;BR /&gt; ac: 54 ea 00 0c e_stw r7,12(r10)&lt;BR /&gt; b0: 58 ea 00 04 e_lhz r7,4(r10)&lt;BR /&gt; b4: 44 07 se_or r7,r0&lt;BR /&gt; b6: 5c ea 00 04 e_sth r7,4(r10)&lt;BR /&gt; ba: 50 e9 00 0c e_lwz r7,12(r9)&lt;BR /&gt; be: 74 67 c1 ce e_rlwimi r7,r3,24,7,7&lt;BR /&gt; c2: 54 e9 00 0c e_stw r7,12(r9)&lt;BR /&gt; c6: 58 e9 00 04 e_lhz r7,4(r9)&lt;BR /&gt; ca: 44 70 se_or r0,r7&lt;BR /&gt; cc: 5c 09 00 04 e_sth r0,4(r9)&lt;BR /&gt; d0: 50 eb 00 14 e_lwz r7,20(r11)&lt;BR /&gt; d4: 74 67 f0 42 e_rlwimi r7,r3,30,1,1&lt;BR /&gt; d8: 54 eb 00 14 e_stw r7,20(r11)&lt;BR /&gt; dc: 50 ec 00 00 e_lwz r7,0(r12)&lt;BR /&gt; e0: 74 67 f8 00 e_rlwimi r7,r3,31,0,0&lt;BR /&gt; e4: 54 ec 00 00 e_stw r7,0(r12)&lt;BR /&gt; e8: 50 e8 00 00 e_lwz r7,0(r8)&lt;BR /&gt; ec: 74 67 f8 00 e_rlwimi r7,r3,31,0,0&lt;BR /&gt; f0: 54 e8 00 00 e_stw r7,0(r8)&lt;BR /&gt; f4: 7c e4 32 14 add r7,r4,r6&lt;BR /&gt; f8: 20 06 se_addi r6,1&lt;BR /&gt; fa: 34 a7 00 40 e_stb r5,64(r7)&lt;BR /&gt; fe: 7a 20 ff f6 e_bdnz f4 &amp;lt;HaltPeripherals+0xf4&amp;gt;&lt;BR /&gt; 102: 1b c1 08 08 e_lmw r30,8(r1)&lt;BR /&gt; 106: 20 f1 se_addi r1,16&lt;BR /&gt; 108: 00 04 se_blr&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The full command prompt I use to compile:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;"C:/SysGCC/powerpc-eabi/bin/powerpc-eabivle-gcc.exe" -c -O2 -g3 -Wall -c -fmessage-length=0 -ffunction-sections -fdata-sections -mcpu=e200z3 -mbig -mvle -mregnames -mhard-float -meabi -Werror -specs="C:/SysGCC/powerpc-eabi/powerpc-eabivle/lib/e200z3/nosys.specs" -I"C:/SysGCC/powerpc-eabi/powerpc-eabivle/include" --sysroot="C:/SysGCC/powerpc-eabi/powerpc-eabivle/lib/e200z3/" -MMD -MP -MF"Test.d" -MT"Test.o" -c -o "Test.o" "Test.c"&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The version I'm using:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;powerpc-eabivle-gcc.exe (BLD = 1607) 4.9.4 20160726 (build.sh rev=gceb1328 s=F494 -i /opt/freescale ELe200 -V release_gceb1328_build_Fed_ELe200_ML3)&lt;/P&gt;&lt;P style="border: 0px;"&gt;Can you please help out?&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2019 15:30:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893915#M4802</guid>
      <dc:creator>devver</dc:creator>
      <dc:date>2019-05-14T15:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Register not saved on stack</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893916#M4803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I checked your command like settings, I can see you use -mcpu=e200z3, but MPC5644A has e200z4 core. From my point of view, all lines which uses e200z3 core should be switched to e200z4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2019 10:44:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893916#M4803</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2019-05-20T10:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Register not saved on stack</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893917#M4804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This instruction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;8: 1b c1 09 08 e_stmw r30,8(r1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a store multiple words. It saves registers r30 and r31 on stack.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2019 21:09:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Register-not-saved-on-stack/m-p/893917#M4804</guid>
      <dc:creator>ra8797</dc:creator>
      <dc:date>2019-05-23T21:09:29Z</dc:date>
    </item>
  </channel>
</rss>

