]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/ng_assembly/opcodes/RS08_table_tests.ma
freescale porting
[helm.git] / helm / software / matita / contribs / ng_assembly / opcodes / RS08_table_tests.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* ********************************************************************** *)
16 (*                          Progetto FreeScale                            *)
17 (*                                                                        *)
18 (*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
19 (*   Sviluppo: 2008-2010                                                  *)
20 (*                                                                        *)
21 (* ********************************************************************** *)
22
23 include "freescale/opcode.ma".
24
25 (* ***************** *)
26 (* TABELLA DELL'RS08 *)
27 (* ***************** *)
28
29 (* RS08: opcode non implementati come da manuale *)
30 ndefinition RS08_not_impl_byte ≝
31  [〈x3,x2〉;〈x3,x3〉;〈x3,xD〉
32  ;〈x4,x0〉;〈x4,x7〉;〈x4,xD〉
33  ;〈xA,x3〉;〈xA,x5〉;〈xA,x7〉
34  ;〈xB,x3〉;〈xB,x5〉
35  ].
36
37 (* test bytecode non implementati *)
38 nlemma ok_byte_table_RS08 : forall_b8 (λb.
39  (test_not_impl_byte b RS08_not_impl_byte     ⊙ eq_w16 (get_byte_count RS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗
40  (⊖ (test_not_impl_byte b RS08_not_impl_byte) ⊙ eq_w16 (get_byte_count RS08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x0〉〉))
41  = true.
42  napply refl_eq.
43 nqed.
44
45 (* tutti op implementati *)
46 nlemma ok_pseudo_table_RS08 :
47  forall_op RS08 (λo.
48   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count RS08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) = true.
49  napply refl_eq.
50 nqed.
51
52 (* tutte im implementate *)
53 nlemma ok_mode_table_RS08 :
54  forall_im RS08 (λi.
55   le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count RS08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) = true.
56  napply refl_eq.
57 nqed.
58
59 (* nessuna ripetizione di combinazione op + imm *)
60 nlemma ok_OpIm_table_RS08 :
61  forall_im RS08 (λi.
62   forall_op RS08 (λo.
63    le_w16 (get_OpIm_count RS08 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
64  napply refl_eq.
65 nqed.