openc166 0.2.7__tar.gz → 0.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. {openc166-0.2.7 → openc166-0.2.8}/CMakeLists.txt +1 -1
  2. {openc166-0.2.7 → openc166-0.2.8}/PKG-INFO +1 -1
  3. {openc166-0.2.7 → openc166-0.2.8}/docs/simulator.md +3 -2
  4. {openc166-0.2.7 → openc166-0.2.8}/src/sim/cpu.cpp +14 -1
  5. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_sim.cpp +29 -0
  6. {openc166-0.2.7 → openc166-0.2.8}/.gitattributes +0 -0
  7. {openc166-0.2.7 → openc166-0.2.8}/.github/workflows/ci.yml +0 -0
  8. {openc166-0.2.7 → openc166-0.2.8}/.github/workflows/wheels.yml +0 -0
  9. {openc166-0.2.7 → openc166-0.2.8}/.gitignore +0 -0
  10. {openc166-0.2.7 → openc166-0.2.8}/LICENSE +0 -0
  11. {openc166-0.2.7 → openc166-0.2.8}/README.md +0 -0
  12. {openc166-0.2.7 → openc166-0.2.8}/boards/5wy19.json +0 -0
  13. {openc166-0.2.7 → openc166-0.2.8}/boards/c166.json +0 -0
  14. {openc166-0.2.7 → openc166-0.2.8}/boards/c167.json +0 -0
  15. {openc166-0.2.7 → openc166-0.2.8}/boards/c167cr.json +0 -0
  16. {openc166-0.2.7 → openc166-0.2.8}/boards/c167cs.json +0 -0
  17. {openc166-0.2.7 → openc166-0.2.8}/cli/CMakeLists.txt +0 -0
  18. {openc166-0.2.7 → openc166-0.2.8}/cli/main.cpp +0 -0
  19. {openc166-0.2.7 → openc166-0.2.8}/cmake/embed_files.cmake +0 -0
  20. {openc166-0.2.7 → openc166-0.2.8}/docs/boards.md +0 -0
  21. {openc166-0.2.7 → openc166-0.2.8}/docs/compatibility.md +0 -0
  22. {openc166-0.2.7 → openc166-0.2.8}/docs/debug-info.md +0 -0
  23. {openc166-0.2.7 → openc166-0.2.8}/docs/debugger-design.md +0 -0
  24. {openc166-0.2.7 → openc166-0.2.8}/docs/ghidra.md +0 -0
  25. {openc166-0.2.7 → openc166-0.2.8}/docs/mpl.md +0 -0
  26. {openc166-0.2.7 → openc166-0.2.8}/docs/phase1-feasibility.md +0 -0
  27. {openc166-0.2.7 → openc166-0.2.8}/docs/releasing.md +0 -0
  28. {openc166-0.2.7 → openc166-0.2.8}/docs/tasking.md +0 -0
  29. {openc166-0.2.7 → openc166-0.2.8}/editors/vscode/README.md +0 -0
  30. {openc166-0.2.7 → openc166-0.2.8}/editors/vscode/extension.js +0 -0
  31. {openc166-0.2.7 → openc166-0.2.8}/editors/vscode/package.json +0 -0
  32. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/README.md +0 -0
  33. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/bsl_shim.a66 +0 -0
  34. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/driver_patch.a66 +0 -0
  35. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/kline_hello.a66 +0 -0
  36. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/loader.a66 +0 -0
  37. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/marker.a66 +0 -0
  38. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/memory_dump.a66 +0 -0
  39. {openc166-0.2.7 → openc166-0.2.8}/examples/mtos/stage2_hello.a66 +0 -0
  40. {openc166-0.2.7 → openc166-0.2.8}/examples/payload.a66 +0 -0
  41. {openc166-0.2.7 → openc166-0.2.8}/examples/sections.a66 +0 -0
  42. {openc166-0.2.7 → openc166-0.2.8}/inc/REG167.INC +0 -0
  43. {openc166-0.2.7 → openc166-0.2.8}/include/openc166/openc166.h +0 -0
  44. {openc166-0.2.7 → openc166-0.2.8}/pyproject.toml +0 -0
  45. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/__init__.py +0 -0
  46. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/_native.py +0 -0
  47. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/bridge.py +0 -0
  48. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/dap.py +0 -0
  49. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/ghidra.py +0 -0
  50. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/py.typed +0 -0
  51. {openc166-0.2.7 → openc166-0.2.8}/python/openc166/sim.py +0 -0
  52. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_bridge.py +0 -0
  53. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_dap.py +0 -0
  54. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_elf.py +0 -0
  55. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_ghidra.py +0 -0
  56. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_openc166.py +0 -0
  57. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_sim.py +0 -0
  58. {openc166-0.2.7 → openc166-0.2.8}/python/tests/test_stock_5wy19.py +0 -0
  59. {openc166-0.2.7 → openc166-0.2.8}/src/CMakeLists.txt +0 -0
  60. {openc166-0.2.7 → openc166-0.2.8}/src/assembler.cpp +0 -0
  61. {openc166-0.2.7 → openc166-0.2.8}/src/assembler.hpp +0 -0
  62. {openc166-0.2.7 → openc166-0.2.8}/src/bundled.cpp +0 -0
  63. {openc166-0.2.7 → openc166-0.2.8}/src/bundled.hpp +0 -0
  64. {openc166-0.2.7 → openc166-0.2.8}/src/capi.cpp +0 -0
  65. {openc166-0.2.7 → openc166-0.2.8}/src/capi.map +0 -0
  66. {openc166-0.2.7 → openc166-0.2.8}/src/capi_sim.cpp +0 -0
  67. {openc166-0.2.7 → openc166-0.2.8}/src/debuginfo.cpp +0 -0
  68. {openc166-0.2.7 → openc166-0.2.8}/src/diag.hpp +0 -0
  69. {openc166-0.2.7 → openc166-0.2.8}/src/disasm.cpp +0 -0
  70. {openc166-0.2.7 → openc166-0.2.8}/src/disasm.hpp +0 -0
  71. {openc166-0.2.7 → openc166-0.2.8}/src/disasm_module.cpp +0 -0
  72. {openc166-0.2.7 → openc166-0.2.8}/src/elf.cpp +0 -0
  73. {openc166-0.2.7 → openc166-0.2.8}/src/encode.cpp +0 -0
  74. {openc166-0.2.7 → openc166-0.2.8}/src/encode.hpp +0 -0
  75. {openc166-0.2.7 → openc166-0.2.8}/src/expr.cpp +0 -0
  76. {openc166-0.2.7 → openc166-0.2.8}/src/expr.hpp +0 -0
  77. {openc166-0.2.7 → openc166-0.2.8}/src/isa/c166.tbl +0 -0
  78. {openc166-0.2.7 → openc166-0.2.8}/src/isa/isa.cpp +0 -0
  79. {openc166-0.2.7 → openc166-0.2.8}/src/isa/isa.hpp +0 -0
  80. {openc166-0.2.7 → openc166-0.2.8}/src/isa/isa_types.hpp +0 -0
  81. {openc166-0.2.7 → openc166-0.2.8}/src/json.cpp +0 -0
  82. {openc166-0.2.7 → openc166-0.2.8}/src/json.hpp +0 -0
  83. {openc166-0.2.7 → openc166-0.2.8}/src/lexer.cpp +0 -0
  84. {openc166-0.2.7 → openc166-0.2.8}/src/lexer.hpp +0 -0
  85. {openc166-0.2.7 → openc166-0.2.8}/src/m166.cpp +0 -0
  86. {openc166-0.2.7 → openc166-0.2.8}/src/m166.hpp +0 -0
  87. {openc166-0.2.7 → openc166-0.2.8}/src/mpl.cpp +0 -0
  88. {openc166-0.2.7 → openc166-0.2.8}/src/mpl.hpp +0 -0
  89. {openc166-0.2.7 → openc166-0.2.8}/src/operand.cpp +0 -0
  90. {openc166-0.2.7 → openc166-0.2.8}/src/operand.hpp +0 -0
  91. {openc166-0.2.7 → openc166-0.2.8}/src/output.cpp +0 -0
  92. {openc166-0.2.7 → openc166-0.2.8}/src/predef.cpp +0 -0
  93. {openc166-0.2.7 → openc166-0.2.8}/src/predef.hpp +0 -0
  94. {openc166-0.2.7 → openc166-0.2.8}/src/sim/board_config.cpp +0 -0
  95. {openc166-0.2.7 → openc166-0.2.8}/src/sim/board_config.hpp +0 -0
  96. {openc166-0.2.7 → openc166-0.2.8}/src/sim/boards.cpp +0 -0
  97. {openc166-0.2.7 → openc166-0.2.8}/src/sim/boards.hpp +0 -0
  98. {openc166-0.2.7 → openc166-0.2.8}/src/sim/debug.cpp +0 -0
  99. {openc166-0.2.7 → openc166-0.2.8}/src/sim/debug.hpp +0 -0
  100. {openc166-0.2.7 → openc166-0.2.8}/src/sim/machine.cpp +0 -0
  101. {openc166-0.2.7 → openc166-0.2.8}/src/sim/machine.hpp +0 -0
  102. {openc166-0.2.7 → openc166-0.2.8}/src/sim/peripherals.cpp +0 -0
  103. {openc166-0.2.7 → openc166-0.2.8}/src/sim/peripherals.hpp +0 -0
  104. {openc166-0.2.7 → openc166-0.2.8}/src/value.hpp +0 -0
  105. {openc166-0.2.7 → openc166-0.2.8}/tests/CMakeLists.txt +0 -0
  106. {openc166-0.2.7 → openc166-0.2.8}/tests/acceptance/minimon.py +0 -0
  107. {openc166-0.2.7 → openc166-0.2.8}/tests/capi/test_capi.c +0 -0
  108. {openc166-0.2.7 → openc166-0.2.8}/tests/check_binary.cmake +0 -0
  109. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/alignment.a66 +0 -0
  110. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/bit_section_errors.a66 +0 -0
  111. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/bit_sections.a66 +0 -0
  112. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/bits.a66 +0 -0
  113. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/branches.a66 +0 -0
  114. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/cond.a66 +0 -0
  115. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/cond_errors.a66 +0 -0
  116. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/controls.a66 +0 -0
  117. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/defs.a66 +0 -0
  118. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/directives.a66 +0 -0
  119. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/dpp.a66 +0 -0
  120. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/expressions.a66 +0 -0
  121. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/group_errors.a66 +0 -0
  122. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/groups.a66 +0 -0
  123. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/code.inc +0 -0
  124. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/comments.inc +0 -0
  125. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/count.inc +0 -0
  126. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/crlf.inc +0 -0
  127. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/ignored.inc +0 -0
  128. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/lit.inc +0 -0
  129. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/mpl.inc +0 -0
  130. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/nested.inc +0 -0
  131. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/noeol.inc +0 -0
  132. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/regs.inc +0 -0
  133. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/sub/deep.inc +0 -0
  134. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/inc/sub/level3.inc +0 -0
  135. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/include.a66 +0 -0
  136. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/label_errors.a66 +0 -0
  137. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/labels.a66 +0 -0
  138. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/bits/1main.a66 +0 -0
  139. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/bits/2lib.a66 +0 -0
  140. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/bits/3more.a66 +0 -0
  141. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/calls/1main.a66 +0 -0
  142. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/calls/2lib.a66 +0 -0
  143. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/combine/1first.a66 +0 -0
  144. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/combine/2second.a66 +0 -0
  145. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/combine/3third.a66 +0 -0
  146. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/fixups/1use.a66 +0 -0
  147. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/fixups/2def.a66 +0 -0
  148. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/groups/1main.a66 +0 -0
  149. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/groups/2lib.a66 +0 -0
  150. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/mixed/1seg.a66 +0 -0
  151. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/mixed/2flat.a66 +0 -0
  152. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/mixed/3seg.a66 +0 -0
  153. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/regbanks/1main.a66 +0 -0
  154. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/regbanks/2lib.a66 +0 -0
  155. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/sections/1first.a66 +0 -0
  156. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/sections/2second.a66 +0 -0
  157. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/sections/3third.a66 +0 -0
  158. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/segmented/1main.a66 +0 -0
  159. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/segmented/2lib.a66 +0 -0
  160. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/unresolved/1main.a66 +0 -0
  161. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/unresolved/2one.a66 +0 -0
  162. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/unresolved/3two.a66 +0 -0
  163. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/values/1use.a66 +0 -0
  164. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/link/values/2def.a66 +0 -0
  165. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/listing.a66 +0 -0
  166. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/lit.a66 +0 -0
  167. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/lit_errors.a66 +0 -0
  168. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/locate.a66 +0 -0
  169. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/macro_args.a66 +0 -0
  170. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/macro_errors.a66 +0 -0
  171. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/macros.a66 +0 -0
  172. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl.a66 +0 -0
  173. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_exit.a66 +0 -0
  174. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_expr.a66 +0 -0
  175. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_fi.a66 +0 -0
  176. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_meta.a66 +0 -0
  177. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_paren.a66 +0 -0
  178. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_pattern.a66 +0 -0
  179. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_syntax.a66 +0 -0
  180. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/mpl_err_undefined.a66 +0 -0
  181. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/operands.a66 +0 -0
  182. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/primary.a66 +0 -0
  183. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/redefine.a66 +0 -0
  184. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/regbank_errors.a66 +0 -0
  185. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/regbanks.a66 +0 -0
  186. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/reloc.a66 +0 -0
  187. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/section_errors.a66 +0 -0
  188. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/section_length.a66 +0 -0
  189. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/segmented.a66 +0 -0
  190. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/type_operator_errors.a66 +0 -0
  191. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/cases/type_operators.a66 +0 -0
  192. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/gen_sweep.py +0 -0
  193. {openc166-0.2.7 → openc166-0.2.8}/tests/diff/keil_diff.py +0 -0
  194. {openc166-0.2.7 → openc166-0.2.8}/tests/expected/driver_patch.hex +0 -0
  195. {openc166-0.2.7 → openc166-0.2.8}/tests/expected/driver_patch.s28 +0 -0
  196. {openc166-0.2.7 → openc166-0.2.8}/tests/expected/payload.srec +0 -0
  197. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/helpers.hpp +0 -0
  198. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/main.cpp +0 -0
  199. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_assembler.cpp +0 -0
  200. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_bits.cpp +0 -0
  201. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_boards.cpp +0 -0
  202. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_branches.cpp +0 -0
  203. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_cond.cpp +0 -0
  204. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_debug.cpp +0 -0
  205. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_defs.cpp +0 -0
  206. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_dpp.cpp +0 -0
  207. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_encode.cpp +0 -0
  208. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_expr.cpp +0 -0
  209. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_groups.cpp +0 -0
  210. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_include.cpp +0 -0
  211. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_json.cpp +0 -0
  212. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_lexer.cpp +0 -0
  213. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_link.cpp +0 -0
  214. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_listing.cpp +0 -0
  215. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_lit.cpp +0 -0
  216. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_macros.cpp +0 -0
  217. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_mpl.cpp +0 -0
  218. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_output.cpp +0 -0
  219. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_peripherals.cpp +0 -0
  220. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_regbanks.cpp +0 -0
  221. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_sections.cpp +0 -0
  222. {openc166-0.2.7 → openc166-0.2.8}/tests/unit/test_tasking.cpp +0 -0
  223. {openc166-0.2.7 → openc166-0.2.8}/third_party/doctest/LICENSE.txt +0 -0
  224. {openc166-0.2.7 → openc166-0.2.8}/third_party/doctest/doctest.h +0 -0
  225. {openc166-0.2.7 → openc166-0.2.8}/tools/CMakeLists.txt +0 -0
  226. {openc166-0.2.7 → openc166-0.2.8}/tools/ghidra/ExportOpenc166Symbols.py +0 -0
  227. {openc166-0.2.7 → openc166-0.2.8}/tools/isagen.cpp +0 -0
