Git Product home page Git Product logo

Comments (1)

smithp35 avatar smithp35 commented on June 24, 2024

Thank you for pointing that out. We will need to think carefully about how to update the document. The Rule B.6 was added after B.5 specifically to deal with over or under aligned types, this does seem to clash with B.5 as worded today.

The intention behind the rules is:

  • The intent of B.5 is to ensure that objects on the stack have register-sized alignment.
  • The intent of B.6 is to avoid creating excess padding in stack arguments for overaligned types.

It is not clear to me that B.5 has much, if any effect given that C.14 "The NSAA is rounded up to the larger of 8 or the Natural Alignment of the argument’s type." so even if a composite type had a size that was not a multiple of 8, then C.14 would ensure that the next parameter passed on the stack was at least 8-byte aligned.

Hope this helps.

The majority of overaligned types are caught by rule B.4 "If the argument type is a Composite Type that is larger than 16 bytes, then the argument is copied to memory allocated by the caller and the argument is replaced by a pointer to the copy." as the size of an aggregate is a multiple of the alignment.

from abi-aa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.