<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/test/MC/ARM, 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-05-19T19:16:37+00:00</updated>
<entry>
<title>[arm] Add big-endian version of pcrel fixups for adr instructions</title>
<updated>2020-05-19T19:16:37+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dimitry@andric.com</email>
</author>
<published>2020-05-12T10:33:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=f79cd71e145c6fd005ba4dd1238128dfa0dc2cb6'/>
<id>urn:sha1:f79cd71e145c6fd005ba4dd1238128dfa0dc2cb6</id>
<content type='text'>
Summary:
In 2e24219d3cbf, a number of ARM pcrel fixups were resolved at assembly
time, to solve PR44929. This only covered little-endian ARM however, so
add similar fixups for big-endian ARM. Also extend the test case to
cover big-endian ARM.

Reviewers: hans, psmith, MaskRay

Reviewed By: psmith, MaskRay

Subscribers: kristof.beyls, hiraditya, danielkiss, emaste, llvm-commits

Tags: #llvm

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

(cherry picked from commit fc373522b044e0b150561204958f0d603fb4caba)
</content>
</entry>
<entry>
<title>[MC][ARM] Resolve some pcrel fixups at assembly time (PR44929)</title>
<updated>2020-02-27T11:44:06+00:00</updated>
<author>
<name>Hans Wennborg</name>
<email>hans@chromium.org</email>
</author>
<published>2020-02-27T11:35:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=058a8cd73f33ae7be7bef469c1b7c2d5fdaa4b24'/>
<id>urn:sha1:058a8cd73f33ae7be7bef469c1b7c2d5fdaa4b24</id>
<content type='text'>
MC currently does not emit these relocation types, and lld does not
handle them. Add FKF_Constant as a work-around of some ARM code after
D72197. Eventually we probably should implement these relocation types.

By Fangrui Song!

Differential revision: https://reviews.llvm.org/D72892

(cherry picked from commit 2e24219d3cbfcb8c824c58872f97de0a2e94a7c8)
</content>
</entry>
<entry>
<title>[ARM][Thumb2] Fix ADD/SUB invalid writes to SP</title>
<updated>2020-01-14T11:47:19+00:00</updated>
<author>
<name>Diogo Sampaio</name>
<email>diogo.sampaio@arm.com</email>
</author>
<published>2020-01-13T11:36:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d94d079a6a5b12156e4b818c8ba46eb143f335b9'/>
<id>urn:sha1:d94d079a6a5b12156e4b818c8ba46eb143f335b9</id>
<content type='text'>
Summary:
This patch fixes pr23772  [ARM] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80".
The violation was that SUB and ADD (reg, immediate) instructions can only write to SP if the source register is also SP. So the above instructions was unpredictable.
To enforce that the instruction t2(ADD|SUB)ri does not write to SP we now enforce the destination register to be rGPR (That exclude PC and SP).
Different than the ARM specification, that defines one instruction that can read from SP, and one that can't, here we inserted one that can't write to SP, and other that can only write to SP as to reuse most of the hard-coded size optimizations.
When performing this change, it uncovered that emitting Thumb2 Reg plus Immediate could not emit all variants of ADD SP, SP #imm instructions before so it was refactored to be able to. (see test/CodeGen/Thumb2/mve-stacksplot.mir where we use a subw sp, sp, Imm12 variant )
It also uncovered a disassembly issue of adr.w instructions, that were only written as SUBW instructions (see llvm/test/MC/Disassembler/ARM/thumb2.txt).

Reviewers: eli.friedman, dmgreen, carwil, olista01, efriedma, andreadb

Reviewed By: efriedma

Subscribers: gbedwell, john.brawn, efriedma, ostannard, kristof.beyls, hiraditya, dmgreen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70680
</content>
</entry>
<entry>
<title>[MC][ELF] Emit a relocation if target is defined in the same section and is non-local</title>
<updated>2020-01-12T21:46:24+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-04T05:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=2bfee35cb860859b436de0b780fbd00d68e198a4'/>
<id>urn:sha1:2bfee35cb860859b436de0b780fbd00d68e198a4</id>
<content type='text'>
For a target symbol defined in the same section, currently we don't emit
a relocation if VariantKind is VK_None (with few exceptions like RISC-V
relaxation), while GNU as emits one. This causes program behavior
differences with and without -ffunction-sections, and can break intended
symbol interposition in a -shared link.

```
.globl foo
foo:
  call foo      # no relocation. On other targets, may be written as b foo, etc
  call bar      # a relocation if bar is in another section (e.g. -ffunction-sections)
  call foo@plt  # a relocation
```

Unify these cases by always emitting a relocation. If we ever want to
optimize `call foo` in -shared links, we should emit a STB_LOCAL alias
and call via the alias.

ARM/thumb2-beq-fixup.s: we now emit a relocation to global_thumb_fn as GNU as does.
X86/Inputs/align-branch-64-2.s: we now emit R_X86_64_PLT32 to foo as GNU does.

