Working on better 65816 support

git-svn-id: svn://svn.cc65.org/cc65/trunk@2619 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-11-07 19:28:37 +00:00
parent 066ad63e35
commit 7e74078801
23 changed files with 558 additions and 460 deletions

View File

@@ -917,7 +917,7 @@ ExprNode* GenCurrentPC (void)
if (RelocMode) {
/* Create SegmentBase + Offset */
Root = NewExprNode (EXPR_PLUS);
Root->Left = GenSectionExpr (GetSegNum ());
Root->Left = GenSectionExpr (GetCurrentSegNum ());
Root->Right = GenLiteralExpr (GetPC ());
} else {
/* Absolute mode, just return PC value */
@@ -950,7 +950,7 @@ ExprNode* GenBranchExpr (unsigned Offs)
/* Create *+Offs */
if (RelocMode) {
N = NewExprNode (EXPR_PLUS);
N->Left = GenSectionExpr (GetSegNum ());
N->Left = GenSectionExpr (GetCurrentSegNum ());
N->Right = GenLiteralExpr (GetPC () + Offs);
} else {
N = GenLiteralExpr (GetPC () + Offs);
@@ -1120,7 +1120,7 @@ static void CheckByteExpr (const ExprNode* N, int* IsByte)
break;
case EXPR_SECTION:
if (GetSegType (N->V.SegNum) == SEGTYPE_ZP) {
if (GetSegAddrSize (N->V.SegNum) == ADDR_SIZE_ZP) {
*IsByte = 1;
}
break;