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
@@ -1217,7 +1217,7 @@ static void EmitCode (EffAddr* A)
|
||||
** mode, force this address into 16 bit range to allow
|
||||
** addressing inside a 64K segment.
|
||||
*/
|
||||
Emit2 (A->Opcode, GenWordExpr (A->Expr));
|
||||
Emit2 (A->Opcode, GenNearAddrExpr (A->Expr));
|
||||
} else {
|
||||
Emit2 (A->Opcode, A->Expr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user