11---
2- eatmycode_version : " 2.0 .0"
2+ eatmycode_version : " 2.1 .0"
33---
44
55# CPU Architecture and Calling Conventions
@@ -21,7 +21,7 @@ or cross-platform compatibility certification.
2121| --- | --- |
2222| [ arch/arch.py] ( ../../qiling/arch/arch.py ) : ` QlArch ` | CPU, pointer width, stack, context interface |
2323| [ arch/register.py] ( ../../qiling/arch/register.py ) : ` QlRegisterManager ` | Name-to-Unicorn registers and PC/SP aliases |
24- | [ arch/] ( ../../qiling/arch/ ) , [ arch/models.py] ( ../../qiling/arch/models.py ) | Concrete x86/ARM/MIPS/RISC-V/PPC/Cortex-M adapters and CPU enums |
24+ | [ arch/] ( ../../qiling/arch/ ) , [ arch/models.py] ( ../../qiling/arch/models.py ) , ` *_const.py ` | Concrete x86/ARM/MIPS/RISC-V/PPC/Cortex-M adapters, CPU enums, register maps and ` EXCP ` exception codes |
2525| [ cc/__ init__ .py] ( ../../qiling/cc/__init__.py ) : ` QlCC ` , ` QlCommonBaseCC ` | Register/stack slots, result, return address, frame unwind |
2626| [ arch/cortex_m.py] ( ../../qiling/arch/cortex_m.py ) : ` QlArchCORTEX_M ` | Exception/vector state and task-aware Unicorn |
2727| [ test_cpu_models.py] ( ../../tests/test_cpu_models.py ) , [ test_riscv.py] ( ../../tests/test_riscv.py ) , [ test_shellcode.py] ( ../../tests/test_shellcode.py ) | Model selection and instruction/ABI samples |
@@ -43,8 +43,13 @@ versions come from the root manifest, not individual adapters.
4343 multiword arguments, shadow space, register exhaustion, stack return
4444 addresses and unwind rules differ (` cc/__init__.py ` , ` cc/intel.py ` ).
4545- Endianness, CPU mode and Thumb PC handling affect execution and instruction
46- decoding. Preserve ` effective_pc ` and Cortex-M exception return behavior
47- when changing ARM mode; inspect the core Thumb workaround too.
46+ decoding. Preserve the ARM adapter's ` effective_pc ` (consumers fall back
47+ to ` arch_pc ` via ` getattr ` ) and Cortex-M exception return behavior when
48+ changing ARM mode; inspect the core Thumb workaround too.
49+ - Interrupt numbers delivered to ` hook_intno ` are QEMU exception codes.
50+ ** Observed:** ARM/ARM64 and MIPS Linux traps use the ` EXCP ` enums in
51+ ` cortex_m_const.py ` and ` mips_const.py ` ; x86/RISC-V/PPC still pass
52+ literals. Prefer an existing enum and extend it for new codes.
4853- Concrete adapters instantiate engine/assembler/disassembler objects;
4954 supported enums do not imply support for every OS/CPU combination.
5055 Cortex-M uses ` MultiTaskUnicorn ` and hardware interrupt state.
@@ -73,8 +78,9 @@ never substitute host pointer size for a guest ABI.
7378
7479From ` tests/ ` : ` python -m unittest test_cpu_models test_riscv test_shellcode `
7580with root dependencies and relevant rootfs samples. All selected modules
76- passed during rebuild; CPU-model suite has 7 tests. Their scope is selected
77- models/instructions and guest execution, not instruction-set conformance.
81+ passed during the latest refresh (11 CPU-model/RISC-V and 8 shellcode
82+ cases). Their scope is selected models/instructions and guest execution,
83+ not instruction-set conformance.
7884For PPC changes use ` test_elf.ELFTest.test_elf_linux_powerpc ` ; for ABI changes
7985run the consuming OS API/syscall regression as well.
8086
0 commit comments