[General]: FCOMI/FUCOMI updates comparison flags on unmasked invalid operation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- xml
- Lĩnh vực
- compilers
Hướng nghiên cứu
Bắt đầu tại data/instruction/FCOMI-FCOMIP-FUCOMI-FUCOMIP.xml, khoảng dòng 123, và kiểm tra operation có thể thực thi dùng chung, bao gồm nhánh stack rỗng và xử lý Compare. Đọc các trang SDM được trích dẫn cùng với source, sau đó xác minh rằng invalid operation không được mask vẫn giữ nguyên ZF/PF/CF, trong khi việc xóa OF/SF/AF và việc ngăn pop vẫn không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The shared executable operation writes ZF/PF/CF before testing whether invalid operation is unmasked. The PDF says those three flags are updated only when the invalid-operation exception is masked. The source and PDF therefore specify different comparison flags for the same inputs.
Concrete case
With x87 enabled and no pending exception, compare signaling NaN 0x7fff8000000000000001 in ST(0) with 1 in ST(1), using FCOMI, control word 0x037e and incoming ZF=PF=CF=0. The source writes all three flags to 1, then suppresses result/pop effects. The PDF implies that the incoming comparison flags remain zero. The shared empty-stack branch also writes the flags before considering the mask.
Expected behavior and references
References use Intel SDM 325462-093, checked on 2026-10-01. PDF page numbers below refer to the combined manual.
- FCOMI/FCOMIP/FUCOMI/FUCOMIP description and Table 1-18 note; combined PDF page 1031
- comparison operation; combined PDF page 1032
Source
Source checked at Intel SDM repository commit b5218b0f1cf512304d4b3cb364433a08fcee47cb.
Suggested correction
Follow the SDM's comparison-flag rule by preserving ZF/PF/CF when invalid operation is unmasked. In the empty-stack branch, write these flags only when IM=1; after Compare, write them only when IE=0 or IM=1. Retain the clearing of OF/SF/AF and the existing pop suppression.
Evidence
On AMD EPYC-Milan under KVM, the unmasked-invalid comparison sets ZF/PF/CF to 1, matching the executable operation.
AI disclosure
Assisted by Codex
- Ngôn ngữ chính
- HTML
- Star
- 40
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của intel/SDM
-
Executable specification issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Executable specification issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
SDM PDF issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
[Bug]: SDM 092 CPUID typoĐang mởSDM PDF issue SDM Volume 1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Executable specification issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
The XMIR reader wraps an `@as` index above `Int`, so `as="α18446744073709551616"` is read as `α0`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
objectionary/phino#1769 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A `\u` in an object name breaks the Javadoc that `to-java.xsl` writes, so the class does not compileĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
objectionary/eo#9347 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
erdos-status-sync
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
google-deepmind/formal-conjectures#6920 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-web-js web-libraries
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 4 ngày