[all-commits] [llvm/llvm-project] 4add24: [AVR] Add support for the -mdouble=x flag

Ayke via All-commits all-commits at lists.llvm.org
Tue Mar 17 05:22:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4add24920550beeaed15b24e6427154a58b02e50
      https://github.com/llvm/llvm-project/commit/4add24920550beeaed15b24e6427154a58b02e50
  Author: Ayke van Laethem <aykevanlaethem at gmail.com>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Basic/TargetInfo.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/CodeGen/mdouble.c
    A clang/test/Driver/mdouble.c

  Log Message:
  -----------
  [AVR] Add support for the -mdouble=x flag

This flag is used by avr-gcc (starting with v10) to set the width of the
double type. The double type is by default interpreted as a 32-bit
floating point number in avr-gcc instead of a 64-bit floating point
number as is common on other architectures. Starting with GCC 10, a new
option has been added to control this behavior:
https://gcc.gnu.org/wiki/avr-gcc#Deviations_from_the_Standard

This commit keeps the default double at 32 bits but adds support for the
-mdouble flag (-mdouble=32 and -mdouble=64) to control this behavior.

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




More information about the All-commits mailing list