Commit e2fb435c authored by xleroy's avatar xleroy
Browse files

Minor updates

git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1848 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
parent c7a642bf
All files in this distribution are part of the Compcert verified compiler.
All files in this distribution are part of the CompCert verified compiler.
The Compcert verified compiler is Copyright 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011 Institut National de Recherche en Informatique
The CompCert verified compiler is Copyright 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012 Institut National de Recherche en Informatique
et en Automatique (INRIA).
The Compcert verified compiler is distributed under the terms of the
The CompCert verified compiler is distributed under the terms of the
INRIA Non-Commercial License Agreement given below. This is a
non-free license that grants you the right to use the Compcert verified
non-free license that grants you the right to use the CompCert verified
compiler for educational, research or evaluation purposes only, but
prohibits commercial uses.
......@@ -54,10 +54,10 @@ BSD license, included below.
----------------------------------------------------------------------
INRIA Non-Commercial License Agreement for the Compcert verified compiler
INRIA Non-Commercial License Agreement for the CompCert verified compiler
1. Background: Institut National de Recherche en Informatique et en
Automatique (the "Provider") developed the Compcert verified
Automatique (the "Provider") developed the CompCert verified
compiler (the "Software") and seeks to distribute the Software for
public use and benefit.
......@@ -92,7 +92,7 @@ INRIA Non-Commercial License Agreement for the Compcert verified compiler
Software and all copyrights, trade secrets, or other intellectual
property rights in the Software and any accompanying information.
6. Publication Credit: You agree to acknowledge the INRIA Compcert
6. Publication Credit: You agree to acknowledge the INRIA CompCert
research project with appropriate citations in any publication or
presentation containing research results obtained in whole or in
part through the use of the Software.
......
The Compcert verified compiler
The CompCert C verified compiler
OVERVIEW:
The Compcert verified compiler is a compiler for a large subset of the
The CompCert C verified compiler is a compiler for a large subset of the
C programming language that generates code for the PowerPC, ARM and x86
processors.
The distinguishing feature of Compcert is that it has been formally
The distinguishing feature of CompCert is that it has been formally
verified using the Coq proof assistant: the generated assembly code is
formally guaranteed to behave as prescribed by the semantics of the
source C code.
Compcert is an ongoing research project. The present release is an
CompCert is an ongoing research project. The present release is an
advanced prototype intended for research, educational and evaluation
purposes.
For more information on CompCert (supported platforms, supported C
features, installation instructions, using the compiler, etc), please
refer to the user's manual: http://compcert.inria.fr/man/
COPYRIGHT:
The Compcert verified compiler is Copyright 2004, 2005, 2006, 2007,
The CompCert verified compiler is Copyright 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012 Institut National de Recherche en
Informatique et en Automatique (INRIA). It is distributed under the
conditions stated in file LICENSE.
SUPPORTED PLATFORMS:
- PowerPC / MacOS [stable]
For Apple Macs running the MacOS 10.4, 10.5 or 10.6 operating system.
Both PowerPC-based and Intel-based Macs are supported.
The PowerPC code generated by the Compcert compiler runs
natively at full speed on PowerPC-based Macs, and runs under
software emulation at reduced speed on Intel-based Macs.
- PowerPC / Linux [stable]
For PowerPC machines running the Linux operating system.
- IA32 / Linux or MacOS or Windows+Cygwin [stable]
For Intel/AMD x86 processors with SSE2 extensions
(i.e. Pentium 4 and later), running either Linux, MacOS 10.6 or 10.7,
or Windows with the Cygwin environment (http://www.cygwin.com/).
- ARM / Linux [experimental]
For ARM machines running the Linux operating system.
PREREQUISITES:
* The "gcc", "as" and "make" tools must be installed and accessible in
the search path. For MacOS X, you can get them by installing the
XCode development tools, as found on the installation DVDs
or on http://developer.apple.com/. For Microsoft Windows,
install the Cygwin environment http://www.cygwin.com/.
* The Coq proof assistant, version 8.3pl1.
Coq is free software, available from http://coq.inria.fr/
The original version 8.3 is not compatible, nor any of the 8.2 versions.
* The Caml functional language, version 3.10 or later.
Caml is free software, available from http://caml.inria.fr/
* Under MacOS, some standard C include files in /usr/include/
contain gcc-isms that cause errors when compiling with CompCert.
Symptoms include:
- references to undefined types uint16_t and uint32_t
- a type error when using the "assert" macro.
These issues have been reported through Apple Developer's Connection.
Until Apple fixes them, you can apply the patch available from
http://compcert.inria.fr/release/MacOSX-includes.patch
Download this file, then do:
sudo /bin/bash
cd /
patch -p0 < ..../MacOSX-includes.patch
INSTALLATION:
1- Configure the system. From the top directory, do:
./configure <target>
where <target> is one of:
ppc-macosx (PowerPC, MacOS X)
ppc-linux (PowerPC, Linux)
ppc-eabi-unix (PowerPC, EABI with Unix tools)
ppc-eabi-diab (PowerPC, EABI with Diab tools)
arm-linux (ARM, Linux)
ia32-linux (x86 SSE2 32 bits, Linux)
ia32-macosx (x86 SSE2 32 bits, MacOS X)
ia32-cygwin (x86 SSE2 32 bits, Cygwin environment for Windows)
This generates the Makefile.config file in the top directory.
The "configure" script accepts the following options:
-bindir <dir> (default: /usr/local/bin)
Directory where the binaries will be installed
-libdir <dir> (default: /usr/local/lib/compcert)
Directory where the Compcert support library will be installed
(needed only under MacOS X)
-prefix <dir> (default: /usr/local)
Set bindir and libdir to
<dir>/bin and <dir>/lib/compcert, respectively.
2- Build the system. From the top directory, do
make all
This re-checks all the Coq proofs, then extracts Caml code from the
Coq specification and combines it with supporting hand-written Caml
code to generate the executable for Compcert. This step takes 20
minutes or so on a recent machine; be patient.
3- You can now install Compcert. This will create the "ccomp" command
in the binary directory selected during configuration, and install
supporting .h and .a files in the library directory. Become superuser
if necessary and do
make install
USAGE:
The executable for Compcert is called "ccomp". It has the standard
command-line interface for a Unix C compiler. For instance, to
compile the single-file program "src.c" and create an executable
called "exec", just do
ccomp -o exec src.c
To compile a two-file program "src1.c" and "src2.c", do
ccomp -c src1.c
ccomp -c src2.c
ccomp -o exec src1.o src2.o
To see the generated assembly code for "src1.c", do
ccomp -S src1.c
The generated assembly code is left in file src1.s
The subset of the C language accepted by Compcert is quite large.
The main features of C that are not supported are:
- The "long long" and "long double" types.
- Non-structured forms of the "switch" statement (Duff's device).
- Variable-argument functions.
The "ccomp" command will issue errors and diagnostics if it encounters
a C construct that it cannot process.
The "ccomp" command recognizes the following classes of input files:
.c C source file
.cm Cminor source file
.s Assembly file
.S Assembly file, to be run through the C preprocessor
.o Object code file
.a Library file
The "ccomp" command recognizes the following options:
Processing options:
-E Preprocess only, send result to standard output
-S Compile to assembler only, save result in <file>.s
-c Compile to object file only (no linking), result in <file>.o
Preprocessing options:
-I<dir> Add <dir> to search path for #include files
-D<symb>=<val> Define preprocessor symbol
-U<symb> Undefine preprocessor symbol
Language support options (use -fno-<opt> to turn off -f<opt>) :
-fbitfields Emulate bit fields in structs [off]
-flonglong Partial emulation of 'long long' types [on]
-flongdouble Treat 'long double' as 'double' [off]
-fstruct-return Emulate returning structs and unions by value [off]
-fvararg-calls Emulate calls to variable-argument functions [on]
-fpacked-structs Emulate packed structs [off]
-fall Activate all language support options above
-fnone Turn off all language support options above
Code generation options:
-fmadd Use fused multiply-add and multiply-sub instructions
-fsmall-data <n> Set maximal size <n> for allocation in small data area
-fsmall-const <n> Set maximal size <n> for allocation in small constant area
Tracing options:
-dparse Save C file after parsing and elaboration in <file>.parse.c
-dc Save generated Compcert C in <file>.compcert.c
-dclight Save generated Clight in <file>.light.c
-dcminor Save generated Cminor in <file>.cm
-drtl Save unoptimized generated RTL in <file>.rtl
-dtailcall Save RTL after tail call optimization in <file>.tailcall.rtl
-dcastopt Save RTL after cast optimization in <file>.castopt.rtl
-dconstprop Save RTL after constant propagation in <file>.constprop.rtl
-dcse Save RTL after CSE optimization in <file>.cse.rtl
-dalloc Save LTL after register allocation in <file>.alloc.ltl
-dmach Save generated Mach in <file>.mach
-dasm Save generated assembly in <file>.s
Linking options:
-l<lib> Link library <lib>
-L<dir> Add <dir> to search path for libraries
-o <file> Generate executable in <file> (default: a.out)
General options:
-stdlib <dir> Set the path of the Compcert stdlib wrappers
-v Print external commands before invoking them
CONTACT:
The authors can be contacted by e-mail at compcert@yquem.inria.fr
......
......@@ -13,7 +13,6 @@
/* */
/* *********************************************************************/
/* HASP: Modified to parse global data declarations, other small changes */
/* Note that this compiles a superset of the language defined by the AST,
including function calls in expressions, matches, while statements, etc. */
......
......@@ -3,7 +3,7 @@
(* The Compcert verified compiler *)
(* *)
(* Xavier Leroy, INRIA Paris-Rocquencourt *)
(* with contributions from Andrew Tolmach (Portland State University) *)
(* with contributions from Andrew Tolmach (Portland State University) *)
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
......@@ -1477,7 +1477,7 @@ Proof.
apply find_funct_ptr_match. auto.
Qed.
Theorem find_funct_rev_match: (* a little weak *)
Theorem find_funct_rev_match:
forall (v : val) (tf : B),
find_funct (globalenv p') v = Some tf ->
(exists f, find_funct (globalenv p) v = Some f /\ match_fun f tf)
......
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