search for: ptrtoint_i1

Displaying 4 results from an estimated 4 matches for "ptrtoint_i1".

2014 Sep 30
2
[LLVMdev] ptrtoint
...or > C+ code, how would that be done? > > if have seen cases where a real boolean gets generated but it was > something fairly involved. > > is a boolean and a char supposed to occupy the same amount of storage? > > is this prototype going to work in general: > > void ptrtoint_i1(char *p, bool *q) > > TIA. > > Reed > > On 09/29/2014 03:15 PM, reed kotler wrote: >> Technically I don't need C/C++ code for it. >> >> I'm not really very good at writing LLVM assembly code by hand >> (but I should be - lol ). >> >> I...
2014 Sep 29
2
[LLVMdev] ptrtoint
...all of them. On 09/29/2014 03:11 PM, Duncan P. N. Exon Smith wrote: >> On Sep 29, 2014, at 2:29 PM, reed kotler <rkotler at mips.com> wrote: >> >> Thanks. >> >> So what about a fragment like this: (taken from fast-isel.ll in X86 ) >> >> define void @ptrtoint_i1(i8* %p, i1* %q) nounwind { >> %t = ptrtoint i8* %p to i1 >> store i1 %t, i1* %q >> ret void >> } > Intuitively, this looks like: > > void ptrtoint_i1(char *p, bool *q) { *q = (bool)p; } > > However, `q` needs to be addressable in C/C++, so it's...
2014 Sep 29
2
[LLVMdev] ptrtoint
Thanks. So what about a fragment like this: (taken from fast-isel.ll in X86 ) define void @ptrtoint_i1(i8* %p, i1* %q) nounwind { %t = ptrtoint i8* %p to i1 store i1 %t, i1* %q ret void } TIA. On 09/29/2014 02:16 PM, Duncan P. N. Exon Smith wrote: >> On Sep 29, 2014, at 1:51 PM, reed kotler <rkotler at mips.com> wrote: >> >> What kind of C or C++ code will emit a &...
2014 Sep 29
2
[LLVMdev] ptrtoint
What kind of C or C++ code will emit a "ptrtoint" op? Also, what causes i1 to be emitted? Tia. Reed