Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source-level-debugging .sym output for mesen2 to PCEAS and HuCC #55

Merged
merged 15 commits into from
Nov 29, 2024

Conversation

jbrandwood
Copy link
Collaborator

No description provided.

…eue but is

ignored by the peephole optimizer.

Change the peephole optimizer to preserve comments when removing instructions.

Change the option that outputs C source into the output file to use this i-code
while a function is being compiled so that peephole optimizations are no longer
spoiled by the queue being flushed when a C source line is output.

Cleanup the function comments in io.c a bit.
…he output

file.

Change HuCC to always output the C source as comments now that it doesn't mess
up the peephole optimizer anymore.

Change #asm initial output tabbing to conform with the compiler's other output.
… the cases.

This will allow the generated code to know what all of the case constant values
are, and then customize the code to use a jump-table instead of comparisons ...
at some point in the future!

Change the C source-code information from a comment to a ".line" for PCEAS.
…y the bank

of a label instead of the address of a label.
…t bank

and address parameters instead of a __far pointer.

The underlying asm functions themselves are not changed, just way that HuCC
fills in the parameters.
… of split bank

and address values instead of a __far pointer.
Destructively sort the symbol table before output.

Add an initial work-in-progress version of a modified form of wla-dx's sym file
source-level debugging output for use with mesen2.

Change various symbol structure members from ints into unsigned chars to save a
little bit of memory.
…base() and

set_far_offset() library functions so that C developers can apply a 64KB offset
to the new functions, just like they can with the old HuC __farptr functions.
…to HuCC's

const_expr() parser that Uli added.

Change HuCC to use the const_expr() parser for "case" values.
… emulator.

This is controlled with the "-gC", "-gA", or '-gL' command line flags to choose
whether to output source mappings to the C, ASM, or PCEAS-generated .LST files.

The .LST file gives the most information, because you see the macro expansions,
but the ASM version might be preferable to developers who don't macros much.

The C version will map to C source lines when it can, but there are going to be
mappings to the ASM files for compiler-generated code, and for library code.

Change PCEAS so that equates ('=' and ".equ") can have an optional parameter to
set the label's size (for data), or whether it is "CODE or a "FUNC", which gets
passed to the .sym file for debugging, but is otherwise unused by PCEAS itself.

Change PCEAS to implement the ".DBG line" and ".DBG clear" pseudo-ops to enable
HuCC to tag the original C source file, line and column of the ASM code that it
generates.

Change PCEAS to clean up all of the '\' and '/' characters in file paths so the
paths match the host platform's native format.
…variables,

and also add the FUNC flag to the System Card function entry points.

These are used when exporting source-level-debugging information to mesen2.

Update ipl-scd.asm to define the System Card functions that it uses because now
those are not defined in pcengine.inc for non-CD/SCD builds, like ipl-scd.asm
…emulator.

This is controlled with the "-gC", "-gA", or "-gL" command line flags to choose
whether to output source mappings to the C, ASM, or PCEAS-generated .LST files.

The .LST file gives the most information, because you see the macro expansions,
but the ASM version might be preferable to developers who don't macros much.

The C version will map to C source lines when it can, but there are going to be
mappings to the ASM files for compiler-generated code, and for library code.

Change PCEAS to clean up all of the '\' and '/' characters in file paths so the
paths match the host platform's native format.
@jbrandwood jbrandwood merged commit 0546b84 into pce-devel:master Nov 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant