[LLVMdev] Being able to know the jitted code-size before emitting

Joachim Durchholz jo at durchholz.org
Wed Apr 16 01:14:25 PDT 2008


Am Mittwoch, den 16.04.2008, 00:05 -0700 schrieb Evan Cheng:
> Hrm. Are there machines where  
> instructions may not be byte sized?

The iAPX 432 had a bitstream format.
See http://en.wikipedia.org/wiki/Intel_iAPX_432 .
In a nutshell: the processor was a failure due to many reasons, the
bitstream format among them though not particularly prominent.

> > +static unsigned sizeGlobalAddress(bool dword) {
> > +  if (dword)
> > +    return 8;
> > +  else
> > +    return 4;
> > +}
> 
> How about?
> return dword ? 8 : 4;

Why?
(Just wondering, I'd be happy with either style if I were to review the
code.)


Regards,
Jo




More information about the llvm-dev mailing list