<?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のトピックRe: GCC 4.9.4 wait instruction bug?</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695780#M1623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this report.&lt;/P&gt;&lt;P&gt;The correct opcode for &lt;STRONG&gt;wait&lt;/STRONG&gt; instruction is&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;0x7C00007C&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'd recommend you to use a direct instruction opcode as a workaround:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;__asm &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".long 0x7C00007C"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm going to log this issue as a defect into our defect tracking database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Oct 2017 20:05:32 GMT</pubDate>
    <dc:creator>stanish</dc:creator>
    <dc:date>2017-10-01T20:05:32Z</dc:date>
    <item>
      <title>GCC 4.9.4 wait instruction bug?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695779#M1622</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;I'm using&amp;nbsp;&lt;SPAN&gt;powerpc-eabivle-gcc 4.9.2 (S32DS 1.1), but want to switch to&lt;/SPAN&gt;&amp;nbsp;4.9.4&lt;SPAN&gt; (S32DS 1.2)&lt;/SPAN&gt;. However, it seems there is a problem with the wait-instruction encoding in 4.9.4. To illustrate the problem the file test.c (see below) is compiled with gcc 4.9.2 and 4.9.4, and the object files are disassembled to show the difference in the instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The C source file test.c:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;int test()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; asm volatile ("wait");&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Output using GCC 4.9.2:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$ powerpc-eabivle-gcc -mvle -O2 -c -o test-4.9.2.o test.c&lt;BR /&gt;$ powerpc-eabivle-objdump -d test-4.9.2.o &amp;gt; test-4.9.2.o.dis&lt;/P&gt;&lt;P&gt;$ cat test-4.9.2.o.dis&lt;/P&gt;&lt;P&gt;test-4.9.2.o: file format elf32-powerpc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Disassembly of section .text:&lt;/P&gt;&lt;P&gt;00000000 &amp;lt;test&amp;gt;:&lt;BR /&gt; 0: 7c 00 00 &lt;STRONG&gt;7c&lt;/STRONG&gt; wait &lt;BR /&gt; 4: 00 04 se_blr&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Output using &lt;/SPAN&gt;GCC 4.9.4:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$ powerpc-eabivle-gcc -mvle -O2 -c -o test-4.9.4.o test.c&lt;BR /&gt;$ powerpc-eabivle-objdump -d test-4.9.4.o &amp;gt; test-4.9.4.o.dis&lt;/P&gt;&lt;P&gt;$ cat test-4.9.4.o.dis&lt;/P&gt;&lt;P&gt;test-4.9.4.o: file format elf32-powerpc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Disassembly of section .text:&lt;/P&gt;&lt;P&gt;00000000 &amp;lt;test&amp;gt;:&lt;BR /&gt; 0: 7c 00 00 &lt;STRONG&gt;3c&lt;/STRONG&gt; .long 0x7c00003c&lt;BR /&gt; 4: 00 04 se_blr&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;For some reason the wait-instruction becomes 0x7c00007c with 4.9.2 and 0x7c00003c with 4.9.4. Also note that the disassembler fails to decode the 4.9.4 instruction and outputs a general .long value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the expected behavior, a bug in gcc/binutils, or something else? Looks like a bug to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Oct 2017 19:31:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695779#M1622</guid>
      <dc:creator>erikmoqvist</dc:creator>
      <dc:date>2017-10-01T19:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: GCC 4.9.4 wait instruction bug?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695780#M1623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this report.&lt;/P&gt;&lt;P&gt;The correct opcode for &lt;STRONG&gt;wait&lt;/STRONG&gt; instruction is&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;0x7C00007C&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'd recommend you to use a direct instruction opcode as a workaround:&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;__asm &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".long 0x7C00007C"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm going to log this issue as a defect into our defect tracking database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Oct 2017 20:05:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695780#M1623</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2017-10-01T20:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: GCC 4.9.4 wait instruction bug?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695781#M1624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, has this been fixed in&amp;nbsp;2017.R1?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 01:11:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695781#M1624</guid>
      <dc:creator>jschloss</dc:creator>
      <dc:date>2018-02-22T01:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: GCC 4.9.4 wait instruction bug?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695782#M1625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This fix is NOT available in the latest version of S32DS 2017.R1.&lt;/P&gt;&lt;P&gt;Anyway the issue has been already fixed but haven't released it yet.&lt;/P&gt;&lt;P&gt;Currently the product team is scheduling when and how to release this update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 14:21:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695782#M1625</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2018-02-22T14:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: GCC 4.9.4 wait instruction bug?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695783#M1626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This issue is fixed in Update 2&amp;nbsp;&lt;A href="https://community.nxp.com/docs/DOC-340534"&gt;S32 Design Studio for Power Architecture 2017.R1 - Update 2 available&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/tag/cmpe200gcc-176/tg-p"&gt;#cmpe200gcc-176&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2018 10:09:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/GCC-4-9-4-wait-instruction-bug/m-p/695783#M1626</guid>
      <dc:creator>alexanderfedoto</dc:creator>
      <dc:date>2018-08-28T10:09:12Z</dc:date>
    </item>
  </channel>
</rss>

