search for: getinstsizewithdesc

Displaying 5 results from an estimated 5 matches for "getinstsizewithdesc".

2008 Apr 16
3
[LLVMdev] Being able to know the jitted code-size before emitting
...working. Is it OK? >> // >> -unsigned X86RegisterInfo::getX86RegNum(unsigned RegNo) const { >> +unsigned X86RegisterInfo::getX86RegNum(unsigned RegNo) { >> > > What happened to "const"? > I made the function static. >> + unsigned Size = GetInstSizeWithDesc(*MI, &Desc, IsPIC, >> Is64BitMode); >> + if (Desc.getOpcode() == X86::MOVPC32r) { >> + Size += GetInstSizeWithDesc(*MI, &get(X86::POP32r), IsPIC, >> Is64BitMode); >> + } >> > > I would prefer this special case is handled in GetInstSi...
2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
...t; -unsigned X86RegisterInfo::getX86RegNum(unsigned RegNo) const { >>> +unsigned X86RegisterInfo::getX86RegNum(unsigned RegNo) { >>> >> >> What happened to "const"? >> > > I made the function static. Ok. > > >>> + unsigned Size = GetInstSizeWithDesc(*MI, &Desc, IsPIC, >>> Is64BitMode); >>> + if (Desc.getOpcode() == X86::MOVPC32r) { >>> + Size += GetInstSizeWithDesc(*MI, &get(X86::POP32r), IsPIC, >>> Is64BitMode); >>> + } >>> >> >> I would prefer this special case...
2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
...gt; + > + FinalSize += sizeSIBByte(); > + > + // Do we need to output a displacement? > + if (DispVal != 0 || ForceDisp32) { > + FinalSize += sizeDisplacementField(DispForReloc); > + } > + } > + return FinalSize; > +} > + > + > +static unsigned GetInstSizeWithDesc(const MachineInstr &MI, > + const TargetInstrDesc *Desc, > + bool IsPIC, bool Is64BitMode) { I probably would have overload the name GetInstSizeInBytes(). Not a big deal. > > + DOUT << MI; Do you want...
2008 Apr 15
4
[LLVMdev] Being able to know the jitted code-size before emitting
OK, here's a new patch that adds the infrastructure and the implementation for X86, ARM and PPC of GetInstSize and GetFunctionSize. Both functions are virtual functions defined in TargetInstrInfo.h. For X86, I moved some commodity functions from X86CodeEmitter to X86InstrInfo. What do you think? Nicolas Evan Cheng wrote: > > I think both of these belong to TargetInstrInfo. And
2008 Apr 17
1
[LLVMdev] Being able to know the jitted code-size before emitting
...86RegisterInfo::getX86RegNum(unsigned RegNo) { >>>> >>>> >>> What happened to "const"? >>> >>> >> I made the function static. >> > > Ok. > > >> >>>> + unsigned Size = GetInstSizeWithDesc(*MI, &Desc, IsPIC, >>>> Is64BitMode); >>>> + if (Desc.getOpcode() == X86::MOVPC32r) { >>>> + Size += GetInstSizeWithDesc(*MI, &get(X86::POP32r), IsPIC, >>>> Is64BitMode); >>>> + } >>>> >>>> &...