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 c44fc24e authored by Léo Gourdin's avatar Léo Gourdin
Browse files

removing some Expansion when loading float/single constants

parent 3bf9a4fc
......@@ -825,22 +825,28 @@ let expanse (sb : superblock) code pm =
| _ -> ());
(if !Clflags.option_fexpanse_others && not !was_exp then
match inst with
| Iop (Ofloatconst f, nil, dest, succ) ->
debug "Iop/Ofloatconst\n";
let r = r2pi () in
let l = loadimm64 vn r (Floats.Float.to_bits f) in
let r', l' = extract_arg l in
exp := addinst vn Ofloat_of_bits [ r' ] dest :: l';
exp := extract_final vn !exp dest succ;
was_exp := true
| Iop (Osingleconst f, nil, dest, succ) ->
debug "Iop/Osingleconst\n";
let r = r2pi () in
let l = loadimm32 vn r (Floats.Float32.to_bits f) in
let r', l' = extract_arg l in
exp := addinst vn Osingle_of_bits [ r' ] dest :: l';
exp := extract_final vn !exp dest succ;
was_exp := true
| Iop (Ofloatconst f, nil, dest, succ) -> (
match make_immed64 (Floats.Float.to_bits f) with
| Imm64_single _ | Imm64_large _ -> ()
| Imm64_pair (hi, lo) ->
debug "Iop/Ofloatconst\n";
let r = r2pi () in
let l = load_hilo64 vn r hi lo in
let r', l' = extract_arg l in
exp := addinst vn Ofloat_of_bits [ r' ] dest :: l';
exp := extract_final vn !exp dest succ;
was_exp := true)
| Iop (Osingleconst f, nil, dest, succ) -> (
match make_immed32 (Floats.Float32.to_bits f) with
| Imm32_single imm -> ()
| Imm32_pair (hi, lo) ->
debug "Iop/Osingleconst\n";
let r = r2pi () in
let l = load_hilo32 vn r hi lo in
let r', l' = extract_arg l in
exp := addinst vn Osingle_of_bits [ r' ] dest :: l';
exp := extract_final vn !exp dest succ;
was_exp := true)
| Iop (Ointconst n, nil, dest, succ) ->
debug "Iop/Ointconst\n";
exp := loadimm32 vn dest n;
......
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