Closed Bug 723073 Opened 13 years ago Closed 7 years ago

Add MOPS abcasm testcases

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: brbaker, Assigned: brbaker)

References

Details

Attachments

(3 files, 1 obsolete file)

Add abcasm testmedia that covers the memory op codes
Attached patch si8 and li8 (obsolete) — Splinter Review
edwsmith: Looking for some feedback and the basis of this testing. This is only trying to cover si8, liz8 and lix8 Feedback can also be supplied as a comment on the testplan https://zerowing.corp.adobe.com/x/KIXCIw
Attachment #593403 - Flags: review?(edwsmith)
These are an ok start but its not likely they probe the corner cases very well - they don't generate high register pressure, they aren't interleaved with other operations (calls?), etc. Feel free to poach from this (stalled) work-in-progress: http://hg.mozilla.org/users/edwsmith_adobe.com/redux-mq/file/tip/mopstest Its an ABS that defines a series of functions, one for every single-byte opcode, including all the MOPS opcodes. It contains a test driver that fleshes out order-of-evaluation bug Bug 689882
Comment on attachment 593403 [details] [diff] [review] si8 and li8 If youre just probing the basic behavior of each opcode, Its better to use a wrapper function for each opcode and write tests in AS3. Wrappers can be closures, so you can test a lot of combinations without a lot of code. On the other hand if you're trying to test the JIT's corner cases then the tests need to be a lot more intense (more register pressure) and some kind of random generator might cover more territory. That said, there's nothing inherently/obviously wrong with these tests, they just don't have a high value for the work it takes to write/maintain each one.
Attachment #593403 - Flags: review?(edwsmith) → review-
(In reply to Edwin Smith from comment #3) > Comment on attachment 593403 [details] [diff] [review] > si8 and li8 > > If youre just probing the basic behavior of each opcode, Its better to use a > wrapper function for each opcode and write tests in AS3. Wrappers can be > closures, so you can test a lot of combinations without a lot of code. Do you have a sample somewhere on putting opcodes directly into as code via a wrapper? I would like to at least get basic coverage into the testsuite since we currently do not have it.
(In reply to Brent Baker from comment #4) > Do you have a sample somewhere on putting opcodes directly into as code via > a wrapper? I would like to at least get basic coverage into the testsuite > since we currently do not have it. Yep, check out the patch I linked to in Comment #2. Here is an example test: package { import flash.utils.ByteArray import avmplus.Domain initMemory() var a0 = { valueOf: function() { print('a0'); return 0 } } var a1 = { valueOf: function() { print('a1'); return 1 } } stores = [SI8, SI16, SI32, SF32, SF64] // SI8() wrapps OP_si8, etc // test arg coerce order for each (var f in stores) f(a0,a1) function initMemory(bytes = 0) { var min = Domain.MIN_DOMAIN_MEMORY_LENGTH var memory = new ByteArray() memory.length = bytes > min ? bytes : min Domain.currentDomain.domainMemory = memory } }
Attached patch v2. si8 and li8Splinter Review
This is very basic coverage of si8 and li8, verified using other memory ops plus ByteArray read|write methods. Again this is just basic coverage of the memory ops and is currently not meant to be something that provides intermixing with other ops or high register pressure. This is based on the patch: http://hg.mozilla.org/users/edwsmith_adobe.com/redux-mq/file/tip/mopstest
Attachment #593403 - Attachment is obsolete: true
Attachment #593841 - Flags: feedback?(edwsmith)
Attachment #593841 - Flags: feedback?(edwsmith) → feedback+
changeset: 7187:3252db0dc6b1 user: Brent Baker <brbaker@adobe.com> summary: Bug 723073: Adding MOPS testcases, these tests are currently fairly simple calls to the various op codes and are pretty isolated as they are wrapped in their own function calls. I will follow up with additional abcasm testcases that allow for more op codes to be jitted at once. http://hg.mozilla.org/tamarin-redux/rev/3252db0dc6b1
Depends on: 724889
Use the proper switch in the avm_args file to have additional abc files loaded at runtime: https://developer.mozilla.org/En/Tamarin/Tamarin_Acceptance_Testing/Actionscript_Acceptance_Tests#testname.as.avm_args
changeset: 7260:64250dfb252a user: Brent Baker <brbaker@adobe.com> summary: Bug 723073: Use |multiabc| avm_args switch http://hg.mozilla.org/tamarin-redux/rev/64250dfb252a
I found the source to test/acceptance/mops/mops.abc_. The files with tools to rebuild are in the qe repo in projects/mops. Looks like they can all be rewritten using the instrinsics like the tests here.
Attached patch mops/mops.abc_Splinter Review
This patch replicates the mops/mops.abc_ as close as possible using the intrinsics.abc_ file. There are still a couple of main differences though that means we should keep the mops.abc_ around. This mainly stems from note being able to mark as3 functions to be inlined. I can look at adding a couple of targeted abcasm tests to try and pick up the difference. (Will work on a follow up patch)
Attachment #611518 - Flags: review?(dschaffe)
Attachment #611518 - Attachment is patch: true
Comment on attachment 611518 [details] [diff] [review] mops/mops.abc_ looks good. You should change these lines for clarity: - AddTestCase("domainClass == null", false, domainClass == null); + AddTestCase("domainClass != null", true, domainClass != null); - AddTestCase("byteArrayClass == null", false, byteArrayClass == null); + AddTestCase("byteArrayClass != null", true, byteArrayClass != null); - AddTestCase("currentDomain == null", false, currentDomain == null); + AddTestCase("currentDomain != null", true, currentDomain != null);
Attachment #611518 - Flags: review?(dschaffe) → review+
changeset: 7339:f85e97660e1f user: Brent Baker <brbaker@adobe.com> summary: Bug 723073: This change replicates the mops/mops.abc_ as close as possible using the intrinsics.abc_ file.(p=brbaker, r=dscahffe) http://hg.mozilla.org/tamarin-redux/rev/f85e97660e1f
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: