{"action":"created","issue":{"url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/261","repository_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo","labels_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/261/comments","events_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/261/events","html_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/261","id":345500183,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjIzNjM3","number":261,"title":"simd: Update DSPr2 check","user":{"login":"neheb","id":2918873,"node_id":"MDQ6VXNlcjI5MTg4NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/2918873?v=4","gravatar_id":"","url":"https://api.github.com/users/neheb","html_url":"https://github.com/neheb","followers_url":"https://api.github.com/users/neheb/followers","following_url":"https://api.github.com/users/neheb/following{/other_user}","gists_url":"https://api.github.com/users/neheb/gists{/gist_id}","starred_url":"https://api.github.com/users/neheb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neheb/subscriptions","organizations_url":"https://api.github.com/users/neheb/orgs","repos_url":"https://api.github.com/users/neheb/repos","events_url":"https://api.github.com/users/neheb/events{/privacy}","received_events_url":"https://api.github.com/users/neheb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-29T04:19:01Z","updated_at":"2018-07-29T18:31:21Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/pulls/261","html_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/261","diff_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/261.diff","patch_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/261.patch"},"body":"The original was only a partial fix that only worked because OpenWrt passes -mips16. If PKG_USE_MIPS16:=0 is passed (-mno-mips16 in gcc), then compilation fails as before."},"comment":{"url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/comments/408696397","html_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/261#issuecomment-408696397","issue_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/261","id":408696397,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODY5NjM5Nw==","user":{"login":"dcommander","id":651941,"node_id":"MDQ6VXNlcjY1MTk0MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/651941?v=4","gravatar_id":"","url":"https://api.github.com/users/dcommander","html_url":"https://github.com/dcommander","followers_url":"https://api.github.com/users/dcommander/followers","following_url":"https://api.github.com/users/dcommander/following{/other_user}","gists_url":"https://api.github.com/users/dcommander/gists{/gist_id}","starred_url":"https://api.github.com/users/dcommander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcommander/subscriptions","organizations_url":"https://api.github.com/users/dcommander/orgs","repos_url":"https://api.github.com/users/dcommander/repos","events_url":"https://api.github.com/users/dcommander/events{/privacy}","received_events_url":"https://api.github.com/users/dcommander/received_events","type":"User","site_admin":false},"created_at":"2018-07-29T18:31:21Z","updated_at":"2018-07-29T18:31:21Z","author_association":"MEMBER","body":"I cannot reproduce your results.  When using the MIPS 24Kc toolchain that you sent me earlier, adding `-mno-mips16` to `CMAKE_C_FLAGS` works fine with the libjpeg-turbo 2.0.0 code.  With the addition of this patch, building with the MIPS 24Kc toolchain fails regardless of whether `-mno-mips16` is added.\r\n\r\nI don't claim to have a deep understanding of the various MIPS flavors.  I can only test the code in two cross-compilation environments:\r\n1. Sourcery CodeBench Lite (https://sourcery.mentor.com/GNUToolchain/release3217)\r\n2. The OpenWrt MIPS 24Kc toolchain\r\n\r\nI am unclear regarding the differences between those environments and which architectures they are emulating, but here are my observations:\r\n\r\n**libjpeg-turbo 2.0.0 code:**\r\n* _Sourcery Codebench Lite:_\r\n    DSPr2 detected, builds successfully\r\n* _OpenWrt MIPS 24Kc:_ \r\n    DSPr2 not detected, builds successfully\r\n* _OpenWrt MIPS 24Kc with `-mno-mips16`:_\r\n    DSPr2 not detected, builds successfully\r\n\r\n**libjpeg-turbo 2.0.0 code + PR 261:**\r\n* _Sourcery Codebench Lite:_\r\n    DSPr2 detected, builds successfully\r\n* _OpenWrt MIPS 24Kc:_ \r\n    DSPr2 detected, build fails with multiple \"Error: opcode not supported on this processor: mips32r2 (mips32r2)\"\r\n* _OpenWrt MIPS 24Kc with `-mno-mips16`:_\r\n    DSPr2 detected, build fails with multiple \"Error: opcode not supported on this processor: mips32r2 (mips32r2)\"\r\n\r\nRemoving the preprocessor conditional in the MIPS test code in simd/CMakeLists.txt produces the same result.\r\n\r\nIntuitively, this makes sense, because the libjpeg-turbo build system is passing `-mdspr2` to the compiler in order to check whether it supports DSPr2, and of course `__mips_dspr2` will always be defined when `-mdspr2` is passed to the compiler.  Thus, this pull request effectively negates the fix you submitted earlier.\r\n"}}
{"actor":{"display_login":"dcommander"}}