{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/25320005","id":25320005,"diff_hunk":"@@ -0,0 +1,368 @@\n+//\n+// Copyright (c) Microsoft. All rights reserved.\n+// Copyright (c) Geoff Norton. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information. \n+//\n+\n+// ==++==\n+//\n+\n+//\n+// ==--==\n+\n+#include \"unixasmmacros.inc\"\n+#include \"asmconstants.h\"\n+\n+//\n+// METHODDESC_REGISTER: UMEntryThunk*\n+//\n+NESTED_ENTRY TheUMEntryPrestub, _TEXT, UMEntryPrestubUnwindFrameChainHandler\n+\n+#define TheUMEntryPrestub_XMM_SAVE_OFFSET SIZEOF_MAX_OUTGOING_ARGUMENT_HOMES\n+\n+// Ensure that the new rsp will be 16-byte aligned.  Note that the caller has\n+// already pushed the return address.\n+#if (((SIZEOF_MAX_OUTGOING_ARGUMENT_HOMES + SIZEOF_MAX_FP_ARG_SPILL) + 8) % 16) != 0\n+#define TheUMEntryPrestub_STACK_FRAME_SIZE (SIZEOF_MAX_OUTGOING_ARGUMENT_HOMES + SIZEOF_MAX_FP_ARG_SPILL + 8)\n+#else\n+#define TheUMEntryPrestub_STACK_FRAME_SIZE (SIZEOF_MAX_OUTGOING_ARGUMENT_HOMES + SIZEOF_MAX_FP_ARG_SPILL)\n+#endif\n+\n+        alloc_stack     TheUMEntryPrestub_STACK_FRAME_SIZE\n+\n+        save_reg_postrsp    rdi, TheUMEntryPrestub_STACK_FRAME_SIZE + 0x8","path":"src/vm/amd64/umthunkstub.S","position":33,"original_position":33,"commit_id":"9bd046b5f303a874dee540f8e0daa71eb2d5e206","original_commit_id":"9bd046b5f303a874dee540f8e0daa71eb2d5e206","user":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"body":"Actually, it would be best to simplify the implementation using the macros to just something like:\r\n\r\nNESTED_ENTRY TheUMEntryPrestub, _TEXT, UMEntryPrestubUnwindFrameChainHandler\r\n\r\nPUSH_ARGUMENT_REGISTERS\r\n// +8 for alignment\r\nalloc_stack SIZEOF_MAX_FP_ARG_SPILL + 8\r\nSAVE_FLOAT_ARGUMENT_REGISTERS 0\r\nEND_PROLOGUE\r\n\r\nmov             rdi, METHODDESC_REGISTER \r\ncall            C_FUNC(TheUMEntryPrestubWorker) \r\n\r\n// we're going to tail call to the exec stub that we just setup\r\n\r\nRESTORE_FLOAT_ARGUMENT_REGISTERS 0\r\nfree_stack SIZEOF_MAX_FP_ARG_SPILL + 8\r\nPOP_ARGUMENT_REGISTERS\r\nTAILJMP_RAX","created_at":"2015-02-25T06:12:06Z","updated_at":"2015-02-25T06:12:06Z","html_url":"https://github.com/dotnet/coreclr/pull/330#discussion_r25320005","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/330","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/25320005"},"html":{"href":"https://github.com/dotnet/coreclr/pull/330#discussion_r25320005"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/330"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/330","id":29868772,"html_url":"https://github.com/dotnet/coreclr/pull/330","diff_url":"https://github.com/dotnet/coreclr/pull/330.diff","patch_url":"https://github.com/dotnet/coreclr/pull/330.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/330","number":330,"state":"open","locked":false,"title":"Implement TheUMEntryPrestub, UMThunkStub, and UM2MThunk_WrapperHelper for UNIX ABIs","user":{"login":"kangaroo","id":151532,"avatar_url":"https://avatars.githubusercontent.com/u/151532?v=3","gravatar_id":"","url":"https://api.github.com/users/kangaroo","html_url":"https://github.com/kangaroo","followers_url":"https://api.github.com/users/kangaroo/followers","following_url":"https://api.github.com/users/kangaroo/following{/other_user}","gists_url":"https://api.github.com/users/kangaroo/gists{/gist_id}","starred_url":"https://api.github.com/users/kangaroo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangaroo/subscriptions","organizations_url":"https://api.github.com/users/kangaroo/orgs","repos_url":"https://api.github.com/users/kangaroo/repos","events_url":"https://api.github.com/users/kangaroo/events{/privacy}","received_events_url":"https://api.github.com/users/kangaroo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-24T03:38:54Z","updated_at":"2015-02-25T06:12:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8885e89baf447b02a3a5c50bcffa929f9a2c351","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/330/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/330/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/330/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/9bd046b5f303a874dee540f8e0daa71eb2d5e206","head":{"label":"kangaroo:issue-324","ref":"issue-324","sha":"9bd046b5f303a874dee540f8e0daa71eb2d5e206","user":{"login":"kangaroo","id":151532,"avatar_url":"https://avatars.githubusercontent.com/u/151532?v=3","gravatar_id":"","url":"https://api.github.com/users/kangaroo","html_url":"https://github.com/kangaroo","followers_url":"https://api.github.com/users/kangaroo/followers","following_url":"https://api.github.com/users/kangaroo/following{/other_user}","gists_url":"https://api.github.com/users/kangaroo/gists{/gist_id}","starred_url":"https://api.github.com/users/kangaroo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangaroo/subscriptions","organizations_url":"https://api.github.com/users/kangaroo/orgs","repos_url":"https://api.github.com/users/kangaroo/repos","events_url":"https://api.github.com/users/kangaroo/events{/privacy}","received_events_url":"https://api.github.com/users/kangaroo/received_events","type":"User","site_admin":false},"repo":{"id":30268501,"name":"coreclr","full_name":"kangaroo/coreclr","owner":{"login":"kangaroo","id":151532,"avatar_url":"https://avatars.githubusercontent.com/u/151532?v=3","gravatar_id":"","url":"https://api.github.com/users/kangaroo","html_url":"https://github.com/kangaroo","followers_url":"https://api.github.com/users/kangaroo/followers","following_url":"https://api.github.com/users/kangaroo/following{/other_user}","gists_url":"https://api.github.com/users/kangaroo/gists{/gist_id}","starred_url":"https://api.github.com/users/kangaroo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangaroo/subscriptions","organizations_url":"https://api.github.com/users/kangaroo/orgs","repos_url":"https://api.github.com/users/kangaroo/repos","events_url":"https://api.github.com/users/kangaroo/events{/privacy}","received_events_url":"https://api.github.com/users/kangaroo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kangaroo/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/kangaroo/coreclr","forks_url":"https://api.github.com/repos/kangaroo/coreclr/forks","keys_url":"https://api.github.com/repos/kangaroo/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kangaroo/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kangaroo/coreclr/teams","hooks_url":"https://api.github.com/repos/kangaroo/coreclr/hooks","issue_events_url":"https://api.github.com/repos/kangaroo/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/kangaroo/coreclr/events","assignees_url":"https://api.github.com/repos/kangaroo/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/kangaroo/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/kangaroo/coreclr/tags","blobs_url":"https://api.github.com/repos/kangaroo/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kangaroo/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kangaroo/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/kangaroo/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kangaroo/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/kangaroo/coreclr/languages","stargazers_url":"https://api.github.com/repos/kangaroo/coreclr/stargazers","contributors_url":"https://api.github.com/repos/kangaroo/coreclr/contributors","subscribers_url":"https://api.github.com/repos/kangaroo/coreclr/subscribers","subscription_url":"https://api.github.com/repos/kangaroo/coreclr/subscription","commits_url":"https://api.github.com/repos/kangaroo/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/kangaroo/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/kangaroo/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/kangaroo/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/kangaroo/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/kangaroo/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kangaroo/coreclr/merges","archive_url":"https://api.github.com/repos/kangaroo/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kangaroo/coreclr/downloads","issues_url":"https://api.github.com/repos/kangaroo/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/kangaroo/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/kangaroo/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/kangaroo/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kangaroo/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/kangaroo/coreclr/releases{/id}","created_at":"2015-02-03T22:39:58Z","updated_at":"2015-02-17T23:51:58Z","pushed_at":"2015-02-25T03:22:41Z","git_url":"git://github.com/kangaroo/coreclr.git","ssh_url":"git@github.com:kangaroo/coreclr.git","clone_url":"https://github.com/kangaroo/coreclr.git","svn_url":"https://github.com/kangaroo/coreclr","homepage":"","size":26129,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"694e8cd4ca6564104477a54c2553052ef434b843","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","created_at":"2015-01-30T22:10:02Z","updated_at":"2015-02-25T06:05:59Z","pushed_at":"2015-02-25T02:09:54Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"","size":30610,"stargazers_count":3686,"watchers_count":3686,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":586,"mirror_url":null,"open_issues_count":66,"forks":586,"open_issues":66,"watchers":3686,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/330"},"html":{"href":"https://github.com/dotnet/coreclr/pull/330"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/330"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/330/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/330/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/330/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/9bd046b5f303a874dee540f8e0daa71eb2d5e206"}}}}