ELF/relax.s: rewrite the test as target-in-same-section.s .
We omitted relocations to `global` and now emit R_X86_64_PLT32.
Note, GNU as does not emit a relocation for `jmp global` (maybe its own
bug). Our new behavior is compatible except `jmp global`.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D72197
</content>
</entry>
<entry>
<title>Reverting, broke some bots. Need further investigation.</title>
<updated>2020-01-10T13:40:41+00:00</updated>
<author>
<name>Diogo Sampaio</name>
<email>diogo.sampaio@arm.com</email>
</author>
<published>2020-01-10T13:32:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b1bb5ce96d349689085eab38121c85737de1fcaa'/>
<id>urn:sha1:b1bb5ce96d349689085eab38121c85737de1fcaa</id>
<content type='text'>
Summary: This reverts commit 8c12769f3046029e2a9b4e48e1645b1a77d28650.

Reviewers:

Subscribers:
</content>
</entry>
<entry>
<title>[ARM][Thumb2] Fix ADD/SUB invalid writes to SP</title>
<updated>2020-01-10T11:25:44+00:00</updated>
<author>
<name>Diogo Sampaio</name>
<email>diogo.sampaio@arm.com</email>
</author>
<published>2020-01-08T10:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=8c12769f3046029e2a9b4e48e1645b1a77d28650'/>
<id>urn:sha1:8c12769f3046029e2a9b4e48e1645b1a77d28650</id>
<content type='text'>
Summary:
This patch fixes pr23772  [ARM] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80".
The violation was that SUB and ADD (reg, immediate) instructions can only write to SP if the source register is also SP. So the above instructions was unpredictable.
To enforce that the instruction t2(ADD|SUB)ri does not write to SP we now enforce the destination register to be rGPR (That exclude PC and SP).
Different than the ARM specification, that defines one instruction that can read from SP, and one that can't, here we inserted one that can't write to SP, and other that can only write to SP as to reuse most of the hard-coded size optimizations.
When performing this change, it uncovered that emitting Thumb2 Reg plus Immediate could not emit all variants of ADD SP, SP #imm instructions before so it was refactored to be able to. (see test/CodeGen/Thumb2/mve-stacksplot.mir where we use a subw sp, sp, Imm12 variant )
It also uncovered a disassembly issue of adr.w instructions, that were only written as SUBW instructions (see llvm/test/MC/Disassembler/ARM/thumb2.txt).

Reviewers: eli.friedman, dmgreen, carwil, olista01, efriedma

Reviewed By: efriedma

Subscribers: john.brawn, efriedma, ostannard, kristof.beyls, hiraditya, dmgreen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70680
</content>
</entry>
<entry>
<title>[NFC] Fix trivial typos in comments</title>
<updated>2020-01-06T10:50:26+00:00</updated>
<author>
<name>James Henderson</name>
<email>jh7370@my.bristol.ac.uk</email>
</author>
<published>2020-01-06T10:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d68904f957ae1f9b2309bdbf34258387c045ce27'/>
<id>urn:sha1:d68904f957ae1f9b2309bdbf34258387c045ce27</id>
<content type='text'>
Reviewed By: jhenderson

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

Patch by Kazuaki Ishizaki.
</content>
</entry>
<entry>
<title>Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351</title>
<updated>2019-12-24T23:57:33+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2019-12-24T23:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=502a77f125f43ffde57af34d3fd1b900248a91cd'/>
<id>urn:sha1:502a77f125f43ffde57af34d3fd1b900248a91cd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[llvm-readelf] - Change letters used for SHF_ARM_PURECODE and SHF_X86_64_LARGE flags.</title>
<updated>2019-12-18T08:31:58+00:00</updated>
<author>
<name>Georgii Rymar</name>
<email>grimar@accesssoftek.com</email>
</author>
<published>2019-12-13T14:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=f8dbb2c62f45a95f306a85410cb4f00c05c4bb0c'/>
<id>urn:sha1:f8dbb2c62f45a95f306a85410cb4f00c05c4bb0c</id>
<content type='text'>
GNU uses `l` for SHF_X86_64_LARGE and `y` for SHF_ARM_PURECODE.
Lets follow.

To do this I had to refactor and refine how we print the help flags description.
It was too generic and inconsistent with GNU readelf.

Differential revision: https://reviews.llvm.org/D71464
</content>
</entry>
<entry>
<title>ARM: Don't emit R_ARM_NONE relocations to compact unwinding decoders in .ARM.exidx on Android.</title>
<updated>2019-11-12T18:52:59+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2019-11-08T19:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1549b4699a84838c3969590dc4f757b72f39f40d'/>
<id>urn:sha1:1549b4699a84838c3969590dc4f757b72f39f40d</id>
<content type='text'>
These relocations are specified by the ARM EHABI (section 6.3). As I understand
it, their purpose is to accommodate unwinder implementations that wish to
reduce code size by placing the implementations of the compact unwinding
decoders in a separate translation unit, and using extern weak symbols to
refer to them from the main unwinder implementation, so that they are only
linked when something in the binary needs them in order to unwind.

However, neither of the unwinders used on Android (libgcc, LLVM libunwind)
use this technique, and in fact emitting these relocations ends up being
counterproductive to code size because they cause a copy of the unwinder
to be statically linked into most binaries, regardless of whether it is
actually needed. Furthermore, these relocations create circular dependencies
(between libc and the unwinder) in cases where the unwinder is dynamically
linked and libc contains compact unwind info.

Therefore, deviate from the EHABI here and stop emitting these relocations
on Android.

Differential Revision: https://reviews.llvm.org/D70027
</content>
</entry>
</feed>
