Hi Team,
=============================================================================
sTmpUint32_3 = sTmpUint32_1 / sTmpUint32_2; ---- divide two integers
0849e8: A306 MOVL P, @0x6
0849e9: 0200 MOVB ACC, #0
0849ea: F61F RPT #31
0849eb: 56170008 || SUBCUL ACC, @0x8 ---- TMU is not used. Actual measurement shows that this division takes many CPU cycles.
0849ed: A90A MOVL @0xa, P
=============================================================================
sTmpFloat32_3 = sTmpFloat32_1 / sTmpFloat32_2; ---- divide two floating point numbers
084a60: E2AF0100 MOV32 R1H, @0x0, UNCF
084a62: E2AF0002 MOV32 R0H, @0x2, UNCF
084a64: E2740008 DIVF32 R0H, R1H, R0H ---- The TMU instruction is used. Actual measurement shows that this division costs less CPU cycles.
084a66: 7700 NOP
084a67: 7700 NOP
084a68: 7700 NOP
084a69: 7700 NOP
084a6a: E2030004 MOV32 @0x4, R0H
How can I make integer division also compiled into a TMU instruction?
--
Thanks & Regards