1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@3085 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2004-06-04 14:36:54 +00:00
parent b1d7f78bce
commit 361316246b

View File

@ -81,33 +81,33 @@ const char* ED_GetLabelName (const ExprDesc* Expr, long Offs)
case E_LOC_ABS:
/* Absolute: numeric address or const */
xsprintf (Buf, sizeof (Buf), "$%04X", (int)(Offs & 0xFFFF));
xsprintf (Buf, sizeof (Buf), "$%04X", (int)(Offs & 0xFFFF));
break;
case E_LOC_GLOBAL:
case E_LOC_STATIC:
/* Global or static variable */
if (Offs) {
xsprintf (Buf, sizeof (Buf), "%s%+ld",
if (Offs) {
xsprintf (Buf, sizeof (Buf), "%s%+ld",
SymGetAsmName (Expr->Sym), Offs);
} else {
xsprintf (Buf, sizeof (Buf), "%s",
} else {
xsprintf (Buf, sizeof (Buf), "%s",
SymGetAsmName (Expr->Sym));
}
}
break;
case E_LOC_REGISTER:
/* Register variable */
xsprintf (Buf, sizeof (Buf), "regbank+%u",
(unsigned)(Offs & 0xFFFFU));
xsprintf (Buf, sizeof (Buf), "regbank+%u",
(unsigned)((Offs + Expr->Name) & 0xFFFFU));
break;
case E_LOC_LITERAL:
/* Literal in the literal pool */
if (Offs) {
xsprintf (Buf, sizeof (Buf), "%s%+ld",
if (Offs) {
xsprintf (Buf, sizeof (Buf), "%s%+ld",
LocalLabelName (Expr->Name), Offs);
} else {
} else {
xsprintf (Buf, sizeof (Buf), "%s",
LocalLabelName (Expr->Name));
}