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

HuCC beta and the latest PCEAS updates. #4

Merged
merged 299 commits into from
Oct 28, 2024

Conversation

jbrandwood
Copy link

The 240pTestSuite seems to be running fine with this. :-)

jbrandwood and others added 30 commits March 9, 2024 12:11
…hterII HuCARD.

Plus LOTS of other work-in-progress stuff that really shouldn't be in there!
Symbols in overlayed banks are now output as "n:nn:nnnn".
Reserved and removed banks now show "--" instead of "F0".
Fix PCEAS's understanding of StreetFighterII's unique overlayed memory layout.
Change the tag of automated builds from "master" to "current".
Add Dave Shadoff's changes to include/huc/startup.asm
Rework handling of bank information in symbols, so that both the
"rombank" and "mprbank" values are stored.

Consolidate all of the MPR-vs-ROM bank calculations into a small
set of routines in symbol.c that are called whenever needed, and
so simplify updates in the future.

Add ".opt f+" to allow forward-references in .EQU and .DS, which
causes a 3rd pass to resolve the symbols. Default this option to
enabled for now because it is friendlier for new programmers.

Add ".3pass" to force a 3rd pass even when PCEAS doesn't believe
that one is needed. This can be used to set the size and address
of stuff at the end of the 1st pass when data sizes are known.

Remove ".overlay", because it is not needed anymore.

Change prefix-keyword expression handling to have 3 underscores
in PCEAS in order to use 2 underscores to access them in C code.
Also ...

Increase filename/path length from 128 characters to 260 characters (Win32 PATH_MAX).
Increase PCEAS identifier length to 126 bytes.
Increase include file nesting depth from 7 to 31.
Check for junk at the end of .include and .incbin, and error on unterminated filename.
Change nested include files to include the path so that you can see where they came from.
Add offset and length parameters to .incbin plus ...
…on every

pass, and the previous pass's values are kept in order to detect changes.

Change RESERVED_BANK to UNDEFINED_BANK for clarity.

Remove last remains of putting the bank number into the top bits of a location
address for C code, it has been replaced by new keyword-prefix capability.
Stop pinning MacOS-12 build to xcode-13.2.1 to see if newer xcode works.
jbrandwood and others added 29 commits October 8, 2024 13:23
correct the VPC initialization comments in vdc.asm
Uli's attempt to generate byte comparisons has been completely removed from the
code-generation section of the compiler because the SmallC expression code does
not propagate operand size information.

Remove the last of the T_LIB usage of embedded comparison name strings, and use
integer enums instead which make it easier to optimize comparison-ops.

Teach the peephole optimizer how to convert the compare-with-integer operations
into a new i-code that generates faster inline code.

Further optimize unsigned char compare-with-integer operations when they can be
detected.
…memory and

compare-with-stack operations into new i-codes that generate faster inline code.
…ng A and

the Z flag.

This makes most of the common comparison operations a little quicker with the
cost that the rare boolean conversion step is slower and larger when it isn't
removed by the peephole optimizer.

The most common boolean is "var = !var", and this can be optimized separately
in the future.
Major changes to HuCC's comparison code-generation.
and document the contents of the "while" stack int array.

Rename a couple of parsing functions to make them easier to read.
…broken

when the underlying function was changed to return a HuCC-compatible result.
Add SuperGRAFX VPC library functions to HuCC.
…re generated

so that I_BOOLEAN doesn't have to preserve the C flag anymore.

This ensures that I_BFALSE and I_BTRUE are always preceeded by an I_TST_WR before
the peephole optimizer does its job, and it means that no workaround is needed if
the optimizer is disabled.

Also add the X_NOT_CF optimization to invert the carry flag for the case if a "!"
follows a conditional enclosed in parentheses.
… detection

of "LD variable; test;" into the same set of peephole rules as the other checks
and then expand the existing peephole rules to understand the list of optimized
i-codes that the "test variable" and "not variable" rules can generate.

Add another peephole rule and set of optimized i-codes for when the result of a
"!" needs to produce a boolean instead of a flag/jump, such as "var = !var".
…clared VOID

even though they do return a data value.
Initial commit of the new HuCC Function reference
…nt number

of parameters than it was declared to take.

This includes the functions that are automatically declared when called before
being defined.
HuCC now gives an error and functions are called with different numbers of parameters.
…and not their

ROM address so that .proc pointers can work in jump tables and function pointers.
Note that function pointers are internally declared as unsigned ints to avoid
being dereferenced by anything other than a function call.

Change HuCC array handling to allow multi-dimensional array subscripting, but
only for arrays of pointers to a final array of char/int/whatever.
…est type.

Fix HuCC so that the excess dereferencing of a pointer gives a compiler error.
Working function-pointers!
@ArtemioUrbina ArtemioUrbina merged commit c6a852e into ArtemioUrbina:master Oct 28, 2024
12 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.

4 participants