diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2020-12-04 23:26:01 +0100 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2020-12-04 23:26:01 +0100 |
commit | 972f6b9890ea3644626fc097e460035028b940eb (patch) | |
tree | a29e64ad4e978f55f06e19345ee753858f1334e0 /aarch64/Asmexpand.ml | |
parent | c48b7c63592e5930f022452ee6c3f1cf3d1ada97 (diff) | |
download | compcert-kvx-972f6b9890ea3644626fc097e460035028b940eb.tar.gz compcert-kvx-972f6b9890ea3644626fc097e460035028b940eb.zip |
a first working draft on ldp/stp peephole
Diffstat (limited to 'aarch64/Asmexpand.ml')
-rw-r--r-- | aarch64/Asmexpand.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aarch64/Asmexpand.ml b/aarch64/Asmexpand.ml index edcce06f..94697df7 100644 --- a/aarch64/Asmexpand.ml +++ b/aarch64/Asmexpand.ml @@ -73,7 +73,7 @@ let save_parameter_registers ir fr = while !i < 8 do let pos = 8*16 + !i*8 in if !i land 1 = 0 then begin - emit (Pstp(int_param_regs.(!i), int_param_regs.(!i + 1), + emit (Pstpx(int_param_regs.(!i), int_param_regs.(!i + 1), ADimm(XSP, Z.of_uint pos))); i := !i + 2 end else begin @@ -169,8 +169,8 @@ let expand_builtin_memcpy_small sz al src dst = let (rdst, odst) = memcpy_small_arg sz dst tdst in let rec copy osrc odst sz = if sz >= 16 then begin - emit (Pldpw(X16, X30, ADimm(rsrc, osrc))); - emit (Pstp(X16, X30, ADimm(rdst, odst))); + emit (Pldpx(X16, X30, ADimm(rsrc, osrc))); + emit (Pstpx(X16, X30, ADimm(rdst, odst))); copy (Ptrofs.add osrc _16) (Ptrofs.add odst _16) (sz - 16) end else if sz >= 8 then begin @@ -209,7 +209,7 @@ let expand_builtin_memcpy_big sz al src dst = expand_loadimm32 X15 (Z.of_uint (sz / 16)); emit (Plabel lbl); emit (Pldpx(X16, X17, ADpostincr(RR1 X30, _16))); - emit (Pstp(X16, X17, ADpostincr(RR1 X29, _16))); + emit (Pstpx(X16, X17, ADpostincr(RR1 X29, _16))); emit (Psubimm(W, RR1 X15, RR1 X15, _1)); emit (Pcbnz(W, X15, lbl)); if sz mod 16 >= 8 then begin |