a) variables declared as "bit" should not be assigned to registers
b) should not reorder instructions if there is a volatile assignment
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@58
4a8a32a2-be11-0410-ad9d-
d568d2c75423
!sym->reqv && /* does not already have a register euivalence */
!IS_VOLATILE(sym->etype) && /* not declared as volatile */
!IS_STATIC(sym->etype) && /* and not declared static */
- !sym->islbl &&
- !IN_FARSPACE(SPEC_OCLS(sym->etype))) { /* not a label */
+ !sym->islbl && /* not a label */
+ !IN_FARSPACE(SPEC_OCLS(sym->etype)) && /* not in far space */
+ !IS_BITVAR(sym->etype) /* not a bit variable */
+ ) {
/* we will use it after all optimizations
and before liveRange calculation */
if (SKIP_IC2(dic))
continue;
-
+
+ if (IS_TRUE_SYMOP(IC_RESULT(dic)) &&
+ IS_OP_VOLATILE(IC_RESULT(dic))) {
+ dic = NULL;
+ break;
+ }
+
if (IS_SYMOP(IC_RESULT(dic)) &&
IC_RESULT(dic)->key == IC_RIGHT(ic)->key) {
if (POINTER_SET(dic))