Closed Bug 603890 Opened 9 years ago Closed 9 years ago
The testcase of ldc2i, lds2i, lduc2ui, ldus2ui are not endian aware
Should we enable these ops on big endian machine?
Tamarin uses those opcodes to implement fast versions of load-byte, store-byte, (etc) opcodes, which are generated by the Alchemy compiler. http://labs.adobe.com/technologies/alchemy/ Enabling the opcodes guarded by NJ_EXPANDED_LOADSTORE_SUPPORTED would make such code run quite a bit faster. Without them, TR generates helper calls instead.
I plan: Add an option "--endian" to lirasm, it will print "big endian" or "little endian". Create tests/le and tests/be directory, copy endian specific tests into these 2 directories. Comments?
This sounds okay with me.
Can we make the names "bigendian" and "littleendian"? "be" and "le" aren't obvious, and these names shouldn't have to be typed that often.
Can we have the default for lirasm be littleendian, leaving us with a single '--bigendian' option.
Adding --big-endian option, then it is backwards compatible. Although I don't think it's necessary. Comments?
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #484623 - Flags: review?(nnethercote)
Comment on attachment 484623 [details] [diff] [review] draft patch > " --word-size prints the word size (32 or 64) for this build of lirasm and exits\n" >+ " --big-endian prints 1 if the machine is big endian\n" To make it consistent with --word-size, it would be better if the option name was --endianness and it printed either "little-endian" or "big-endian". Reasonable? r=me with that change (tests in the script need to be updated accordingly).
Attachment #484623 - Flags: review?(nnethercote) → review+
Add test cases for big endian http://hg.mozilla.org/projects/nanojit-central/rev/a8165439796e
Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.