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
F141056139: D22656.id54425.diff
Wed, Dec 31, 7:25 AM
Unknown Object (File)
Mon, Dec 29, 10:48 AM
Unknown Object (File)
Tue, Dec 9, 7:21 AM
Unknown Object (File)
Nov 30 2025, 1:12 PM
Unknown Object (File)
Nov 27 2025, 11:22 AM
Unknown Object (File)
Nov 25 2025, 5:09 AM
Unknown Object (File)
Nov 23 2025, 2:14 PM
Unknown Object (File)
Nov 20 2025, 9:44 PM
Subscribers

Details

Summary

This saves an instruction in each case.

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 27923
Build 26092: arc lint + arc unit

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