I have a macro:
#define EnterCritical() do { SP++; *(unsigned char idata *)(SP-1) = IE; EA = 0; } while (0);
I wrote "FYI, it does the behavior described for optimization levels 8 and 9." It only happens in level 9, of course ...