Skip to content

Handwritten asm build prep, add handwritten asm for the code segment #1807

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Thar0
Copy link
Contributor

@Thar0 Thar0 commented Apr 18, 2025

No description provided.

…tack.s, add handwritten asm for the code segment
Copy link
Collaborator

@hensldm hensldm left a comment

Choose a reason for hiding this comment

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

Couple thoughts.
Also looks like this breaks the partial disassembly since makerom/ipl3 and audio/lib/stack no longer have actual source files.

Comment on lines +648 to +649
$(BUILD_DIR)/src/makerom/ipl3.o: $(EXTRACTED_DIR)/incbin/ipl3
$(OBJCOPY) -I binary -O elf32-big --rename-section .data=.text $< $@
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the advantage of using objcopy over incbin assembly files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

incbin isn't supported by IDO, so we'd need custom makefile rule anyway. At that point, objcopy is simpler

@hensldm hensldm removed the Needs-first-approval First approval label May 24, 2025

#define _MIPS_SIM_ABI32 1 /* MIPS MSIG calling convention */
#define _MIPS_SIM_NABI32 2 /* MIPS new 32-bit abi */
/* NABI32 is 64bit calling convention but 32bit type sizes) */
Copy link
Contributor

Choose a reason for hiding this comment

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

there's an open parenthesis missing?


.section .text
#define PAD_TO 0x60
#define LA(reg, sym) la reg, sym
Copy link
Contributor

Choose a reason for hiding this comment

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

why make a LA macro?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense
(you see and forget 👴)

@hensldm hensldm added the Waiting-for-author Author needs fix to conflicts or address reviews label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Needs-second-approval Second approval Waiting-for-author Author needs fix to conflicts or address reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants