Displaying 1 result from an estimated 1 matches for "bc1t".
Did you mean:
bc1
2012 Aug 06
4
[LLVMdev] Casting from float to unsigned char - incorrect output?
...to i8
ret i8 %conv
}
This is the assembly produced by another compiler; it is more complex, but
it produces the expected output, matching with GCC: (directives removed for
convenience)
trunc:
mov.s $f4,$f12
la $2,L6
l.s $f6,($2)
c.lt.s $f12,$f6
bc1t .L3
sub.s $f0,$f12,$f6
cvt.w.s $f0,$f0
mfc1 $2,$f0
lui $3,32768
addu $3,$2,$3
j .L4
.L3:
cvt.w.s $f4,$f4
mfc1 $3,$f4
.L4:
sll $2,$3,24
srl $2,$2,24
sll $2,$2,24
srl...