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)
Sun, May 12, 6:51 AM
Unknown Object (File)
Fri, May 10, 3:02 PM
Unknown Object (File)
Thu, May 9, 4:25 AM
Unknown Object (File)
Tue, May 7, 6:58 PM
Unknown Object (File)
Fri, May 3, 11:58 PM
Unknown Object (File)
Sun, Apr 28, 12:53 PM
Unknown Object (File)
Apr 19 2024, 4:57 PM
Unknown Object (File)
Nov 15 2023, 8:16 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.