Conversation
| .section .text | ||
| .global ___sleep_common | ||
| .type ___sleep_common, @function | ||
|
|
||
| ___sleep_common: | ||
| ; Timing assumes fetching from RAM (4cc) and the first timer read being valid. | ||
|
|
||
| ; Calculate the end time. | ||
| section .text |
There was a problem hiding this comment.
not sure why section is "defined twice" here
| pop hl | ||
| ret | ||
|
|
||
| .extern __popcnt_common_init_full, __popcnt_common_iter_adjusted |
There was a problem hiding this comment.
not sure if this is a valid extension or not, but we only use .extern , twice toolchain wide so probably should make this consistent. Also, this could also hide bugs possibly if it is not a valid extension? Also it seems like GAS .extern is a lot more forgiving than FASMG extern, since I won't get linker errors if I forget to put .extern sometimes
| .global _memmem | ||
| .type _memmem, @function | ||
| .local _memcmp_fast | ||
| .type _memcmp_fast, @function |
There was a problem hiding this comment.
_memcmp_fast is a private function, so I don't think it needs @function, and I don't see it used with other .local functions
| .local lz4_decompress_block_internal | ||
| .type lz4_decompress_block_internal, @function | ||
|
|
There was a problem hiding this comment.
@calc84maniac is this .local function supposed to have @function?
| .global _ceil | ||
| .global _ceilf | ||
| .type _ceil, @function | ||
| .global _ceilf | ||
| .type _ceilf, @function | ||
|
|
There was a problem hiding this comment.
this is what I mean by canonicalizing the order of @function. And this makes it consistent with how it has been done elsewhere.
| .equ ti.MemClear, 0x0210DC | ||
| .equ ti.ClrTxtShd, 0x020818 | ||
|
|
||
| .global __start |
There was a problem hiding this comment.
should we add .type __start, @function? If so, should it be done to both crt0.S and crt.src
Bug fixes:
@functionfrom.global/.weak, this is necessary for preventing these warnings frombinutils:@functionfrom.localextern-->.externsection-->.sectionFormatting:
@functiondeclarations (so.type _func, @functionis always after its corresponding.global/.weak _func.0x012345/$012345instead of0012345h.assumestoassumesin commentsADL=1,adl = 1, and etc toadl=1so everything is consistent toolchain wide.