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

オープン
#418 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
335
フォーク
26
平均マージ
1日 50分
マージ済み PR(30日)
12

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

intel/tsffs のほかの issue

intel/tsffs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。