<?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 Pa Risc2.0 Assembly in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/pa-risc2-0-assembly/m-p/3541777#M101593</link>
    <description>I have a problem with a cast. A program is&lt;BR /&gt;doing something roughly like this:&lt;BR /&gt;&lt;BR /&gt;#define NUM 45&lt;BR /&gt;short n;&lt;BR /&gt;n = 45;&lt;BR /&gt;&lt;BR /&gt;if (n == NUM)&lt;BR /&gt;&lt;BR /&gt;Ok, things are a bit more complex but...&lt;BR /&gt;In the asm gerenated, we load the 45 in N&lt;BR /&gt;from the stack frame where it was saved:&lt;BR /&gt;&lt;BR /&gt;        LDH     -60(%r30),%r22  ;offset 0x40&lt;BR /&gt;        EXTRW,S %r22,31,16,%r1  ;offset 0x44&lt;BR /&gt;&lt;BR /&gt;Then we extract the short value. My question&lt;BR /&gt;is: Is the EXTRW,S ... a MUST be instruction?&lt;BR /&gt;Isn't the LDH instruction expected to &lt;BR /&gt;clear out the remaining bytes of the register?&lt;BR /&gt;&lt;BR /&gt;Reason I ask is that I have one program&lt;BR /&gt;that fails the 'if' test though the value&lt;BR /&gt;in memory is correct. However, the generated&lt;BR /&gt;asm does not include the EXTRW instruction.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;dalla&lt;BR /&gt;</description>
    <pubDate>Tue, 10 May 2005 21:31:43 GMT</pubDate>
    <dc:creator>dalla-santa_1</dc:creator>
    <dc:date>2005-05-10T21:31:43Z</dc:date>
    <item>
      <title>Pa Risc2.0 Assembly</title>
      <link>https://community.hpe.com/t5/operating-system-linux/pa-risc2-0-assembly/m-p/3541777#M101593</link>
      <description>I have a problem with a cast. A program is&lt;BR /&gt;doing something roughly like this:&lt;BR /&gt;&lt;BR /&gt;#define NUM 45&lt;BR /&gt;short n;&lt;BR /&gt;n = 45;&lt;BR /&gt;&lt;BR /&gt;if (n == NUM)&lt;BR /&gt;&lt;BR /&gt;Ok, things are a bit more complex but...&lt;BR /&gt;In the asm gerenated, we load the 45 in N&lt;BR /&gt;from the stack frame where it was saved:&lt;BR /&gt;&lt;BR /&gt;        LDH     -60(%r30),%r22  ;offset 0x40&lt;BR /&gt;        EXTRW,S %r22,31,16,%r1  ;offset 0x44&lt;BR /&gt;&lt;BR /&gt;Then we extract the short value. My question&lt;BR /&gt;is: Is the EXTRW,S ... a MUST be instruction?&lt;BR /&gt;Isn't the LDH instruction expected to &lt;BR /&gt;clear out the remaining bytes of the register?&lt;BR /&gt;&lt;BR /&gt;Reason I ask is that I have one program&lt;BR /&gt;that fails the 'if' test though the value&lt;BR /&gt;in memory is correct. However, the generated&lt;BR /&gt;asm does not include the EXTRW instruction.&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;dalla&lt;BR /&gt;</description>
      <pubDate>Tue, 10 May 2005 21:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/pa-risc2-0-assembly/m-p/3541777#M101593</guid>
      <dc:creator>dalla-santa_1</dc:creator>
      <dc:date>2005-05-10T21:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pa Risc2.0 Assembly</title>
      <link>https://community.hpe.com/t5/operating-system-linux/pa-risc2-0-assembly/m-p/3541778#M101594</link>
      <description>The EXTRW,S is needed if "n" contains a negative value.  If "n" was unsigned short, it wouldn't be needed.</description>
      <pubDate>Thu, 09 Mar 2006 22:42:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/pa-risc2-0-assembly/m-p/3541778#M101594</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-03-09T22:42:44Z</dc:date>
    </item>
  </channel>
</rss>

