[cfe-dev] Advice on __emit__ intrinsic

Daniel Wallin daniel at boostpro.com
Wed Jun 1 06:18:58 PDT 2011


I'm working on adding codegen support for the BCC __emit__ intrinsic:

  http://docwiki.embarcadero.com/RADStudio/en/Bcc_intrinsics

Essentially, it allows you to insert a sequence of bytes verbatim to
the object file.

  __emit__(0xCC);

would be equivalent to:

  asm(".byte 0xCC");

The documentation doesn't seem to mention it, but it also allows you
to emit the address of a variable:

  __emit__(&x);

Because of this I figure I need to add support for this on the llvm
level, but I'm not sure how to go about it. If anyone has any advice I
would appreciate it.

Thanks,
-- 
Daniel Wallin
BoostPro Computing
http://www.boostpro.com



More information about the cfe-dev mailing list