Stream: project-inline-asm

Topic: AVR


Jake Goulding (Dec 10 2019 at 18:32, on Zulip):

I can't promise any concrete time availability, but once this gets further along, I'd love to help with this for AVR.

Jake Goulding (Dec 10 2019 at 18:32, on Zulip):

Ideally once you've hammered out all the hard abstractions and there's just a simple template for me to fill in ;-)

Josh Triplett (Dec 10 2019 at 23:39, on Zulip):

Yeah, if we've done it right, it should be just "what are your registers".

Amanieu (Dec 11 2019 at 00:38, on Zulip):

I would expect it to take 2 hours max to add a new architecture. As Josh said, all you need to do is define registers and register classes.

Jake Goulding (Dec 11 2019 at 02:17, on Zulip):

Well, Josh just said registers. You've doubled the work with also adding specific classes ;-)

Jake Goulding (Dec 11 2019 at 02:18, on Zulip):

At this doubling rate :upwards_trend: , there's only a few more "and also" before it gets out of hand :explosion:

bjorn3 (Dec 11 2019 at 09:17, on Zulip):

O(2^n)? :slight_smile:

Josh Triplett (Dec 12 2019 at 16:09, on Zulip):

I had intended the concept of defining registers to include classifying them. ;)

Jake Goulding (Jun 09 2020 at 13:52, on Zulip):

I expect that the AVR fork will get merged into rust-lang/rust in the next few weeks. Is this implemented enough to dump in some AVR-specific things after that happens?

Amanieu (Jun 09 2020 at 14:07, on Zulip):

Sure!

Jake Goulding (Jun 09 2020 at 15:04, on Zulip):

Cool. I'm guessing there's not _tons_ of documentation, so do you have any pointers for me to start looking at?

Amanieu (Jun 09 2020 at 16:24, on Zulip):

It's actually very easy, someone has already added NVPTX inline asm support. There's only 2 places you need to modify: src/librustc_target/asm to define the target registers and src/librustc_codegen_llvm/asm.rs to lower to LLVM constraint codes and modifiers.

nagisa (Jun 09 2020 at 23:36, on Zulip):

Amanieu said:

It's actually very easy, someone has already added NVPTX inline asm support. There's only 2 places you need to modify: src/librustc_target/asm to define the target registers and src/librustc_codegen_llvm/asm.rs to lower to LLVM constraint codes and modifiers.

I think it helps to look through the PR that added initial inline assembly support. I feel like just a skim should be enough to figure out where architecture-specific stuff needs to go. (And what is really necessary)

Last update: Jul 02 2020 at 19:45UTC