<?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>S32 Design StudioのトピックIssue with powerpc-eabivle-gcc.exe 4.9.4 with -mspe2 option using S32r274 (e200Z7 core)</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Issue-with-powerpc-eabivle-gcc-exe-4-9-4-with-mspe2-option-using/m-p/749695#M2617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have encountered an issue when compiling the code with&amp;nbsp;&lt;EM&gt;powerpc-eabivle-gcc.exe 4.9.4&lt;/EM&gt; with &lt;EM&gt;-mspe2&lt;/EM&gt; option using an s32R274 e200z7 core.&amp;nbsp; It builds and runs fine without the &lt;EM&gt;-mspe2&lt;/EM&gt;, but&amp;nbsp;it&amp;nbsp;crashes during runtime and gets trapped in a watchdog timer interrupt vector #12 with the &lt;EM&gt;-mspe2&lt;/EM&gt; option.&amp;nbsp; I am using S32 Design Studio for Power Architecture v2017.R1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The offending line of code is a simple typecast to a &lt;EM&gt;float&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tmpFloat = (float)tmpInt64;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &lt;EM&gt;tmpFloat&lt;/EM&gt; is of type &lt;EM&gt;float&lt;/EM&gt; and &lt;EM&gt;tmpInt64&lt;/EM&gt; is of type &lt;EM&gt;int64_t&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the disassembly, the code compiles into the following assembly instructions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;se_lwz r3,32(r31)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;se_lwz r4,36(r31)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;e_bl 0x10c2d88 &amp;lt;__floatdisf&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;se_mr r7,r3 &amp;lt;-------- Crashes here&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;e_stw r7,40(r31)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To add to the confusion,&amp;nbsp;I get the same assembly output whether the &lt;EM&gt;-mspe2&lt;/EM&gt; option is included or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jan 2018 15:34:46 GMT</pubDate>
    <dc:creator>j_cole</dc:creator>
    <dc:date>2018-01-23T15:34:46Z</dc:date>
    <item>
      <title>Issue with powerpc-eabivle-gcc.exe 4.9.4 with -mspe2 option using S32r274 (e200Z7 core)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Issue-with-powerpc-eabivle-gcc-exe-4-9-4-with-mspe2-option-using/m-p/749695#M2617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have encountered an issue when compiling the code with&amp;nbsp;&lt;EM&gt;powerpc-eabivle-gcc.exe 4.9.4&lt;/EM&gt; with &lt;EM&gt;-mspe2&lt;/EM&gt; option using an s32R274 e200z7 core.&amp;nbsp; It builds and runs fine without the &lt;EM&gt;-mspe2&lt;/EM&gt;, but&amp;nbsp;it&amp;nbsp;crashes during runtime and gets trapped in a watchdog timer interrupt vector #12 with the &lt;EM&gt;-mspe2&lt;/EM&gt; option.&amp;nbsp; I am using S32 Design Studio for Power Architecture v2017.R1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The offending line of code is a simple typecast to a &lt;EM&gt;float&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tmpFloat = (float)tmpInt64;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where &lt;EM&gt;tmpFloat&lt;/EM&gt; is of type &lt;EM&gt;float&lt;/EM&gt; and &lt;EM&gt;tmpInt64&lt;/EM&gt; is of type &lt;EM&gt;int64_t&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the disassembly, the code compiles into the following assembly instructions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;se_lwz r3,32(r31)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;se_lwz r4,36(r31)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;e_bl 0x10c2d88 &amp;lt;__floatdisf&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;se_mr r7,r3 &amp;lt;-------- Crashes here&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;e_stw r7,40(r31)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To add to the confusion,&amp;nbsp;I get the same assembly output whether the &lt;EM&gt;-mspe2&lt;/EM&gt; option is included or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:34:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Issue-with-powerpc-eabivle-gcc-exe-4-9-4-with-mspe2-option-using/m-p/749695#M2617</guid>
      <dc:creator>j_cole</dc:creator>
      <dc:date>2018-01-23T15:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with powerpc-eabivle-gcc.exe 4.9.4 with -mspe2 option using S32r274 (e200Z7 core)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Issue-with-powerpc-eabivle-gcc-exe-4-9-4-with-mspe2-option-using/m-p/749696#M2618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, after posting the question I found a solution.&amp;nbsp; The SPE must be enabled in the core prior to using it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be done as follows:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;mfmsr r6&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;se_bseti r6,6&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;mtmsr r6&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 17:07:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Issue-with-powerpc-eabivle-gcc-exe-4-9-4-with-mspe2-option-using/m-p/749696#M2618</guid>
      <dc:creator>j_cole</dc:creator>
      <dc:date>2018-01-23T17:07:30Z</dc:date>
    </item>
  </channel>
</rss>