@@ -1,6 +1,6 @@
1
1
  cmake_minimum_required(VERSION 3.20)
2
2
  project(openc166
3
- VERSION 0.2.7
3
+ VERSION 0.2.8
4
4
  DESCRIPTION "Keil A166-compatible assembler for the Infineon C166/C167 family"
5
5
  LANGUAGES CXX)
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openc166
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: Keil A166-compatible assembler for the Infineon C166/C167 microcontrollers
5
5
  Keywords: c166,c167,st10,assembler,keil,a166,infineon,ecu
6
6
  License-Expression: MIT
@@ -182,8 +182,9 @@ they are not part of snapshots, so reverse execution does not replay them.
182
182
  ## What the core models, and how closely
183
183
 
184
184
  - The whole instruction set, decoded from `src/isa/c166.tbl`. Flags follow
185
- the instruction set manual; they are checked by unit tests, not yet
186
- against a real C167 (design §6: the MiniMon oracle is the next step).
185
+ the instruction set manual; an instruction that writes PSW itself
186
+ (`POP PSW`, `BCLR PSW.3`) keeps the value written, not its flag
187
+ update. They are checked by unit tests, not yet against a real C167 (design §6: the MiniMon oracle is the next step).
187
188
  - Register banks in IRAM through CP; DPP paging; EXTR, EXTP(R), EXTS(R)
