Joshua Isom (via RT) wrote:
When using JIT on FreeBSD 6.0, there are multiple failures in
t/op/trans.t. Most are geometric, sinh, tanh, and atan2, so these
might be covered by a previous report. But in particular are bugs in
pow. I've tried to track it down more specifically but I don't seen to
be succeeding, and only getting more confused.
Please have a look at docs/jit.pod and docs/debug.pod. Both have
sections how to debug JIT code with gdb/ddd.
I've also noticed that pow_n_nc_nc optimizes away to just set, and
trying -O0 doesn't disable optimization. With -O1 -j, it persists...
There are no opcodes with all constant integer or number arguments.
Therefore, during compilation, registers are set to the constants and an
opcode with equivalent registers is used to calculate the result. E.g.
the PASM 'opcode':
pow N3, 2.0, -4
is converted to
set N1, 2.0
set N2, -4
pow N0, N1, N2
and evaluated at compiletime. The result is then used and replaces the
original opcode:
set N3, 0.0625
With -O2 -j, it disappears.
That's just a bug with -O2. Just ignore -O2 for now please.
leo