Page MenuHomeFreeBSD

Use a single 'ld' to read the jmpbuf magic values instead of 'la; ld'.
ClosedPublic

Authored by jhb on Dec 3 2019, 10:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 7:18 AM
Unknown Object (File)
Jul 11 2023, 1:21 AM
Unknown Object (File)
Jul 11 2023, 1:20 AM
Unknown Object (File)
Jul 11 2023, 1:11 AM
Unknown Object (File)
Jul 8 2023, 2:21 PM
Unknown Object (File)
Jun 16 2023, 3:25 AM
Unknown Object (File)
Jun 3 2023, 8:07 AM
Unknown Object (File)
Apr 29 2023, 1:33 PM
Subscribers

Details

Summary

This saves an instruction in each case.

Test Plan
  • tests in /usr/tests/lib/libc/setjmp pass

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This is particularly beneficial as, for PIC code, which this will almost always be, la expands to auipc/ld to index the GOT, so we save a level of unnecessary indirection too. (This could have been lla instead to save the indirection but still take 2 instructions just to do the address calculation.)

This revision is now accepted and ready to land.Dec 4 2019, 2:40 PM