Vetting the cargo
Vetting the cargo
Posted Jun 12, 2022 16:41 UTC (Sun) by adobriyan (guest, #30858)In reply to: Vetting the cargo by mpr22
Parent article: Vetting the cargo
Funnily enough gcc 12 will optimise this exact code back to strlen():
f:
cmp BYTE PTR [rdi], 0
je .L3
sub rsp, 8
add rdi, 1
call strlen
add rsp, 8
add rax, 1
ret
.L3:
xor eax, eax
ret
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
