search for: mcconstantexpr

Displaying 10 results from an estimated 10 matches for "mcconstantexpr".

Did you mean: constantexpr
2013 Jul 16
0
[LLVMdev] [PATCH 2/2] X86: infer immediate forms of bit-test instructions
...ame.endswith("w") || Name.endswith("l") || Name.endswith("q")) + && Operands.size() == 3) { + X86Operand &Op1 = *(X86Operand*)Operands.begin()[1]; + X86Operand &Op2 = *(X86Operand*)Operands.begin()[2]; + + if (Op1.isImm() && isa<MCConstantExpr>(Op1.getImm()) && + Op2.isMem() && isa<MCConstantExpr>(Op2.Mem.Disp)) { + int64_t Given_imm = cast<MCConstantExpr>(Op1.getImm())->getValue(); + int64_t Given_mem = cast<MCConstantExpr>(Op2.Mem.Disp)->getValue(); + + static_cast<X86Operand...
2011 Oct 18
4
[LLVMdev] Question about MCExpr and subclasses
I have a question about MCExpr and its subclasses defined in MCExpr.h. I am trying to get Mips' direct object emission working. Line 283 of MCElfStreamer.cpp reads like this: 00283 case MCExpr::Target: llvm_unreachable("Can't handle target exprs yet!"); Does this mean that if I use a subclass of MCTargetExpr to lower MachineOperands to MCOperands, it won't work?
2011 Oct 19
0
[LLVMdev] Question about MCExpr and subclasses
...r to print symbol > operands for MIps? I am hesitant to add my code here, since it looks a > little disorganized already. > > Also, wtih MCSymbolRefExpr, how do I print symbols with offsets? > lw $7, %lo(f1.s1+4)($16) > > I tried creating MCBinaryExpr with MCSymbolRefExpr and MCConstantExpr > operands, but I am getting something like this, which is not what I > want: > lw $7, %lo(f1.s1)+4($16) > > On Mon, Oct 17, 2011 at 5:30 PM, Jim Grosbach <grosbach at apple.com> wrote: >> That just means the ELF writer doesn't know yet how to deal with the target-sp...
2014 Apr 08
2
[LLVMdev] 3.4.1 Release Plans
On Tue, Apr 08, 2014 at 04:08:13PM +0400, Robert Khasanov wrote: > Hi Reid, > > Would you approve your patches r203146 and r202774 to be backported to > 3.4.1? They fix stability issues in x86 asm. > Hi Robert, I was able to merge r203146, but it used a c++11 feature: std::string::back() which I replaced with std::string::at(std::string::size() - 1). r202774 was not merged,
2011 Oct 18
0
[LLVMdev] Question about MCExpr and subclasses
That just means the ELF writer doesn't know yet how to deal with the target-specific data. It needs taught how to map them onto relocations and such. Do you really need to subclass MCTargetExpr? That's ordinarily only for operands that aren't representable via the normal MC stuff (for example, the ARM movw/movt relocations). You should be able represent normal symbol operands w/o
2012 Nov 19
0
[LLVMdev] Debug information under windows
...*Label, uint64_t Offset, unsigned Size) const { + // if COFF .secrel32 is available, use it + if (MAI->getDwarfSectionOffsetDirective()) { + MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++); + OutStreamer.EmitAssignment(SetLabel, MCConstantExpr::Create(Offset, OutContext)); + OutStreamer.EmitCOFFSecRel32(SetLabel); + return; + } // Emit Label+Offset const MCExpr *Plus = diff -r 547972237a05 -r d28fa29d4b44 lib/CodeGen/AsmPrinter/DIE.cpp --- a/lib/CodeGen/AsmPrinter/DIE.cpp Wed Oct 10 20:39:45 2012 +0200 +++ b/lib/CodeGen/As...
2012 Oct 26
5
[LLVMdev] Debug information under windows
Hello, Recently I found binaries produced with LLVM impossible to debug under Windows. This was probably related to the following bug: http://llvm.org/bugs/show_bug.cgi?id=13636 Asm generated from .ll files revealed that some offsets to debug information were incorrect: they were absolute instead of relative to their sections. Following patch seemed to have repaired the problem, so I'm
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
...nd *X86ATTAsmParser::ParseMemOperand(unsigned SegReg, SMLoc MemStart) { // of a memory operand with a missing displacement "(%ebx)" or "(,%eax)". The // only way to do this without lookahead is to eat the '(' and see what is // after it. - const MCExpr *Disp = MCConstantExpr::Create(0, getParser().getContext()); - if (getLexer().isNot(AsmToken::LParen)) { + const MCExpr *Disp = MCConstantExpr::Create(0, Parser->getContext()); + if (Parser->getLexer().isNot(AsmToken::LParen)) { SMLoc ExprEnd; - if (getParser().ParseExpression(Disp, ExprEnd)) return 0; +...
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...AArch64MachOMCAsmInfo::getExprForPersonalitySymbol( + const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const { + MCContext &Context = Streamer.getContext(); + const MCExpr *Res = + MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOT, Context); + const MCExpr *Four = MCConstantExpr::Create(4, Context); + return MCBinaryExpr::CreateAdd(Res, Four, Context); +} diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h b/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h index a20bc47..61ad0cc 100644 --- a/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h +++ b/lib/Target...
2018 Sep 28
3
error: expected memory with 32-bit signed offset
Hi, I want to encode Loongson ISA initially https://gist.github.com/xiangzhai/8ae6966e2f02a94e180dd16ff1cd60ac gslbx           $2,0($3,$4) It is equivalent to: dadd $1, $3, $4 lb $2,0($1) I just use  mem_simmptr  as the default value of  DAGOperand MO , because  MipsMemAsmOperand  use  parseMemOperand  to parse general  MemOffset  and only *one*  AnyRegister , for example: 0($1) But