search for: pinst

Displaying 16 results from an estimated 16 matches for "pinst".

Did you mean: inst
2015 Apr 15
1
[LLVMdev] How to do bitcast for double to <2 x double>
So, you need to bitcast `pinst` to a pointer to Vector of double, since it (I hope for your sake) is a pointer to integer. What you are trying to do is bitcast a pointer into a vector, which probably will lead to an assert or "bad code that doesn't work". -- Mats On 15 April 2015 at 21:57, zhi chen <zchenhn at...
2015 Apr 16
3
[LLVMdev] double* to <2 x double>*
...uble]* @main.B, i32 0, i32 %i.021 %1 = load double* %arrayidx1, align 4, !tbaa !0 to: %arrayidx1 = getelementptr inbounds [100 x double]* @main.B, i32 0, i32 %i.021 %1 = bitcast double* %arrayidx1 to <2 x double>* %2 = load <2 x double>* %1, align 4 what I right now doing is: *Assume pInst is *%1 = load double* %arrayidx1, align 4, !tbaa !0 Value *loadValue = pInst->getOperand(0); Type *vecTy = VectorType::get(Type::getDoublePtrTy(currF->getContext()), 2); Value *emptyVec = UndefValue::get(vecTy); Type* u32Ty = Type::getInt32Ty(currF->getContext()); Value *index0 = Constan...
2015 Apr 21
2
[LLVMdev] what's the best way to insert an instruction after the current instruction
The current instruction is: Instruction *pInst; How can I create a new instruction, say add, after pInst? Thanks, Zhi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150421/8f75a4a0/attachment.html>
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...eFAdd to create a <2 x double> vectortype FADD instruction. It works if I use it to create the scalar version FADD. I want to have an instruction like: *%2 = fadd <2 x double> undef, <2 x double> undef. *The following is the way I used to create the vectorized FADD instruction: //pInst is a double type instruction Type *vecTy = VectorType::get(pInst->getType(), 2); Value *emptyVec = UndefValue::get(vecTy); IRBuilder<> builder(&*pInst); Value *dupVal = builder.CreateFAdd(emptyVec, emptyVec, instName); std::cout << " dupVal " << *dupVa...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
I read the tutorial document, but I didn't understand the it and Ops fields of instruction class well. Can any one give me an example? Instruction *newInstr = new Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps, Instruction *InsertBefore); For example, I have an *instruction *pInst *without no the type of operation in advance. If I want to create a new instruction which is similar to the *pInst. *How can I do it? Any help will be appreciated. Thanks. Best, Zhi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail...
2015 Apr 21
2
[LLVMdev] what's the best way to insert an instruction after the current instruction
...ue, Apr 21, 2015 at 3:36 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > IRBuilder takes an insertion point. > Use it? > > > On Tue, Apr 21, 2015 at 3:17 PM, zhi chen <zchenhn at gmail.com> wrote: > > The current instruction is: > > > > Instruction *pInst; > > > > How can I create a new instruction, say add, after pInst? > > > > Thanks, > > Zhi > > > > > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llv...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...ype FADD instruction. It works if I use it >> to create the scalar version FADD. I want to have an instruction like: >> *%2 = fadd <2 x double> undef, <2 x double> undef. *The following is the >> way I used to create the vectorized FADD instruction: >> >> //pInst is a double type instruction >> >> Type *vecTy = VectorType::get(pInst->getType(), 2); >> Value *emptyVec = UndefValue::get(vecTy); >> IRBuilder<> builder(&*pInst); >> Value *dupVal = builder.CreateFAdd(emptyVec, emptyVec, instName); >> s...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...#39;s something what I am trying to implement as the following. But it seems I still only get the constant value not the instruction. Could you please go over the following instruction and see what wrong with it? Thanks for your time again. Value *vecVal = NULL; IRBuilder<> builder(&*pInst); Type *vecTy = VectorType::get(Type::getDoubleTy(ctxt), 2); Value *emptyVec = UndefValue::get(vecTy); Type* u32Ty = Type::getInt32Ty(currF->getContext()); Value *index0 = ConstantInt::get(u32Ty, 0); Value *index1 = ConstantInt::get(u32Ty, 1); Instruction *InsertVal = InsertEleme...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...n. use dyn_cast<Instruction> to get to it. On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com> wrote: > But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I get the > instruction created by it? For example, > > IRBuilder<> builder(&*pinst); > Value *val = builder.CreateFAdd(LV, RV, ""); > > How can I get the fadd instruction created by builder? > > On Thu, Apr 16, 2015 at 8:52 PM, zhi chen <zchenhn at gmail.com> wrote: > >> Yes. That's what I was the solution in my mind. But I just wanted...
2015 Apr 15
2
[LLVMdev] How to do bitcast for double to <2 x double>
How can I write code to generate IR for: %2 = bitcast double* %1 to <2 x double>*. %3 = load <2 x double>* %2, align 16 Basically, it is similar to x86 _mm_load_pd1 intrinsics. Thanks, Zhi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150415/66489860/attachment.html>
2013 Feb 16
1
[LLVMdev] A weird problem when try to output operand of instruction involving function pointer in a struct
...ator i = b->begin(), ie = b->end(); i != ie; ++i) { if (CallInst* callInst = dyn_cast<CallInst>(&*i)) { Function *fun = callInst->getCalledFunction(); if(fun){ errs().write_escaped(fun->getName()); } else{ errs() <<"indirect call: "; Instruction* pinst = &*i; for(User::op_iterator opi=pinst->op_begin(), opie=pinst->op_end(); opi!=opie; ++opi){ if (Instruction *Op = dyn_cast<Instruction>(*opi)){ errs() <<Op->getOperand(0)->getName() <<", "; }else{ errs() <<"noti\n"; } } }...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Yes. That's what I was the solution in my mind. But I just wanted to know if there was a generic way to save some code... On Thu, Apr 16, 2015 at 8:32 PM, Tim Northover <t.p.northover at gmail.com> wrote: > > I understand that I can detect the operation first, and use "create" to > > create for each of them. But I don't if there is a generic way to do this
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...nderstand the it and Ops >> fields of instruction class well. Can any one give me an example? >> >> Instruction *newInstr = new Instruction(Type *ty, unsigned it, Use *Ops, >> unsigned NumOps, Instruction *InsertBefore); >> >> For example, I have an *instruction *pInst *without no the type of >> operation in advance. If I want to create a new instruction which is >> similar to the *pInst. *How can I do it? >> >> Any help will be appreciated. Thanks. >> >> Best, >> Zhi >> >> >> ___________________________...
2003 Jan 09
0
Building openssh-3.5p1 with new DES functions
...line 736: In this statement, "creds" is not declared. (undeclared) CREDENTIALS *creds; ---------------------^ cc: Error: sshconnect1.c, line 738: In the declaration of "pname", "ANAME_SZ" is not declared. (undeclared) char buffer[4096], pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ]; ---------------------------------^ cc: Error: sshconnect1.c, line 738: In the declaration of "pinst", "INST_SZ" is not declared. (undeclared) char buffer[4096], pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ]; -------------------------------...
2002 Apr 20
0
Buffer overflow in OpenSSH 2.2.0-3.1.0
...tyfocus.com effect: local root vulnerable services: -pass Kerberos IV TGT -pass AFS Token bug details: radix.c GETSTRING macro in radix_to_creds function may cause buffer overflow. affected buffers: creds->service creds->instance creds->realm creds->pinst exploit code here: mantra.freeweb.hu
2002 Jan 24
1
PATCH: krb4/krb5/... names/patterns in auth_keys entries
...@@ -40,6 +40,7 @@ #ifdef KRB4 extern ServerOptions options; +int user_key_allowed(struct passwd *, Key *); static int krb4_init(void *context) @@ -220,6 +221,7 @@ socklen_t slen; u_int cksum; int r, s; + Key k; s = packet_get_connection_in(); @@ -249,12 +251,27 @@ *adat.pinst ? "." : "", adat.pinst, adat.prealm); /* Check ~/.klogin authorization now. */ - if (kuserok(&adat, authctxt->user) != KSUCCESS) { - log("Kerberos v4 .klogin authorization failed for %s to " - "account %s", *client, authctxt->user); + k.t...