<?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>MPC5xxx中的主题 Re: Compiling a single function (VLE, embedded ABI) - tidying up the preamble and exit</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Compiling-a-single-function-VLE-embedded-ABI-tidying-up-the/m-p/1599120#M22869</link>
    <description>&lt;P&gt;&lt;STRONG&gt;-O2&lt;/STRONG&gt; instead of &lt;STRONG&gt;-Os&lt;/STRONG&gt; fixed it.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 22:42:50 GMT</pubDate>
    <dc:creator>johnbanks</dc:creator>
    <dc:date>2023-02-14T22:42:50Z</dc:date>
    <item>
      <title>Compiling a single function (VLE, embedded ABI) - tidying up the preamble and exit</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Compiling-a-single-function-VLE-embedded-ABI-tidying-up-the/m-p/1598898#M22866</link>
      <description>&lt;P&gt;I would like to compile a single function (not main, without startup files), passing parameters in r3 and r4 with a return value in r3.&lt;/P&gt;&lt;P&gt;With GNU for another CPU family I do this (with a different exe):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;powerpc-eabivle-gcc -std=c99 -Os -nostdlib -T test.ld test.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;test.ld:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SECTIONS&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;.text : {*(.text)}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the output is disassembled there is extra stuff involving the stack at the beginning that I don't want:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;e_stwu r1, back_chain(r1)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;se_mflr r0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;e_stmw r27, 0x20+var_14(r1)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;se_stw r0, 0x20+sender_lr(r1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;At the end there is&amp;nbsp;&lt;STRONG&gt;e_b _restgpr_27_x &lt;/STRONG&gt;so I have to add&amp;nbsp;&lt;STRONG&gt;-Wl,-r&lt;/STRONG&gt; to get this to be ignored.&lt;/P&gt;&lt;P&gt;I would like to have a &lt;STRONG&gt;se_blr&lt;/STRONG&gt;&amp;nbsp;return instruction.&lt;/P&gt;&lt;P&gt;I think I'm missing an eabi or -mcall- option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 13:29:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Compiling-a-single-function-VLE-embedded-ABI-tidying-up-the/m-p/1598898#M22866</guid>
      <dc:creator>johnbanks</dc:creator>
      <dc:date>2023-02-14T13:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling a single function (VLE, embedded ABI) - tidying up the preamble and exit</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Compiling-a-single-function-VLE-embedded-ABI-tidying-up-the/m-p/1599120#M22869</link>
      <description>&lt;P&gt;&lt;STRONG&gt;-O2&lt;/STRONG&gt; instead of &lt;STRONG&gt;-Os&lt;/STRONG&gt; fixed it.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 22:42:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Compiling-a-single-function-VLE-embedded-ABI-tidying-up-the/m-p/1599120#M22869</guid>
      <dc:creator>johnbanks</dc:creator>
      <dc:date>2023-02-14T22:42:50Z</dc:date>
    </item>
  </channel>
</rss>

