This adds support for __builtin_frame_address. Nothing fancy; just the basics.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Awesome! Just one comment update, then lgtm.
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
586 ↗ | (On Diff #48116) | This just returns zero, right? That seems like valid behavior so I'd say so in the comment above: On some machines it may be impossible to determine the frame address of any function other than the current one; in such cases, or when the top of the stack has been reached, this function returns 0 if the first frame pointer is properly initialized by the startup code. Calling this function with a nonzero argument can have unpredictable effects, including crashing the calling program. As a result, calls that are considered unsafe are diagnosed when the -Wframe-address option is in effect. Such calls should only be made in debugging situations. |
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
586 ↗ | (On Diff #48116) | Just returning SDValue() here will cause an isel failure, which is fatal with an obscure error. We should probably fail() gracefully with a diagnostic here instead. |
Comment Actions
Otherwise LGTM too
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
586 ↗ | (On Diff #48116) | Or returning 0 would be fine too. Maybe even better if that's what GCC. does. |
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
586 ↗ | (On Diff #48116) | Sorry, this returns an empty SDValue and not the original one. Ignore my previous comment. |