mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Fixed Issues #420 and #919 by always outputing the code segment before the three data segments for functions.
This commit is contained in:
parent
33e103fdc6
commit
68f53e69f1
@ -1353,7 +1353,7 @@ void CS_OutputEpilogue (const CodeSeg* S)
|
||||
*/
|
||||
{
|
||||
if (S->Func) {
|
||||
WriteOutput ("\n.endproc\n\n");
|
||||
WriteOutput (".endproc\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1423,6 +1423,9 @@ void CS_Output (CodeSeg* S)
|
||||
CE_Output (E);
|
||||
}
|
||||
|
||||
/* Prettyier formatting */
|
||||
WriteOutput ("\n");
|
||||
|
||||
/* If debug info is enabled, terminate the last line number information */
|
||||
if (DebugInfo) {
|
||||
WriteOutput ("\t.dbg\tline\n");
|
||||
|
@ -289,14 +289,14 @@ void OutputSegments (const Segments* S)
|
||||
/* Output the text segment */
|
||||
TS_Output (S->Text);
|
||||
|
||||
/* Output the code segment */
|
||||
CS_Output (S->Code);
|
||||
|
||||
/* Output the three data segments */
|
||||
DS_Output (S->Data);
|
||||
DS_Output (S->ROData);
|
||||
DS_Output (S->BSS);
|
||||
|
||||
/* Output the code segment */
|
||||
CS_Output (S->Code);
|
||||
|
||||
/* Output the code segment epiloque */
|
||||
CS_OutputEpilogue (S->Code);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user