unison-code / unison

Unison's source code
http://unison-code.github.io/
Other
101 stars 17 forks source link

Missing delay slots for Mips #41

Closed romits800 closed 4 years ago

romits800 commented 4 years ago

The delay slots for Mips after instructions beqz and jr are missing:

factorial:                              
# BB#0:
    blez    $4, $BB0_2
    addiu   $2, $zero, 1
$BB0_1:                                 # =>This Inner Loop Header: Depth=1
    mul $2, $2, $4
    slti    $1, $4, 2
    addiu   $4, $4, -1
    beqz    $1, $BB0_1
$BB0_2:
    jr  $ra

I attach the .mir, .asm.mir, and the Makefile that generated this. factorial.tar.gz