<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/lib/CodeGen/AsmPrinter, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-02-03T12:57:25+00:00</updated>
<entry>
<title>[AArch64] -fpatchable-function-entry=N,0: place patch label after BTI</title>
<updated>2020-02-03T12:57:25+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-30T02:00:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=cbd4815dec165fc4190f30cd6f409334c7e59063'/>
<id>urn:sha1:cbd4815dec165fc4190f30cd6f409334c7e59063</id>
<content type='text'>
Summary:
For -fpatchable-function-entry=N,0 -mbranch-protection=bti, after
9a24488cb67a90f889529987275c5e411ce01dda, we place the NOP sled after
the initial BTI.

```
.Lfunc_begin0:
bti c
nop
nop

.section __patchable_function_entries,"awo",@progbits,f,unique,0
.p2align 3
.xword .Lfunc_begin0
```

This patch adds a label after the initial BTI and changes the __patchable_function_entries entry to reference the label:

```
.Lfunc_begin0:
bti c
.Lpatch0:
nop
nop

.section __patchable_function_entries,"awo",@progbits,f,unique,0
.p2align 3
.xword .Lpatch0
```

This placement is compatible with the resolution in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92424 .

A local linkage function whose address is not taken does not need a BTI.
Placing the patch label after BTI has the advantage that code does not
need to differentiate whether the function has an initial BTI.

Reviewers: mrutland, nickdesaulniers, nsz, ostannard

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

(cherry picked from commit 06b8e32d4fd3f634f793e3bc0bc4fdb885e7a3ac)
</content>
</entry>
<entry>
<title>Revert "Reland: [DWARF] Allow cross-CU references of subprogram definitions"</title>
<updated>2020-01-29T21:18:16+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2020-01-25T02:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b516ca061838e2cb8b48b31ee113e3c4aae7e7d5'/>
<id>urn:sha1:b516ca061838e2cb8b48b31ee113e3c4aae7e7d5</id>
<content type='text'>
... as well as:
Revert "[DWARF] Defer creating declaration DIEs until we prepare call site info"

This reverts commit fa4701e1979553c2df61698ac1ac212627630442.

This reverts commit 79daafc90308787b52a5d3a7586e82acd5e374b3.

There have been reports of this assert getting hit:

CalleeDIE &amp;&amp; "Could not find DIE for call site entry origin

(cherry picked from commit 802bec896171997a7b73dde3857712e0eedeabc1)
</content>
</entry>
<entry>
<title>Add function attribute "patchable-function-prefix" to support -fpatchable-function-entry=N,M where M&gt;0</title>
<updated>2020-01-24T18:38:40+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-20T22:57:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=bf04730dee1b74c8e7661c671484eff93c1f5a77'/>
<id>urn:sha1:bf04730dee1b74c8e7661c671484eff93c1f5a77</id>
<content type='text'>
Similar to the function attribute `prefix` (prefix data),
"patchable-function-prefix" inserts data (M NOPs) before the function
entry label.

-fpatchable-function-entry=2,1 (1 NOP before entry, 1 NOP after entry)
will look like:

```
  .type	foo,@function
.Ltmp0:               # @foo
  nop
foo:
.Lfunc_begin0:
  # optional `bti c` (AArch64 Branch Target Identification) or
  # `endbr64` (Intel Indirect Branch Tracking)
  nop

  .section  __patchable_function_entries,"awo",@progbits,get,unique,0
  .p2align  3
  .quad .Ltmp0
```

-fpatchable-function-entry=N,0 + -mbranch-protection=bti/-fcf-protection=branch has two reasonable
placements (https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01185.html):

```
(a)         (b)

func:       func:
.Ltmp0:     bti c
  bti c     .Ltmp0:
  nop       nop
```

(a) needs no additional code. If the consensus is to go for (b), we will
need more code in AArch64BranchTargets.cpp / X86IndirectBranchTracking.cpp .

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

(cherry picked from commit 22467e259507f5ead2a87d989251b4c951a587e4)
</content>
</entry>
<entry>
<title>[AsmPrinter] Don't emit __patchable_function_entries entry if "patchable-function-entry"="0"</title>
<updated>2020-01-24T18:38:40+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2020-01-20T23:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=0e2eea29cc4f360fc95638fbfc8aca24cec3fc5f'/>
<id>urn:sha1:0e2eea29cc4f360fc95638fbfc8aca24cec3fc5f</id>
<content type='text'>
Add improve tests

