AArch64 cmplog almost never logs: cmp/cmn/tst, cbz/cbnz, tbz not handled

Aperta
#417 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
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start in src/arch/aarch64.rs at the listed ranges and trace how decoded AArch64 instructions are converted into cmplog operands; the report says the findings came from static review and were not reproduced under SIMICS. Check the last_was_cmp, simplify, and RegShift handling against the listed instruction cases. Done means those cases produce useful cmplog entries; verify the behavior under SIMICS.

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

Descrizione

Where

  • src/arch/aarch64.rs around lines 1019-1022, 1122-1143, 1188-1203

Problem
yaxpeax a64 decodes compares as SUBS/ADDS/ANDS with rd=31, which are not in last_was_cmp. CBZ/CBNZ have one operand and are dropped; TBZ/CCMP reg,#imm produce mismatched widths; CSEL/CSINC log (dest, src1); simplify lacks U8/U16/U64; RegShift is wrapped in Deref (treated as a load). W registers may be looked up under names SIMICS lacks.

Impact
Effectively only ccmp xN, xM produces useful cmplog entries on AArch64.

Suggested fix
Handle SUBS/ADDS/ANDS with rd==31 using operands [1],[2]; push an implicit 0 for CBZ/CBNZ; handle missing widths; drop Deref around RegShift.

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.