X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fng_assembly%2Femulator%2Fopcodes%2FHC08_table_tests.ma;h=7c02884ee2229b4ce0f799e6795ea5792d3a19ff;hb=e880d6eab5e1700f4a625ddcd7d0fa8f0cce2dcc;hp=aa792b55ea20a46bf5743d601bca05410078ac80;hpb=0f13d14b63b012e0ea8ce0d0e71bf808fdd444eb;p=helm.git diff --git a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_table_tests.ma b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_table_tests.ma index aa792b55e..7c02884ee 100755 --- a/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_table_tests.ma +++ b/helm/software/matita/contribs/ng_assembly/emulator/opcodes/HC08_table_tests.ma @@ -20,7 +20,7 @@ (* *) (* ********************************************************************** *) -include "emulator/opcodes/opcode.ma". +include "emulator/opcodes/pseudo.ma". include "emulator/opcodes/HC08_table.ma". (* ***************** *) @@ -35,7 +35,6 @@ ndefinition HC08_not_impl_byte ≝ ;〈xA,xC〉 ]. -(* test bytecode non implementati *) nlemma ok_byte_table_HC08 : forall_b8 (λb. (test_not_impl_byte b HC08_not_impl_byte ⊙ eq_w16 (get_byte_count HC08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗ (⊖ (test_not_impl_byte b HC08_not_impl_byte) ⊙ eq_w16 (get_byte_count HC08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉)) @@ -76,32 +75,49 @@ ndefinition HC08_not_impl_word ≝ ;〈xF,x8〉;〈xF,x9〉;〈xF,xA〉;〈xF,xB〉;〈xF,xC〉;〈xF,xD〉;〈xF,xE〉;〈xF,xF〉 ]. -(* test bytecode non implementati *) nlemma ok_word_table_HC08 : forall_b8 (λb. - (test_not_impl_byte b HC08_not_impl_word ⊙ eq_w16 (get_word_count HC08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗ - (⊖ (test_not_impl_byte b HC08_not_impl_word) ⊙ eq_w16 (get_word_count HC08 b 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉)) + (test_not_impl_byte b HC08_not_impl_word ⊙ eq_w16 (get_word_count HC08 〈〈x9,xE〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉) ⊗ + (⊖ (test_not_impl_byte b HC08_not_impl_word) ⊙ eq_w16 (get_word_count HC08 〈〈x9,xE〉:b〉 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉)) = true. napply refl_eq. nqed. -(* tutti op implementati *) -nlemma ok_pseudo_table_HC08 : - forall_op HC08 (λo. - le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HC08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08)) = true. +(* HC08: pseudocodici non implementati come da manuale *) +ndefinition HC08_not_impl_pseudo ≝ + [ BGND ; SHA ; SLA ]. + +nlemma ok_pseudo_table_HC08 : forall_Freescale_pseudo (λo. + (test_not_impl_pseudo HC08 o HC08_not_impl_pseudo ⊙ le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_pseudo_count HC08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08)) ⊗ + (⊖ (test_not_impl_pseudo HC08 o HC08_not_impl_pseudo) ⊙ eq_w16 (get_pseudo_count HC08 o 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉)) + = true. napply refl_eq. nqed. -(* tutte im implementate *) -nlemma ok_mode_table_HC08 : - forall_im HC08 (λi. - le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HC08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08)) = true. +(* HC08: modalita' non implementate come da manuale *) +ndefinition HC08_not_impl_mode ≝ + [ MODE_TNY x0 ; MODE_TNY x1 ; MODE_TNY x2 ; MODE_TNY x3 + ; MODE_TNY x4 ; MODE_TNY x5 ; MODE_TNY x6 ; MODE_TNY x7 + ; MODE_TNY x8 ; MODE_TNY x9 ; MODE_TNY xA ; MODE_TNY xB + ; MODE_TNY xC ; MODE_TNY xD ; MODE_TNY xE ; MODE_TNY xF + ; MODE_SRT t00 ; MODE_SRT t01 ; MODE_SRT t02 ; MODE_SRT t03 + ; MODE_SRT t04 ; MODE_SRT t05 ; MODE_SRT t06 ; MODE_SRT t07 + ; MODE_SRT t08 ; MODE_SRT t09 ; MODE_SRT t0A ; MODE_SRT t0B + ; MODE_SRT t0C ; MODE_SRT t0D ; MODE_SRT t0E ; MODE_SRT t0F + ; MODE_SRT t10 ; MODE_SRT t11 ; MODE_SRT t12 ; MODE_SRT t13 + ; MODE_SRT t14 ; MODE_SRT t15 ; MODE_SRT t16 ; MODE_SRT t17 + ; MODE_SRT t18 ; MODE_SRT t19 ; MODE_SRT t1A ; MODE_SRT t1B + ; MODE_SRT t1C ; MODE_SRT t1D ; MODE_SRT t1E ; MODE_SRT t1F ]. + +nlemma ok_mode_table_HC08 : forall_Freescale_im (λi. + (test_not_impl_mode HC08 i HC08_not_impl_mode ⊙ le_w16 〈〈x0,x0〉:〈x0,x1〉〉 (get_mode_count HC08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08)) ⊗ + (⊖ (test_not_impl_mode HC08 i HC08_not_impl_mode) ⊙ eq_w16 (get_mode_count HC08 i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x0〉〉)) + = true. napply refl_eq. nqed. -(* nessuna ripetizione di combinazione op + imm *) -nlemma ok_OpIm_table_HC08 : - forall_im HC08 (λi. - forall_op HC08 (λo. - le_w16 (get_OpIm_count HC08 o i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true. +nlemma ok_PsIm_table_HC08 : + forall_Freescale_im (λi:Freescale_instr_mode. + forall_Freescale_pseudo (λps:Freescale_pseudo. + le_w16 (get_PsIm_count HC08 ps i 〈〈x0,x0〉:〈x0,x0〉〉 opcode_table_HC08) 〈〈x0,x0〉:〈x0,x1〉〉)) = true. napply refl_eq. nqed.