diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2021-04-13 15:04:34 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2021-04-13 15:04:34 +0200 |
commit | d53cc13b6e47843ebaf4b23c8b03dcef34f331f1 (patch) | |
tree | 9cae52930879af39cd3443cf48874df8a0a5e654 /driver | |
parent | 5a846f2aeb5eb659c1b510e3fb27e49677cb8680 (diff) | |
download | compcert-kvx-d53cc13b6e47843ebaf4b23c8b03dcef34f331f1.tar.gz compcert-kvx-d53cc13b6e47843ebaf4b23c8b03dcef34f331f1.zip |
Adding distinction between kvx-cos and kvx-mbr (for trapping loads)
Diffstat (limited to 'driver')
-rw-r--r-- | driver/Configuration.ml | 1 | ||||
-rw-r--r-- | driver/Configuration.mli | 3 | ||||
-rw-r--r-- | driver/Frontend.ml | 5 |
3 files changed, 8 insertions, 1 deletions
diff --git a/driver/Configuration.ml b/driver/Configuration.ml index 1d40214a..ecc2aba6 100644 --- a/driver/Configuration.ml +++ b/driver/Configuration.ml @@ -126,6 +126,7 @@ let arch = | "powerpc"|"arm"|"x86"|"riscV"|"kvx"|"aarch64" as a -> a | v -> bad_config "arch" [v] let model = get_config_string "model" +let os = get_config_string "os" let abi = get_config_string "abi" let is_big_endian = match get_config_string "endianness" with diff --git a/driver/Configuration.mli b/driver/Configuration.mli index a71da72d..75e547ff 100644 --- a/driver/Configuration.mli +++ b/driver/Configuration.mli @@ -19,6 +19,9 @@ val model: string val abi: string (** ABI to use *) +val os: string + (** ABI to use *) + val is_big_endian: bool (** Endianness to use *) diff --git a/driver/Frontend.ml b/driver/Frontend.ml index c99da945..c8890046 100644 --- a/driver/Frontend.ml +++ b/driver/Frontend.ml @@ -117,7 +117,10 @@ let init () = | "riscV" -> if Configuration.model = "64" then Machine.rv64 else Machine.rv32 - | "kvx" -> Machine.kvx + | "kvx" -> if Configuration.os = "cos" then Machine.kvxcos + else if Configuration.os = "mbr" then Machine.kvxmbr + else (Printf.eprintf "Configuration OS = %s\n" Configuration.os; + failwith "Wrong OS configuration for KVX") | "aarch64" -> Machine.aarch64 | _ -> assert false end; |