Title: 68000: Suggestion for additional DIVS/DIVU test cases · Issue #67 · SingleStepTests/ProcessorTests · GitHub
Open Graph Title: 68000: Suggestion for additional DIVS/DIVU test cases · Issue #67 · SingleStepTests/ProcessorTests
X Title: 68000: Suggestion for additional DIVS/DIVU test cases · Issue #67 · SingleStepTests/ProcessorTests
Description: I believe there are currently no test cases for either DIVS or DIVU where the quotient is zero. If I modify my 68k DIVS and DIVU implementations to hardcode the Z flag to false, it still passes all of the DIVS and DIVU test cases. I noti...
Open Graph Description: I believe there are currently no test cases for either DIVS or DIVU where the quotient is zero. If I modify my 68k DIVS and DIVU implementations to hardcode the Z flag to false, it still passes all...
X Description: I believe there are currently no test cases for either DIVS or DIVU where the quotient is zero. If I modify my 68k DIVS and DIVU implementations to hardcode the Z flag to false, it still passes all...
Opengraph URL: https://github.com/SingleStepTests/ProcessorTests/issues/67
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"68000: Suggestion for additional DIVS/DIVU test cases","articleBody":"I believe there are currently no test cases for either DIVS or DIVU where the quotient is zero. If I modify my 68k DIVS and DIVU implementations to hardcode the Z flag to false, it still passes all of the DIVS and DIVU test cases.\r\n\r\nI noticed this because I had a silly bug in my implementation where I was setting the Z flag based on the final 32-bit value written back to the register, when as I understand it the correct behavior is to set the Z flag purely based on the 16-bit quotient.\r\n\r\nAs an example, here is a mostly hand-crafted test case for DIVU that failed in my implementation before the bugfix (minus the bus transactions which I don't currently have a way to generate easily):\r\n```\r\n{\r\n \"name\": \"80c1 [DIVU D1, D0] xxxx\",\r\n \"initial\": {\r\n \"d0\": 1,\r\n \"d1\": 5,\r\n \"d2\": 0,\r\n \"d3\": 0,\r\n \"d4\": 0,\r\n \"d5\": 0,\r\n \"d6\": 0,\r\n \"d7\": 0,\r\n \"a0\": 0,\r\n \"a1\": 0,\r\n \"a2\": 0,\r\n \"a3\": 0,\r\n \"a4\": 0,\r\n \"a5\": 0,\r\n \"a6\": 0,\r\n \"usp\": 2763053352,\r\n \"ssp\": 2048,\r\n \"sr\": 9985,\r\n \"pc\": 3072,\r\n \"prefetch\": [\r\n 32961,\r\n 40692\r\n ],\r\n \"ram\": [\r\n [\r\n 3077,\r\n 228\r\n ],\r\n [\r\n 3076,\r\n 74\r\n ]\r\n ]\r\n },\r\n \"final\": {\r\n \"d0\": 65536,\r\n \"d1\": 5,\r\n \"d2\": 0,\r\n \"d3\": 0,\r\n \"d4\": 0,\r\n \"d5\": 0,\r\n \"d6\": 0,\r\n \"d7\": 0,\r\n \"a0\": 0,\r\n \"a1\": 0,\r\n \"a2\": 0,\r\n \"a3\": 0,\r\n \"a4\": 0,\r\n \"a5\": 0,\r\n \"a6\": 0,\r\n \"usp\": 2763053352,\r\n \"ssp\": 2048,\r\n \"sr\": 9988,\r\n \"pc\": 3074,\r\n \"prefetch\": [\r\n 40692,\r\n 19098\r\n ],\r\n \"ram\": [\r\n [\r\n 3077,\r\n 228\r\n ],\r\n [\r\n 3076,\r\n 74\r\n ]\r\n ]\r\n },\r\n \"length\": 136,\r\n \"transactions\": []\r\n}\r\n```","author":{"url":"https://github.com/jsgroth","@type":"Person","name":"jsgroth"},"datePublished":"2023-10-18T22:45:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/67/ProcessorTests/issues/67"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f1b865d8-d81c-c024-661a-04f52368cdb7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 984E:BC6D1:8A237B1:BB79A49:6A4BA0D1 |
| html-safe-nonce | fe825654adb8feb1c5c7748c8d3e2ed665b0cc946b7ccc935fa590a0aa9aabd7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODRFOkJDNkQxOjhBMjM3QjE6QkI3OUE0OTo2QTRCQTBEMSIsInZpc2l0b3JfaWQiOiIxMzYyNTg0MTQ3NzQ1NTg5MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b0281d38cd2e35c5b89615bc15344093ae076b04f32864f97ad80fc96cd2a531 |
| hovercard-subject-tag | issue:1950827859 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/SingleStepTests/ProcessorTests/67/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e7f50d0bab7de6f6c742375d49cc853edab03cb1ce430081ed07f8fde37ccf37/SingleStepTests/ProcessorTests/issues/67 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e7f50d0bab7de6f6c742375d49cc853edab03cb1ce430081ed07f8fde37ccf37/SingleStepTests/ProcessorTests/issues/67 |
| og:image:alt | I believe there are currently no test cases for either DIVS or DIVU where the quotient is zero. If I modify my 68k DIVS and DIVU implementations to hardcode the Z flag to false, it still passes all... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jsgroth |
| hostname | github.com |
| expected-hostname | github.com |
| None | a7e470aeb8fedd833ae331b0a162f6c5a72c09b899dd94a7cd531e5e0e3a93d5 |
| turbo-cache-control | no-preview |
| go-import | github.com/SingleStepTests/ProcessorTests git https://github.com/SingleStepTests/ProcessorTests.git |
| octolytics-dimension-user_id | 169324964 |
| octolytics-dimension-user_login | SingleStepTests |
| octolytics-dimension-repository_id | 409399462 |
| octolytics-dimension-repository_nwo | SingleStepTests/ProcessorTests |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 409399462 |
| octolytics-dimension-repository_network_root_nwo | SingleStepTests/ProcessorTests |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ad79fae8b165db9a62b2142d969fa7b21eedcf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width