Page MenuHomeFreeBSD

Add CFI start/end proc directives to arm64, i386, and ppc
ClosedPublic

Authored by cem on Nov 26 2020, 6:27 PM.

Details

Summary

Follow-up to r353959 and r368070: do the same for other architectures.

arm32 already seems to use its own .fnstart/.fnend directives, which
appear to be ARM-specific variants of the same thing. Likewise, MIPS
uses .frame directives.

Test Plan

Tinderbox running.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem requested review of this revision.Nov 26 2020, 6:27 PM
jrtc27 requested changes to this revision.Nov 26 2020, 6:35 PM
jrtc27 added a subscriber: jrtc27.
jrtc27 added inline comments.
sys/powerpc/include/asm.h
112 ↗(On Diff #80034)

This is the descriptor; you need it after DOT_LABEL(name).

163 ↗(On Diff #80034)

END_SIZE(name) whilst you're here?

This revision now requires changes to proceed.Nov 26 2020, 6:35 PM
sys/powerpc/include/asm.h
112 ↗(On Diff #80034)

Thanks, will fix.

163 ↗(On Diff #80034)

Sorry, what about END_SIZE?

cem marked an inline comment as done.
  • Move cfi_startproc in ELFv1 prologue after DOT_LABEL
sys/powerpc/include/asm.h
163 ↗(On Diff #80034)

Currently there's no .size directive for powerpc32, unlike powerpc64. There's an END_SIZE macro available for that, though it looks like it's assuming powerpc64 without checking so you might want to just do a normal .size.

sys/powerpc/include/asm.h
163 ↗(On Diff #80034)

Sure, I'll add it. Thanks.

Add a lot of missing END directives. Tinderbox passes on arm64 and i386.
PowerPC mostly passes, except for all the PS3 HV calls which still need END
directives (and there are hundreds of these).

cem marked 2 inline comments as done.
  • Add remaining missing END/ASEND directives in powerpc. Now tinderbox is clean.

Fix ENTRY consumers in userspace (syscalls, MD assembly functions)

Are there any outstanding objections? (I think I've addressed everything raised so far, but please correct me if I am mistaken.) Is there anyone who hasn't reviewed yet, but will have time to review in the next few days? Thanks.

Looks good to me. Obviously there might be some non-default build configurations that are missing end() calls, but if so they been be fixed later.

Probably best to wait for at least one more review though.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 5 2020, 12:34 AM
This revision was automatically updated to reflect the committed changes.

I'm fine with it on readthrough, I just hadn't gotten around to the actual tests. If it broke anything in powerpc land, it should be easy to fix. Thanks for tidying up the procedure annotations!

I'm fine with it on readthrough, I just hadn't gotten around to the actual tests. If it broke anything in powerpc land, it should be easy to fix. Thanks for tidying up the procedure annotations!

Thanks! It compiles (tinderbox, anyway) and shouldn't affect code generation, so I'm cautiously optimistic nothing broke. Please let me know if it broke something and I can help fix it :-).