title: How do I move a floating point constant into an FP register?
body: <p>So, I am programming in assembly form ARM using the A64 instruction set.
  I am using the instruction fmov   d1, #31.0 to move values to the dx register.
  However, when I use 0.0 or any value higher than 31.0, it shows the error:</p>
  <pre><code>&quot;Error: invalid floating-point constant at operand 2 -- `fmov d1,#32.0'&quot;
  </code></pre>
  <p>So, how do I define a floating-point constant on A64? Why can't I use any value above 31 or use 0? How can I represent the values in hex?</p>
  <p>Another question is: According to the <a href="https://developer.arm.com/architectures/learn-the-architecture/aarch64-instruction-set-architecture/registers-in-aarch64-general-purpose-registers" rel="nofollow noreferrer">arm's website</a> it supports the use of floating point registers as Bx, Hx, Sx, Dx and Qx (8,16 ,34,64 and 128 bits respectively), but I just can't use the Bx,Hx and Qx registers, it shows:</p>
  <p>&quot; Error: operand mismatch -- `fmov b1,#1.0'&quot;</p>
  <p>&quot; Error: selected processor does not support `fmov h1,#2.0&quot;</p>
  <p>&quot; Error: operand mismatch -- `fmov q1,#2.0'&quot;</p>
  <p>How can I properly set the second operand?</p>