Closed Bug 704097 Opened 13 years ago Closed 6 years ago

FloatClass::reciprocal and rsqrt C++ implementations must use the intrinsic

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q2 12 - Cyril

People

(Reporter: lhansen, Unassigned)

References

Details

The two methods are currently implemented as 1/x and 1/sqrt(x), but that is more precision than the JIT will have and will lead to interpreter/jit differences.  Ergo the C++ implementation must use the same hardware instruction as the JIT.

Don't forget to account for the interpreter-only configuration...
ditto for min/max, if we expose hardware-dependent semantics.
With inline SSE2 support for reciprocal and rsqrt, This bug definitely manifests.
With changes introduced in tr-float changeset 6989:35967134e840, there is now a visible difference between jitted code and interpreted code with regards to some of the implemented float intrinsics.

changeset:   6989:35967134e840
user:        William Maddox <wmaddox@adobe.com>
date:        Tue Nov 29 18:40:08 2011 -0800
summary:     Bug 703604 - Inline those float methods that correspond to inlined math methods

At the moment that following test media will produce different results between jit and interp:
as3/Types/Float/reciprocal.as
as3/Types/Float/rsqrt.as
as3/Types/Float/nonstrict/reciprocal.as
as3/Types/Float/nonstrict/rsqrt.as

There is also visible differences in these tests between release and release-debugger builds when jitted. The release-debugger builds do NOT show a difference between jitted code and interpreted code, is it possible that this configuration does not inline these methods?

What is interesting here is that the release-debugger builds will produce the non-inlined results if the debugger is active, but will produce the inline (different precision) if the debugger is disabled.
Correct, the inlining is disabled in debugger builds.  the "bug" is that there is any different behavior at all.  You should see the same divergence in float4.reciprocal and rsqrt too.
changeset: 7057:eab7b4ac9c84
user:      Brent Baker <brbaker@adobe.com>
summary:   Bug 704097: cleanup expected failures

http://hg.mozilla.org/tamarin-redux/rev/eab7b4ac9c84
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.