mirror of
https://github.com/cc65/cc65.git
synced 2025-04-06 20:37:16 +00:00
Move global segment creation to a better place in source.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4498 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ff4eeebec2
commit
1f90ec93a0
@ -145,10 +145,6 @@ static const char* GetLabelName (unsigned Flags, unsigned long Label, long Offs)
|
||||
void g_preamble (void)
|
||||
/* Generate the assembler code preamble */
|
||||
{
|
||||
/* Create a new (global) segment list and remember it */
|
||||
PushSegments (0);
|
||||
GS = CS;
|
||||
|
||||
/* Identify the compiler version */
|
||||
AddTextLine (";");
|
||||
AddTextLine ("; File generated by cc65 v %s", GetVersionAsString ());
|
||||
|
@ -343,12 +343,15 @@ void Compile (const char* FileName)
|
||||
/* DefineNumericMacro ("__STDC__", 1); <- not now */
|
||||
DefineNumericMacro ("__STDC_HOSTED__", 1);
|
||||
|
||||
/* Initialize the literal pool */
|
||||
InitLiteralPool ();
|
||||
|
||||
/* Create the base lexical level */
|
||||
EnterGlobalLevel ();
|
||||
|
||||
/* Create the global code and data segments */
|
||||
CreateGlobalSegments ();
|
||||
|
||||
/* Initialize the literal pool */
|
||||
InitLiteralPool ();
|
||||
|
||||
/* Generate the code generator preamble */
|
||||
g_preamble ();
|
||||
|
||||
|
@ -183,6 +183,14 @@ void PopSegments (void)
|
||||
|
||||
|
||||
|
||||
void CreateGlobalSegments (void)
|
||||
/* Create the global segments and remember them in GS */
|
||||
{
|
||||
GS = PushSegments (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UseDataSeg (segment_t DSeg)
|
||||
/* For the current segment list, use the data segment DSeg */
|
||||
{
|
||||
|
@ -123,6 +123,9 @@ Segments* PushSegments (struct SymEntry* Func);
|
||||
void PopSegments (void);
|
||||
/* Pop the old segment list (make it current) */
|
||||
|
||||
void CreateGlobalSegments (void);
|
||||
/* Create the global segments and remember them in GS */
|
||||
|
||||
void UseDataSeg (segment_t DSeg);
|
||||
/* For the current segment list, use the data segment DSeg */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user