{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/21237","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/21237/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/21237/comments","events_url":"https://api.github.com/repos/apple/swift/issues/21237/events","html_url":"https://github.com/apple/swift/pull/21237","id":390040274,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3ODk0MTUy","number":21237,"title":"[stdlib][SR-2239] Refactor AAPCS64 variable argument list support.","user":{"login":"drodriguez","id":6338,"node_id":"MDQ6VXNlcjYzMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/6338?v=4","gravatar_id":"","url":"https://api.github.com/users/drodriguez","html_url":"https://github.com/drodriguez","followers_url":"https://api.github.com/users/drodriguez/followers","following_url":"https://api.github.com/users/drodriguez/following{/other_user}","gists_url":"https://api.github.com/users/drodriguez/gists{/gist_id}","starred_url":"https://api.github.com/users/drodriguez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drodriguez/subscriptions","organizations_url":"https://api.github.com/users/drodriguez/orgs","repos_url":"https://api.github.com/users/drodriguez/repos","events_url":"https://api.github.com/users/drodriguez/events{/privacy}","received_events_url":"https://api.github.com/users/drodriguez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-12-12T02:38:22Z","updated_at":"2018-12-20T23:56:07Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/21237","html_url":"https://github.com/apple/swift/pull/21237","diff_url":"https://github.com/apple/swift/pull/21237.diff","patch_url":"https://github.com/apple/swift/pull/21237.patch"},"body":"This refactoring uses large portions of the already existing code for\r\nx86_64 and s390 to implement AAPCS64 __VaListBuilder. The parts where\r\neach implementation differ are the x86_64 header, and the order of the\r\ngeneral and vector registers.\r\n\r\nThe changes also addresses many of the request from the reviewers in\r\n #20862 which were not addressed originally, like the reuse of the\r\nalready existing code, and the generalizations for the code to be useful\r\nfor platforms different than Linux (Android, for example).\r\n\r\nSome of the previous reviewers concerns were not addressed. Below are my explanations.\r\n\r\n@compnerd:\r\n\r\n- `_fpRegisterWords` should not be `MemoryLayout<Double>.size / MemoryLayout<Int>.size`, because the size of `Double` is just 8 bytes, while the vector registers seems to be 16 bytes wide.\r\n- About using the same indexing than x86_64 (“Should this not be offset by gpRegistersUsed like L554?”), I tried, but I couldn’t make it work. However the organization VR, then GR, and then stack seems to pass the tests, which seems pretty complete (there’s at least an example than goes beyond the 8 register limit which starts using the stack).\r\n- I keep using literal `-64` and `-128`. If you want me to add the math is fine, but I think the real math according to the standard is confussing in this case (`MemoryLayout<Double>.size * _countFPRegisters` was also incorrect for the reason above).\r\n\r\n@rjmccall:\r\n\r\n- I didn’t implement the `@_va_list_kind` you were proposing, but I’m not against it. I think, however, that it is of limited utility (it will only be used here, and probably nowhere else). If you still think it is a good idea, can I implement it as a follow up?\r\n\r\n@futurejones: I hope you don’t mind I’m modifying the code and adopting the feedback from the previous PR. The code is generally useful to more platforms than Linux, so it will be a pity not to use it. My only intention is to have a better support for all the platforms with a cleaner code."},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/449181316","html_url":"https://github.com/apple/swift/pull/21237#issuecomment-449181316","issue_url":"https://api.github.com/repos/apple/swift/issues/21237","id":449181316,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTE4MTMxNg==","user":{"login":"swift-ci","id":15467072,"node_id":"MDQ6VXNlcjE1NDY3MDcy","avatar_url":"https://avatars0.githubusercontent.com/u/15467072?v=4","gravatar_id":"","url":"https://api.github.com/users/swift-ci","html_url":"https://github.com/swift-ci","followers_url":"https://api.github.com/users/swift-ci/followers","following_url":"https://api.github.com/users/swift-ci/following{/other_user}","gists_url":"https://api.github.com/users/swift-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/swift-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swift-ci/subscriptions","organizations_url":"https://api.github.com/users/swift-ci/orgs","repos_url":"https://api.github.com/users/swift-ci/repos","events_url":"https://api.github.com/users/swift-ci/events{/privacy}","received_events_url":"https://api.github.com/users/swift-ci/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T23:56:07Z","updated_at":"2018-12-20T23:56:07Z","author_association":"CONTRIBUTOR","body":"**Build failed**\n[Swift Test OS X Platform](https://ci.swift.org/job/swift-PR-osx/10014/)\nGit Sha - 219c499961a944b6c6012fa33fe4a7d483cf55d5\n"}}
{"actor":{"display_login":"swift-ci"}}