[all-commits] [llvm/llvm-project] 9505b5: [AVR] Do not use divmod calls for bigger integers

Ayke via All-commits all-commits at lists.llvm.org
Mon Apr 20 04:57:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9505b5cb66856a53ef2416aaf65adc85d749fd42
      https://github.com/llvm/llvm-project/commit/9505b5cb66856a53ef2416aaf65adc85d749fd42
  Author: Ayke van Laethem <aykevanlaethem at gmail.com>
  Date:   2020-04-20 (Mon, 20 Apr 2020)

  Changed paths:
    M llvm/lib/Target/AVR/AVRISelLowering.cpp
    M llvm/test/CodeGen/AVR/div.ll

  Log Message:
  -----------
  [AVR] Do not use divmod calls for bigger integers

The avr-libc provides *divmodqi4, *divmodhi4, and *divmodsi4 functions,
but does not provide a *divmoddi4. Instead it provides regular *divdi3
and *moddi3 functions.

Note that avr-libc doesn't support *divti3 or *modti3 for 128-bit
integer manipulation.

Source:
https://github.com/gcc-mirror/gcc/blob/releases/gcc-5.4.0/libgcc/config/avr/lib1funcs.S

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


  Commit: 8aad119d93e3cc399012f1379e705b06f38def3d
      https://github.com/llvm/llvm-project/commit/8aad119d93e3cc399012f1379e705b06f38def3d
  Author: Ayke van Laethem <aykevanlaethem at gmail.com>
  Date:   2020-04-20 (Mon, 20 Apr 2020)

  Changed paths:
    M llvm/lib/Target/AVR/AVRTargetObjectFile.cpp
    A llvm/test/CodeGen/AVR/sections.ll

  Log Message:
  -----------
  [AVR] Do not place functions in .progmem.data

Previously, the AVR backend would put functions in .progmem.data. This
is probably a regression from when functions still lived in address
space 0. With this change, only global constants are placed in
.progmem.data.

This is not complete: avr-gcc additionally respects -fdata-sections for
progmem global constants, which LLVM doesn't yet do. But fixing that is
a bit more complicated (and I believe other backends such as RISC-V
might also have similar issues).

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


Compare: https://github.com/llvm/llvm-project/compare/76e0ab23f683...8aad119d93e3


More information about the All-commits mailing list