mirror of
https://github.com/cc65/cc65.git
synced 2025-01-03 16:33:19 +00:00
move EXPR_NEARADDR to end of enum list to avoid invalidation of existing object binaries?
This commit is contained in:
parent
ac2ecb0b2c
commit
10cefdb456
@ -1447,10 +1447,6 @@ static void StudyExprInternal (ExprNode* Expr, ExprDesc* D)
|
||||
StudyWord1 (Expr, D);
|
||||
break;
|
||||
|
||||
case EXPR_NEARADDR:
|
||||
StudyNearAddr (Expr, D);
|
||||
break;
|
||||
|
||||
case EXPR_FARADDR:
|
||||
StudyFarAddr (Expr, D);
|
||||
break;
|
||||
@ -1459,6 +1455,10 @@ static void StudyExprInternal (ExprNode* Expr, ExprDesc* D)
|
||||
StudyDWord (Expr, D);
|
||||
break;
|
||||
|
||||
case EXPR_NEARADDR:
|
||||
StudyNearAddr (Expr, D);
|
||||
break;
|
||||
|
||||
default:
|
||||
Internal ("Unknown Op type: %u", Expr->Op);
|
||||
break;
|
||||
|
@ -210,10 +210,6 @@ static void InternalDumpExpr (const ExprNode* Expr, const ExprNode* (*ResolveSym
|
||||
printf (" WORD1");
|
||||
break;
|
||||
|
||||
case EXPR_NEARADDR:
|
||||
printf (" NEARADDR");
|
||||
break;
|
||||
|
||||
case EXPR_FARADDR:
|
||||
printf (" FARADDR");
|
||||
break;
|
||||
@ -222,6 +218,10 @@ static void InternalDumpExpr (const ExprNode* Expr, const ExprNode* (*ResolveSym
|
||||
printf (" DWORD");
|
||||
break;
|
||||
|
||||
case EXPR_NEARADDR:
|
||||
printf (" NEARADDR");
|
||||
break;
|
||||
|
||||
default:
|
||||
AbEnd ("Unknown Op type: %u", Expr->Op);
|
||||
|
||||
|
@ -97,9 +97,9 @@
|
||||
#define EXPR_BYTE3 (EXPR_UNARYNODE | 0x0B)
|
||||
#define EXPR_WORD0 (EXPR_UNARYNODE | 0x0C)
|
||||
#define EXPR_WORD1 (EXPR_UNARYNODE | 0x0D)
|
||||
#define EXPR_NEARADDR (EXPR_UNARYNODE | 0x0E)
|
||||
#define EXPR_FARADDR (EXPR_UNARYNODE | 0x0F)
|
||||
#define EXPR_DWORD (EXPR_UNARYNODE | 0x10)
|
||||
#define EXPR_FARADDR (EXPR_UNARYNODE | 0x0E)
|
||||
#define EXPR_DWORD (EXPR_UNARYNODE | 0x0F)
|
||||
#define EXPR_NEARADDR (EXPR_UNARYNODE | 0x10)
|
||||
|
||||
|
||||
|
||||
|
@ -436,16 +436,16 @@ long GetExprVal (ExprNode* Expr)
|
||||
case EXPR_WORD1:
|
||||
return (GetExprVal (Expr->Left) >> 16) & 0xFFFF;
|
||||
|
||||
case EXPR_NEARADDR:
|
||||
/* Assembler was expected to validate this truncation. */
|
||||
return GetExprVal (Expr->Left) & 0xFFFF;
|
||||
|
||||
case EXPR_FARADDR:
|
||||
return GetExprVal (Expr->Left) & 0xFFFFFF;
|
||||
|
||||
case EXPR_DWORD:
|
||||
return GetExprVal (Expr->Left) & 0xFFFFFFFF;
|
||||
|
||||
case EXPR_NEARADDR:
|
||||
/* Assembler was expected to validate this truncation. */
|
||||
return GetExprVal (Expr->Left) & 0xFFFF;
|
||||
|
||||
default:
|
||||
Internal ("Unknown expression Op type: %u", Expr->Op);
|
||||
/* NOTREACHED */
|
||||
|
Loading…
Reference in New Issue
Block a user