{"action":"created","issue":{"url":"https://api.github.com/repos/avr-rust/rust/issues/14","labels_url":"https://api.github.com/repos/avr-rust/rust/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/avr-rust/rust/issues/14/comments","events_url":"https://api.github.com/repos/avr-rust/rust/issues/14/events","html_url":"https://github.com/avr-rust/rust/issues/14","id":127053239,"number":14,"title":"Update to newest Rust","user":{"login":"shepmaster","id":174509,"avatar_url":"https://avatars.githubusercontent.com/u/174509?v=3","gravatar_id":"","url":"https://api.github.com/users/shepmaster","html_url":"https://github.com/shepmaster","followers_url":"https://api.github.com/users/shepmaster/followers","following_url":"https://api.github.com/users/shepmaster/following{/other_user}","gists_url":"https://api.github.com/users/shepmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/shepmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepmaster/subscriptions","organizations_url":"https://api.github.com/users/shepmaster/orgs","repos_url":"https://api.github.com/users/shepmaster/repos","events_url":"https://api.github.com/users/shepmaster/events{/privacy}","received_events_url":"https://api.github.com/users/shepmaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2016-01-16T20:57:34Z","updated_at":"2016-01-19T14:38:01Z","closed_at":null,"body":"Since I'm playing with this, I figured I'd document some of what I've been seeing.\r\n\r\nI've merged rust/rust@1447ce78fbd65a629f228ec8731a5cddc076a15c into the `avr-support` branch. This entailed a few rounds of merge conflict resolution, as well as updating compiler-rt and the LLVM fork as well. The compiler seems to build, but I've hit some issues with compiling libcore:\r\n\r\n```\r\n./x86_64-apple-darwin/stage1/bin/rustc -C opt-level=2 -Z no-landing-pads --target avr-atmel-none -g ../src/libcore/lib.rs --out-dir libcore-avr/\r\n```\r\n\r\nSpecifically, LLVM hit a few assertions when `SelectionDAG::computeKnownBits` calls `APInt::trunc`, `APInt::sext`, and `APInt::zext` because it's trying to convert a 16-bit number to a 16-bit number. These functions all expect to convert to a different size, and there are methods like `zextOrSelf` that allow the same size. I hacked around that by returning `*this` in all three methods (what could go wrong, right?).\r\n\r\nThe next attempt failed at an LLVM issue:\r\n\r\n```\r\nLLVM ERROR: Cannot select: t35: i8 = mulhs t2, t4\r\n  t2: i8,ch = CopyFromReg t0, Register:i8 %vreg27\r\n    t1: i8 = Register %vreg27\r\n  t4: i8,ch = CopyFromReg t0, Register:i8 %vreg25\r\n    t3: i8 = Register %vreg25\r\nIn function: _ZN3num14from_str_radix20h7837196669301488416E\r\n```\r\n\r\nWhich I don't have the LLVM understanding to parse yet :-)\r\n\r\nI'm going to try some other directions to see if I can get an executable."},"comment":{"url":"https://api.github.com/repos/avr-rust/rust/issues/comments/172872129","html_url":"https://github.com/avr-rust/rust/issues/14#issuecomment-172872129","issue_url":"https://api.github.com/repos/avr-rust/rust/issues/14","id":172872129,"user":{"login":"shepmaster","id":174509,"avatar_url":"https://avatars.githubusercontent.com/u/174509?v=3","gravatar_id":"","url":"https://api.github.com/users/shepmaster","html_url":"https://github.com/shepmaster","followers_url":"https://api.github.com/users/shepmaster/followers","following_url":"https://api.github.com/users/shepmaster/following{/other_user}","gists_url":"https://api.github.com/users/shepmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/shepmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepmaster/subscriptions","organizations_url":"https://api.github.com/users/shepmaster/orgs","repos_url":"https://api.github.com/users/shepmaster/repos","events_url":"https://api.github.com/users/shepmaster/events{/privacy}","received_events_url":"https://api.github.com/users/shepmaster/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T14:38:01Z","updated_at":"2016-01-19T14:38:01Z","body":"> so it shouldn't be a problem.\r\n\r\nYup, not a problem. I merged `avr-support` and `avr-rust-support` locally to get the newest stuff, plus some hacks of my own. Whenever there's progress I should be able to do the same again. Or did you want me to try updating and see if errors had changed?\r\n\r\n> the IR for the original multiplication\r\n\r\nGood point. [I've updated that issue](https://github.com/avr-llvm/llvm/issues/174)."}}