title: Accessing hi and low part of int64_t with int32_t
body: <p>I am working on a 32-bit architecture where <code>int64_t</code> is defined only with the most recent version of the compiler (software emulation). Since we did not entirely upgraded to the last compiler, I would like to manage 64-bit integers with a union and define basic arithmetic operations.</p>
  <p>I wrote this:</p>
  <pre><code>typedef union _int64_u {
      int64_t  int64;
      int64_32 int32;
  } int64_u;
  
  typedef struct _int64_32 {
      int32_t hi;
      int32_t lo;
  }  
  </code></pre>
  <p>I would like to clarify the following points:</p>
  <ul>
  <li>What is the naming standards for such definition (part and types)?</li>
  <li>Is this solution correct?</li>
  </ul>
  <p>Hereafter, an example of the add and sub functions:</p>
  <pre><code>#pragma inline
  #pragma always_inline
  int64_u int64_sub(int64_u x, int64_u y)
  {
      int64_u n;
      asm(&quot;%0 = %1 - %2;&quot;
              : &quot;=d&quot; (n.int32.lo)
              : &quot;d&quot;  (x.int32.lo), &quot;d&quot; (y.int32.lo));
      asm(&quot;%0 = %1 - %2 + CI - 1;&quot;
              : &quot;=d&quot; (n.int32.hi)
              : &quot;d&quot;  (x.int32.hi), &quot;d&quot; (y.int32.hi));
      return n;
  }
  
  #pragma inline
  #pragma always_inline
  int64_u int64_add(int64_u x, int64_u y)
  {
      int64_u n;
      asm(&quot;%0 = %1 + %2;&quot;
              : &quot;=d&quot; (n.int32.lo)
              : &quot;d&quot;  (x.int32.lo), &quot;d&quot; (y.int32.lo));
      asm(&quot;%0 = %1 + %2 + CI;&quot;
              : &quot;=d&quot; (n.int32.hi)
              : &quot;d&quot;  (x.int32.hi), &quot;d&quot; (y.int32.hi));
      return n;
  } 
  </code></pre>