(cherry picked from commit d232c215669cb57f5eb4ead40a4a336220dbc429)
</content>
</entry>
<entry>
<title>Revert "[DWARF5][DebugInfo]: Added support for DebugInfo generation for auto return type for C++ member functions."</title>
<updated>2020-01-13T21:58:14+00:00</updated>
<author>
<name>Amy Huang</name>
<email>akhuang@google.com</email>
</author>
<published>2020-01-13T21:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=328e0f3dcac52171b8cdedeaba22c98e7fbb75ea'/>
<id>urn:sha1:328e0f3dcac52171b8cdedeaba22c98e7fbb75ea</id>
<content type='text'>
This reverts commit c958639098a8702b831952b1a1a677ae19190a55, which
causes a crash. See https://reviews.llvm.org/D70524 for details.
</content>
</entry>
<entry>
<title>[DWARF5][DebugInfo]: Added support for DebugInfo generation for auto return type for C++ member functions.</title>
<updated>2020-01-13T06:56:13+00:00</updated>
<author>
<name>Awanish Pandey</name>
<email>Awanish.Pandey@amd.com</email>
</author>
<published>2020-01-13T06:26:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=c958639098a8702b831952b1a1a677ae19190a55'/>
<id>urn:sha1:c958639098a8702b831952b1a1a677ae19190a55</id>
<content type='text'>
Summary:
This patch will provide support for auto return type for the C++ member
functions. Before this return type of the member function is deduced and
stored in the DIE.
This patch includes llvm side implementation of this feature.

Patch by: Awanish Pandey &lt;Awanish.Pandey@amd.com&gt;

Reviewers: dblaikie, aprantl, shafik, alok, SouraVX, jini.susan.george

Reviewed by: dblaikie

Differential Revision: https://reviews.llvm.org/D70524
</content>
</entry>
<entry>
<title>__patchable_function_entries: don't use linkage field 'unique' with -no-integrated-as</title>
<updated>2020-01-12T20:53:44+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-12T20:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=7fa5290d5bd5632d7a36a4ea9f46e81e04fb819e'/>
<id>urn:sha1:7fa5290d5bd5632d7a36a4ea9f46e81e04fb819e</id>
<content type='text'>
.section name, "flags"G, @type, GroupName[, linkage]

As of binutils 2.33, linkage cannot be 'unique'.  For integrated
assembler, we use both 'o' flag and 'unique' linkage to support
--gc-sections and COMDAT with lld.

https://sourceware.org/ml/binutils/2019-11/msg00266.html
</content>
</entry>
<entry>
<title>[AArch64] Add function attribute "patchable-function-entry" to add NOPs at function entry</title>
<updated>2020-01-10T17:55:51+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-03T08:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4d1e23e3b3cd7c72a8b24dc5acb7e13c58a8de37'/>
<id>urn:sha1:4d1e23e3b3cd7c72a8b24dc5acb7e13c58a8de37</id>
<content type='text'>
The Linux kernel uses -fpatchable-function-entry to implement DYNAMIC_FTRACE_WITH_REGS
for arm64 and parisc. GCC 8 implemented
-fpatchable-function-entry, which can be seen as a generalized form of
-mnop-mcount. The N,M form (function entry points before the Mth NOP) is
currently only used by parisc.

This patch adds N,0 support to AArch64 codegen. N is represented as the
function attribute "patchable-function-entry". We will use a different
function attribute for M, if we decide to implement it.

The patch reuses the existing patchable-function pass, and
TargetOpcode::PATCHABLE_FUNCTION_ENTER which is currently used by XRay.

When the integrated assembler is used, __patchable_function_entries will
be created for each text section with the SHF_LINK_ORDER flag to prevent
--gc-sections (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93197) and
COMDAT (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93195) issues.

Retrospectively, __patchable_function_entries should use a PC-relative
relocation type to avoid the SHF_WRITE flag and dynamic relocations.

"patchable-function-entry"'s interaction with Branch Target
Identification is still unclear (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92424 for GCC discussions).

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D72215
</content>
</entry>
<entry>
<title>Don't rely on 'l'(ell) modifiers to indicate a label reference</title>
<updated>2020-01-06T22:44:03+00:00</updated>
<author>
<name>Bill Wendling</name>
<email>isanbard@gmail.com</email>
</author>
<published>2019-12-24T00:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=83d690a149802d40c711d4fb5a058dd1ebe4aa23'/>
<id>urn:sha1:83d690a149802d40c711d4fb5a058dd1ebe4aa23</id>
<content type='text'>
Summary:
It's not necessary to use an 'l'(ell) modifier when referencing a label.
Treat block addresses and MBB references as if the modifier is used
anyway. This prevents us from generating references to ficticious
labels.

Reviewers: jyknight, nickdesaulniers, hfinkel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71849
</content>
</entry>
<entry>
<title>DebugInfo: Correct the form of DW_AT_macro_info in .dwo files (sec_offset, rather than data4)</title>
<updated>2019-12-24T09:23:21+00:00</updated>
<author>
<name>David Blaikie</name>
<email>dblaikie@gmail.com</email>
</author>
<published>2019-12-24T09:23:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=fccac1ec16951e9a9811abf19e2c18be147854fc'/>
<id>urn:sha1:fccac1ec16951e9a9811abf19e2c18be147854fc</id>
<content type='text'>
</content>
</entry>
</feed>
