llvm with tablegen backend for capstone disassembler
Go to file
Ties Stuij 2273741ea2 [ARM] generate armv6m eXecute Only (XO) code
[ARM] generate armv6m eXecute Only (XO) code for immediates, globals

Previously eXecute Only (XO) support was implemented for targets that support
MOVW/MOVT (~armv7+). See: https://reviews.llvm.org/D27449

XO prevents the compiler from generating data accesses to code sections. This
patch implements XO codegen for armv6-M, which does not support MOVW/MOVT, and
must resort to the following general pattern to avoid loads:

    movs    r3, :upper8_15:foo
    lsls    r3, #8
    adds    r3, :upper0_7:foo
    lsls    r3, #8
    adds    r3, :lower8_15:foo
    lsls    r3, #8
    adds    r3, :lower0_7:foo
    ldr     r3, [r3]

This is equivalent to the code pattern generated by GCC.

The above relocations are new to LLVM and have been implemented in a parent
patch: https://reviews.llvm.org/D149443.

This patch limits itself to implementing codegen for this pattern and enabling
XO for armv6-M in the backend.

Separate patches will follow for:
- switch tables
- replacing specific loads from constant islands which are spread out over the
  ARM backend codebase. Amongst others: FastISel, call lowering, stack frames.

Reviewed By: john.brawn

Differential Revision: https://reviews.llvm.org/D152795
2023-06-23 10:50:47 +01:00
.github/workflows workflows/release-tasks: Upload lit releases to pypi 2023-05-31 09:25:19 -07:00
bolt [BOLT] Fixing relative ordering of cold sections under multi-way function splitting 2023-06-22 14:26:48 -07:00
clang [APFloat] Add APFloat semantic support for TF32 2023-06-23 10:54:49 +02:00
clang-tools-extra [clangd] Store offsets in MacroOccurrence 2023-06-23 09:21:08 +02:00
cmake [CMake] Ensure CLANG_RESOURCE_DIR is respected. 2023-06-03 04:21:35 -07:00
compiler-rt [compiler-rt][CMake] Multiarch build of XRay libraries 2023-06-22 18:41:07 -07:00
cross-project-tests [Dexter] XFAIL Dexter tests for Apple Silicon (arm64) 2023-05-26 15:43:20 -07:00
flang [flang][hlfir] Simplify hlfir::convertToValue 2023-06-23 09:04:25 +02:00
libc [libc] Factor specifics of packet type out of process 2023-06-23 03:45:23 +01:00
libclc Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
libcxx [libc++] Fix the check-format job 2023-06-21 17:59:32 -04:00
libcxxabi [libc++][NFC] Consistently qualify malloc and free calls with std:: 2023-06-16 09:40:31 -04:00
libunwind [libunwind] Removes CMake work-arounds. 2023-06-05 17:42:37 +02:00
lld Revert "Revert "[lld][Arm] Big Endian - Byte invariant support."" 2023-06-22 16:10:18 +01:00
lldb [lldb] Adjust for changes in objc runtime 2023-06-22 16:42:22 -07:00
llvm [ARM] generate armv6m eXecute Only (XO) code 2023-06-23 10:50:47 +01:00
llvm-libgcc Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
mlir [mlir][transform] don't wrap a warning into silenceable failure 2023-06-23 08:20:53 +00:00
openmp [OpenMP] Disable some tests for AArch64 2023-06-20 19:00:07 +00:00
polly [SCEV] Compute AddRec range computations using different type BECount 2023-05-31 21:05:17 -07:00
pstl Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
runtimes Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
third-party Revert "Prevent deadlocks in death tests." 2023-06-20 07:39:31 +00:00
utils [Bazel][mlir] Avoid ODR violation introduced in 7ab749c. 2023-06-22 08:00:50 +02:00
.arcconfig
.arclint
.clang-format
.clang-tidy Add -misc-use-anonymous-namespace to .clang-tidy 2023-05-06 02:33:20 +03:00
.git-blame-ignore-revs [NFC] Add libc++ formatting commit to the git-blame ignore file 2023-06-19 11:21:15 -04:00
.gitignore
.mailmap Add entry to mailmap 2023-04-25 23:15:07 -07:00
CONTRIBUTING.md Added instruction to join the llvm discourse and discord group. 2023-03-27 17:02:07 -07:00
LICENSE.TXT [docs] Add LICENSE.txt to the root of the mono-repo 2022-08-24 09:35:00 +02:00
README.md [docs] Update README and GettingStarted 2023-03-08 12:55:59 -08:00
SECURITY.md

The LLVM Compiler Infrastructure

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.