title: How to convert 64-bit int to float on 32-bit PowerPC?
body: <p>I'm writing assembly on a 32-bit PowerPC system (specifically, a GameCube). I have a 64-bit integer that I need to convert to a floating-point number. How can I do this? Examples I can find online all involve the use of <code>fcfid</code> instruction, but this is only available on 64-bit systems.</p>
  <p>The code so far is:</p>
  <pre><code>CALL  __OSGetSystemTime # -&gt; u64 ticks in r3, r4
  stw   r3, SP_FLOAT_TMP(r1)
  stw   r4, (SP_FLOAT_TMP+4)(r1)
  lfd   f1, SP_FLOAT_TMP(r1)
  fcfid f1 # u64 -&gt; double
  frsp  f1 # double -&gt; float
  </code></pre>
  <p>(<code>CALL</code> is a macro for position-independent <code>bl</code>)</p>
  <p>The GNU Assembler gives an error:</p>
  <pre><code>Error building debugprint debugprint.s: Assembler messages:
  debugprint.s:345: Error: unrecognized opcode: `fcfid'
  </code></pre>