mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 06:30:16 +00:00
Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1350 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
8c7f650621
commit
7c9bf720d8
@ -504,7 +504,7 @@ unsigned OptJumpTarget (CodeSeg* S)
|
||||
* is not attached to the jump itself
|
||||
*/
|
||||
if (E2 != 0 &&
|
||||
(E2->Info & OF_UBRA) != 0 &&
|
||||
(E2->Info & OF_UBRA) != 0 &&
|
||||
E2->JumpTo &&
|
||||
E2->JumpTo->Owner != E2) {
|
||||
|
||||
@ -875,7 +875,7 @@ unsigned OptDupLoads (CodeSeg* S)
|
||||
*/
|
||||
if (In->RegY >= 0 && /* Value of Y is known */
|
||||
E->AM == AM65_ZP && /* Store into zp */
|
||||
In->RegX == RegVal (E->Chg, In)) { /* Value identical */
|
||||
In->RegY == RegVal (E->Chg, In)) { /* Value identical */
|
||||
|
||||
Delete = 1;
|
||||
|
||||
|
@ -223,14 +223,12 @@ unsigned assignadjust (type* lhst, ExprDesc* rhs)
|
||||
} else if (!IsClassInt (rhst)) {
|
||||
Error ("Incompatible types");
|
||||
} else {
|
||||
/* Adjust the int types. To avoid manipulation of TOS mark lhs
|
||||
* as const.
|
||||
*/
|
||||
/* Convert the rhs to the type of the lhs. */
|
||||
unsigned flags = TypeOf (rhst);
|
||||
if (rhs->Flags == E_MCONST) {
|
||||
flags |= CF_CONST;
|
||||
}
|
||||
return g_typeadjust (TypeOf (lhst) | CF_CONST, flags);
|
||||
return g_typecast (TypeOf (lhst), flags);
|
||||
}
|
||||
} else if (IsClassPtr (lhst)) {
|
||||
if (IsClassPtr (rhst)) {
|
||||
@ -246,7 +244,7 @@ unsigned assignadjust (type* lhst, ExprDesc* rhs)
|
||||
case TC_INCOMPATIBLE:
|
||||
Error ("Incompatible pointer types");
|
||||
break;
|
||||
|
||||
|
||||
case TC_QUAL_DIFF:
|
||||
Error ("Pointer types differ in type qualifiers");
|
||||
break;
|
||||
@ -279,7 +277,7 @@ unsigned assignadjust (type* lhst, ExprDesc* rhs)
|
||||
return CF_INT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DefineData (ExprDesc* Expr)
|
||||
/* Output a data definition for the given expression */
|
||||
@ -2947,10 +2945,8 @@ static void addsubeq (const GenDesc* Gen, ExprDesc *lval, int k)
|
||||
lflags |= TypeOf (lval->Type) | CF_FORCECHAR;
|
||||
rflags |= TypeOf (lval2.Type);
|
||||
|
||||
/* Adjust the rhs to the lhs. To avoid manipulation of the TOS, mark
|
||||
* the lhs as const.
|
||||
*/
|
||||
g_typeadjust (lflags | CF_CONST, rflags);
|
||||
/* Cast the rhs to the type of the lhs */
|
||||
g_typecast (lflags, rflags);
|
||||
|
||||
/* Output apropriate code */
|
||||
if (lval->Flags & E_MGLOBAL) {
|
||||
|
Loading…
Reference in New Issue
Block a user