ARM (32-bit): Thumb never decoded, cmplog logs wrong operands, `pop {pc}` not seen as return

Aperta
#418 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start in src/arch/arm.rs at the listed decoder, operand simplification, and return-detection locations. Check how instruction mode and CPSR.T are represented, then trace compare operands and LDM handling; the report has not been reproduced under SIMICS. Done means Thumb decoding, compare logging, pop {..., pc} return detection, and the noted U8/U16 and Asr cases behave as described, with coverage and cmplog verified on ARM targets.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Where

  • src/arch/arm.rs around lines 150, 1016-1019, 1029-1055, 1090-1107, 1128-1131

Problem
The decoder is always ARM mode (set_thumb_mode never called), so Thumb/Cortex-M code gets almost no edge or cmp coverage. ARM-mode data-processing decodes as [Rd, Rn, Op2]; for CMP/CMN/TST/TEQ tsffs logs operands 0 and 1 (r0, Rn) instead of (Rn, Op2). ARM-mode pop {..., pc} is LDM and not matched by last_was_ret. simplify lacks U8/U16; Asr is a logical shift.

Impact
Little useful coverage/cmplog on ARM targets.

Suggested fix
Set Thumb mode per instruction from CPSR.T; skip operand 0 for compare opcodes in ARM mode; treat LDM with pc in the list as a return.

Status
Reported by static code review at 79972db; not yet re-verified line by line. Found by reading the code; not reproduced under SIMICS.

Lingua principale
Rust
Stelle
335
Fork
26
Merge medio
1g 50m
PR unite (30g)
12

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/tsffs

Tutte le issue di intel/tsffs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.