velxio/test
David Montero 7ac17ff2b6 test_intel: fix 8086 MOV r/m,imm encoding (0xC6/0xC7)
Root cause of the deferred CALL/RET test: my chip was missing the
0xC6 / 0xC7 (Group 11 — MOV r/m, imm) opcodes. Bytes like the
test's "MOV byte [0x8002], 0x55" (0xC6 0x06 0x02 0x80 0x55) fell
through to the default NOP, then the chip decoded the residual
0x06 0x02 0x80 0x55 as PUSH ES + ADD r/m + ... taking SP into
unpredictable territory.

Implementation:
- 0xC6 (8-bit) and 0xC7 (16-bit) variants added.
- The encoding is opcode + modrm + disp + imm. Critically the disp
  bytes (consumed by calc_ea) come BEFORE the immediate, so we
  compute EA first, then fetch imm. Earlier draft had imm fetched
  before disp — that had imm winning the disp slot and disp becoming
  the next instruction's bytes. Caught only after wiring CALL+RET.

Tests: 8086 10→11 passing. Total test_intel: 93→94 passing,
0 failed, 11 todo. CALL/RET integration test now active and green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 20:44:17 +02:00
..
autosearch feat: Add support for SSD168x ePaper panels 2026-04-29 22:23:00 -03:00
backend Implement TCP and UDP NAT services for chip-initiated connections 2026-04-29 08:43:41 -03:00
esp32 Fix MPU6050Slave I2C handling and add comprehensive tests 2026-04-09 02:04:41 -03:00
esp32-emulator feat: add ESP32 lcgamboa test suite, sketches and firmware binaries 2026-03-14 12:28:40 -03:00
multi_board
multi_board_esp32 feat(multi-board): add wire-aware cross-board interconnect router 2026-04-25 19:47:40 -03:00
pi_arduino_serial
test_100_days Add ESP32 chip demos and comprehensive tests for I2C, SPI, and UART interactions 2026-04-28 19:24:39 -03:00
test_Raspberry_Pi_Pico_W feat(epaper): Add SVG layouts and emulation plan for ePaper panels 2026-04-29 02:33:59 -03:00
test_chip_backend_runtime Add ESP32 chip demos and comprehensive tests for I2C, SPI, and UART interactions 2026-04-28 19:24:39 -03:00
test_circuit test: update BMP280 chip ID assertions and clarify tagName uniqueness in metadata drift test 2026-04-21 17:31:51 -03:00
test_custom_chips Add ESP32 chip demos and comprehensive tests for I2C, SPI, and UART interactions 2026-04-28 19:24:39 -03:00
test_custom_chips_boards Add ESP32 chip demos and comprehensive tests for I2C, SPI, and UART interactions 2026-04-28 19:24:39 -03:00
test_epaper feat: add support for UC8159c (ACeP 7-colour) display 2026-04-30 00:27:40 -03:00
test_intel test_intel: fix 8086 MOV r/m,imm encoding (0xC6/0xC7) 2026-04-30 20:44:17 +02:00
docker-errors-2026-04-19.md docs: add Docker production error report (2026-04-19) 2026-04-19 00:37:07 +02:00