Stream: t-compiler

Topic: function pointer Debug


Jake Goulding (Jun 07 2019 at 12:47, on Zulip):

Where about is the code for implementing Debug for function pointers? It has some weird bug on AVR with respect to address spaces.

yodal (Jun 07 2019 at 12:50, on Zulip):

Whenever I can't find certain code I go digging in the generated docs for rustc. I'm unsure if it will help in this case, but it might.

Jake Goulding (Jun 07 2019 at 12:54, on Zulip):

Oh, these might not be special implementations

Jake Goulding (Jun 07 2019 at 12:54, on Zulip):

https://github.com/rust-lang/rust/blob/master/src/libcore/ptr/mod.rs#L2638-L2643

Jake Goulding (Jun 07 2019 at 12:55, on Zulip):

I would have thought they were magically implemented for every number of args

Jake Goulding (Jun 07 2019 at 12:55, on Zulip):

but they are limited to 12

Jake Goulding (Jun 07 2019 at 12:57, on Zulip):

For context, on AVR this IR is generated

  %3 = addrspacecast {} addrspace(1)* %2 to {}*
  %4 = ptrtoint {}* %3 to i16

Which it doesn't know how to handle

yodal (Jun 07 2019 at 14:02, on Zulip):

did it used to make create correct IR or has this always been broken

yodal (Jun 07 2019 at 14:03, on Zulip):

I know AVR has always been an out-of-band project

Jake Goulding (Jun 07 2019 at 14:43, on Zulip):

It worked at some point, but we are trying to upgrade the version of Rust we are based on

Jake Goulding (Jun 07 2019 at 14:43, on Zulip):

This would be an update since circa December, I think.

Jake Goulding (Jun 07 2019 at 14:44, on Zulip):

which makes identifying the rust commit fun and annoying ;-)

Jake Goulding (Jun 07 2019 at 14:44, on Zulip):

the context, if you are interested.

yodal (Jun 07 2019 at 15:23, on Zulip):

All I can say to that upgrade is oof

yodal (Jun 07 2019 at 15:24, on Zulip):

I may look at this later, but you could probably narrow your commit search to changes in the codegen libs

yodal (Jun 07 2019 at 15:24, on Zulip):

that would probably cut your search domain by an order of magnitude

Jake Goulding (Jun 07 2019 at 15:26, on Zulip):

And the update is already out of date, so once we get that we will need to do it again ;-)

yodal (Jun 07 2019 at 15:32, on Zulip):

such is how it is with large PRs

Last update: Nov 22 2019 at 05:55UTC