search for: getexpr

Displaying 13 results from an estimated 13 matches for "getexpr".

2011 Dec 03
2
Downloading tab separated data from internet
...yurl<-paste("http://ida.water.usgs.gov/ida/available_records.cfm?sn=",stn,sep="") mypage1 = readLines(myurl) # Getting the start and end dates mypattern = '<td align="center">([^<]*)</td>' datalines = grep(mypattern, mypage1[124], value=TRUE) getexpr = function(s,g)substring(s,g,g+attr(g,'match.length')-1) gg = gregexpr(mypattern, datalines) matches = mapply(getexpr,datalines,gg) result = gsub(mypattern,'\\1',matches) names(result)=NULL mydates<-result[1:2] I want to know how I can feed these start and end dates to the form...
2012 Jan 25
0
[LLVMdev] [PATCH] TLS support for Windows 32+64bit
...re tests and also refined an assert statement. Applies cleanly > to r148473 now. Are there more comments on the code? Thank you!! + assert(Inst.getOperand(0).isReg() && + (Inst.getOperand(ImmOp).isImm() || + (Inst.getOperand(ImmOp).isExpr() && + Inst.getOperand(ImmOp).getExpr()->getKind() == MCExpr::SymbolRef) && + static_cast<const MCSymbolRefExpr*>(Inst.getOperand(ImmOp).getExpr())->getKind() == MCSymbolRefExpr::VK_SECREL) && Just asserting "Inst.getOperand(ImmOp).isImm() || (Inst.getOperand(ImmOp).isExpr()" should be sufficie...
2012 Jan 19
2
[LLVMdev] [PATCH] TLS support for Windows 32+64bit
Hi! I added 2 more tests and also refined an assert statement. Applies cleanly to r148473 now. Are there more comments on the code? Thank you!! Regards Kai On 01.01.2012 22:01, Eli Friedman wrote: > On Sun, Jan 1, 2012 at 10:44 AM, Kai<kai at redstar.de> wrote: >> Happy new year to all! >> >> The attached patch adds TLS support for x86_64-pc-win32 and x86-pc-win32.
2010 Jul 07
0
[LLVMdev] LLC Bug x86 with thread local storage
...eg()) { O << '%' << getRegisterName(Op.getReg()); } else if (Op.isImm()) { ... } else { assert(Op.isExpr() && "unknown operand kind in printOperand"); // HERE I remove the '$' to make it work O << '$' << *Op.getExpr(); } I hope someone is good in this thing! Thank you for your help, Patrick Marlier.
2010 Jun 22
2
[LLVMdev] LLC Bug x86 with thread local storage
On 06/21/2010 08:21 PM, Eric Christopher wrote: > On Jun 21, 2010, at 2:56 AM, Patrick Marlier wrote: > > >> Hello, >> >> This bug affects all LLVM versions from 2.6 to trunk : >> http://llvm.org/bugs/show_bug.cgi?id=5081 >> >> The workaround I found is to add this : >> >> Index: lib/Target/X86/X86Instr64bit.td >>
2011 Oct 10
2
[LLVMdev] Adding fixups and relocations late in code generation
...gNo; } else if (MO.isImm()) { return static_cast<unsigned>(MO.getImm()); } else if (MO.isFPImm()) { return static_cast<unsigned>(APFloat(MO.getFPImm()) .bitcastToAPInt().getHiBits(32).getLimitedValue()); } else if (MO.isExpr()) { const MCExpr *p_expr = MO.getExpr(); Fixups.push_back(MCFixup::Create(0, p_expr, MCFixupKind(Mips::fixup_Mips_Branch_PCRel))); } return 0; } ############################################ Later in MipsAsmBackend.cpp:ApplyFixup() I find the value is the offset of the target value from the beginning of the section and not t...
2010 Jul 07
4
[LLVMdev] LLC Bug x86 with thread local storage
...lt; '%' << getRegisterName(Op.getReg()); > } else if (Op.isImm()) { > ... > } else { > assert(Op.isExpr() && "unknown operand kind in printOperand"); > // HERE I remove the '$' to make it work > O << '$' << *Op.getExpr(); > } > Hrm. Something is wonky here. Can you file a testcase with a .i file I can compile please? -eric
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
...No); ZZ if (Op.isImm()) { int64_t Imm = Op.getImm() + 2; <<<======================== O << "$"; if (Imm >= 0) O << '+'; O << Imm; } else { assert(Op.isExpr() && "unknown pcrel immediate operand"); Op.getExpr()->print(O, &MAI); } } Which works well enough except for the constant 2 that I've arrowed - it needs to be the length of the binary instruction in bytes. The MC6809 has a *LOT* of variability here, so a case statement would be a right pain to maintain. An answer is tantalisingly clo...
2010 Jul 07
0
[LLVMdev] LLC Bug x86 with thread local storage
...egisterName(Op.getReg()); >> } else if (Op.isImm()) { >> ... >> } else { >> assert(Op.isExpr()&& "unknown operand kind in printOperand"); >> // HERE I remove the '$' to make it work >> O<< '$'<< *Op.getExpr(); >> } >> > > Hrm. Something is wonky here. Can you file a testcase with a .i file I can compile please? > > -eric Is the testcase from Eli Friedman not enough? http://llvm.org/bugs/show_bug.cgi?id=5081 Eli Friedman 2009-10-02 20:15:35 CDT Reduced testcase: target tr...
2017 Oct 05
2
Conversion of const llvm::MCExpr * to string
Hello, I need the expression in string. How can i convert llvm::MCExpr * to string? Please help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171005/50817330/attachment.html>
2011 Oct 10
0
[LLVMdev] Adding fixups and relocations late in code generation
...Imm()) { > return static_cast<unsigned>(MO.getImm()); > } else if (MO.isFPImm()) { > return static_cast<unsigned>(APFloat(MO.getFPImm()) > .bitcastToAPInt().getHiBits(32).getLimitedValue()); > } else if (MO.isExpr()) { > const MCExpr *p_expr = MO.getExpr(); > Fixups.push_back(MCFixup::Create(0, p_expr, > MCFixupKind(Mips::fixup_Mips_Branch_PCRel))); > } > return 0; > } > > ############################################ > > Later in MipsAsmBackend.cpp:ApplyFixup() I find the value is the offset > of the target va...
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...ame << "'"); > } > > void WinCOFFStreamer::EmitInstruction(const MCInst &Instruction) { > + for (unsigned i = 0, e = Instruction.getNumOperands(); i != e; ++i) > + if (Instruction.getOperand(i).isExpr()) > + VisitSymbols(Instruction.getOperand(i).getExpr()); > + > + getSectionData()->setHasInstructions(true); > + > + // FIXME: Who owns this memory? > + MCInstFragment *Fragment = > + new MCInstFragment(Instruction, getSectionData()); > + > + { > + raw_svector_ostream VecOS(Fragment->getCode()); > + >...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer