Skip to content

Initial support to bytetype#5125

Draft
gulugulubing wants to merge 2 commits intoldc-developers:masterfrom
gulugulubing:byteTypeABI
Draft

Initial support to bytetype#5125
gulugulubing wants to merge 2 commits intoldc-developers:masterfrom
gulugulubing:byteTypeABI

Conversation

@gulugulubing
Copy link
Copy Markdown
Contributor

This is relate to #4982.
ABI of aarch64 is simpler than x86-64(and I only have a macbook), so I just implement byte type on aarch64 first.

Draft: Experimental b8 interop for 8-bit parameters

Status

  • AArch64 ABI rewrite (ubyte/char → b8 + zeroext)
  • Call-site: bitcast i8 → b8 (piggybacking the original addExplicitArguments)
  • Return-site: bitcast b8 → i8
  • Callee entry: bitcast b8 → i8
  • Callee return: bitcast i8 → b8

Gate

-fc-interop-llvm-byte (default off)

Known Limitations

  • LLVM upstream work for byte types is still in progress
  • Clang does not yet emit b8 for unsigned char
  • LTO testing uses hand-written .ll for C side

@thewilsonator
Copy link
Copy Markdown
Contributor

Thanks for looking into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants