llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.83k stars 11.91k forks source link

[M68k] implement large code model #106208

Open TechnoElf opened 2 months ago

TechnoElf commented 2 months ago

The currently supported code models all assume that any symbol may be reached with a 16bit offset, however, m68k-based microcontrollers may have ROM/flash (where .text and .rodata are usually mapped) and RAM (where .data and .bss are usually mapped) at greatly differing address ranges (> 16bit). This makes it necessary to support a large code model that uses absolute or GOT-relative addressing modes for these targets.

llvmbot commented 2 months ago

@llvm/issue-subscribers-backend-m68k

Author: Janis Heims (TechnoElf)

The currently supported code models all assume that any symbol may be reached with a 16bit offset, however, m68k-based microcontrollers may have ROM/flash (where .text and .rodata are usually mapped) and RAM (where .data and .bss are usually mapped) at greatly differing address ranges (> 16bit). This makes it necessary to support a large code model that uses absolute or GOT-relative addressing modes for these targets.