Skip to content
  • Akira Hatanaka's avatar
    [mips] Fix instruction selection pattern for sint_to_fp node to avoid emitting an · 39d40f7b
    Akira Hatanaka authored
    invalid instruction sequence.
    
    Rather than emitting an int-to-FP move instruction and an int-to-FP conversion
    instruction during instruction selection, we emit a pseudo instruction which gets
    expanded post-RA. Without this change, register allocation can possibly insert a
    floating point register move instruction between the two instructions, which is not
    valid according to the ISA manual.
    
    mtc1 $f4, $4         # int-to-fp move instruction.
    mov.s $f2, $f4       # move contents of $f4 to $f2.
    cvt.s.w $f0, $f2     # int-to-fp conversion.
    
    llvm-svn: 182042
    39d40f7b
Loading