Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CertiCompil
CompCert-KVX
Commits
7b3d2c0a
Commit
7b3d2c0a
authored
Apr 20, 2018
by
Cyril SIX
Browse files
MPPA - Added Ocast8signed and Ocast16signed
parent
aa25ec27
Changes
2
Hide whitespace changes
Inline
Side-by-side
mppa_k1c/Asmgen.v
View file @
7b3d2c0a
...
...
@@ -271,13 +271,13 @@ Definition transl_op
do
rd
<-
ireg_of
res
;
OK
(
addptrofs
rd
SP
n
k
)
(
*
|
Ocast8signed
,
a1
::
nil
=>
|
Ocast8signed
,
a1
::
nil
=>
do
rd
<-
ireg_of
res
;
do
rs
<-
ireg_of
a1
;
OK
(
Pslliw
rd
rs
(
Int
.
repr
24
)
::
Psraiw
rd
rd
(
Int
.
repr
24
)
::
k
)
|
Ocast16signed
,
a1
::
nil
=>
do
rd
<-
ireg_of
res
;
do
rs
<-
ireg_of
a1
;
OK
(
Pslliw
rd
rs
(
Int
.
repr
16
)
::
Psraiw
rd
rd
(
Int
.
repr
16
)
::
k
)
*
)
|
Oadd
,
a1
::
a2
::
nil
=>
|
Oadd
,
a1
::
a2
::
nil
=>
do
rd
<-
ireg_of
res
;
do
rs1
<-
ireg_of
a1
;
do
rs2
<-
ireg_of
a2
;
OK
(
Paddw
rd
rs1
rs2
::
k
)
|
Oaddimm
n
,
a1
::
nil
=>
...
...
mppa_k1c/Asmgenproof1.v
View file @
7b3d2c0a
...
...
@@ -1214,6 +1214,20 @@ Opaque Int.eq.
-
(
*
Oaddrstack
*
)
exploit
addptrofs_correct
.
instantiate
(
1
:=
GPR12
);
auto
with
asmgen
.
intros
(
rs
'
&
A
&
B
&
C
).
exists
rs
'
;
split
;
eauto
.
auto
with
asmgen
.
-
(
*
Ocast8signed
*
)
econstructor
;
split
.
eapply
exec_straight_two
.
simpl
;
eauto
.
simpl
;
eauto
.
auto
.
auto
.
split
;
intros
;
Simpl
.
assert
(
A
:
Int
.
ltu
(
Int
.
repr
24
)
Int
.
iwordsize
=
true
)
by
auto
.
unfold
getw
.
destruct
(
rs
x0
);
auto
;
simpl
.
rewrite
A
;
simpl
.
Simpl
.
unfold
Val
.
shr
.
rewrite
A
.
apply
Val
.
lessdef_same
.
f_equal
.
apply
Int
.
sign_ext_shr_shl
.
split
;
reflexivity
.
-
(
*
Ocast16signed
*
)
econstructor
;
split
.
eapply
exec_straight_two
.
simpl
;
eauto
.
simpl
;
eauto
.
auto
.
auto
.
split
;
intros
;
Simpl
.
assert
(
A
:
Int
.
ltu
(
Int
.
repr
16
)
Int
.
iwordsize
=
true
)
by
auto
.
unfold
getw
.
destruct
(
rs
x0
);
auto
;
simpl
.
rewrite
A
;
simpl
.
Simpl
.
unfold
Val
.
shr
.
rewrite
A
.
apply
Val
.
lessdef_same
.
f_equal
.
apply
Int
.
sign_ext_shr_shl
.
split
;
reflexivity
.
-
(
*
Oshrximm
*
)
clear
H
.
exploit
Val
.
shrx_shr_2
;
eauto
.
intros
E
;
subst
v
;
clear
EV
.
destruct
(
Int
.
eq
n
Int
.
zero
).
...
...
@@ -1257,20 +1271,6 @@ Opaque Int.eq.
-
(
*
stackoffset
*
)
exploit
addptrofs_correct
.
instantiate
(
1
:=
X2
);
auto
with
asmgen
.
intros
(
rs
'
&
A
&
B
&
C
).
exists
rs
'
;
split
;
eauto
.
auto
with
asmgen
.
-
(
*
cast8signed
*
)
econstructor
;
split
.
eapply
exec_straight_two
.
simpl
;
eauto
.
simpl
;
eauto
.
auto
.
auto
.
split
;
intros
;
Simpl
.
assert
(
A
:
Int
.
ltu
(
Int
.
repr
24
)
Int
.
iwordsize
=
true
)
by
auto
.
destruct
(
rs
x0
);
auto
;
simpl
.
rewrite
A
;
simpl
.
rewrite
A
.
apply
Val
.
lessdef_same
.
f_equal
.
apply
Int
.
sign_ext_shr_shl
.
split
;
reflexivity
.
-
(
*
cast16signed
*
)
econstructor
;
split
.
eapply
exec_straight_two
.
simpl
;
eauto
.
simpl
;
eauto
.
auto
.
auto
.
split
;
intros
;
Simpl
.
assert
(
A
:
Int
.
ltu
(
Int
.
repr
16
)
Int
.
iwordsize
=
true
)
by
auto
.
destruct
(
rs
x0
);
auto
;
simpl
.
rewrite
A
;
simpl
.
rewrite
A
.
apply
Val
.
lessdef_same
.
f_equal
.
apply
Int
.
sign_ext_shr_shl
.
split
;
reflexivity
.
-
(
*
addimm
*
)
exploit
(
opimm32_correct
Paddw
Paddiw
Val
.
add
);
auto
.
instantiate
(
1
:=
x0
);
eauto
with
asmgen
.
intros
(
rs
'
&
A
&
B
&
C
).
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment