aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64/Asmgen.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-01-15 09:45:17 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-01-15 09:45:17 +0100
commitb77b57ea6da032e0931a80c6e826ae9acc3e748e (patch)
treeb9c2dada7c0f0862acc191c966e6d80bb3ac9eb9 /aarch64/Asmgen.v
parent320d0841ee99fa33c0cd85e0fab203ee9b861748 (diff)
parent4393640af54ee3139e5c399e6fa1685faf483707 (diff)
downloadcompcert-kvx-b77b57ea6da032e0931a80c6e826ae9acc3e748e.tar.gz
compcert-kvx-b77b57ea6da032e0931a80c6e826ae9acc3e748e.zip
Merge branch 'dm-div2' of https://github.com/monniaux/CompCert into mppa-work
Diffstat (limited to 'aarch64/Asmgen.v')
-rw-r--r--aarch64/Asmgen.v22
1 files changed, 14 insertions, 8 deletions
diff --git a/aarch64/Asmgen.v b/aarch64/Asmgen.v
index 0c72c7cc..46dd875d 100644
--- a/aarch64/Asmgen.v
+++ b/aarch64/Asmgen.v
@@ -268,18 +268,24 @@ Definition arith_extended
Definition shrx32 (rd r1: ireg) (n: int) (k: code) : code :=
if Int.eq n Int.zero then
Pmov rd r1 :: k
- else
- Porr W X16 XZR r1 (SOasr (Int.repr 31)) ::
- Padd W X16 r1 X16 (SOlsr (Int.sub Int.iwordsize n)) ::
- Porr W rd XZR X16 (SOasr n) :: k.
+ else if Int.eq n Int.one then
+ Padd W X16 r1 r1 (SOlsr (Int.repr 31)) ::
+ Porr W rd XZR X16 (SOasr n) :: k
+ else
+ Porr W X16 XZR r1 (SOasr (Int.repr 31)) ::
+ Padd W X16 r1 X16 (SOlsr (Int.sub Int.iwordsize n)) ::
+ Porr W rd XZR X16 (SOasr n) :: k.
Definition shrx64 (rd r1: ireg) (n: int) (k: code) : code :=
if Int.eq n Int.zero then
Pmov rd r1 :: k
- else
- Porr X X16 XZR r1 (SOasr (Int.repr 63)) ::
- Padd X X16 r1 X16 (SOlsr (Int.sub Int64.iwordsize' n)) ::
- Porr X rd XZR X16 (SOasr n) :: k.
+ else if Int.eq n Int.one then
+ Padd X X16 r1 r1 (SOlsr (Int.repr 63)) ::
+ Porr X rd XZR X16 (SOasr n) :: k
+ else
+ Porr X X16 XZR r1 (SOasr (Int.repr 63)) ::
+ Padd X X16 r1 X16 (SOlsr (Int.sub Int64.iwordsize' n)) ::
+ Porr X rd XZR X16 (SOasr n) :: k.
(** Load the address [id + ofs] in [rd] *)