188
189
  and ATOMIC, which also block interrupts. The debugger steps a sequence as
189
190
  one unit.
@@ -105,6 +105,11 @@ struct Exec {
105
105
  };
106
106
  PostInc post[2] = {};
107
107
  int npost = 0;
108
+ // The flag update, applied when the instruction completes unless it
109
+ // wrote PSW itself: the explicit write takes precedence.
110
+ std::uint16_t flags_set = 0;
111
+ std::uint16_t flags_mask = 0;
112
+ bool psw_written = false;
108
113
 
109
114
  // An operand location: a memory address or an immediate.
110
115
  struct Loc {
@@ -194,6 +199,7 @@ struct Exec {
194
199
  }
195
200
  void write(const Loc& l, bool b, std::uint16_t v) {
196
201
  if (l.imm) return;
202
+ if (!l.gpr && (l.addr & 0xFFFFFE) == reg::PSW) psw_written = true;
197
203
  if (b) return m.write8(l.addr, static_cast<std::uint8_t>(v));
198
204
  if ((l.addr & 1) && !l.gpr) throw TrapAbort{kIllopa};
199
205
  m.write16(l.addr, v);
@@ -205,8 +211,13 @@ struct Exec {
205
211
  }
206
212
 
207
213
  void flags(std::uint16_t set, std::uint16_t mask) {
214
+ flags_set = static_cast<std::uint16_t>((flags_set & ~mask) | (set & mask));
215
+ flags_mask |= mask;
216
+ }
217
+ void commit_flags() {
218
+ if (psw_written || !flags_mask) return;
208
219
  const std::uint16_t p = m.psw();
209
- const std::uint16_t v = static_cast<std::uint16_t>((p & ~mask) | (set & mask));
220
+ const std::uint16_t v = static_cast<std::uint16_t>((p & ~flags_mask) | (flags_set & flags_mask));
210
221
  m.sfr_set(reg::PSW, v);
211
222
  // Flag updates are not bus accesses, but watchpoints on PSW bits
212
223
  // must see them.
@@ -757,8 +768,10 @@ Stop Machine::step() {
757
768
  const bool starts_sequence = info.op >= Op::Atomic && info.op <= Op::Extsr;
758
769
  try {
759
770
  ex.run();
771
+ ex.commit_flags();
760
772
  ip_ = ex.next_ip;
761
773
  } catch (const TrapAbort& t) {
774
+ ex.commit_flags(); // as far as the instruction got
762
775
  ip_ = static_cast<std::uint16_t>(ip_ + insn->size);
763
776
  raise_trap(t.bit);
764
777
  }
@@ -185,6 +185,35 @@ TEST_CASE("sim: bit instructions") {
185
185
  CHECK(m->gpr(5) == 0);
186
186
  }
187
187
 
188
+ TEST_CASE("sim: an explicit PSW write takes precedence over the flags") {
189
+ // POP sets N, Z and E from the value popped, MOV from the value moved;
190
+ // with PSW as the destination the value written is what stays.
191
+ auto m = load("MOV R4, #0008H\nPUSH R4\nMOV R5, #1\nPOP PSW");
192
+ finish(*m);
193
+ CHECK(psw_flags(*m) == Z); // not cleared from 0008H
194
+ m = load("MOV R4, #0\nPUSH R4\nPOP PSW");
195
+ finish(*m);
196
+ CHECK(psw_flags(*m) == 0); // not Z from 0000H
197
+ m = load("MOV R4, #0\nMOV R5, #0FFFFH\nMOV PSW, R4");
198
+ finish(*m);
199
+ CHECK(psw_flags(*m) == 0);
200
+ m = load("MOV R4, #0\nMOVB RL5, #80H\nMOVB 0FF10H, RL4");
201
+ finish(*m);
202
+ CHECK(psw_flags(*m) == 0);
203
+ // BCLR sets N for a bit that was set, but the PSW it writes is the old
204
+ // one with Z cleared.
205
+ m = load("MOV R4, #0\nBCLR PSW.3");
206
+ finish(*m);
207
+ CHECK(psw_flags(*m) == 0);
208
+ m = load("MOV R4, #0\nBSET PSW.1");
209
+ finish(*m);
210
+ CHECK(psw_flags(*m) == (Z | C));
211
+ // Other destinations still get their flags.
212
+ m = load("MOV R4, #0\nPUSH R4\nPOP R6");
213
+ finish(*m);
214
+ CHECK(psw_flags(*m) == Z);
215
+ }
216
+
188
217
  TEST_CASE("sim: addressing modes") {
189
218
  auto m = load(
190
219
  "MOV R0, #0FC40H\n"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes