-
Notifications
You must be signed in to change notification settings - Fork 111
Add support for building SSE2 code to JS. #103
Conversation
return (caps ? (isInt ? "Int" : "Float") : (isInt ? "int" : "float")) + std::to_string(primSize) + 'x' + std::to_string(numElems); | ||
} | ||
|
||
std::string WrapMathFRound(const std::string &value, bool wrap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is similar to ensureFloat
. First of all, the name should begin with a lowercase letter. Second, how about also calling it ensureFloat
, but overloaded with a second parameter which is a bool? And implementing it right after ensureFloat
?
Aside from one comment above, this looks good. I am not familiar with the SIMD correctness wrt the spec, though, perhaps @sunfishcode wants to review that aspect. |
Thanks, renamed the function. Also did other changes to help SSE2 code generation in emscripten-core/emscripten#3542 |
…e instead of a shuffle.
… the output can avoid emitting redundant SIMD symbols.
Ping @sunfishcode , this is now ready to be reviewed and merged from my end. Merging this should be done at the same time with emscripten-core/emscripten#3542, since they go hand in hand. |
Add support for building SSE2 code to JS.
No description provided.