Skip to content

Big Endian Support (using extra acorn AST pass)#13413

Merged
kripken merged 16 commits intoemscripten-core:mainfrom
V-for-Vasili:BE-port
Mar 9, 2021
Merged

Big Endian Support (using extra acorn AST pass)#13413
kripken merged 16 commits intoemscripten-core:mainfrom
V-for-Vasili:BE-port

Conversation

@V-for-Vasili
Copy link
Copy Markdown
Contributor

@V-for-Vasili V-for-Vasili commented Feb 4, 2021

Related to previous discussion about supporting Big Endian architectures:
#12387
#12780

@welcome
Copy link
Copy Markdown

welcome bot commented Feb 4, 2021

Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS.

@V-for-Vasili V-for-Vasili marked this pull request as ready for review February 8, 2021 15:00
@V-for-Vasili
Copy link
Copy Markdown
Contributor Author

V-for-Vasili commented Feb 8, 2021

@kripken @juj please take a look!

Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general the direction looks good!

Please add a test for this. See for example how unsignPointers is tested in tests/test_other.py.

@V-for-Vasili V-for-Vasili force-pushed the BE-port branch 2 times, most recently from 5f795bc to 841e180 Compare March 2, 2021 19:16
@V-for-Vasili
Copy link
Copy Markdown
Contributor Author

@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).

Base automatically changed from master to main March 8, 2021 23:49
Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@kripken kripken enabled auto-merge (squash) March 9, 2021 18:15
@kripken kripken disabled auto-merge March 9, 2021 21:56
@kripken
Copy link
Copy Markdown
Member

kripken commented Mar 9, 2021

Looks like all the test failures here are unrelated issues on main atm, landing.

@kripken kripken merged commit 03b33ac into emscripten-core:main Mar 9, 2021
}
case 'HEAPF64': {
// change "name[idx]" to "LE_HEAP_LOAD_F64(idx*8)"
makeCallExpression(node, 'LE_HEAP_LOAD_F64', [multiply(idx, 8)]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants