Stream: t-compiler

Topic: reify fn pointer for inline asm

Nikita Popov (Nov 03 2018 at 19:34, on Zulip):

Anyone have some pointers on how to handle It would be possible to work around this on the codegen side, but probably the right way is to adjust type checking somehow, but I don't know how.

nagisa (Nov 03 2018 at 19:38, on Zulip):

Rather than typechecking, coercion needs to be applied somehow

nagisa (Nov 03 2018 at 19:38, on Zulip):

@nikomatsakis would know better, but also some other people who work in that area (@eddyb ?)

eddyb (Nov 03 2018 at 19:40, on Zulip):

okay, so, the place to look for is variadics

nagisa (Nov 03 2018 at 19:41, on Zulip):

fixing coercion won’t fix "i"(foo as *const u8) not working, though.

eddyb (Nov 03 2018 at 19:42, on Zulip):

wait why would that not work?

eddyb (Nov 03 2018 at 19:42, on Zulip):

I guess LLVM does something weird sometimes

nagisa (Nov 03 2018 at 19:44, on Zulip):

I don’t know, the original report states that "i"(foo as *const u8) worked in their isolated case but not when used in an another project

nagisa (Nov 03 2018 at 19:45, on Zulip):

The "i" constraint is very constraining, I wouldn’t be surprised that there could be a ton of factor that could make it accidently not work and thus making the constraint outright unusable ever :slight_smile:

Nikita Popov (Nov 03 2018 at 20:08, on Zulip):

Ah yes, variadics look very relevant

Last update: May 24 2020 at 23:45UTC