[all-commits] [llvm/llvm-project] 9d8691: [ARM] Follow AACPS for preserving number of loads/...

dnsampaio via All-commits all-commits at lists.llvm.org
Fri Feb 7 02:11:59 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d869180c4adba42d68c14dab51fba8093ccf91c
      https://github.com/llvm/llvm-project/commit/9d869180c4adba42d68c14dab51fba8093ccf91c
  Author: Diogo Sampaio <diogo.sampaio at arm.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/aapcs-bitfield.c

  Log Message:
  -----------
  [ARM] Follow AACPS for preserving number of loads/stores of volatile bit-fields

Summary:
Following the AAPCS, every store to a volatile bit-field requires to generate one load of that field, even if all the bits are going to be replaced.
This patch allows the user to opt-in in following such rule, whenever the a.

AAPCS Release 2019Q1.1 (https://static.docs.arm.com/ihi0042/g/aapcs32.pdf)
section 8.1 Data Types, page 35, paragraph: Volatile bit-fields – preserving number and width of container accesses

```
When a volatile bit-field is written, and its container does not overlap with any non-bit-field member, its
container must be read exactly once and written exactly once using the access width appropriate to the
type of the container. The two accesses are not atomic.

```

Reviewers: lebedev.ri, ostannard, jfb, eli.friedman

Reviewed By: jfb

Subscribers: rsmith, rjmccall, dexonsmith, kristof.beyls, jfb, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67399




More information about the All-commits mailing list