Closed Bug 462010 Opened 17 years ago Closed 17 years ago

MOPS/FLACC failures when run on PPC

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: brbaker, Assigned: stejohns)

Details

(Keywords: flashplayer)

Attachments

(1 file)

Possibly an endian issue. $> avmshell tests/acceptance/mops/mops.abc_ The following testcases fail: Read test int w/ min sized = false FAILED! expected: true Read test float w/ min sized = false FAILED! expected: true Read test double w/ min sized = false FAILED! expected: true Write test float w/ min sized = false FAILED! expected: true Write test double w/ min sized = false FAILED! expected: true Read/write int min = false FAILED! expected: true Read/write float min = false FAILED! expected: true Read/write double min = false FAILED! expected: true Read/write int scratch = false FAILED! expected: true Read/write float scratch = false FAILED! expected: true Read/write double scratch = false FAILED! expected: true
Flags: in-testsuite+
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Pushed change to redux to skip the testcase (1031:82929bd5b049), needs to be removed when this is fixed.
Is this running with -Dinterp, or without, or both?
Answer: it fails both ways. (handy tip I just learned: you can force an Intel Mac to run a universal binary in PPC mode, via rosetta, by preceding command line with "arch -ppc").
Doh. Looks like the byte-swap functions for big-endian are just plain wrong for 32-bit and 64-bit.
Attached patch PatchSplinter Review
big-endian byte-swap routines were just plain wrong for 32-bit and 64-bit values in the MOPS opcodes. Also, a couple of the interpreter cases were incorrect as well (but only for big-endian). Consolidated the swap functions from MethodEnv.cpp and Interpreter.cpp into a single set, added strong typing to make some of the errors harder to make. Now passes the acceptance test for both Intel and PPC, in both interp and jit modes.
Assignee: nobody → stejohns
Status: NEW → ASSIGNED
Attachment #345329 - Flags: review?(brbaker)
Attachment #345329 - Flags: review?(rreitmai)
Comment on attachment 345329 [details] [diff] [review] Patch Probably not that critical but have you looked into using the shift/and/or version of swapping. It's usually faster than byte extract.
Attachment #345329 - Flags: review?(rreitmai) → review+
Nope -- I mimicked what we were already doing in DataIO.cpp. Definitely open for improvements :-)
pushed to redux as changeset: 1038:c071833f0116
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #345329 - Flags: review?(brbaker) → review+
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
removing QRB request, bug resolved/verified
Flags: flashplayer-qrb?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: