diff options
author | Sylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr> | 2018-11-28 13:16:54 +0100 |
---|---|---|
committer | Sylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr> | 2018-11-28 13:16:54 +0100 |
commit | 09ebc4ffc4fa22e04e89f47d2f860cc831d6c23c (patch) | |
tree | 24e4ab5ea6c71742415afb9867dfe3c6c278fdd8 | |
parent | 3af2dc7aaa8c8139ddd26589258f2b289425f591 (diff) | |
download | compcert-kvx-09ebc4ffc4fa22e04e89f47d2f860cc831d6c23c.tar.gz compcert-kvx-09ebc4ffc4fa22e04e89f47d2f860cc831d6c23c.zip |
compilation Asmexpandaux both for x86/ and mppa_k1c/
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | backend/Asmaux.v | 5 | ||||
-rw-r--r-- | backend/Asmexpandaux.ml | 4 | ||||
-rw-r--r-- | extraction/extraction.v | 3 | ||||
-rw-r--r-- | mppa_k1c/Asm.v | 3 | ||||
-rw-r--r-- | mppa_k1c/Asmaux.v | 5 |
6 files changed, 17 insertions, 5 deletions
@@ -97,7 +97,7 @@ BACKEND=\ Debugvar.v Debugvarproof.v \ Mach.v \ Bounds.v Stacklayout.v Stacking.v Stackingproof.v \ - Asm.v Asmgen.v Asmgenproof.v \ + Asm.v Asmgen.v Asmgenproof.v Asmaux.v \ $(BACKENDLIB) # C front-end modules (in cfrontend/) diff --git a/backend/Asmaux.v b/backend/Asmaux.v new file mode 100644 index 00000000..51e94f6b --- /dev/null +++ b/backend/Asmaux.v @@ -0,0 +1,5 @@ +Require Import Asm. +Require Import AST. + +(* Constant only needed by Asmexpandaux.ml *) +Definition dummy_function := {| fn_code := nil; fn_sig := signature_main |}.
\ No newline at end of file diff --git a/backend/Asmexpandaux.ml b/backend/Asmexpandaux.ml index f5c76925..b1d822db 100644 --- a/backend/Asmexpandaux.ml +++ b/backend/Asmexpandaux.ml @@ -15,6 +15,7 @@ pseudo-instructions *) open Asm +open Asmaux open AST open Camlcoq @@ -26,7 +27,10 @@ let emit i = current_code := i :: !current_code (* Generation of fresh labels *) +(* now imported from Asmaux.ml let dummy_function = { fn_code = []; fn_sig = signature_main } +*) + let current_function = ref dummy_function let next_label = ref (None: label option) diff --git a/extraction/extraction.v b/extraction/extraction.v index a47a7237..f18c1274 100644 --- a/extraction/extraction.v +++ b/extraction/extraction.v @@ -35,6 +35,7 @@ Require Compiler. Require Parser. Require Initializers. Require Int31. +Require Asmaux. (* Standard lib *) Require Import ExtrOcamlBasic. @@ -184,7 +185,7 @@ Separate Extraction Machregs.mregs_for_operation Machregs.mregs_for_builtin Machregs.two_address_op Machregs.is_stack_reg Machregs.destroyed_at_indirect_call - AST.signature_main + AST.signature_main Asmaux Floats.Float32.from_parsed Floats.Float.from_parsed Globalenvs.Senv.invert_symbol Parser.translation_unit_file. diff --git a/mppa_k1c/Asm.v b/mppa_k1c/Asm.v index c142185c..17cd67f4 100644 --- a/mppa_k1c/Asm.v +++ b/mppa_k1c/Asm.v @@ -291,9 +291,6 @@ Fixpoint unfold (lb: bblocks) := Record function : Type := mkfunction { fn_sig: signature; fn_blocks: bblocks; fn_code: code;
correct: unfold fn_blocks = fn_code }.
-(* For OCaml code *)
-Program Definition dummy_function := {| fn_code := nil; fn_sig := signature_main; fn_blocks := nil |}.
-
Definition fundef := AST.fundef function.
Definition program := AST.program fundef unit.
Definition genv := Genv.t fundef unit.
diff --git a/mppa_k1c/Asmaux.v b/mppa_k1c/Asmaux.v new file mode 100644 index 00000000..85359658 --- /dev/null +++ b/mppa_k1c/Asmaux.v @@ -0,0 +1,5 @@ +Require Import Asm. +Require Import AST. + +(* Constant only needed by Asmexpandaux.ml *) +Program Definition dummy_function := {| fn_code := nil; fn_sig := signature_main; fn_blocks := nil |}.
|