From c2220f3c3055aa1187b1876d0cee75509079da4d Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Wed, 10 Apr 2019 14:46:07 +0300 Subject: [PATCH] Add a goto indirect jump from pointer --- src/cc65/symentry.h | 2 ++ src/cc65/symtab.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/cc65/symentry.h b/src/cc65/symentry.h index 73a8a72e7..abadc35c2 100644 --- a/src/cc65/symentry.h +++ b/src/cc65/symentry.h @@ -58,6 +58,7 @@ struct Segments; struct LiteralPool; +struct CodeEntry; @@ -138,6 +139,7 @@ struct SymEntry { struct { unsigned Label; Collection *DefsOrRefs; + struct CodeEntry *IndJumpFrom; } L; /* Value of SP adjustment needed after forward 'goto' */ diff --git a/src/cc65/symtab.c b/src/cc65/symtab.c index 7adafc413..9a767fd0e 100644 --- a/src/cc65/symtab.c +++ b/src/cc65/symtab.c @@ -777,6 +777,7 @@ SymEntry* AddLabelSym (const char* Name, unsigned Flags) /* Set a new label number */ Entry->V.L.Label = GetLocalLabel (); + Entry->V.L.IndJumpFrom = NULL; /* Create Collection for label definition and references */ Entry->V.L.DefsOrRefs = NewCollection (); -- 2.39.5