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

Updates to HuCC's expression handling that make the code faster, but not smaller. #47

Merged
merged 5 commits into from
Oct 3, 2024

Conversation

jbrandwood
Copy link
Collaborator

No description provided.

current short string pointer and the work-in-progress far string
pointer.
…t they are

symbols and not labels.

Defer the address addition for static local and norecursive arrays so that they
can take advantage of the same peephole optimization rules as global arrays.

Display static and norecursive function local variable names as comments in the
listing file so that it is easier to see what the generated code is doing.

Change how the expression handler decides if an lvalue is unsigned to hopefully
make it a bit less error-prone.

Add some of SmallC-85's comments to expr.c to try to make the source code a bit
more readable.
…timizer so

that they can be recursively calculated and resolved into integers.

Reorganize the optimizer so that math with an integer is optimized early on and
doesn't get in the way of more-complex later optimizations.

Change HuCC's "jsr smul/sdiv" into i-codes to remove the I_JSR and T_LIB string
comparisons that are a PITA to deal with in the optimizer, and add new multiply
and divide by an integer i-codes.

Add some rules to convert signed multiply and divide into unsigned if possible,
and then to convert unsigned power-of-two divide or mod into LSR or AND.

Allow the instruction rescheduler to reorder multiplies as they're commutative.
@jbrandwood jbrandwood merged commit 899060c into pce-devel:master Oct 3, 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