* set to the type of the left hand side.
*/
{
- /* Get the type of the right hand side. Treat function types as
- * pointer-to-function
+ /* Get the type of the right hand side. Treat function types as
+ * pointer-to-function
*/
type* rhst = rhs->e_tptr;
if (IsTypeFunc (rhst)) {
g_subeqstatic (flags, lval->e_const, 0, val);
}
} else if (lval->e_flags & E_MEXPR) {
- /* Address in a/x. */
+ /* Address in a/x, check if we have an offset */
+ unsigned Offs = (lval->e_flags == E_MEOFFS)? lval->e_const : 0;
if (inc == g_inc) {
- g_addeqind (flags, lval->e_const, val);
+ g_addeqind (flags, Offs, val);
} else {
- g_subeqind (flags, lval->e_const, val);
+ g_subeqind (flags, Offs, val);
}
} else {
Internal ("Invalid addressing mode");
#define E_MLOCAL 0x0040 /* Reference to local variable (stack offset) */
#define E_MCONST 0x0020 /* Constant value */
#define E_MEXPR 0x0010 /* Result is in primary register */
-#define E_MEOFFS 0x0011 /* Offset is in primary register, base on stack */
+#define E_MEOFFS 0x0011 /* Base is in primary register, const offset */
#define E_MCTYPE 0x0007 /* Type of a constant */
#define E_TCONST 0x0000 /* Constant */