Skip to content

Conversation

@hangingman
Copy link
Collaborator

既存のLGDT実装と同様に、pass1とcodegenにハンドラを追加することで、LIDT命令 (0F 01 /3) を実装しました。

  • internal/codegen/x86gen_lidt.gohandleLIDT にアドレスプレフィックスの処理を追加しました。
  • フォールバックテーブル (pkg​​/asmdb/instruction_table_fallback.go) の LGDT のオペランド型を "m" から "m32" に修正しました。これにより、pass1 における命令サイズ計算の問題を修正しました。これは TestHarib02i をパスさせるために必要な変更でした。
  • test/day05_harib02i_test.goTestHarib02i テストケースを有効化し、パスするようになりました。

じゅーるす君に書いてもらったがどうだろうか

google-labs-jules bot and others added 2 commits June 25, 2025 14:53
This commit introduces `gotestsum` to the project for enhanced test
execution and reporting, utilizing the Go 1.24 feature for managing
tool dependencies directly in `go.mod`.

Key changes:
- Added `gotest.tools/gotestsum` as a tool dependency to `go.mod`
  using `go get -d` and `go mod edit -tool`.
- Updated Makefile:
  - The `test` target now uses `gotestsum` with `short-verbose` format.
  - Added `test-rerun-fails` target using `gotestsum --rerun-fails`.
  - Added `test-ci` target using `gotestsum --junitfile report.xml --format dots`.
  - Makefile test targets use `go run gotest.tools/gotestsum` for execution.
  - `clean` target updated to remove `report.xml` and `.gotestsum.json`.
- Updated GitHub Actions workflow (`.github/workflows/go.yml`):
  - Added step to `go install gotest.tools/gotestsum@v1.12.3`.
  - Test execution changed to `make test-ci`.
  - Added step to upload `report.xml` artifact.

This approach replaces the previous `tools.go` method for managing
`gotestsum` and aligns with the newer Go tooling standards.
…ool-dep

Go 1.24 ツール依存機能を使用して gotestsum を統合する
@hangingman hangingman force-pushed the feat/implement-lidt branch from 9958734 to 405472c Compare June 26, 2025 12:28
hangingman and others added 7 commits June 26, 2025 21:36
Implemented the LIDT instruction (0F 01 /3) by adding handlers in pass1 and codegen, similar to the existing LGDT implementation.

- Added address prefix handling to `handleLIDT` in `internal/codegen/x86gen_lidt.go`.
- Corrected the operand type for `LGDT` in the fallback table (`pkg/asmdb/instruction_table_fallback.go`) from "m" to "m32" to fix an issue with instruction size calculation in pass1. This was necessary for the `TestHarib02i` to pass.
- Enabled the `TestHarib02i` test case in `test/day05_harib02i_test.go` which now passes.
@hangingman hangingman force-pushed the feat/implement-lidt branch from 405472c to 5490b14 Compare June 26, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants