aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/SelectOp.vp
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2017-06-16 11:53:28 +0200
committerBernhard Schommer <bschommer@users.noreply.github.com>2017-07-06 15:41:51 +0200
commit2ff53c2361773f28027ccc8332e1830686d5bbc6 (patch)
tree2c0b1dc7201bd3618859cc5dc2257dbf07e996de /riscV/SelectOp.vp
parentdff22ef6d855973e0e0f05c7203a6bfa9a4cf01a (diff)
downloadcompcert-kvx-2ff53c2361773f28027ccc8332e1830686d5bbc6.tar.gz
compcert-kvx-2ff53c2361773f28027ccc8332e1830686d5bbc6.zip
Extend builtin arguments with a pointer addition operator, continued
- Add support for PowerPC, with all addressing modes. - Add support for ARM, with "reg + ofs" addressing mode. - Add support for RISC-V, with the one addressing mode. - Constprop.v: forgot to recurse in BA_addptr - volatile4 test: more tests
Diffstat (limited to 'riscV/SelectOp.vp')
-rw-r--r--riscV/SelectOp.vp4
1 files changed, 4 insertions, 0 deletions
diff --git a/riscV/SelectOp.vp b/riscV/SelectOp.vp
index b38b7b4d..bb8af2ed 100644
--- a/riscV/SelectOp.vp
+++ b/riscV/SelectOp.vp
@@ -442,5 +442,9 @@ Nondetfunction builtin_arg (e: expr) :=
BA_long (Int64.ofwords h l)
| Eop Omakelong (h ::: l ::: Enil) => BA_splitlong (BA h) (BA l)
| Eload chunk (Ainstack ofs) Enil => BA_loadstack chunk ofs
+ | Eop (Oaddimm n) (e1:::Enil) =>
+ if Archi.ptr64 then BA e else BA_addptr (BA e1) (BA_int n)
+ | Eop (Oaddlimm n) (e1:::Enil) =>
+ if Archi.ptr64 then BA_addptr (BA e1) (BA_long n) else BA e
| _ => BA e
end.