diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-11-08 10:52:26 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-11-08 10:52:26 +0100 |
commit | 90f4de67b8cd1ac753d099100d4612cc3eabe4f1 (patch) | |
tree | 9c8627eb73d56f2247039c36c2e73df5388f9420 /backend/PrintAsmaux.ml | |
parent | 9e9c57616c9cf683ed65b1ba60510b8ae8066700 (diff) | |
download | compcert-90f4de67b8cd1ac753d099100d4612cc3eabe4f1.tar.gz compcert-90f4de67b8cd1ac753d099100d4612cc3eabe4f1.zip |
Fix jumptable issue.
Instead of using reset_constants use reset_literals which avoids
emptying the jumptables.
Bug 22525
Diffstat (limited to 'backend/PrintAsmaux.ml')
-rw-r--r-- | backend/PrintAsmaux.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backend/PrintAsmaux.ml b/backend/PrintAsmaux.ml index f7a30b22..257b1ba4 100644 --- a/backend/PrintAsmaux.ml +++ b/backend/PrintAsmaux.ml @@ -86,11 +86,14 @@ let literal64_labels = (Hashtbl.create 39 : (int64, int) Hashtbl.t) let label_literal32 bf = label_constant literal32_labels bf let label_literal64 n = label_constant literal64_labels n -let reset_constants () = - jumptables := []; +let reset_literals () = Hashtbl.clear literal32_labels; Hashtbl.clear literal64_labels +let reset_constants () = + jumptables := []; + reset_literals () + let exists_constants () = Hashtbl.length literal32_labels > 0 || Hashtbl.length literal64_labels > 0 |