diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 21:20:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 21:20:11 +0000 |
commit | 2ad9c2b4a298c04bcbddc80b50f681e712dfbeba (patch) | |
tree | d10917056c1d76bf8cffba92d7d0a89af135e9ac /lib/Core/Memory.cpp | |
parent | c753b579533997ba1ebc4c1aeeb22d474681ea94 (diff) | |
download | klee-2ad9c2b4a298c04bcbddc80b50f681e712dfbeba.tar.gz |
Kill off ExtractExpr::createByteOff.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core/Memory.cpp')
-rw-r--r-- | lib/Core/Memory.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp index 05c226d3..d2c1dd0e 100644 --- a/lib/Core/Memory.cpp +++ b/lib/Core/Memory.cpp @@ -455,11 +455,11 @@ ref<Expr> ObjectState::read(unsigned offset, Expr::Width width) const { } ref<Expr> ObjectState::read1(unsigned offset) const { - return ExtractExpr::createByteOff(read8(offset), 0, Expr::Bool); + return ExtractExpr::create(read8(offset), 0, Expr::Bool); } ref<Expr> ObjectState::read1(ref<Expr> offset) const { - return ExtractExpr::createByteOff(read8(offset), 0, Expr::Bool); + return ExtractExpr::create(read8(offset), 0, Expr::Bool); } ref<Expr> ObjectState::read16(unsigned offset) const { @@ -676,11 +676,11 @@ void ObjectState::write16(unsigned offset, uint16_t value) { void ObjectState::write16(unsigned offset, ref<Expr> value) { if (kMachineByteOrder == machine::MSB) { - write8(offset+0, ExtractExpr::createByteOff(value, 1)); - write8(offset+1, ExtractExpr::createByteOff(value, 0)); + write8(offset+0, ExtractExpr::create(value, 8, Expr::Int8)); + write8(offset+1, ExtractExpr::create(value, 0, Expr::Int8)); } else { - write8(offset+1, ExtractExpr::createByteOff(value, 1)); - write8(offset+0, ExtractExpr::createByteOff(value, 0)); + write8(offset+1, ExtractExpr::create(value, 8, Expr::Int8)); + write8(offset+0, ExtractExpr::create(value, 0, Expr::Int8)); } } @@ -689,17 +689,17 @@ void ObjectState::write16(ref<Expr> offset, ref<Expr> value) { if (kMachineByteOrder == machine::MSB) { write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,1)); + ExtractExpr::create(value, 8, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,0)); + ExtractExpr::create(value, 0, Expr::Int8)); } else { write8(AddExpr::create(offset, ConstantExpr::create(1, kMachinePointerType)), - ExtractExpr::createByteOff(value,1)); + ExtractExpr::create(value, 8, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,0)); + ExtractExpr::create(value, 0, Expr::Int8)); } } @@ -719,15 +719,15 @@ void ObjectState::write32(unsigned offset, uint32_t value) { void ObjectState::write32(unsigned offset, ref<Expr> value) { if (kMachineByteOrder == machine::MSB) { - write8(offset+0, ExtractExpr::createByteOff(value, 3)); - write8(offset+1, ExtractExpr::createByteOff(value, 2)); - write8(offset+2, ExtractExpr::createByteOff(value, 1)); - write8(offset+3, ExtractExpr::createByteOff(value, 0)); + write8(offset+0, ExtractExpr::create(value, 24, Expr::Int8)); + write8(offset+1, ExtractExpr::create(value, 16, Expr::Int8)); + write8(offset+2, ExtractExpr::create(value, 8, Expr::Int8)); + write8(offset+3, ExtractExpr::create(value, 0, Expr::Int8)); } else { - write8(offset+3, ExtractExpr::createByteOff(value, 3)); - write8(offset+2, ExtractExpr::createByteOff(value, 2)); - write8(offset+1, ExtractExpr::createByteOff(value, 1)); - write8(offset+0, ExtractExpr::createByteOff(value, 0)); + write8(offset+3, ExtractExpr::create(value, 24, Expr::Int8)); + write8(offset+2, ExtractExpr::create(value, 16, Expr::Int8)); + write8(offset+1, ExtractExpr::create(value, 8, Expr::Int8)); + write8(offset+0, ExtractExpr::create(value, 0, Expr::Int8)); } } @@ -735,29 +735,29 @@ void ObjectState::write32(ref<Expr> offset, ref<Expr> value) { if (kMachineByteOrder == machine::MSB) { write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,3)); + ExtractExpr::create(value, 24, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(1, kMachinePointerType)), - ExtractExpr::createByteOff(value,2)); + ExtractExpr::create(value, 16, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(2, kMachinePointerType)), - ExtractExpr::createByteOff(value,1)); + ExtractExpr::create(value, 8, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(3, kMachinePointerType)), - ExtractExpr::createByteOff(value,0)); + ExtractExpr::create(value, 0, Expr::Int8)); } else { write8(AddExpr::create(offset, ConstantExpr::create(3, kMachinePointerType)), - ExtractExpr::createByteOff(value,3)); + ExtractExpr::create(value, 24, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(2, kMachinePointerType)), - ExtractExpr::createByteOff(value,2)); + ExtractExpr::create(value, 16, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(1, kMachinePointerType)), - ExtractExpr::createByteOff(value,1)); + ExtractExpr::create(value, 8, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,0)); + ExtractExpr::create(value, 0, Expr::Int8)); } } @@ -785,23 +785,23 @@ void ObjectState::write64(unsigned offset, uint64_t value) { void ObjectState::write64(unsigned offset, ref<Expr> value) { if (kMachineByteOrder == machine::MSB) { - write8(offset+0, ExtractExpr::createByteOff(value, 7)); - write8(offset+1, ExtractExpr::createByteOff(value, 6)); - write8(offset+2, ExtractExpr::createByteOff(value, 5)); - write8(offset+3, ExtractExpr::createByteOff(value, 4)); - write8(offset+4, ExtractExpr::createByteOff(value, 3)); - write8(offset+5, ExtractExpr::createByteOff(value, 2)); - write8(offset+6, ExtractExpr::createByteOff(value, 1)); - write8(offset+7, ExtractExpr::createByteOff(value, 0)); + write8(offset+0, ExtractExpr::create(value, 56, Expr::Int8)); + write8(offset+1, ExtractExpr::create(value, 48, Expr::Int8)); + write8(offset+2, ExtractExpr::create(value, 40, Expr::Int8)); + write8(offset+3, ExtractExpr::create(value, 32, Expr::Int8)); + write8(offset+4, ExtractExpr::create(value, 24, Expr::Int8)); + write8(offset+5, ExtractExpr::create(value, 16, Expr::Int8)); + write8(offset+6, ExtractExpr::create(value, 8, Expr::Int8)); + write8(offset+7, ExtractExpr::create(value, 0, Expr::Int8)); } else { - write8(offset+7, ExtractExpr::createByteOff(value, 7)); - write8(offset+6, ExtractExpr::createByteOff(value, 6)); - write8(offset+5, ExtractExpr::createByteOff(value, 5)); - write8(offset+4, ExtractExpr::createByteOff(value, 4)); - write8(offset+3, ExtractExpr::createByteOff(value, 3)); - write8(offset+2, ExtractExpr::createByteOff(value, 2)); - write8(offset+1, ExtractExpr::createByteOff(value, 1)); - write8(offset+0, ExtractExpr::createByteOff(value, 0)); + write8(offset+7, ExtractExpr::create(value, 56, Expr::Int8)); + write8(offset+6, ExtractExpr::create(value, 48, Expr::Int8)); + write8(offset+5, ExtractExpr::create(value, 40, Expr::Int8)); + write8(offset+4, ExtractExpr::create(value, 32, Expr::Int8)); + write8(offset+3, ExtractExpr::create(value, 24, Expr::Int8)); + write8(offset+2, ExtractExpr::create(value, 16, Expr::Int8)); + write8(offset+1, ExtractExpr::create(value, 8, Expr::Int8)); + write8(offset+0, ExtractExpr::create(value, 0, Expr::Int8)); } } @@ -809,53 +809,53 @@ void ObjectState::write64(ref<Expr> offset, ref<Expr> value) { if (kMachineByteOrder == machine::MSB) { write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,7)); + ExtractExpr::create(value, 56, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(1, kMachinePointerType)), - ExtractExpr::createByteOff(value,6)); + ExtractExpr::create(value, 48, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(2, kMachinePointerType)), - ExtractExpr::createByteOff(value,5)); + ExtractExpr::create(value, 40, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(3, kMachinePointerType)), - ExtractExpr::createByteOff(value,4)); + ExtractExpr::create(value, 32, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(4, kMachinePointerType)), - ExtractExpr::createByteOff(value,3)); + ExtractExpr::create(value, 24, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(5, kMachinePointerType)), - ExtractExpr::createByteOff(value,2)); + ExtractExpr::create(value, 16, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(6, kMachinePointerType)), - ExtractExpr::createByteOff(value,1)); + ExtractExpr::create(value, 8, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(7, kMachinePointerType)), - ExtractExpr::createByteOff(value,0)); + ExtractExpr::create(value, 0, Expr::Int8)); } else { write8(AddExpr::create(offset, ConstantExpr::create(7, kMachinePointerType)), - ExtractExpr::createByteOff(value,7)); + ExtractExpr::create(value, 56, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(6, kMachinePointerType)), - ExtractExpr::createByteOff(value,6)); + ExtractExpr::create(value, 48, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(5, kMachinePointerType)), - ExtractExpr::createByteOff(value,5)); + ExtractExpr::create(value, 40, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(4, kMachinePointerType)), - ExtractExpr::createByteOff(value,4)); + ExtractExpr::create(value, 32, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(3, kMachinePointerType)), - ExtractExpr::createByteOff(value,3)); + ExtractExpr::create(value, 24, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(2, kMachinePointerType)), - ExtractExpr::createByteOff(value,2)); + ExtractExpr::create(value, 16, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(1, kMachinePointerType)), - ExtractExpr::createByteOff(value,1)); + ExtractExpr::create(value, 8, Expr::Int8)); write8(AddExpr::create(offset, ConstantExpr::create(0, kMachinePointerType)), - ExtractExpr::createByteOff(value,0)); + ExtractExpr::create(value, 0, Expr::Int8)); } } |