-
Notifications
You must be signed in to change notification settings - Fork 495
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
base: main
Are you sure you want to change the base?
Conversation
…tack.s, add handwritten asm for the code segment
There was a problem hiding this 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.
$(BUILD_DIR)/src/makerom/ipl3.o: $(EXTRACTED_DIR)/incbin/ipl3 | ||
$(OBJCOPY) -I binary -O elf32-big --rename-section .data=.text $< $@ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
|
||
#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) */ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably to be synced with OoT's entry
https://github.com/zeldaret/oot/blob/f7073a7837de95ac72a0189c74ffa96335280f12/src/makerom/entry.s#L7-L18
There was a problem hiding this comment.
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 👴)
No description provided.