search for: numbits

Displaying 20 results from an estimated 29 matches for "numbits".

Did you mean: num_bits
2012 Dec 21
1
[LLVMdev] A potential bug in helper function "fieldFromInstruction" in tablegen'erated file "XXXGenDisassemblerTables.inc"
Helper function: template<typename InsnType> static InsnType fieldFromInstruction(InsnType insn, unsigned startBit, unsigned numBits) { assert(startBit + numBits <= (sizeof(InsnType)*8) && "Instruction field out of bounds!"); InsnType fieldMask; if (numBits == sizeof(InsnType)*8) fieldMask = (InsnType)(-1LL); else fieldMask = ((1 << numBits) - 1) << startBit...
2004 Oct 20
1
i-node showing 100 % used whereas the partitionsare empty
...le.com Subject: Re: [Ocfs-users] i-node showing 100 % used whereas the partitionsare empty File a bug on this. I think I know what the issue is. File a bug on oss so that I don't forget about it. diff -r1.165.2.97 ocfsmain.c 1000,1001c1000,1001 < buf->f_files = (unsigned long) (numbits); < buf->f_ffree = (unsigned long) (numbits) - freebits; --- > buf->f_files = numbits; > buf->f_ffree = freebits; On Wed, 2004-10-13 at 16:32, Varghese Abraham wrote: > Output df -i > ------------------ > Filesystem Inodes IUsed IF...
2018 Jun 02
2
LoopIdiomRecognize is not recognizing the ctpop idiom
Hello. Could you please tell me why am I not able to recognize (with LLVM built from the SVN code in Apr 25, 2018) the LLVM IR intrinsic ctpop (described at https://llvm.org/docs/LangRef.html#llvm-ctpop-intrinsic) in the following program: int PopCnt_Simple(int x) { int numBits = 0; int i; //for (i = 0; i < 32; i++) { for (i = 0; x != 0; i++) { if (x & 1) numBits++; x >>= 1; } return numBits; } I also did check the following code, getting ins...
2009 Jun 20
1
[LLVMdev] /include/llvm/Bitcode/BitstreamReader.h
Hello, I'm compiling LLVM with MSVC at the moment, I've got the following warning: BitstreamReader.h(327) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) in line uint64_t Piece = Read(NumBits); if ((Piece & (1U << (NumBits-1))) == 0) Is this warning relevant? Is also Read64() instead of Read() assumed? -- Ivan Sorokin mailto:sorokin at rain.ifmo.ru -------------- next part -------------- A non-text attachment was scrubbed... Name: bitstre...
2004 Oct 13
1
i-node showing 100 % used whereas the partitions are empty
Output df -i ------------------ Filesystem Inodes IUsed IFree IUse% Mounted on / /dev/sde 348548 348195 353 100% /ocfsa01 /dev/sdf 348548 348195 353 100% /ocfsa02 /dev/sdg 348548 348195 353 100% /ocfsa03 /dev/sdk 139410 138073 1337 100% /ocfsq01 Output df -kP ----------------------- Filesystem
2010 Apr 06
2
[PATCH] ocfs2/trivial: Code cleanup for allocation reservation.
...lalloc.c index 2882f79..0b32113 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -879,13 +879,10 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, mlog(0, "Exiting loop, bitoff = %d, numfound = %d\n", bitoff, numfound); - if (numfound == *numbits) { + if (numfound == *numbits) bitoff = startoff - numfound; - *numbits = numfound; - } else { - numfound = 0; + else bitoff = -1; - } bail: if (local_resv) diff --git a/fs/ocfs2/reservations.c b/fs/ocfs2/reservations.c index 6497bcc..32bad4a 100644 --- a/fs/ocfs2/reservations.c +++ b/...
2017 Oct 20
2
How to create a 64 bit ConstInt having a value of -1?
I tried the following: - ConstantInt::get(Type::getInt64Ty(Ctx), APInt(0xFFFFFFFFFFFFFFFF, 64, false)) - ConstantInt::get(Type::getInt64Ty(Ctx), APInt(-1, 64)) I am receiving the following error: Assertion `NumBits <= MAX_INT_BITS && "bitwidth too large" failed -- Thanks & Regards, Dipanjan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171019/2e76a814/attachment.html>
2009 Jul 25
3
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
I think I might have found a bug in the exection engine's 'constants folding'. Basically APInt's parameters are the wrong way round. Line 577 for lib/ExecutionEngine/ExecutionEngine.cpp :- case Instruction::PtrToInt: { GenericValue GV = getConstantValue(Op0); uint32_t PtrWidth = TD->getPointerSizeInBits(); GV.IntVal = APInt(PtrWidth,
2015 Jan 22
2
[LLVMdev] access IntegerType::getSignBit from Type *
Hi, I have a Type * which may come from an IntegerType as shown below: Type.getIntegerBitWidth() tells me numBits. But how to extract the IntegerType.getSignBit? If pType isIntegerType, I need to know if it is signed or unsigned... How to achieve this? Thx Alex llvm::Type * getRandomValid_IntegerType(llvm::LLVMContext &C) { using namespace llvm; //--- determine num of bits between allowed b...
2007 Dec 15
2
[LLVMdev] fix warning with newer g++ compilers
...llvmAsmlval.StrVal = new std::string(StartChar-1, CurPtr++); return LABELSTR; } - + // Otherwise, this wasn't a label. If this was valid as an integer type, // return it. if (IntEnd == 0) IntEnd = CurPtr; if (IntEnd != StartChar) { CurPtr = IntEnd; uint64_t NumBits = atoull(StartChar, CurPtr); - if (NumBits < IntegerType::MIN_INT_BITS || + if (NumBits < IntegerType::MIN_INT_BITS || NumBits > IntegerType::MAX_INT_BITS) { GenerateError("Bitwidth for integer type out of range!"); return YYERROR; @@ -423,7 +425,7 @...
2011 Sep 06
2
[LLVMdev] bitwise AND
Hi, I want to compute the bitwise 'and' between two values of type int1:  %x = and %a, %b  . Which is the LLVM instruction that creates this? I only found the APInt class, whose constructor is:  APInt(unsigned numBits, uint64_t val, bool isSigned = false) and which provides the bitwise AND operation: APInt  llvm::APIntOps::And (const APInt &LHS, const APInt &RHS)   Bitwise AND function for APInt. Is this the best way to build the 'and' instruction that I need? If so, how can I send the valu...
2009 Jan 16
2
[PATCH] ocfs2: return f_fsid info in ocfs2_statfs(), v4
...tions(+), 0 deletions(-) diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 43ed113..c953933 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -1425,6 +1425,10 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) buf->f_bavail = buf->f_bfree; buf->f_files = numbits; buf->f_ffree = freebits; + buf->f_fsid.val[0] = crc32_le(0, osb->uuid_str, OCFS2_VOL_UUID_LEN) + & 0xFFFFFFFFUL; + buf->f_fsid.val[1] = crc32_le(0, osb->uuid_str + OCFS2_VOL_UUID_LEN, + OCFS2_VOL_UUID_LEN) & 0xFFFFFFFFUL; brelse(bh); -- Coly Li SuSE Labs
2009 Jan 15
2
[PATCH] ocfs2: return f_fsid info in ocfs2_statfs()
...rtions(+), 0 deletions(-) diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 43ed113..fdab98a 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -1425,6 +1425,8 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) buf->f_bavail = buf->f_bfree; buf->f_files = numbits; buf->f_ffree = freebits; + buf->f_fsid.val[0] = osb->uuid_hash & 0xFFFFFFFFUL; + buf->f_fsid.val[1] = 0; brelse(bh); -- Coly Li SuSE Labs
2009 Nov 18
4
[LLVMdev] Information generated by Bugpoint
...ash! Error running tool: /usr/local/bin/llc -o bugpoint-test-program.bc.cbe.c -march=c -f bugpoint-test-program.bc llc: CBackend.cpp:487: llvm::raw_ostream&<unnamed>::CWriter::printSimpleType(llvm::formatted_raw_ostream&, const llvm::Type*, bool, const std::string&): Assertion `NumBits <= 128 && "Bit widths > 128 not implemented yet"' failed. 0 llc 0x09017572 1 llc 0x090173e7 2 0x0044a400 __kernel_sigreturn + 0 3 0x0044a424 __kernel_vsyscall + 16 4 libc.so.6 0x00a6d7c1 gsignal + 81 5 libc.so.6 0x00a6f092 abort + 38...
2009 Jul 25
0
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
...uction::PtrToInt: { > GenericValue GV = getConstantValue(Op0); > uint32_t PtrWidth = TD->getPointerSizeInBits(); > GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal)); > return GV; > } > Aaron That looks to be the right order to me: APInt(unsigned numBits, uint64_t val, bool isSigned=false) John. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090725/ccc4b855/attachment.html>
2009 Nov 18
0
[LLVMdev] Information generated by Bugpoint
...t; /usr/local/bin/llc -o bugpoint-test-program.bc.cbe.c -march=c -f > bugpoint-test-program.bc > llc: CBackend.cpp:487: > llvm::raw_ostream&<unnamed>::CWriter::printSimpleType(llvm::formatted_raw_ostream&, > const llvm::Type*, bool, const std::string&): Assertion `NumBits <= 128 > && "Bit widths > 128 not implemented yet"' failed. try the -llc-safe option. It will use llc to compile code rather than gcc, and llc does handle arbitrary sized integers. Ciao, Duncan.
2010 Jun 23
1
FLAC StreamInfo Parsing
...lator will have to be (long long) because you > will sometimes request more than 32 bits. > > In other words, instead of: > > GetEndianBytes(streamArray, streamOffset, numBytes); > > ... you should implement: > > (long long)GetBigEndianStreamBits(streamHandle, (unsigned)numBits); > > The return value will have to be 64-bit to handle totalSamples. > The nice thing is that you won't need any indexing or bit shifting, > because GetBigEndianStreamBits() will directly return the value you > ask for, based upon the number of bits requested.
2011 Jun 26
2
String manipulation
Dear all, I have following kind of character vector: Vec <- c("344426", "dwjjsgcj", "123sgdc", "aagha123", "sdh343asgh", "123jhd51") Now I want to split each element of this vector according to?numeric?and string element. For example in the 1st element of that vector, there is no string element. Therefore I should get a vector of
2023 Apr 06
3
[PATCH] ocfs2: Fix wrong search logic in __ocfs2_resv_find_window
** problem ** Current code triggers a defragfs bug [1]: ``` tw-tst:~ # defragfs.ocfs2 /mnt/test_from_dd1 defragfs.ocfs2 1.8.7 [ERROR]Move extent failed:"/mnt/test_from_dd1" - No space left on device [ERROR]"/mnt/test_from_dd1":No space left on device ``` I added some debug messages in relevant functions. When above error messages appeared, the la-window still had enough
2011 Feb 15
3
[LLVMdev] Structure Types and ABI sizes
Hi all, We're hitting some walls here when generating the correct structure layout for specific C++ ABI requirements, and I was wondering how much StructLayout could help. For instance, the ABI has some complicated rules on the size of derived classes (http://www.codesourcery.com/public/cxx-abi/abi.html#class-types) and LLVM struct type cannot reflect that in full. Example: // CHECK: