davehylands / align

Check alignment for various architectures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple project for determining the alignment for various architectures.

To use, install an appropriate target using rustup target add TARGETNAME

You can then build using cargo build --target=TARGETNAME and disassemble the lib using: llvm-objdump -d target/TARGETNAME/debug/libalign.a

I tested the following:

  • aarch64-apple-ios
  • armv5te-unknown-linux-gnueabi
  • armv7-linux-androideabi
  • i686-linux-android
  • x86_64-apple-darwin
  • x86_64-apple-ios

and they all produced 1, 2, 4, and 8 for the alignment of u8, u16, u32, and u64 with the exception that i686-linux-android produced an alignment of 4 for u64.

About

Check alignment for various architectures


Languages

Language:Rust 100.0%