Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 5a632954 authored by Cyril SIX's avatar Cyril SIX
Browse files

[BROKEN] Merge with v3.9 : something broken for __builtin_expect in cfrontend/C2C.ml

parent a298e55f
Release 3.9, 2021-05-10
=======================
New features:
- New port: AArch64 (ARM 64 bits, "Apple silicon") under macOS.
- Support bitfields of types other than `int`, provided they are no larger
than 32 bits (#387)
- Support `__builtin_unreachable` and `__builtin_expect` (#394)
(but these builtins are not used for optimization yet)
Optimizations:
- Improved branch tunneling: optimized conditional branches can
introduce further opportunities for tunneling, which are now taken
into account.
Usability:
- Pragmas within functions are now ignored (with a warning) instead of
being lifted just before the function like in earlier versions.
- configure script: add `-mandir` option (#382)
Compiler internals:
- Finer control of variable initialization in sections. Now we can
put variables initialized with symbol addresses that need relocation
in specific sections (e.g. `const_data` on macOS).
- Support re-normalization of function parameters at function entry,
as required by the AArch64/ELF ABI.
- PowerPC 64 bits: remove `Pfcfi`, `Pfcfiu`, `Pfctiu` pseudo-instructions,
expanding the corresponding int<->FP conversions during the
selection pass instead.
Bug fixing:
- PowerPC 64 bits: incorrect `ld` and `std` instructions were generated
and rejected by the assembler.
- PowerPC: some variadic functions had the wrong position for their
first variadic parameter.
- RISC-V: fix calling convention in the case of floating-point
arguments that are passed in integer registers.
- AArch64: the default function alignment was incorrect, causing a
warning from the LLVM assembler.
- Pick the correct archiver to build `.a` library archives (#380).
- x86 32 bits: make sure functions returning structs and unions
return the correct pointer in register EAX (#377).
- PowerPC, ARM, AArch64: updated the registers destroyed by asm
pseudo-instructions and built-in functions.
- Remove spurious error on initialization of a local struct
containing a flexible array member.
- Fixed bug in emulation of assignment to a volatile bit-field (#395).
The clightgen tool:
- Move the `$` notation for Clight identifiers to scope `clight_scope`
and submodule `ClightNotations`, to avoid clashes with Ltac2's use of `$`
(#392).
Coq development:
- Compatibility with Coq 8.12.2, 8.13.0, 8.13.1, 8.13.2.
- Compatibility with Menhir 20210419 and up.
- Oldest Coq version supported is now 8.9.0.
- Use the `lia` tactic instead of `omega`.
- Updated the Flocq library to version 3.4.0.
Licensing and distribution:
- Dual-licensed source files are now distributed under the LGPL version 2.1
(plus the Inria non-commercial license) instead of the GPL version 2
(plus the Inria non-commercial license).
Release 3.8, 2020-11-16
=======================
......
This diff is collapsed.
......@@ -6,10 +6,11 @@
# #
# Copyright Institut National de Recherche en Informatique et en #
# Automatique. All rights reserved. This file is distributed #
# under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 2 of the License, or #
# (at your option) any later version. This file is also distributed #
# under the terms of the INRIA Non-Commercial License Agreement. #
# under the terms of the GNU Lesser General Public License as #
# published by the Free Software Foundation, either version 2.1 of #
# the License, or (at your option) any later version. #
# This file is also distributed under the terms of the #
# INRIA Non-Commercial License Agreement. #
# #
#######################################################################
......
......@@ -6,10 +6,11 @@
# #
# Copyright Institut National de Recherche en Informatique et en #
# Automatique. All rights reserved. This file is distributed #
# under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 2 of the License, or #
# (at your option) any later version. This file is also distributed #
# under the terms of the INRIA Non-Commercial License Agreement. #
# under the terms of the GNU Lesser General Public License as #
# published by the Free Software Foundation, either version 2.1 of #
# the License, or (at your option) any later version. #
# This file is also distributed under the terms of the #
# INRIA Non-Commercial License Agreement. #
# #
#######################################################################
......
......@@ -6,10 +6,11 @@
# #
# Copyright Institut National de Recherche en Informatique et en #
# Automatique. All rights reserved. This file is distributed #
# under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 2 of the License, or #
# (at your option) any later version. This file is also distributed #
# under the terms of the INRIA Non-Commercial License Agreement. #
# under the terms of the GNU Lesser General Public License as #
# published by the Free Software Foundation, either version 2.1 of #
# the License, or (at your option) any later version. #
# This file is also distributed under the terms of the #
# INRIA Non-Commercial License Agreement. #
# #
#######################################################################
......
version=3.8
version=3.9
buildnr=
tag=
branch=
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -355,8 +355,12 @@ let expand_builtin_inline name args res =
(* Synchronization *)
| "__builtin_membar", [], _ ->
()
(* No operation *)
| "__builtin_nop", [], _ ->
emit Pnop
(* Optimization hint *)
| "__builtin_unreachable", [], _ ->
()
(* Byte swap *)
| ("__builtin_bswap" | "__builtin_bswap32"), [BA(DR(IR(RR1 a1)))], BR(DR(IR(RR1 res))) ->
emit (Prev(W, res, a1))
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -7,10 +7,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -407,8 +407,12 @@ let expand_builtin_inline name args res =
(* Vararg stuff *)
| "__builtin_va_start", [BA(IR a)], _ ->
expand_builtin_va_start a
(* No operation *)
| "__builtin_nop", [], _ ->
emit Pnop
(* Optimization hint *)
| "__builtin_unreachable", [], _ ->
()
(* Catch-all *)
| _ ->
raise (Error ("unrecognized builtin " ^ name))
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
......@@ -114,11 +114,17 @@ let pp_program pp pp_inst prog =
let prog_vars,prog_funs = List.fold_left (fun (vars,funs) (ident,def) ->
match def with
| Gfun (Internal f) ->
(* No assembly is generated for non static inline functions *)
if not (atom_is_iso_inline_definition ident) then
vars,(ident,f)::funs
else
vars,funs
| Gvar v -> (ident,v)::vars,funs
| Gvar v ->
(* No assembly is generated for variables without init *)
if v.gvar_init <> [] then
(ident,v)::vars,funs
else
vars, funs
| _ -> vars,funs) ([],[]) prog.prog_defs in
pp_jobject_start pp;
pp_jmember ~first:true pp "Global Variables" (pp_jarray pp_vardef) prog_vars;
......
......@@ -737,7 +737,7 @@ Lemma store_argument_sound:
Proof.
intros.
assert (UNDEF: list_forall2 memval_lessdef
(list_repeat (size_chunk_nat chunk) Undef)
(List.repeat Undef (size_chunk_nat chunk))
(encode_val chunk w)).
{
rewrite <- (encode_val_length chunk w).
......
......@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
(* under the terms of the GNU General Public License as published by *)
(* the Free Software Foundation, either version 2 of the License, or *)
(* (at your option) any later version. This file is also distributed *)
(* under the terms of the INRIA Non-Commercial License Agreement. *)
(* under the terms of the GNU Lesser General Public License as *)
(* published by the Free Software Foundation, either version 2.1 of *)
(* the License, or (at your option) any later version. *)
(* This file is also distributed under the terms of the *)
(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment