Closed Bug 483649 Opened 15 years ago Closed 15 years ago

ppc64 debugger builds failing test suite

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: rreitmai, Assigned: rreitmai)

References

Details

Attachments

(1 file, 1 obsolete file)

The following tests are failing on [debug|release] debugger builds : 

  ecma3/TypeConversion/e9_3.abc : Number(false) = -238423838475.15292 FAILED! expected: 0
  ecma3/TypeConversion/e9_3.abc : Number(0) = -238423838475.15292 FAILED! expected: 0
  ecma3/Types/e8_5.abc : var s:Number = 'string' = -238423838475.15292 FAILED! expected: NaN
Assignee: nobody → rreitmai
Marked expected failures until this is fixed: 1608:7c44b7d26f76

Marking as blocking the next TC merge since this is an injection.
Blocks: 481413
Interesting; the following code fails: 

function foo() {
  var a = Number(false);
  var b = Number(0);
  return b
}

print(foo())

And re-enabling deadvars() allows it to pass.
Attached patch ver 1 - fmr fix (obsolete) — Splinter Review
The issue turned out to be specific to the fmr() instruction.  

We were generating fmr f1,r15  <= note non-fp reg as src.

The problem started with a downstream store (stqi) for the result of a i2f.  This reserved a gp register, r15.  When we then came across a call in which we needed to pass the i2f result, f1 was marked as the argument and since the i2f result was already in r15, a fmr was issued.

This brings up an interesting point on 64b systems; since gp regs can hold the float value and we're using quad instructions somewhat interchangeably with float on these systems, are there other instances where we incorrectly choose a gp reg instead of a fp reg?

Diving into this bug also made me realize that debugger builds (with deadvars disabled) are generating absolutely horrible code.  I'll open a bug for that.
Attachment #369001 - Flags: review?(edwsmith)
Attachment #369001 - Attachment is obsolete: true
Attachment #369003 - Flags: review?(edwsmith)
Attachment #369001 - Flags: review?(edwsmith)
(In reply to comment #3)
> Created an attachment (id=369001) [details]

> This brings up an interesting point on 64b systems; since gp regs can hold the
> float value and we're using quad instructions somewhat interchangeably with
> float on these systems, are there other instances where we incorrectly choose a
> gp reg instead of a fp reg?

bugs are certianly possible, but in the X64 code I did find and fix several in this area.  Each case in asm_nongp_copy() is definitely being used, as a result.

Take a look at NativeX64 asm_regarg(), since it just uses findSpecificRegFor(), it should handle the various corner cases.  (of course, it is slightly less optimized; the ppc code will copy from a saved-reg to a scratch-reg without forgetting the expr's assignment to the saved reg.  this should yeild less spillage).

> Diving into this bug also made me realize that debugger builds (with deadvars
> disabled) are generating absolutely horrible code.  I'll open a bug for that.
Attachment #369003 - Flags: review?(edwsmith) → review+
Target Milestone: --- → flash10.x
Status: NEW → ASSIGNED
e772e92d06e4: Fix for bug 483649 - ppc64 fmr instruction fix (r=edwsmith) - rev 1682
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
failing tests have been passing since the fix was submitted, removed "expectedfail" in changeset 1696:b1d4d72e4a22
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: