Changeset 5388


Ignore:
Timestamp:
Mar 31, 2017, 3:58:55 PM (2 years ago)
Author:
nmedfort
Message:

Fix for 32-bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.cpp

    r5387 r5388  
    184184    ConstantInt * const flags =  ConstantInt::get(intTy, MAP_PRIVATE | MAP_ANONYMOUS);
    185185    ConstantInt * const fd =  ConstantInt::get(intTy, -1);
    186     ConstantInt * const offset = ConstantInt::get(intTy, 0); // getCacheAlignment()
     186    Constant * const offset = ConstantInt::get(offTy, 0); // getCacheAlignment()
    187187    Value * const ptr = CreateCall(fMMap, {Constant::getNullValue(voidPtrTy), size, prot, flags, fd, offset});
    188188    CreateAssert(CreateICmpNE(CreatePtrToInt(ptr, getSizeTy()), getSize((size_t)MAP_FAILED)), "CreateAnonymousMMap: mmap failed to allocate memory");
     
    204204    ConstantInt * const prot =  ConstantInt::get(intTy, PROT_READ);
    205205    ConstantInt * const flags =  ConstantInt::get(intTy, MAP_PRIVATE);
    206     ConstantInt * const offset = ConstantInt::get(intTy, 0); // getCacheAlignment()
     206    Constant * const offset = ConstantInt::get(offTy, 0); // getCacheAlignment()
    207207    Value * const ptr = CreateCall(fMMap, {Constant::getNullValue(voidPtrTy), size, prot, flags, fd, offset});
    208208    CreateAssert(CreateICmpNE(CreatePtrToInt(ptr, getSizeTy()), getSize((size_t)MAP_FAILED)), "CreateFileSourceMMap: mmap failed to allocate memory");
Note: See TracChangeset for help on using the changeset viewer.