This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add linux aarch64 syscall implementation.
ClosedPublic

Authored by sivachandra on Jan 10 2022, 8:43 AM.

Details

Summary

Add mmap and munmap to the linux aarch64 entrypoint list as the first
user of these syscalls.

Diff Detail

Event Timeline

sivachandra created this revision.Jan 10 2022, 8:43 AM
sivachandra requested review of this revision.Jan 10 2022, 8:43 AM
abrachet added inline comments.
libc/src/__support/OSUtil/linux/aarch64/syscall.h
16

I think register is (or soon to be) deprecated and reserved, and my understanding is that most compilers completely ignore it anyway. Should it be omitted here?

sivachandra added inline comments.Jan 10 2022, 9:34 AM
libc/src/__support/OSUtil/linux/aarch64/syscall.h
16

Oh, I didn't know that. But, when I try, I get warnings like this:

warning: ignored asm label 'r10' on automatic variable
  long r10 __asm__("r10") = 123;

The allocation is not in the register and the syscalls end up with wrong number of args.

This revision is now accepted and ready to land.Jan 10 2022, 2:44 PM
This revision was automatically updated to reflect the committed changes.