65816 now generate EXPR_NEARADDR instead of EXPR_WORD0 for default assumed address mode, which will be validated by the linker's range check rather than blindly truncated. Assuming the assembler correctly validated this, the linker is allowed to truncate.
This commit is contained in:
committed by
Oliver Schmidt
parent
a01c4231f2
commit
ac2ecb0b2c
@@ -436,6 +436,10 @@ 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user