Skip to content

Commit

Permalink
Make the disablement of optimizatiomn in x86's thunkProtect specific to
Browse files Browse the repository at this point in the history
gcc 7.4.x.  Guille, Pablo, All, please take note of this style.  The point
being we want correctness, but we shouldn't penalise unnecessarily other
platfoms or build configurations that do function correctly.
  • Loading branch information
eliotmiranda committed Jan 22, 2019
1 parent 426dbc0 commit 68441ad
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion platforms/Cross/plugins/IA32ABI/ia32abicc.c
Expand Up @@ -168,8 +168,18 @@ getMostRecentCallbackContext() { return mostRecentCallbackContext; }
* longs, followed by the thunkp and stackp passed on the stack. The register
* args would get copied into a struct on the stack. A pointer to the struct
* is then passed as an element of the VMCallbackContext.
*
* N.B. On gcc 7.4.x thunkEntry fails if optimized, for as yet not fully
* diagnosed reasons. See
* https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/353
* Hence the pragma below.
*/
long __attribute__((optimize("O0")))
long
#ifdef __GNUC__
# if __GNUC__ == 7 && __GNUC_MINOR__ >= 4
__attribute__((optimize("O0")))
# endif
#endif
thunkEntry(void *thunkp, sqIntptr_t *stackp)
{
VMCallbackContext vmcc;
Expand Down

0 comments on commit 68441ad

Please sign in to comment.