mirror of
https://github.com/cc65/cc65.git
synced 2025-02-27 14:29:52 +00:00
No need to simplify an expression in SegDone() if it is replaced by a constant
anyway. git-svn-id: svn://svn.cc65.org/cc65/trunk@5372 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
b16a12d260
commit
be77192bcf
@ -295,7 +295,7 @@ void SegAlign (unsigned long Alignment, int FillVal)
|
||||
Error ("Combined alignment for active segment is %lu which exceeds %lu",
|
||||
CombinedAlignment, MAX_ALIGNMENT);
|
||||
|
||||
/* Avoid creating large fills for an object file that is thrown away
|
||||
/* Avoid creating large fills for an object file that is thrown away
|
||||
* later.
|
||||
*/
|
||||
Count = 1;
|
||||
@ -372,9 +372,6 @@ void SegDone (void)
|
||||
ED_Init (&ED);
|
||||
StudyExpr (F->V.Expr, &ED);
|
||||
|
||||
/* Try to simplify it before looking further */
|
||||
F->V.Expr = SimplifyExpr (F->V.Expr, &ED);
|
||||
|
||||
/* Check if the expression is constant */
|
||||
if (ED_IsConst (&ED)) {
|
||||
|
||||
@ -408,7 +405,10 @@ void SegDone (void)
|
||||
}
|
||||
F->Type = FRAG_LITERAL;
|
||||
|
||||
} else if (ED.AddrSize != ADDR_SIZE_DEFAULT) {
|
||||
} else {
|
||||
|
||||
/* Simplify the expression */
|
||||
F->V.Expr = SimplifyExpr (F->V.Expr, &ED);
|
||||
|
||||
/* We cannot evaluate the expression now, leave the job for
|
||||
* the linker. However, we can check if the address size
|
||||
|
Loading…
x
Reference in New Issue
Block a user