Big Endian Support (using extra acorn AST pass)#13413
Big Endian Support (using extra acorn AST pass)#13413kripken merged 16 commits intoemscripten-core:mainfrom
Conversation
|
Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS. |
kripken
left a comment
There was a problem hiding this comment.
In general the direction looks good!
Please add a test for this. See for example how unsignPointers is tested in tests/test_other.py.
5f795bc to
841e180
Compare
|
@kripken Please take a look! On LE machine with SUPPORT_BIG_ENDIAN=0 it does not cause any additional test failures (over core tests). On LE machine with SUPPORT_BIG_ENDIAN=1 it breaks a few tests that deal with runtime code size. On BE machine there are still problems, but Emscripten works in most cases (for "wasm0", "wasm1", "wasm2" and "other" test suites approximately 600 out of 700 tests pass). |
|
Looks like all the test failures here are unrelated issues on |
| } | ||
| case 'HEAPF64': { | ||
| // change "name[idx]" to "LE_HEAP_LOAD_F64(idx*8)" | ||
| makeCallExpression(node, 'LE_HEAP_LOAD_F64', [multiply(idx, 8)]); |
There was a problem hiding this comment.
Nice work overall!
Instead of doing the multiplies here, I would recommend placing the multiplies inside the LE_HEAP_LOAD_ and LE_HEAP_STORE_ functions for a nice code size win. (only one multiply per function versus once for each call) - unless there is some reason they need to be here?
Related to previous discussion about supporting Big Endian architectures:
#12387
#12780