mirror of
https://github.com/cc65/cc65.git
synced 2025-04-08 19:38:55 +00:00
Fixed handling of %v in inline asm parser.
This commit is contained in:
parent
a85d5330fa
commit
dbba5f3fc9
@ -213,7 +213,9 @@ static void ParseLongArg (StrBuf* T, unsigned Arg attribute ((unused)))
|
||||
|
||||
|
||||
static void ParseGVarArg (StrBuf* T, unsigned Arg)
|
||||
/* Parse the %v format specifier */
|
||||
/* Parse the %v format specifier.
|
||||
** ### FIXME: Asm names should be generated in the same place.
|
||||
*/
|
||||
{
|
||||
/* Parse the symbol name parameter and check the type */
|
||||
SymEntry* Sym = AsmGetSym (Arg, SC_STATIC);
|
||||
@ -225,7 +227,6 @@ static void ParseGVarArg (StrBuf* T, unsigned Arg)
|
||||
/* Check for external linkage */
|
||||
if (Sym->Flags & (SC_EXTERN | SC_STORAGE | SC_FUNC)) {
|
||||
/* External linkage or a function */
|
||||
/* ### FIXME: Asm name should be generated by codegen */
|
||||
SB_AppendChar (T, '_');
|
||||
SB_AppendStr (T, Sym->Name);
|
||||
} else if (Sym->Flags & SC_REGISTER) {
|
||||
@ -234,9 +235,7 @@ static void ParseGVarArg (StrBuf* T, unsigned Arg)
|
||||
SB_AppendStr (T, Buf);
|
||||
} else {
|
||||
/* Static variable */
|
||||
char Buf [16];
|
||||
xsprintf (Buf, sizeof (Buf), "L%04X", Sym->V.L.Label);
|
||||
SB_AppendStr (T, Buf);
|
||||
SB_AppendStr (T, LocalDataLabelName (Sym->V.L.Label));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user