Please use last attached patch for stfiwx implementation and demonstration of cast problem. Instruction stfiwx is used when casting from float point to integer is needed. I'm having problems with proper evaluation of values at the line (in cast_ftoi.c) where casting from float to integer accured. In first example where evaluation is separated from casting there is no problems, but in second example instead of evaluated value the last parameter "b" is casted to integer (like lazy evaluation), that's wrong. (see cast_ftoi.c) Is there maybe a problem with generating the correct qemu vm instructions. The casting has been tested on real powerpc 603e processor board where casting works properly and on Qemu where second test fails. cast test 1 - float: 85.745110 [0x42ab7d7f] -> integer: 85 [0x00000055] cast test 2 - float: 85.745110 [0x42ab7d7f] -> integer: 57005 [0x0000dead] <-- 85 is correct Tom Marn