]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/ng_assembly/freescale/table_RS08_tests.ma
Additional contribs.
[helm.git] / helm / software / matita / contribs / ng_assembly / freescale / table_RS08_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 (*   Ultima modifica: 05/08/2009                                          *)
20 (*                                                                        *)
21 (* ********************************************************************** *)
22
23 include "freescale/table_RS08.ma".
24 include "freescale/opcode.ma".
25
26 (* ***************** *)
27 (* TABELLA DELL'RS08 *)
28 (* ***************** *)
29
30 (* RS08: opcode non implementati come da manuale *)
31 ndefinition RS08_not_impl_byte ≝
32  [〈x3,x2〉;〈x3,x3〉;〈x3,xD〉
33  ;〈x4,x0〉;〈x4,x7〉;〈x4,xD〉
34  ;〈xA,x3〉;〈xA,x5〉;〈xA,x7〉
35  ;〈xB,x3〉;〈xB,x5〉
36  ].
37
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 (* RS08: pseudocodici non implementati come da manuale *)
46 ndefinition RS08_not_impl_pseudo ≝
47  [ AIS ; AIX ; ASR ; BGE ; BGT ; BHCC ; BHCS ; BHI ; BIH ; BIL ; BIT ; BLE ; BLS
48  ; BLT ; BMC ; BMI ; BMS ; BPL ; BRN ; CBEQX ; CLI ; CPHX ; CPX ; DAA ; DIV
49  ; LDHX ; LDX ; MUL ; NEG ; NSA ; PSHA ; PSHH ; PSHX ; PULA ; PULH ; PULX ; RSP  
50  ; RTI ; SEI ; STHX ; STX ; SWI ; TAP ; TAX ; TPA ; TST ; TSX ; TXA ; TXS ].
51
52 nlemma ok_pseudo_table_RS08 : forall_op (λo.
53  (test_not_impl_pseudo o RS08_not_impl_pseudo     ⊙ le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count RS08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) ⊗
54  (⊖ (test_not_impl_pseudo o RS08_not_impl_pseudo) ⊙ eq_w16 (get_pseudo_count RS08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x0〉〉))
55  = true.
56  napply refl_eq.
57 nqed.
58
59 (* RS08: modalita' non implementate come da manuale *)
60 ndefinition RS08_not_impl_mode ≝
61  [ MODE_INHX ; MODE_INHH ; MODE_INHX0ADD ; MODE_INHX1ADD ; MODE_INHX2ADD ; MODE_IMM1EXT
62  ; MODE_DIR2 ; MODE_IX0 ; MODE_IX1 ; MODE_IX2 ; MODE_SP1 ; MODE_SP2
63  ; MODE_IX0p_to_DIR1 ; MODE_DIR1_to_IX0p ; MODE_INHX_and_IMM1 ; MODE_IX0_and_IMM1
64  ; MODE_IX0p_and_IMM1 ; MODE_IX1_and_IMM1 ; MODE_IX1p_and_IMM1 ; MODE_SP1_and_IMM1 ].
65
66 nlemma ok_mode_table_RS08 : forall_im (λi.
67  (test_not_impl_mode i RS08_not_impl_mode     ⊙ le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count RS08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08)) ⊗
68  (⊖ (test_not_impl_mode i RS08_not_impl_mode) ⊙ eq_w16 (get_mode_count RS08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x0〉〉))
69  = true.
70  napply refl_eq.
71 nqed.
72
73 nlemma ok_OpIm_table_RS08 :
74  forall_im (λi:instr_mode.
75  forall_op (λop:opcode.
76   le_w16 (get_OpIm_count RS08 (anyOP RS08 op) i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_RS08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true.
77  napply refl_eq.
78 nqed.