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 some comments about the tkmk00 stuff #594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tmcg2
Copy link
Collaborator

@Tmcg2 Tmcg2 commented Apr 4, 2024

No description provided.

@@ -445,6 +461,7 @@ glabel func_80040AC8
/* 0417B8 80040BB8 03E00008 */ jr $ra
/* 0417BC 80040BBC 00000000 */ nop

# func_80040BC0 -> SetUpHuffmanTree
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not rename it ?


Maybe tkmk00 wasn't compiled with IDO. Its explicit usage of registers rather than variables is something that IDO can't do (I think?) but GCC can.
Or mabybe its C++ code and that interacts with registers differently?
Or maybe its all hand written?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's my understanding that this assembly was hand-written.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is if you know where to look.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code was likely assembled using IDO, however the code is almost certainly hand-written given the bal, add, and sub, instructions which are not used by any known compiler.

@MegaMech
Copy link
Collaborator

MegaMech commented Apr 19, 2024

Taking another look at this PR.

Everyone whose looked at this func said it was hand-written. My only issue is the comment about it being possibly compiled. It's my understanding that there's no known compiler that outputs assembly like this. bal instead of jal for example.

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