{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/34011810","id":34011810,"diff_hunk":"@@ -3401,7 +3587,6 @@ VirtualProtect(\n            IN DWORD flNewProtect,\n            OUT PDWORD lpflOldProtect);\n \n-#if defined(_AMD64_)","path":"src/pal/inc/pal.h","position":219,"original_position":219,"commit_id":"76de7198d878d51d2020ee21093c926bd917bf93","original_commit_id":"76de7198d878d51d2020ee21093c926bd917bf93","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":"The GC is using it on all platforms.","created_at":"2015-07-07T06:50:51Z","updated_at":"2015-07-07T06:50:51Z","html_url":"https://github.com/dotnet/coreclr/pull/1210#discussion_r34011810","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/1210","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/34011810"},"html":{"href":"https://github.com/dotnet/coreclr/pull/1210#discussion_r34011810"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1210"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/1210","id":39326239,"html_url":"https://github.com/dotnet/coreclr/pull/1210","diff_url":"https://github.com/dotnet/coreclr/pull/1210.diff","patch_url":"https://github.com/dotnet/coreclr/pull/1210.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/1210","number":1210,"state":"open","locked":false,"title":"[WIP] CoreCLR building on ARM","user":{"login":"benpye","id":442623,"avatar_url":"https://avatars.githubusercontent.com/u/442623?v=3","gravatar_id":"","url":"https://api.github.com/users/benpye","html_url":"https://github.com/benpye","followers_url":"https://api.github.com/users/benpye/followers","following_url":"https://api.github.com/users/benpye/following{/other_user}","gists_url":"https://api.github.com/users/benpye/gists{/gist_id}","starred_url":"https://api.github.com/users/benpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpye/subscriptions","organizations_url":"https://api.github.com/users/benpye/orgs","repos_url":"https://api.github.com/users/benpye/repos","events_url":"https://api.github.com/users/benpye/events{/privacy}","received_events_url":"https://api.github.com/users/benpye/received_events","type":"User","site_admin":false},"body":"This currently has all changes required to get coreclr building on ARM. This has been validated on both a Raspberry Pi 2 and scaleway.com . I have targeted ARMv7, VFPv3 and Thumb 2 as this is the base line target for Ubuntu 14.04 armhf but I believe also the target for Windows' ARM .NET Framework?\r\n\r\nThe result of this is all of the code will build for ARM on Linux (Ubuntu 14.04 has been my target), using clang 3.5, lldb 3.6. This doesn't however give a working coreclr nor do all PAL tests pass. @kangaroo said that he had already fixed the va_list usage which is breaking vsnprintf, it will use the first argument in the va_list repeatedly. Another issue with ARM's different va_list ABI arises in the VM, the marshalling for va_lists, I have stubbed this out on ARM for Linux currently.\r\n\r\nThere does not appear to be a standard way to get the FP registers from a ucontext_t, in addition only the callee saved registers are captured by glibc anyway (d8-d15), I have therefore not attempted to handle the floating point registers when converting between the PAL context and ucontext_t.\r\n\r\nThe JIT has been build with `LEGACY_BACKEND` defined on the advice of @jkotas . The JIT will build successfully and code does begin to be generated and ran, some FCall functions appear to be called into, however a segfault is hit as the following instruction is generated `ldr r3, [r0, #0]`, and r0 is 0x0. At this point I am somewhat out of my depth when it comes to debugging the JIT issue and so if anyone has any idea where I should look, the help would be much appreciated.\r\n\r\nlldb is non functional on ARM as far as I can tell (at least as of 3.6), so I am limited to using gdb and obviously SOS cannot be used which is a limitation, the SOS plugin does build and will be loaded, but lldb segfaults upon running any binary.\r\n\r\nFrom what I could tell the ARM code required `STUBLINKER_GENERATES_UNWIND_INFO` to be defined, without this there was a fairly large number of undefined variables/functions within the code. I cannot find any reference to this in any Windows projects, nor any documentation for what this is intended to do.\r\n\r\nSome GC related functions have been stubbed out, I am not too sure how to translate https://github.com/dotnet/coreclr/blob/master/src/vm/arm/asmhelpers.asm#L2170-L2646 from MASM to GNU assembler. In addition, I have noticed the AMD64 build has a lot of .cfi_foo directives in the assembly, from my reading this is for making it so the code can be unwinded. I haven't really made an attempt outside of unixasmmacros.inc to add these directives to the assembly I have commited. I am under the impression however that the VM will run without unwinding, however exceptions and such will not function?\r\n\r\nPart of the reason for this PR is so that the CI servers will build the code as I have limited ability to test configurations. So far this code has only been validated on ARM but I do not believe (now) that it will break AMD64 on OS X or Windows, and I hope it wouldn't break other Windows platforms. If required I can split up the commits and I presume before any consideration of being merged, they would need to be rebased anyway, so that can be addressed in a later pull request.","created_at":"2015-07-07T01:00:33Z","updated_at":"2015-07-07T06:50:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0575e98b1c57bb7c304ccaa7c2963e941335920","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/1210/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/1210/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/1210/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/76de7198d878d51d2020ee21093c926bd917bf93","head":{"label":"benpye:linux-arm","ref":"linux-arm","sha":"76de7198d878d51d2020ee21093c926bd917bf93","user":{"login":"benpye","id":442623,"avatar_url":"https://avatars.githubusercontent.com/u/442623?v=3","gravatar_id":"","url":"https://api.github.com/users/benpye","html_url":"https://github.com/benpye","followers_url":"https://api.github.com/users/benpye/followers","following_url":"https://api.github.com/users/benpye/following{/other_user}","gists_url":"https://api.github.com/users/benpye/gists{/gist_id}","starred_url":"https://api.github.com/users/benpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpye/subscriptions","organizations_url":"https://api.github.com/users/benpye/orgs","repos_url":"https://api.github.com/users/benpye/repos","events_url":"https://api.github.com/users/benpye/events{/privacy}","received_events_url":"https://api.github.com/users/benpye/received_events","type":"User","site_admin":false},"repo":{"id":30714471,"name":"coreclr","full_name":"benpye/coreclr","owner":{"login":"benpye","id":442623,"avatar_url":"https://avatars.githubusercontent.com/u/442623?v=3","gravatar_id":"","url":"https://api.github.com/users/benpye","html_url":"https://github.com/benpye","followers_url":"https://api.github.com/users/benpye/followers","following_url":"https://api.github.com/users/benpye/following{/other_user}","gists_url":"https://api.github.com/users/benpye/gists{/gist_id}","starred_url":"https://api.github.com/users/benpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpye/subscriptions","organizations_url":"https://api.github.com/users/benpye/orgs","repos_url":"https://api.github.com/users/benpye/repos","events_url":"https://api.github.com/users/benpye/events{/privacy}","received_events_url":"https://api.github.com/users/benpye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benpye/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/benpye/coreclr","forks_url":"https://api.github.com/repos/benpye/coreclr/forks","keys_url":"https://api.github.com/repos/benpye/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benpye/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benpye/coreclr/teams","hooks_url":"https://api.github.com/repos/benpye/coreclr/hooks","issue_events_url":"https://api.github.com/repos/benpye/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/benpye/coreclr/events","assignees_url":"https://api.github.com/repos/benpye/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/benpye/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/benpye/coreclr/tags","blobs_url":"https://api.github.com/repos/benpye/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benpye/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benpye/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/benpye/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benpye/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/benpye/coreclr/languages","stargazers_url":"https://api.github.com/repos/benpye/coreclr/stargazers","contributors_url":"https://api.github.com/repos/benpye/coreclr/contributors","subscribers_url":"https://api.github.com/repos/benpye/coreclr/subscribers","subscription_url":"https://api.github.com/repos/benpye/coreclr/subscription","commits_url":"https://api.github.com/repos/benpye/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/benpye/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/benpye/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/benpye/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/benpye/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/benpye/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benpye/coreclr/merges","archive_url":"https://api.github.com/repos/benpye/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benpye/coreclr/downloads","issues_url":"https://api.github.com/repos/benpye/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/benpye/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/benpye/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/benpye/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benpye/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/benpye/coreclr/releases{/id}","created_at":"2015-02-12T17:32:53Z","updated_at":"2015-07-01T15:47:17Z","pushed_at":"2015-07-07T01:56:15Z","git_url":"git://github.com/benpye/coreclr.git","ssh_url":"git@github.com:benpye/coreclr.git","clone_url":"https://github.com/benpye/coreclr.git","svn_url":"https://github.com/benpye/coreclr","homepage":"","size":35959,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"linux-arm"}},"base":{"label":"dotnet:master","ref":"master","sha":"c2218edd754accdb521d101ca5c7f6d97eaaff23","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, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","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-07-07T06:29:33Z","pushed_at":"2015-07-07T03:09:29Z","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":"http://dotnet.github.io/core/","size":51197,"stargazers_count":4808,"watchers_count":4808,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":934,"mirror_url":null,"open_issues_count":200,"forks":934,"open_issues":200,"watchers":4808,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1210"},"html":{"href":"https://github.com/dotnet/coreclr/pull/1210"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/1210"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/1210/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1210/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/1210/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/76de7198d878d51d2020ee21093c926bd917bf93"}}}}