search for: size_int

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

2010 Mar 23
1
[PATCH] drm/nouveau: fix vbios load and check functions on PowerPC
...int nouveau_firstopen(struct drm_device *dev) static void nouveau_OF_copy_vbios_to_ramin(struct drm_device *dev) { #if defined(__powerpc__) - int size, i; - const uint32_t *bios; + /* + * Copy BMP Bios to RAMIN, calculate its checksum and append it to Bios. + */ + int size, i, j, unread_bytes, size_int; + uint8_t sum = 0; + uint8_t checksum = 0; + uint32_t last_bytes = 0; + const uint32_t *bios = NULL; struct device_node *dn = pci_device_to_OF_node(dev->pdev); - if (!dn) { - NV_INFO(dev, "Unable to get the OF node\n"); - return; - } + size_int = sizeof(uint32_t); bios = of_ge...
2012 Feb 22
1
[LLVMdev] Size of structs & arrays
...4)); llvm::ConstantInt* two = llvm::ConstantInt::get(mod->getContext(), llvm::APInt(32, llvm::StringRef("1"), 10)); std::vector<llvm::Value*> indices; indices.push_back(one); indices.push_back(two); llvm::Value* size = builder->CreateGEP(struct_ptr, indices); llvm::Value* size_int = builder->CreatePtrToInt(size, llvm::IntegerType::get(mod->getContext(), 64)) And I'm getting the assertion error "Invalid GetElementPtrInst indices for type!"'. 'struct_ptr' is a pointer to the struct I'm trying to size. I've also tried using getNullValue...
2012 Feb 22
0
[LLVMdev] Size of structs & arrays
On Wed, Feb 22, 2012 at 1:56 PM, Fraser Cormack <frasercrmck at gmail.com> wrote: > > I'm trying to work out the size of a struct so that I can pass this to the > 'llvm.memcpy' intrinsic. It's easy to find out how I'm supposed to do this, > as I keep seeing the following: > > %Size = getelementptr %T* null, int 1 > %SizeI = cast %T* %Size to uint >
2012 Feb 22
5
[LLVMdev] Size of structs & arrays
I'm trying to work out the size of a struct so that I can pass this to the 'llvm.memcpy' intrinsic. It's easy to find out how I'm supposed to do this, as I keep seeing the following: %Size = getelementptr %T* null, int 1 %SizeI = cast %T* %Size to uint But I'm unsure how I actually do this in the C++ API. Is the 'null' here a llvm::ConstantPointerNull? Any help