mirror of
https://github.com/cc65/cc65.git
synced 2025-02-03 07:30:52 +00:00
More explicit solution. The first one was a bit hackish.
This commit is contained in:
parent
3a52c143fb
commit
447b6e5573
@ -105,9 +105,15 @@ static void CopyStruct (ExprDesc* LExpr, ExprDesc* RExpr)
|
||||
} else {
|
||||
|
||||
/* Load the address of rhs into the primary */
|
||||
ED_AddrExpr (RExpr);
|
||||
if (!ED_IsLocExpr (RExpr)) {
|
||||
ED_AddrExpr (RExpr);
|
||||
LoadExpr (CF_NONE, RExpr);
|
||||
} else if (RExpr->IVal != 0) {
|
||||
/* We have an expression in the primary plus a constant
|
||||
** offset. Adjust the value in the primary accordingly.
|
||||
*/
|
||||
g_inc (CF_PTR | CF_CONST, RExpr->IVal);
|
||||
RExpr->IVal = 0;
|
||||
}
|
||||
|
||||
/* Push the address of the rhs as the source of memcpy */
|
||||
|
Loading…
x
Reference in New Issue
Block a user