lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I found a bug in the JIT that happens when passing numeric constants to e.g. sinh. This happens only on x64, tested on Windows with VC++.
Here's a snippet that reproduces it:

local sum = 0
for i=1,100 do
sum = sum + math.sinh(2)
end

assert(math.abs(math.sinh(2)*100 - sum) < 0.1)


It appears the JIT fails to assign the constant to the xmm0 register in the call to sinh.

Regards,
Erik Lindroos