Page MenuHomeFreeBSD

Fix compilation of locore.S with clang
ClosedPublic

Authored by mhorne on Aug 27 2019, 2:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 5:08 PM
Unknown Object (File)
Nov 16 2024, 10:27 AM
Unknown Object (File)
Nov 5 2024, 9:28 AM
Unknown Object (File)
Oct 3 2024, 4:57 PM
Unknown Object (File)
Oct 2 2024, 4:01 AM
Unknown Object (File)
Sep 30 2024, 1:43 PM
Unknown Object (File)
Sep 30 2024, 4:24 AM
Unknown Object (File)
Sep 18 2024, 12:23 AM
Subscribers

Details

Summary

The branch from _start to mpentry has to cross a large section of data;
an offset larger than can be specified with a 12-bit branch immediate.
Fix this by converting the branch to an unconditional jump. The gcc
assembler does this conversion silently but is not done automatically by
clang.

Reported by: Jeremy Bennett <jeremy.bennett@embecosm.com>

Diff Detail

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

Event Timeline

sys/riscv/riscv/locore.S
73 ↗(On Diff #61352)

I would suggest adding a comment, since otherwise it looks like something that should be simplified.

This revision is now accepted and ready to land.Aug 27 2019, 2:22 PM

Add comment explaining the change

This revision now requires review to proceed.Sep 8 2019, 7:37 PM
This revision is now accepted and ready to land.Sep 8 2019, 7:48 PM
This revision was automatically updated to reflect the committed changes.