name
string | code
string | asm
string | file
string |
|---|---|---|---|
llvm::getArm64ECMangledFunctionName[abi:cxx11](llvm::StringRef)
|
std::optional<std::string> llvm::getArm64ECMangledFunctionName(StringRef Name) {
bool IsCppFn = Name[0] == '?';
if (IsCppFn && Name.contains("$$h"))
return std::nullopt;
if (!IsCppFn && Name[0] == '#')
return std::nullopt;
StringRef Prefix = "$$h";
size_t InsertIdx = 0;
if (IsCppFn) {
InsertIdx = Name.find("@@");
size_t ThreeAtSignsIdx = Name.find("@@@");
if (InsertIdx != std::string::npos && InsertIdx != ThreeAtSignsIdx) {
InsertIdx += 2;
} else {
InsertIdx = Name.find("@");
if (InsertIdx != std::string::npos)
InsertIdx++;
}
} else {
Prefix = "#";
}
return std::optional<std::string>(
(Name.substr(0, InsertIdx) + Prefix + Name.substr(InsertIdx)).str());
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movb (%rsi), %al
cmpb $0x3f, %al
jne 0x2a750c6
leaq 0x2619af9(%rip), %rsi # 0x508eba6
leaq 0x8(%rsp), %rdi
movl $0x3, %edx
xorl %ecx, %ecx
callq 0x2b56c06
cmpq $-0x1, %rax
jne 0x2a750d0
jmp 0x2a750e1
movq 0x8(%rsp), %rcx
cmpb $0x23, (%rcx)
jne 0x2a750d9
movb $0x0, 0x20(%rbx)
jmp 0x2a7525d
cmpb $0x3f, %al
jne 0x2a75161
leaq 0x263f818(%rip), %rsi # 0x50b4900
leaq 0x8(%rsp), %r15
movl $0x2, %edx
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x2b56c06
movq %rax, %r14
leaq 0x252c216(%rip), %rsi # 0x4fa131c
movl $0x3, %r12d
movl $0x3, %edx
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x2b56c06
cmpq $-0x1, %r14
je 0x2a75132
cmpq %rax, %r14
je 0x2a75132
addq $0x2, %r14
movl $0x3, %r12d
jmp 0x2a75158
leaq 0x83adfa(%rip), %rsi # 0x32aff33
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x2b56c06
incq %rax
movq $-0x1, %r14
cmovneq %rax, %r14
leaq 0x2619a47(%rip), %rcx # 0x508eba6
jmp 0x2a75171
movl $0x1, %r12d
leaq 0x1d53122(%rip), %rcx # 0x47c8290
xorl %r14d, %r14d
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
cmpq %r14, %rax
cmovbq %rax, %r14
movq %rdx, 0x38(%rsp)
movq %r14, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %r12, 0x50(%rsp)
movw $0x505, 0x58(%rsp) # imm = 0x505
movb $0x5, %cl
xorl %esi, %esi
testb %sil, %sil
jne 0x2a751c5
addq %r14, %rdx
subq %r14, %rax
movl $0x5, %esi
cmpl $0x1, %esi
jne 0x2a751c9
leaq 0x68(%rsp), %rsi
movq %rdx, -0x8(%rsi)
movb $0x1, %dl
movb $0x5, %cl
jmp 0x2a751fa
movb $0x1, %dl
jmp 0x2a751fd
leaq 0x78(%rsp), %rsi
leaq 0x38(%rsp), %rdi
cmpb $0x1, 0x21(%rdi)
movzbl %cl, %r8d
movl $0x2, %ecx
cmovel %r8d, %ecx
movq 0x8(%rdi), %r8
cmoveq (%rdi), %rdi
movq %rdi, -0x18(%rsi)
movq %r8, -0x10(%rsi)
movq %rdx, -0x8(%rsi)
movb $0x5, %dl
movq %rax, (%rsi)
leaq 0x60(%rsp), %rsi
movb %cl, 0x20(%rsi)
movb %dl, 0x21(%rsi)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x2b6085c
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x28(%rsp), %rax
cmpq %rax, %rdx
je 0x2a75237
movq %rdx, (%rbx)
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x2a7523d
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movb $0x1, 0x20(%rbx)
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
/IR/Mangler.cpp
|
llvm::ReplaceableMetadataImpl::isReplaceable(llvm::Metadata const&)
|
bool ReplaceableMetadataImpl::isReplaceable(const Metadata &MD) {
if (auto *N = dyn_cast<MDNode>(&MD))
return !N->isResolved() || N->isAlwaysReplaceable();
return isa<ValueAsMetadata>(&MD) || isa<DIArgList>(&MD);
}
|
pushq %rbx
movq %rdi, %rbx
callq 0xb1e29e
xorl %edx, %edx
testb %al, %al
cmovneq %rbx, %rdx
je 0x2a75a97
movb 0x1(%rdx), %sil
andb $0x7f, %sil
movb $0x1, %cl
cmpb $0x2, %sil
je 0x2a75a97
cmpl $0x0, -0x8(%rdx)
jne 0x2a75a97
cmpb $0x1e, (%rdx)
sete %cl
testb %al, %al
jne 0x2a75aad
movb (%rbx), %al
leal -0x1(%rax), %ecx
cmpb $0x2, %cl
setb %dl
cmpb $0x4, %al
sete %cl
orb %dl, %cl
andb $0x1, %cl
movl %ecx, %eax
popq %rbx
retq
|
/IR/Metadata.cpp
|
llvm::ReplaceableMetadataImpl::getAllDbgVariableRecordUsers()
|
SmallVector<DbgVariableRecord *>
ReplaceableMetadataImpl::getAllDbgVariableRecordUsers() {
SmallVector<std::pair<OwnerTy, uint64_t> *> DVRUsersWithID;
for (auto Pair : UseMap) {
OwnerTy Owner = Pair.second.first;
if (Owner.isNull())
continue;
if (!Owner.is<DebugValueUser *>())
continue;
DVRUsersWithID.push_back(&UseMap[Pair.first]);
}
// Order DbgVariableRecord users in reverse-creation order. Normal dbg.value
// users of MetadataAsValues are ordered by their UseList, i.e. reverse order
// of when they were added: we need to replicate that here. The structure of
// debug-info output depends on the ordering of intrinsics, thus we need
// to keep them consistent for comparisons sake.
llvm::sort(DVRUsersWithID, [](auto UserA, auto UserB) {
return UserA->second > UserB->second;
});
SmallVector<DbgVariableRecord *> DVRUsers;
for (auto UserWithID : DVRUsersWithID)
DVRUsers.push_back(UserWithID->first.get<DebugValueUser *>()->getUser());
return DVRUsers;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x600000000, %rcx # imm = 0x600000000
movq %rcx, -0x8(%rax)
movl 0x10(%rsi), %eax
cmpl $0x1, %eax
ja 0x2a75d79
leaq 0x18(%r14), %rcx
testl %eax, %eax
cmoveq 0x18(%r14), %rcx
movl $0x4, %edx
cmovel 0x20(%r14), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,8), %rbp
movq %rbp, %r13
jmp 0x2a75dcc
leaq 0x18(%r14), %rbp
testb $0x1, %al
cmoveq 0x18(%r14), %rbp
movl $0x4, %ecx
cmovel 0x20(%r14), %ecx
leaq (%rcx,%rcx,2), %rdx
leaq (,%rdx,8), %r13
addq %rbp, %r13
testl %ecx, %ecx
je 0x2a75dcc
leaq (,%rcx,8), %rcx
leaq (%rcx,%rcx,2), %rcx
movl $0x1000, %edx # imm = 0x1000
movq (%rbp), %rsi
orq %rdx, %rsi
cmpq $-0x1000, %rsi # imm = 0xF000
jne 0x2a75dcc
addq $0x18, %rbp
addq $-0x18, %rcx
jne 0x2a75db2
leaq 0x18(%r14), %rcx
testb $0x1, %al
cmoveq 0x18(%r14), %rcx
movl $0x4, %eax
cmovel 0x20(%r14), %eax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %r15
cmpq %r15, %rbp
je 0x2a75e58
addq $0x10, %r14
movl $0x1000, %r12d # imm = 0x1000
movups (%rbp), %xmm0
movaps %xmm0, (%rsp)
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x4, %rax
setb %cl
andl $0x3, %eax
cmpl $0x2, %eax
setne %al
orb %cl, %al
jne 0x2a75e3b
movq %r14, %rdi
movq %rsp, %rsi
callq 0x2a7e590
leaq 0x8(%rax), %rsi
leaq 0x18(%rsp), %rdi
callq 0x2a75ce6
addq $0x18, %rbp
cmpq %r13, %rbp
je 0x2a75e53
movq (%rbp), %rax
orq %r12, %rax
cmpq $-0x1000, %rax # imm = 0xF000
je 0x2a75e3b
cmpq %r15, %rbp
jne 0x2a75df8
movl 0x20(%rsp), %r15d
testq %r15, %r15
je 0x2a75edd
movq 0x18(%rsp), %r12
leaq (%r12,%r15,8), %r14
bsrq %r15, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2a7ec43
cmpl $0x11, %r15d
jb 0x2a75ed2
leaq 0x80(%r12), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x2a7ee83
movq -0x8(%r15), %rcx
movq (%r15), %rax
movq 0x8(%rax), %rdx
movq %r15, %rsi
cmpq 0x8(%rcx), %rdx
jbe 0x2a75ec4
movq %r15, %rsi
movq %rcx, (%rsi)
movq -0x10(%rsi), %rcx
addq $-0x8, %rsi
cmpq 0x8(%rcx), %rdx
ja 0x2a75eb3
movq %rax, (%rsi)
addq $0x8, %r15
cmpq %r14, %r15
jne 0x2a75e9c
jmp 0x2a75edd
movq %r12, %rdi
movq %r14, %rsi
callq 0x2a7ee83
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movabsq $0x600000000, %rax # imm = 0x600000000
movq %rax, 0x8(%rbx)
movl 0x20(%rsp), %r14d
testq %r14, %r14
je 0x2a75f28
movq 0x18(%rsp), %r15
shlq $0x3, %r14
xorl %r12d, %r12d
movq (%r15,%r12), %rax
movq (%rax), %rsi
andq $-0x4, %rsi
addq $-0x28, %rsi
movq %rbx, %rdi
callq 0x1c50b20
addq $0x8, %r12
cmpq %r12, %r14
jne 0x2a75f08
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2a75f3c
callq 0x780910
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/IR/Metadata.cpp
|
llvm::MDString::get(llvm::LLVMContext&, llvm::StringRef)
|
MDString *MDString::get(LLVMContext &Context, StringRef Str) {
auto &Store = Context.pImpl->MDStringCache;
auto I = Store.try_emplace(Str);
auto &MapEntry = I.first->getValue();
if (!I.second)
return &MapEntry;
MapEntry.Entry = &*I.first;
return &MapEntry;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl $0x180, %r15d # imm = 0x180
addq (%rdi), %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2b55ff4
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %eax, %ecx
callq 0x2a80014
movq (%rax), %rax
testb $0x1, %dl
je 0x2a76bf3
movq %rax, 0x10(%rax)
addq $0x8, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
/IR/Metadata.cpp
|
llvm::DIObjCProperty::cloneImpl() const
|
TempDIObjCProperty cloneImpl() const {
return getTemporary(getContext(), getName(), getFile(), getLine(),
getGetterName(), getSetterName(), getAttributes(),
getType());
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movq %rax, %rdi
andq $-0x8, %rdi
testb $0x4, %al
je 0x2a7879c
movq (%rdi), %rdi
leaq -0x10(%rsi), %r10
movq -0x10(%rsi), %r11
testb $0x2, %r11b
jne 0x2a787b9
leal (%r11,%r11), %ecx
andl $0x78, %ecx
movq %r10, %rax
subq %rcx, %rax
jmp 0x2a787bd
movq -0x20(%rsi), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2a787d2
movq 0x8(%rax), %rax
movq (%rax), %rdx
addq $0x18, %rax
jmp 0x2a787d6
xorl %edx, %edx
xorl %eax, %eax
testb $0x2, %r11b
jne 0x2a787ec
leal (%r11,%r11), %r8d
andl $0x78, %r8d
movq %r10, %rcx
subq %r8, %rcx
jmp 0x2a787f0
movq -0x20(%rsi), %rcx
testb $0x2, %r11b
jne 0x2a78806
leal (%r11,%r11), %r9d
andl $0x78, %r9d
movq %r10, %r8
subq %r9, %r8
jmp 0x2a7880a
movq -0x20(%rsi), %r8
movq 0x10(%r8), %r8
testq %r8, %r8
je 0x2a78820
movq 0x8(%r8), %r15
movq (%r15), %r14
addq $0x18, %r15
jmp 0x2a78826
xorl %r14d, %r14d
xorl %r15d, %r15d
testb $0x2, %r11b
jne 0x2a7883c
leal (%r11,%r11), %r9d
andl $0x78, %r9d
movq %r10, %r8
subq %r9, %r8
jmp 0x2a78840
movq -0x20(%rsi), %r8
movq 0x18(%r8), %r8
testq %r8, %r8
je 0x2a78857
movq 0x8(%r8), %r13
movq (%r13), %r12
addq $0x18, %r13
jmp 0x2a7885d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%rcx), %rcx
movl 0x10(%rsi), %r8d
movl 0x14(%rsi), %r9d
testb $0x2, %r11b
jne 0x2a7887b
addl %r11d, %r11d
andl $0x78, %r11d
subq %r11, %r10
jmp 0x2a7887f
movq -0x20(%rsi), %r10
movq 0x20(%r10), %rsi
movq %r13, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movq %r15, 0x40(%rsp)
movq %r14, 0x48(%rsp)
movups 0x50(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rsi, 0x20(%rsp)
movl $0x1, 0x30(%rsp)
movl $0x2, 0x28(%rsp)
movq %rax, %rsi
callq 0x29fcc1e
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/llvm/IR/DebugInfoMetadata.h
|
llvm::MDNode::makeDistinct()
|
void MDNode::makeDistinct() {
assert(isTemporary() && "Expected this to be temporary");
assert(!isResolved() && "Expected this to be unresolved");
// Drop RAUW support and store as a distinct node.
dropReplaceableUses();
storeDistinctInContext();
assert(isDistinct() && "Expected this to be distinct");
assert(isResolved() && "Expected this to be resolved");
}
|
pushq %rbx
movq %rdi, %rbx
callq 0x2a7916a
movq %rbx, %rdi
popq %rbx
jmp 0x2a791be
|
/IR/Metadata.cpp
|
llvm::MDNode::getMergedProfMetadata(llvm::MDNode*, llvm::MDNode*, llvm::Instruction const*, llvm::Instruction const*)
|
MDNode *MDNode::getMergedProfMetadata(MDNode *A, MDNode *B,
const Instruction *AInstr,
const Instruction *BInstr) {
if (!(A && B)) {
return A ? A : B;
}
assert(AInstr->getMetadata(LLVMContext::MD_prof) == A &&
"Caller should guarantee");
assert(BInstr->getMetadata(LLVMContext::MD_prof) == B &&
"Caller should guarantee");
const CallInst *ACall = dyn_cast<CallInst>(AInstr);
const CallInst *BCall = dyn_cast<CallInst>(BInstr);
// Both ACall and BCall are direct callsites.
if (ACall && BCall && ACall->getCalledFunction() &&
BCall->getCalledFunction())
return mergeDirectCallProfMetadata(A, B, AInstr, BInstr);
// The rest of the cases are not implemented but could be added
// when there are use cases.
return nullptr;
}
|
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %r8b
testb %r8b, %al
je 0x2a7b9ba
xorl %eax, %eax
cmpb $0x55, (%rdx)
movl $0x0, %r8d
cmoveq %rdx, %r8
sete %r9b
cmpb $0x55, (%rcx)
sete %r10b
cmovneq %rax, %rcx
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x2a7b9c4
movq -0x20(%r8), %r9
xorl %eax, %eax
testq %r9, %r9
je 0x2a7b9a8
cmpb $0x0, (%r9)
cmoveq %r9, %rax
testq %rax, %rax
je 0x2a7b9b7
movq 0x18(%rax), %rax
cmpq 0x50(%r8), %rax
je 0x2a7b9c5
xorl %eax, %eax
retq
testq %rdi, %rdi
cmovneq %rdi, %rsi
movq %rsi, %rax
retq
movq -0x20(%rcx), %r8
xorl %eax, %eax
testq %r8, %r8
je 0x2a7b9d8
cmpb $0x0, (%r8)
cmoveq %r8, %rax
testq %rax, %rax
je 0x2a7b9b7
movq 0x18(%rax), %rax
cmpq 0x50(%rcx), %rax
jne 0x2a7b9b7
jmp 0x2a7b762
|
/IR/Metadata.cpp
|
llvm::Value::getAllMetadata(llvm::SmallVectorImpl<std::pair<unsigned int, llvm::MDNode*>>&) const
|
bool hasMetadata() const { return (bool)HasMetadata; }
|
testb $0x20, 0x7(%rdi)
jne 0x2a7ca2d
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2a9f5fc
movl $0xaa0, %edi # imm = 0xAA0
addq (%rax), %rdi
movq %r14, %rsi
callq 0x2a822bc
leaq 0x8(%rax), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a7c5ba
nop
|
/llvm/IR/Value.h
|
std::pair<llvm::DenseMapIterator<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>, llvm::DenseMapInfo<void*, void>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>, false>, bool> llvm::DenseMapBase<llvm::SmallDenseMap<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>, 4u, llvm::DenseMapInfo<void*, void>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>>, void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>, llvm::DenseMapInfo<void*, void>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>>::try_emplace<std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>(void*&&, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>&&)
|
std::pair<iterator, bool> try_emplace(KeyT &&Key, Ts &&... Args) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return std::make_pair(makeIterator(TheBucket,
shouldReverseIterate<KeyT>()
? getBuckets()
: getBucketsEnd(),
*this, true),
false); // Already in map.
// Otherwise, insert the new element.
TheBucket =
InsertIntoBucket(TheBucket, std::move(Key), std::forward<Ts>(Args)...);
return std::make_pair(makeIterator(TheBucket,
shouldReverseIterate<KeyT>()
? getBuckets()
: getBucketsEnd(),
*this, true),
true);
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r13
movq %rsi, %rdi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x2a7e5de
movl %eax, %ecx
movq (%r13), %rax
testb %cl, %cl
je 0x2a7ef4a
xorl %ecx, %ecx
jmp 0x2a7ef6c
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x2a7e67e
movq (%r12), %rcx
movq %rcx, (%rax)
movups (%r15), %xmm0
movups %xmm0, 0x8(%rax)
movb $0x1, %cl
testb $0x1, (%r14)
leaq 0x8(%r14), %rdx
cmoveq 0x8(%r14), %rdx
movl $0x4, %esi
cmovel 0x10(%r14), %esi
leaq (%rsi,%rsi,2), %rsi
leaq (%rdx,%rsi,8), %rdx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movb %cl, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/llvm/ADT/DenseMap.h
|
bool llvm::DenseMapBase<llvm::SmallDenseMap<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>, 4u, llvm::DenseMapInfo<void*, void>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>>, void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>, llvm::DenseMapInfo<void*, void>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>>::LookupBucketFor<void const*>(void const* const&, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>> const*&) const
|
const BucketT *getBuckets() const {
return Small ? getInlineBuckets() : getLargeRep()->Buckets;
}
|
leaq 0x8(%rdi), %rcx
testb $0x1, (%rdi)
cmoveq 0x8(%rdi), %rcx
movl $0x4, %r8d
cmovel 0x10(%rdi), %r8d
testl %r8d, %r8d
je 0x2a7f039
pushq %rbx
movl (%rsi), %edi
movl %edi, %eax
shrl $0x4, %eax
shrl $0x9, %edi
xorl %eax, %edi
decl %r8d
andl %r8d, %edi
movl $0x1, %r10d
xorl %r9d, %r9d
movl %edi, %r11d
leaq (%r11,%r11,2), %r11
leaq (%rcx,%r11,8), %r11
movq (%r11), %rbx
cmpq %rbx, (%rsi)
jne 0x2a7f000
movq %r11, (%rdx)
movb $0x1, %al
xorl %r11d, %r11d
testb %r11b, %r11b
jne 0x2a7efde
jmp 0x2a7f036
cmpq $-0x1000, %rbx # imm = 0xF000
jne 0x2a7f01a
testq %r9, %r9
cmovneq %r9, %r11
movq %r11, (%rdx)
xorl %r11d, %r11d
xorl %eax, %eax
jmp 0x2a7eff9
xorq $-0x2000, %rbx # imm = 0xE000
orq %r9, %rbx
cmoveq %r11, %r9
addl %r10d, %edi
incl %r10d
andl %r8d, %edi
movb $0x1, %r11b
jmp 0x2a7eff9
popq %rbx
jmp 0x2a7f042
movq $0x0, (%rdx)
xorl %eax, %eax
andb $0x1, %al
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::SmallDenseMap<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>, 4u, llvm::DenseMapInfo<void*, void>, llvm::detail::DenseMapPair<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*, llvm::DebugValueUser*>, unsigned long>>>::shrink_and_clear()
|
void shrink_and_clear() {
unsigned OldSize = this->size();
this->destroyAll();
// Reduce the number of buckets.
unsigned NewNumBuckets = 0;
if (OldSize) {
NewNumBuckets = 1 << (Log2_32_Ceil(OldSize) + 1);
if (NewNumBuckets > InlineBuckets && NewNumBuckets < 64u)
NewNumBuckets = 64;
}
if ((Small && NewNumBuckets <= InlineBuckets) ||
(!Small && NewNumBuckets == getLargeRep()->NumBuckets)) {
this->BaseT::initEmpty();
return;
}
deallocateBuckets();
init(NewNumBuckets);
}
|
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %eax
xorl %ebp, %ebp
cmpl $0x2, %eax
jb 0x2a7f677
movl %eax, %ecx
shrl %ecx
decl %ecx
je 0x2a7f659
bsrl %ecx, %edx
xorl $0x1f, %edx
jmp 0x2a7f65e
movl $0x20, %edx
movb $0x21, %cl
subb %dl, %cl
movl $0x1, %esi
shll %cl, %esi
addl $-0x1c, %edx
cmpl $0x3, %edx
movl $0x40, %ebp
cmovael %esi, %ebp
andl $0x1, %eax
je 0x2a7f681
cmpl $0x5, %ebp
jb 0x2a7f692
testl %eax, %eax
jne 0x2a7f775
cmpl 0x10(%rbx), %ebp
jne 0x2a7f775
movl %eax, (%rbx)
movl $0x0, 0x4(%rbx)
leaq 0x8(%rbx), %rcx
testl %eax, %eax
cmoveq 0x8(%rbx), %rcx
movl $0x4, %eax
cmovel 0x10(%rbx), %eax
testl %eax, %eax
je 0x2a7f76e
movl %eax, %eax
leaq (%rax,%rax,2), %rax
leaq -0x18(,%rax,8), %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
movq %rdx, %xmm0
shrq $0x4, %rdx
addq $0x2, %rdx
andq $-0x2, %rdx
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
psrlq $0x4, %xmm0
xorl %eax, %eax
movdqa 0x135929(%rip), %xmm1 # 0x2bb5020
movdqa 0x135931(%rip), %xmm2 # 0x2bb5030
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rax, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x2a7f74a
movq $-0x1000, (%rcx) # imm = 0xF000
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x2a7f761
movq $-0x1000, 0x18(%rcx) # imm = 0xF000
addq $0x2, %rax
addq $0x30, %rcx
cmpq %rax, %rdx
jne 0x2a7f707
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testl %eax, %eax
jne 0x2a7f792
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rsi
movl $0x8, %edx
callq 0x2b410f1
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2a10af2
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::Value*, llvm::ValueAsMetadata*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::ValueAsMetadata*>>, llvm::Value*, llvm::ValueAsMetadata*, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, llvm::ValueAsMetadata*>>::moveFromOldBuckets(llvm::detail::DenseMapPair<llvm::Value*, llvm::ValueAsMetadata*>*, llvm::detail::DenseMapPair<llvm::Value*, llvm::ValueAsMetadata*>*)
|
void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) {
initEmpty();
// Insert all the old elements.
const KeyT EmptyKey = getEmptyKey();
const KeyT TombstoneKey = getTombstoneKey();
for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) {
if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) &&
!KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) {
// Insert the key/value into the new table.
BucketT *DestBucket;
bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket);
(void)FoundVal; // silence warning.
assert(!FoundVal && "Key already in new map?");
DestBucket->getFirst() = std::move(B->getFirst());
::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond()));
incrementNumEntries();
// Free the value.
B->getSecond().~ValueT();
}
B->getFirst().~KeyT();
}
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x8(%rdi)
movl 0x10(%rdi), %ecx
testq %rcx, %rcx
je 0x2a7ffb9
movq (%r15), %rax
movabsq $0xfffffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFFFF
addq %rdx, %rcx
andq %rcx, %rdx
andl $0x1, %ecx
negq %rcx
addq %rdx, %rcx
addq $0x2, %rcx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
addq $0x10, %rax
xorl %edx, %edx
movdqa 0x1350de(%rip), %xmm1 # 0x2bb5020
movdqa 0x1350e6(%rip), %xmm2 # 0x2bb5030
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x2a7ff96
movq $-0x1000, -0x10(%rax) # imm = 0xF000
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x2a7ffac
movq $-0x1000, (%rax) # imm = 0xF000
addq $0x2, %rdx
addq $0x20, %rax
cmpq %rdx, %rcx
jne 0x2a7ff52
cmpq %rbx, %r14
je 0x2a80005
movl $0x1000, %r13d # imm = 0x1000
leaq 0x8(%rsp), %r12
movq (%r14), %rax
orq %r13, %rax
cmpq $-0x1000, %rax # imm = 0xF000
je 0x2a7fffc
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2a7fc92
movq 0x8(%rsp), %rax
movq (%r14), %rcx
movq %rcx, (%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
incl 0x8(%r15)
addq $0x10, %r14
cmpq %rbx, %r14
jne 0x2a7ffc9
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::DINamespace*, llvm::detail::DenseSetEmpty, llvm::MDNodeInfo<llvm::DINamespace>, llvm::detail::DenseSetPair<llvm::DINamespace*>>, llvm::DINamespace*, llvm::detail::DenseSetEmpty, llvm::MDNodeInfo<llvm::DINamespace>, llvm::detail::DenseSetPair<llvm::DINamespace*>>::erase(llvm::DINamespace* const&)
|
bool erase(const KeyT &Val) {
BucketT *TheBucket;
if (!LookupBucketFor(Val, TheBucket))
return false; // not in map.
TheBucket->getSecond().~ValueT();
TheBucket->getFirst() = getTombstoneKey();
decrementNumEntries();
incrementNumTombstones();
return true;
}
|
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x2a1967e
testb %al, %al
je 0x2a80cfe
movq 0x8(%rsp), %rcx
movq $-0x2000, (%rcx) # imm = 0xE000
movq 0x8(%rbx), %xmm0
paddd 0x922957(%rip), %xmm0 # 0x33a3650
movq %xmm0, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
|
/llvm/ADT/DenseMap.h
|
bool llvm::MDNodeOpsKey::compareOps<llvm::MDTuple>(llvm::MDTuple const*, unsigned int) const
|
unsigned getHash() const { return Hash; }
|
movl 0x20(%rdi), %eax
cmpl 0x4(%rsi), %eax
jne 0x2a81120
movl %edx, %ecx
movq %rsi, %rdx
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x2a81123
movq (%rdi), %rdi
jmp 0x2a11caa
xorl %eax, %eax
retq
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rsi
movq %rax, %rdi
jmp 0x2a11c36
nop
|
/IR/LLVMContextImpl.h
|
bool llvm::DenseMapBase<llvm::DenseMap<llvm::Value const*, llvm::MDAttachments, llvm::DenseMapInfo<llvm::Value const*, void>, llvm::detail::DenseMapPair<llvm::Value const*, llvm::MDAttachments>>, llvm::Value const*, llvm::MDAttachments, llvm::DenseMapInfo<llvm::Value const*, void>, llvm::detail::DenseMapPair<llvm::Value const*, llvm::MDAttachments>>::LookupBucketFor<llvm::Value const*>(llvm::Value const* const&, llvm::detail::DenseMapPair<llvm::Value const*, llvm::MDAttachments> const*&) const
|
unsigned getNumBuckets() const {
return NumBuckets;
}
|
movl 0x10(%rdi), %ecx
testl %ecx, %ecx
je 0x2a8238a
pushq %rbx
movq (%rdi), %rdi
movl (%rsi), %r8d
movl %r8d, %eax
shrl $0x4, %eax
shrl $0x9, %r8d
xorl %eax, %r8d
decl %ecx
andl %ecx, %r8d
movl $0x1, %r10d
xorl %r9d, %r9d
movl %r8d, %r11d
leaq (%r11,%r11,4), %r11
leaq (%rdi,%r11,8), %r11
movq (%r11), %rbx
cmpq %rbx, (%rsi)
jne 0x2a82351
movq %r11, (%rdx)
movb $0x1, %al
xorl %r11d, %r11d
testb %r11b, %r11b
jne 0x2a8232f
jmp 0x2a82387
cmpq $-0x1000, %rbx # imm = 0xF000
jne 0x2a8236b
testq %r9, %r9
cmovneq %r9, %r11
movq %r11, (%rdx)
xorl %r11d, %r11d
xorl %eax, %eax
jmp 0x2a8234a
xorq $-0x2000, %rbx # imm = 0xE000
orq %r9, %rbx
cmoveq %r11, %r9
addl %r10d, %r8d
incl %r10d
andl %ecx, %r8d
movb $0x1, %r11b
jmp 0x2a8234a
popq %rbx
jmp 0x2a82393
movq $0x0, (%rdx)
xorl %eax, %eax
andb $0x1, %al
retq
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::Value const*, llvm::MDAttachments, llvm::DenseMapInfo<llvm::Value const*, void>, llvm::detail::DenseMapPair<llvm::Value const*, llvm::MDAttachments>>, llvm::Value const*, llvm::MDAttachments, llvm::DenseMapInfo<llvm::Value const*, void>, llvm::detail::DenseMapPair<llvm::Value const*, llvm::MDAttachments>>::FindAndConstruct(llvm::Value const*&&)
|
value_type& FindAndConstruct(KeyT &&Key) {
BucketT *TheBucket;
if (LookupBucketFor(Key, TheBucket))
return *TheBucket;
return *InsertIntoBucket(TheBucket, std::move(Key));
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0x2a82306
movl %eax, %ecx
movq (%r15), %rax
testb %cl, %cl
jne 0x2a823f3
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2a823fe
movq (%rbx), %rcx
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x100000000, %rcx # imm = 0x100000000
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::SymbolTableListTraits<llvm::GlobalAlias>::addNodeToList(llvm::GlobalAlias*)
|
ItemParentClass *getListOwner() {
size_t Offset = reinterpret_cast<size_t>(
&((ItemParentClass *)nullptr->*ItemParentClass::getSublistAccess(
static_cast<ValueSubClass *>(
nullptr))));
ListTy *Anchor = static_cast<ListTy *>(this);
return reinterpret_cast<ItemParentClass*>(reinterpret_cast<char*>(Anchor)-
Offset);
}
|
leaq -0x28(%rdi), %rax
movq %rax, 0x28(%rsi)
testb $0x10, 0x7(%rsi)
je 0x2a8310b
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
jne 0x2aa2b04
retq
|
/llvm/IR/SymbolTableListTraits.h
|
llvm::Module::createRNG(llvm::StringRef) const
|
std::unique_ptr<RandomNumberGenerator>
Module::createRNG(const StringRef Name) const {
SmallString<32> Salt(Name);
// This RNG is guaranteed to produce the same random stream only
// when the Module ID and thus the input filename is the same. This
// might be problematic if the input filename extension changes
// (e.g. from .c to .bc or .ll).
//
// We could store this salt in NamedMetadata, but this would make
// the parameter non-const. This would unfortunately make this
// interface unusable by any Machine passes, since they only have a
// const reference to their IR Module. Alternatively we can always
// store salt metadata from the Module constructor.
Salt += sys::path::filename(getModuleIdentifier());
return std::unique_ptr<RandomNumberGenerator>(
new RandomNumberGenerator(Salt));
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq (%rcx,%rdx), %rax
leaq 0x18(%rsp), %r12
movq %r12, -0x18(%r12)
movq $0x0, -0x10(%r12)
movq $0x20, -0x8(%r12)
movq %rsp, %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x89893e
movq 0xa8(%r15), %rdi
movq 0xb0(%r15), %rsi
xorl %edx, %edx
callq 0x2b874bf
addq %rax, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x89893e
movl $0x9c8, %edi # imm = 0x9C8
callq 0x7808d0
movq %rax, %r15
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rax, %rdi
callq 0x2b44cc8
movq %r15, (%rbx)
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x2a838e7
callq 0x780910
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/IR/Module.cpp
|
addSDKVersionMD(llvm::VersionTuple const&, llvm::Module&, llvm::StringRef)
|
static void addSDKVersionMD(const VersionTuple &V, Module &M, StringRef Name) {
SmallVector<unsigned, 3> Entries;
Entries.push_back(V.getMajor());
if (auto Minor = V.getMinor()) {
Entries.push_back(*Minor);
if (auto Subminor = V.getSubminor())
Entries.push_back(*Subminor);
// Ignore the 'build' component as it can't be represented in the object
// file.
}
M.addModuleFlag(Module::ModFlagBehavior::Warning, Name,
ConstantDataArray::get(M.getContext(), Entries));
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movabsq $0x300000000, %rax # imm = 0x300000000
movq %rax, -0x8(%r13)
movl (%rdi), %esi
movq %rsp, %rdi
callq 0x81fb4c
movq (%r12), %rsi
testq %rsi, %rsi
jns 0x2a8521a
shrq $0x20, %rsi
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
movq %rsp, %rdi
callq 0x81fb4c
movq 0x8(%r12), %rsi
testl %esi, %esi
jns 0x2a8521a
andl $0x7fffffff, %esi # imm = 0x7FFFFFFF
movq %rsp, %rdi
callq 0x81fb4c
movq (%r15), %rdi
movq (%rsp), %rsi
movl 0x8(%rsp), %edx
callq 0x295a158
movq %rax, %rdi
callq 0x2a75606
movq %r15, %rdi
movl $0x2, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2a84126
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2a85256
callq 0x780910
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/IR/Module.cpp
|
llvm::DenseMapBase<llvm::DenseMap<std::pair<unsigned int, llvm::FunctionType const*>, unsigned int, llvm::DenseMapInfo<std::pair<unsigned int, llvm::FunctionType const*>, void>, llvm::detail::DenseMapPair<std::pair<unsigned int, llvm::FunctionType const*>, unsigned int>>, std::pair<unsigned int, llvm::FunctionType const*>, unsigned int, llvm::DenseMapInfo<std::pair<unsigned int, llvm::FunctionType const*>, void>, llvm::detail::DenseMapPair<std::pair<unsigned int, llvm::FunctionType const*>, unsigned int>>::moveFromOldBuckets(llvm::detail::DenseMapPair<std::pair<unsigned int, llvm::FunctionType const*>, unsigned int>*, llvm::detail::DenseMapPair<std::pair<unsigned int, llvm::FunctionType const*>, unsigned int>*)
|
void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) {
initEmpty();
// Insert all the old elements.
const KeyT EmptyKey = getEmptyKey();
const KeyT TombstoneKey = getTombstoneKey();
for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) {
if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) &&
!KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) {
// Insert the key/value into the new table.
BucketT *DestBucket;
bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket);
(void)FoundVal; // silence warning.
assert(!FoundVal && "Key already in new map?");
DestBucket->getFirst() = std::move(B->getFirst());
::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond()));
incrementNumEntries();
// Free the value.
B->getSecond().~ValueT();
}
B->getFirst().~KeyT();
}
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x8(%rdi)
movl 0x10(%rdi), %ecx
testq %rcx, %rcx
je 0x2a85b21
movq (%r15), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rcx
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $-0x1000, 0x8(%rax) # imm = 0xF000
addq $0x18, %rax
cmpq %rcx, %rax
jne 0x2a85b0a
cmpq %rbx, %r14
je 0x2a85b8d
movq %rsp, %r12
movl (%r14), %eax
cmpl $-0x1, %eax
sete %dl
movq 0x8(%r14), %rcx
cmpq $-0x1000, %rcx # imm = 0xF000
sete %sil
testb %sil, %dl
jne 0x2a85b84
cmpl $-0x2, %eax
sete %al
cmpq $-0x2000, %rcx # imm = 0xE000
sete %cl
testb %cl, %al
jne 0x2a85b84
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2a858d2
movq (%rsp), %rax
movl (%r14), %ecx
movl %ecx, (%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
movl 0x10(%r14), %ecx
movl %ecx, 0x10(%rax)
incl 0x8(%r15)
addq $0x18, %r14
cmpq %rbx, %r14
jne 0x2a85b29
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
/llvm/ADT/DenseMap.h
|
llvm::DenseMapBase<llvm::DenseMap<llvm::ValueInfo, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::ValueInfo, void>, llvm::detail::DenseSetPair<llvm::ValueInfo>>, llvm::ValueInfo, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::ValueInfo, void>, llvm::detail::DenseSetPair<llvm::ValueInfo>>::find(llvm::ValueInfo const&) const
|
const_iterator find(const_arg_type_t<KeyT> Val) const {
const BucketT *TheBucket;
if (LookupBucketFor(Val, TheBucket))
return makeConstIterator(TheBucket,
shouldReverseIterate<KeyT>() ? getBuckets()
: getBucketsEnd(),
*this, true);
return end();
}
|
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x1fa9cf0
testb %al, %al
je 0x2a88bcd
movq 0x8(%rsp), %rax
movl 0x10(%rbx), %edx
shlq $0x3, %rdx
addq (%rbx), %rdx
jmp 0x2a88bda
movl 0x10(%rbx), %eax
shlq $0x3, %rax
addq (%rbx), %rax
movq %rax, %rdx
addq $0x10, %rsp
popq %rbx
retq
|
/llvm/ADT/DenseMap.h
|
getNodeVisualName[abi:cxx11](llvm::ValueInfo const&)
|
static std::string getNodeVisualName(const ValueInfo &VI) {
return VI.name().empty() ? getNodeVisualName(VI.getGUID()) : VI.name().str();
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1fa7c36
testq %rdx, %rdx
je 0x2a88c1b
movq %r14, %rdi
callq 0x1fa7c36
testq %rax, %rax
je 0x2a88c2f
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
addq %rax, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7fa87c
jmp 0x2a88c42
movq (%r14), %rax
andq $-0x8, %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x2a88c4d
jmp 0x2a88c42
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/IR/ModuleSummaryIndex.cpp
|
llvm::ModulePass::skipModule(llvm::Module&) const
|
bool ModulePass::skipModule(Module &M) const {
OptPassGate &Gate = M.getContext().getOptPassGate();
return Gate.isEnabled() &&
!Gate.shouldRunPass(this->getPassName(), getDescription(M));
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r13
movq %rdi, %r15
movq (%rsi), %rdi
callq 0x2a60918
movq %rax, %r14
movq (%rax), %rax
movq %r14, %rdi
callq *0x18(%rax)
movl %eax, %ebx
testb %al, %al
je 0x2a8af00
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq %rax, %r15
movq %rdx, %r12
movq 0xa8(%r13), %rsi
leaq 0x38(%rsp), %rax
testq %rsi, %rsi
je 0x2a8af07
movq 0xb0(%r13), %rdx
addq %rsi, %rdx
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
callq 0x7fa87c
jmp 0x2a8af16
xorl %ebp, %ebp
jmp 0x2a8b01e
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x26045cf(%rip), %rcx # 0x508f4ec
leaq 0x28(%rsp), %rdi
movl $0x8, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7801d0
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2a8af58
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x2a8af60
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10809e7(%rip), %rsi # 0x3b0b96a
callq 0x780c80
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x2a8afaf
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2a8afb5
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a8afe4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7800d0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a8afff
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7800d0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x10(%rax)
movl %eax, %ebp
xorb $0x1, %bpl
testb %bl, %bl
je 0x2a8b03d
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a8b03d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7800d0
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/IR/Pass.cpp
|
(anonymous namespace)::StructuralHashImpl::hashType(llvm::Type*)
|
void hashType(Type *ValueType) {
hash(ValueType->getTypeID());
if (ValueType->isIntegerTy())
hash(ValueType->getIntegerBitWidth());
}
|
movabsq $-0x622015f714c7d297, %rax # imm = 0x9DDFEA08EB382D69
movzbl 0x8(%rsi), %ecx
movq (%rdi), %rdx
xorq %rcx, %rdx
imulq %rax, %rdx
xorq %rdx, %rcx
shrq $0x2f, %rdx
xorq %rcx, %rdx
imulq %rax, %rdx
movq %rdx, %rcx
shrq $0x2f, %rcx
xorq %rdx, %rcx
imulq %rax, %rcx
movq %rcx, (%rdi)
movl 0x8(%rsi), %edx
cmpb $0xd, %dl
jne 0x2a9a242
shrl $0x8, %edx
xorq %rdx, %rcx
imulq %rax, %rcx
xorq %rcx, %rdx
shrq $0x2f, %rcx
xorq %rdx, %rcx
imulq %rax, %rcx
movq %rcx, %rdx
shrq $0x2f, %rdx
xorq %rcx, %rdx
imulq %rax, %rdx
movq %rdx, (%rdi)
retq
nop
|
/IR/StructuralHash.cpp
|
llvm::Type::isSizedDerivedType(llvm::SmallPtrSetImpl<llvm::Type*>*) const
|
bool Type::isSizedDerivedType(SmallPtrSetImpl<Type*> *Visited) const {
if (auto *ATy = dyn_cast<ArrayType>(this))
return ATy->getElementType()->isSized(Visited);
if (auto *VTy = dyn_cast<VectorType>(this))
return VTy->getElementType()->isSized(Visited);
if (auto *TTy = dyn_cast<TargetExtType>(this))
return TTy->getLayoutType()->isSized(Visited);
return cast<StructType>(this)->isSized(Visited);
}
|
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x8(%rdi), %ebp
cmpl $0x11, %ebp
jne 0x2a9a979
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x97e1b8
cmpl $0x11, %ebp
je 0x2a9a9bf
movl $0xfe, %ebp
andl 0x8(%r14), %ebp
cmpl $0x12, %ebp
jne 0x2a9a998
movq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x97e1b8
cmpl $0x12, %ebp
je 0x2a9a9bf
movzbl 0x8(%r14), %ebp
cmpl $0x15, %ebp
jne 0x2a9a9ba
movq %r14, %rdi
callq 0x2a9b8b9
movq %rax, %rdi
movq %rbx, %rsi
callq 0x97e1b8
cmpl $0x15, %ebp
jne 0x2a9a9c6
andb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2a9a9d6
nop
|
/IR/Type.cpp
|
llvm::APInt::divide(unsigned long const*, unsigned int, unsigned long const*, unsigned int, unsigned long*, unsigned long*)
|
void APInt::divide(const WordType *LHS, unsigned lhsWords, const WordType *RHS,
unsigned rhsWords, WordType *Quotient, WordType *Remainder) {
assert(lhsWords >= rhsWords && "Fractional result");
// First, compose the values into an array of 32-bit words instead of
// 64-bit words. This is a necessity of both the "short division" algorithm
// and the Knuth "classical algorithm" which requires there to be native
// operations for +, -, and * on an m bit value with an m*2 bit result. We
// can't use 64-bit operands here because we don't have native results of
// 128-bits. Furthermore, casting the 64-bit values to 32-bit values won't
// work on large-endian machines.
unsigned n = rhsWords * 2;
unsigned m = (lhsWords * 2) - n;
// Allocate space for the temporary values we need either on the stack, if
// it will fit, or on the heap if it won't.
uint32_t SPACE[128];
uint32_t *U = nullptr;
uint32_t *V = nullptr;
uint32_t *Q = nullptr;
uint32_t *R = nullptr;
if ((Remainder?4:3)*n+2*m+1 <= 128) {
U = &SPACE[0];
V = &SPACE[m+n+1];
Q = &SPACE[(m+n+1) + n];
if (Remainder)
R = &SPACE[(m+n+1) + n + (m+n)];
} else {
U = new uint32_t[m + n + 1];
V = new uint32_t[n];
Q = new uint32_t[m+n];
if (Remainder)
R = new uint32_t[n];
}
// Initialize the dividend
memset(U, 0, (m+n+1)*sizeof(uint32_t));
for (unsigned i = 0; i < lhsWords; ++i) {
uint64_t tmp = LHS[i];
U[i * 2] = Lo_32(tmp);
U[i * 2 + 1] = Hi_32(tmp);
}
U[m+n] = 0; // this extra word is for "spill" in the Knuth algorithm.
// Initialize the divisor
memset(V, 0, (n)*sizeof(uint32_t));
for (unsigned i = 0; i < rhsWords; ++i) {
uint64_t tmp = RHS[i];
V[i * 2] = Lo_32(tmp);
V[i * 2 + 1] = Hi_32(tmp);
}
// initialize the quotient and remainder
memset(Q, 0, (m+n) * sizeof(uint32_t));
if (Remainder)
memset(R, 0, n * sizeof(uint32_t));
// Now, adjust m and n for the Knuth division. n is the number of words in
// the divisor. m is the number of words by which the dividend exceeds the
// divisor (i.e. m+n is the length of the dividend). These sizes must not
// contain any zero words or the Knuth algorithm fails.
for (unsigned i = n; i > 0 && V[i-1] == 0; i--) {
n--;
m++;
}
for (unsigned i = m+n; i > 0 && U[i-1] == 0; i--)
m--;
// If we're left with only a single word for the divisor, Knuth doesn't work
// so we implement the short division algorithm here. This is much simpler
// and faster because we are certain that we can divide a 64-bit quantity
// by a 32-bit quantity at hardware speed and short division is simply a
// series of such operations. This is just like doing short division but we
// are using base 2^32 instead of base 10.
assert(n != 0 && "Divide by zero?");
if (n == 1) {
uint32_t divisor = V[0];
uint32_t remainder = 0;
for (int i = m; i >= 0; i--) {
uint64_t partial_dividend = Make_64(remainder, U[i]);
if (partial_dividend == 0) {
Q[i] = 0;
remainder = 0;
} else if (partial_dividend < divisor) {
Q[i] = 0;
remainder = Lo_32(partial_dividend);
} else if (partial_dividend == divisor) {
Q[i] = 1;
remainder = 0;
} else {
Q[i] = Lo_32(partial_dividend / divisor);
remainder = Lo_32(partial_dividend - (Q[i] * divisor));
}
}
if (R)
R[0] = remainder;
} else {
// Now we're ready to invoke the Knuth classical divide algorithm. In this
// case n > 1.
KnuthDiv(U, V, Q, R, m, n);
}
// If the caller wants the quotient
if (Quotient) {
for (unsigned i = 0; i < lhsWords; ++i)
Quotient[i] = Make_64(Q[i*2+1], Q[i*2]);
}
// If the caller wants the remainder
if (Remainder) {
for (unsigned i = 0; i < rhsWords; ++i)
Remainder[i] = Make_64(R[i*2+1], R[i*2]);
}
// Clean up the memory we allocated.
if (U != &SPACE[0]) {
delete [] U;
delete [] V;
delete [] Q;
delete [] R;
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rdi, %rbx
movq %rcx, 0x38(%rsp)
leal (%rcx,%rcx), %r13d
leal (%rsi,%rsi), %r10d
movl %r10d, %ebp
subl %r13d, %ebp
cmpq $0x1, %r9
movl $0x3, %eax
sbbl $-0x1, %eax
imull %r13d, %eax
leal (%rax,%rbp,2), %eax
incl %eax
movq %rsi, 0x30(%rsp)
leal 0x1(,%rsi,2), %edi
movl %r10d, %esi
movl %r13d, %r14d
cmpl $0x80, %eax
movq %r9, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq %r8, 0x48(%rsp)
movl %r10d, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
ja 0x2b14808
leal (%rdi,%r13), %eax
leaq (%rsp,%rdi,4), %r15
addq $0x50, %r15
leaq (%rsp,%rax,4), %rcx
addq $0x50, %rcx
movq %rcx, 0x10(%rsp)
leaq 0x50(%rsp), %r12
testq %r9, %r9
je 0x2b14856
addl %r10d, %eax
leaq (%rsp,%rax,4), %rax
addq $0x50, %rax
movq %rax, (%rsp)
jmp 0x2b1486d
shlq $0x2, %rdi
callq 0x780b00
movq %rax, %r12
leaq (,%r14,4), %rdi
movq %rdi, (%rsp)
callq 0x780b00
movq %rax, %r15
movq 0x8(%rsp), %rax
leaq (,%rax,4), %rdi
callq 0x780b00
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x2b14860
movq (%rsp), %rdi
callq 0x780b00
movq %rax, (%rsp)
jmp 0x2b14868
movq $0x0, (%rsp)
jmp 0x2b1486d
movq $0x0, (%rsp)
movq 0x8(%rsp), %rsi
leaq 0x4(,%rsi,4), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x780240
movq 0x30(%rsp), %rax
movl %eax, %edi
testl %eax, %eax
je 0x2b148ae
leaq (%rdi,%rdi), %rax
xorl %ecx, %ecx
movq (%rbx,%rcx,4), %rdx
movl %ecx, %esi
movl %edx, (%r12,%rsi,4)
shrq $0x20, %rdx
leal 0x1(%rcx), %esi
movl %edx, (%r12,%rsi,4)
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0x2b14890
movq %rdi, 0x40(%rsp)
movq 0x8(%rsp), %rax
movl $0x0, (%r12,%rax,4)
leaq (,%r14,4), %rbx
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x780240
movq 0x38(%rsp), %rax
movl %eax, %edi
testl %eax, %eax
movq 0x20(%rsp), %r8
je 0x2b14909
leaq (%rdi,%rdi), %rax
xorl %ecx, %ecx
movq (%r8,%rcx,4), %rdx
movl %ecx, %esi
movl %edx, (%r15,%rsi,4)
shrq $0x20, %rdx
leal 0x1(%rcx), %esi
movl %edx, (%r15,%rsi,4)
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0x2b148eb
movq %rdi, 0x20(%rsp)
movq 0x8(%rsp), %rdx
shlq $0x2, %rdx
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x780240
movq 0x18(%rsp), %r10
testq %r10, %r10
je 0x2b14940
movq (%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x780240
movq 0x18(%rsp), %r10
testl %r13d, %r13d
je 0x2b14965
movl 0x2c(%rsp), %eax
cmpl $0x0, -0x4(%r15,%r14,4)
jne 0x2b1495d
decq %r14
jne 0x2b14949
xorl %r13d, %r13d
movl %eax, %ebp
jmp 0x2b14965
subl %r14d, %eax
movl %eax, %ebp
movl %r14d, %r13d
movl %r13d, %eax
addl %ebp, %eax
je 0x2b14984
movl %eax, %eax
movl %r13d, %ecx
negl %ecx
cmpl $0x0, -0x4(%r12,%rax,4)
jne 0x2b14984
decl %ebp
decq %rax
jne 0x2b14973
movl %ecx, %ebp
cmpl $0x1, %r13d
jne 0x2b149f1
testl %ebp, %ebp
js 0x2b14a05
movl (%r15), %ecx
movl %ebp, %esi
incq %rsi
xorl %edi, %edi
movq 0x10(%rsp), %r14
movq (%rsp), %rbx
movl %edi, %eax
movl -0x4(%r12,%rsi,4), %edi
shlq $0x20, %rax
orq %rdi, %rax
je 0x2b149c1
cmpq %rcx, %rax
jae 0x2b149cc
movl $0x0, -0x4(%r14,%rsi,4)
jmp 0x2b149ea
movl $0x0, -0x4(%r14,%rsi,4)
jmp 0x2b149d7
jne 0x2b149db
movl $0x1, -0x4(%r14,%rsi,4)
xorl %edi, %edi
jmp 0x2b149ea
xorl %edx, %edx
divq %rcx
movl %eax, -0x4(%r14,%rsi,4)
imull %ecx, %eax
subl %eax, %edi
decq %rsi
jg 0x2b149a1
jmp 0x2b14a10
leal -0x1(%r13), %edi
movl (%r15,%rdi,4), %eax
testl %eax, %eax
je 0x2b14a20
bsrl %eax, %esi
xorl $0x1f, %esi
jmp 0x2b14a25
xorl %edi, %edi
movq 0x10(%rsp), %r14
movq (%rsp), %rbx
testq %rbx, %rbx
je 0x2b14c76
movl %edi, (%rbx)
jmp 0x2b14c76
movl $0x20, %esi
movl %r13d, %r8d
testl %esi, %esi
je 0x2b14a65
movl %ebp, %ecx
addl %r13d, %ecx
je 0x2b14a69
movl $0x20, %eax
subl %esi, %eax
movl %ecx, %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
movl (%r12,%r10,4), %ebx
movl %ebx, %edx
movl %eax, %ecx
shrl %cl, %edx
movl %esi, %ecx
shll %cl, %ebx
orl %r11d, %ebx
movl %ebx, (%r12,%r10,4)
incq %r10
movl %edx, %r11d
cmpq %r10, %r9
jne 0x2b14a43
jmp 0x2b14a6b
xorl %edx, %edx
jmp 0x2b14a9f
xorl %edx, %edx
testl %r13d, %r13d
je 0x2b14a9f
movl $0x20, %eax
subl %esi, %eax
xorl %r9d, %r9d
xorl %r10d, %r10d
movl (%r15,%r9,4), %r11d
movl %r11d, %ebx
movl %eax, %ecx
shrl %cl, %ebx
movl %esi, %ecx
shll %cl, %r11d
orl %r10d, %r11d
movl %r11d, (%r15,%r9,4)
incq %r9
movl %ebx, %r10d
cmpq %r9, %r8
jne 0x2b14a7d
leal (%rbp,%r13), %eax
movl %edx, (%r12,%rax,4)
leal -0x2(%r13), %eax
movq %rax, 0x8(%rsp)
movslq %ebp, %r9
leal (%r9,%r13), %r11d
leal (%r9,%r13), %eax
decl %eax
movl (%r12,%rax,4), %edx
movl (%r12,%r11,4), %eax
shlq $0x20, %rax
orq %rdx, %rax
movl (%r15,%rdi,4), %r14d
xorl %edx, %edx
divq %r14
movabsq $0x100000000, %rcx # imm = 0x100000000
cmpq %rcx, %rax
je 0x2b14b0c
movq 0x8(%rsp), %rcx
movl (%r15,%rcx,4), %ebp
imulq %rax, %rbp
movq %rdx, %rbx
shlq $0x20, %rbx
leal -0x2(%r11), %ecx
movl (%r12,%rcx,4), %ecx
orq %rbx, %rcx
movq %rax, %rbx
cmpq %rcx, %rbp
jbe 0x2b14b53
leaq -0x1(%rax), %rbx
addq %r14, %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
jne 0x2b14b53
movabsq $0x100000000, %rcx # imm = 0x100000000
cmpq %rcx, %rbx
je 0x2b14b4c
movq 0x8(%rsp), %rcx
movl (%r15,%rcx,4), %ecx
imulq %rbx, %rcx
shlq $0x20, %rdx
leal -0x2(%r11), %r14d
movl (%r12,%r14,4), %r14d
orq %rdx, %r14
cmpq %r14, %rcx
jbe 0x2b14b53
addq $-0x2, %rax
movq %rax, %rbx
testl %r13d, %r13d
je 0x2b14b91
xorl %edx, %edx
xorl %r14d, %r14d
movl (%r15,%rdx,4), %eax
imulq %rbx, %rax
leal (%r9,%rdx), %ecx
movl (%r12,%rcx,4), %ebp
movl %eax, %r10d
addq %r14, %r10
subq %r10, %rbp
movl %ebp, (%r12,%rcx,4)
shrq $0x20, %rax
shrq $0x20, %rbp
subl %ebp, %eax
incq %rdx
movq %rax, %r14
cmpq %rdx, %r8
jne 0x2b14b5d
jmp 0x2b14b93
xorl %eax, %eax
movl (%r12,%r11,4), %ecx
movl %ecx, %edx
subl %eax, %edx
movl %edx, (%r12,%r11,4)
movq 0x10(%rsp), %r14
movl %ebx, (%r14,%r9,4)
cmpq %rcx, %rax
jbe 0x2b14c0b
decl %ebx
movl %ebx, (%r14,%r9,4)
testl %r13d, %r13d
je 0x2b14c05
xorl %eax, %eax
xorl %edx, %edx
leal (%r9,%rax), %ecx
movl (%r15,%rax,4), %r10d
movl (%r12,%rcx,4), %ebx
cmpl %ebx, %r10d
movl %ebx, %ebp
cmovbl %r10d, %ebp
movzbl %dl, %r14d
andl $0x1, %r14d
addl %r10d, %r14d
addl %ebx, %r14d
movl %r14d, (%r12,%rcx,4)
movb $0x1, %bl
cmpl %ebp, %r14d
jb 0x2b14bf1
sete %cl
andb %cl, %dl
movl %edx, %ebx
incq %rax
movl %ebx, %edx
cmpq %rax, %r8
jne 0x2b14bbc
movzbl %bl, %eax
movq 0x10(%rsp), %r14
jmp 0x2b14c07
xorl %eax, %eax
addl %eax, (%r12,%r11,4)
leaq -0x1(%r9), %rax
testq %r9, %r9
movq %rax, %r9
jg 0x2b14ab4
movq (%rsp), %rbx
testq %rbx, %rbx
movq 0x18(%rsp), %r10
je 0x2b14c76
testl %esi, %esi
je 0x2b14c61
testl %edi, %edi
js 0x2b14c76
movl $0x20, %eax
subl %esi, %eax
incq %rdi
xorl %edx, %edx
movl -0x4(%r12,%rdi,4), %r8d
movl %r8d, %r9d
movl %esi, %ecx
shrl %cl, %r9d
movl %eax, %ecx
shll %cl, %r8d
orl %edx, %r9d
movl %r9d, -0x4(%rbx,%rdi,4)
movl %r8d, %edx
decq %rdi
jg 0x2b14c3d
jmp 0x2b14c76
testl %edi, %edi
js 0x2b14c76
incq %rdi
movl -0x4(%r12,%rdi,4), %eax
movl %eax, -0x4(%rbx,%rdi,4)
decq %rdi
jg 0x2b14c68
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
sete %al
cmpl $0x0, 0x30(%rsp)
sete %cl
orb %al, %cl
movq 0x40(%rsp), %rdi
jne 0x2b14cb8
addq %rdi, %rdi
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %eax, %edx
movl (%r14,%rdx,4), %edx
movl (%r14,%rcx,4), %ecx
shlq $0x20, %rcx
orq %rdx, %rcx
movq %rcx, (%rsi,%rax,4)
addq $0x2, %rax
cmpq %rax, %rdi
jne 0x2b14c97
testq %r10, %r10
sete %al
cmpl $0x0, 0x38(%rsp)
sete %cl
orb %al, %cl
movq 0x20(%rsp), %rsi
jne 0x2b14cf3
addq %rsi, %rsi
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %eax, %edx
movl (%rbx,%rdx,4), %edx
movl (%rbx,%rcx,4), %ecx
shlq $0x20, %rcx
orq %rdx, %rcx
movq %rcx, (%r10,%rax,4)
addq $0x2, %rax
cmpq %rax, %rsi
jne 0x2b14cd4
leaq 0x50(%rsp), %rax
cmpq %rax, %r12
je 0x2b14d22
movq %r12, %rdi
callq 0x7802b0
movq %r15, %rdi
callq 0x7802b0
movq %r14, %rdi
callq 0x7802b0
testq %rbx, %rbx
je 0x2b14d22
movq %rbx, %rdi
callq 0x7802b0
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/Support/APInt.cpp
|
llvm::Error llvm::BinaryStreamWriter::writeObject<char>(char const&)
|
Error writeObject(const T &Obj) {
static_assert(!std::is_pointer<T>::value,
"writeObject should not be used with pointers, to write "
"the pointed-to value dereference the pointer before calling "
"writeObject");
return writeBytes(
ArrayRef<uint8_t>(reinterpret_cast<const uint8_t *>(&Obj), sizeof(T)));
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rsi
movq 0x38(%r14), %rdx
movl $0x1, %r8d
callq 0x2b1c78a
cmpq $0x0, (%rbx)
jne 0x2b1cf65
incq 0x38(%r14)
movq $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/llvm/Support/BinaryStreamWriter.h
|
llvm::TypeSize::operator unsigned long() const
|
TypeSize::operator TypeSize::ScalarTy() const {
if (isScalable()) {
reportInvalidSizeRequest(
"Cannot implicitly convert a scalable size to a fixed-width size in "
"`TypeSize::operator ScalarTy()`");
return getKnownMinValue();
}
return getFixedValue();
}
|
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x8(%rdi)
jne 0x2b60e8a
leaq 0x254e2d6(%rip), %rdi # 0x50af15b
callq 0x2b60def
movq (%rbx), %rax
popq %rbx
retq
nop
|
/Support/TypeSize.cpp
|
llvm::yaml::Scanner::setError(llvm::Twine const&, char const*)
|
void setError(const Twine &Message, StringRef::iterator Position) {
if (Position >= End)
Position = End - 1;
// propagate the error if possible
if (EC)
*EC = make_error_code(std::errc::invalid_argument);
// Don't print out more errors after the first one we encounter. The rest
// are just the result of the first, and have no meaning.
if (!Failed)
printError(SMLoc::getFromPointer(Position), SourceMgr::DK_Error, Message);
Failed = true;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq 0x150(%rdi), %r12
leaq -0x1(%rax), %r15
cmpq %rdx, %rax
cmovaq %rdx, %r15
testq %r12, %r12
je 0x2b74b02
callq 0x7805a0
movl $0x16, (%r12)
movq %rax, 0x8(%r12)
cmpb $0x0, 0x4b(%rbx)
jne 0x2b74b37
movq (%rbx), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movzbl 0x4c(%rbx), %eax
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %eax, 0x10(%rsp)
movq %r15, %rsi
xorl %edx, %edx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2b50a92
movb $0x1, 0x4b(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
/Support/YAMLParser.cpp
|
PopDescriptor
|
static cc_bool PopDescriptor(const KosinskiDecompressCallbacks* const callbacks)
{
const cc_bool result = (descriptor & 1) != 0;
descriptor >>= 1;
if (--descriptor_bits_remaining == 0)
GetDescriptor(callbacks);
return result;
}
|
pushq %rbp
pushq %r14
pushq %rbx
movl 0x4a5c(%rip), %ebx # 0x6080
movl %ebx, %eax
shrl %eax
movl %eax, 0x4a52(%rip) # 0x6080
decl 0x4a50(%rip) # 0x6084
jne 0x166c
movq %rdi, %r14
incq 0x2a30(%rip) # 0x4070
movq (%rdi), %rdi
callq *0x8(%r14)
movl %eax, %ebp
incq 0x2a20(%rip) # 0x4070
movq (%r14), %rdi
callq *0x8(%r14)
shll $0x8, %eax
orl %ebp, %eax
movl %eax, 0x4a1e(%rip) # 0x6080
movl $0x10, 0x4a18(%rip) # 0x6084
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
/Clownacy[P]accurate-kosinski/lib/kosinski-decompress.c
|
Ptex::v2_2::PtexReader::prune()
|
void PtexReader::prune()
{
if (_metadata) { delete _metadata; _metadata = 0; }
for (std::vector<Level*>::iterator i = _levels.begin(); i != _levels.end(); ++i) {
if (*i) { delete *i; *i = 0; }
}
_reductions.clear();
_memUsed = _baseMemUsed;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x140(%rdi), %rdi
testq %rdi, %rdi
je 0x103a1
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x140(%rbx)
movq 0x1b0(%rbx), %r15
cmpq 0x1b8(%rbx), %r15
je 0x103db
movq (%r15), %r14
testq %r14, %r14
je 0x103d5
movq %r14, %rdi
callq 0x12eea
movl $0x48, %esi
movq %r14, %rdi
callq 0xc2a0
movq $0x0, (%r15)
addq $0x8, %r15
jmp 0x103a8
leaq 0x1f8(%rbx), %r14
movq %r14, %rdi
callq 0x14bd2
movq %r14, %rdi
callq 0x14b7a
movq 0x2a8(%rbx), %rax
movq %rax, 0x2b0(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.cpp
|
Ptex::v2_2::PtexReader::readConstData()
|
void PtexReader::readConstData()
{
if (!_constdata) {
// read compressed constant data block
seek(_constdatapos);
int size = _pixelsize * _header.nfaces;
_constdata = new uint8_t[size];
readZipBlock(_constdata, _header.constdatasize, size);
if (_premultiply && _header.hasAlpha())
PtexUtils::multalpha(_constdata, _header.nfaces, datatype(),
_header.nchannels, _header.alphachan);
increaseMemUsed(size);
}
}
|
cmpq $0x0, 0x138(%rdi)
je 0x1070d
retq
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xf8(%rdi), %rsi
callq 0x13070
movl 0xa0(%rbx), %ebp
imull 0x130(%rbx), %ebp
movslq %ebp, %r14
movq %r14, %rdi
callq 0xc030
movq %rax, 0x138(%rbx)
movl 0xac(%rbx), %edx
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %ecx
callq 0x10b68
cmpb $0x1, 0x50(%rbx)
jne 0x10794
movl 0x98(%rbx), %eax
testl %eax, %eax
js 0x10794
movzwl 0x9c(%rbx), %ecx
cmpl %ecx, %eax
jge 0x10794
movq 0x138(%rbx), %rdi
movl 0xa0(%rbx), %esi
movzwl 0x9c(%rbx), %ecx
movl 0x94(%rbx), %edx
movl 0x98(%rbx), %r8d
callq 0x175d3
testl %ebp, %ebp
je 0x107a0
lock
addq %r14, 0x2b0(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.cpp
|
Ptex::v2_2::PtexReader::readMetaDataBlock(Ptex::v2_2::PtexReader::MetaData*, long, int, int, unsigned long&)
|
void PtexReader::readMetaDataBlock(MetaData* metadata, FilePos pos, int zipsize, int memsize, size_t& metaDataMemUsed)
{
seek(pos);
// read from file
bool useNew = memsize > AllocaMax;
char* buff = useNew ? new char[memsize] : (char*)alloca(memsize);
if (readZipBlock(buff, zipsize, memsize)) {
// unpack data entries
char* ptr = buff;
char* end = ptr + memsize;
while (ptr < end) {
uint8_t keysize = *ptr++;
char* key = (char*)ptr; ptr += keysize;
key[keysize-1] = '\0';
uint8_t datatypeval = *ptr++;
uint32_t datasize; memcpy(&datasize, ptr, sizeof(datasize));
ptr += sizeof(datasize);
char* data = ptr; ptr += datasize;
metadata->addEntry((uint8_t)(keysize-1), key, datatypeval, datasize, data, metaDataMemUsed);
}
}
if (useNew) delete [] buff;
}
|
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movl %r8d, %ebx
movl %ecx, -0x38(%rbp)
movq %rsi, %r15
movq %rdi, %r13
movq %rdx, %rsi
callq 0x13070
movslq %ebx, %r12
cmpl $0x4001, %ebx # imm = 0x4001
jl 0x10f54
movl %ebx, %edi
callq 0xc030
jmp 0x10f66
movq %rsp, %rax
leaq 0xf(%r12), %rcx
andq $-0x10, %rcx
subq %rcx, %rax
movq %rax, %rsp
movq %r13, %rdi
movq %rax, -0x40(%rbp)
movq %rax, %rsi
movl -0x38(%rbp), %edx
movl %ebx, -0x2c(%rbp)
movl %ebx, %ecx
callq 0x10b68
testb %al, %al
je 0x11012
cmpl $0x0, -0x2c(%rbp)
jle 0x11012
movq %r15, %rdi
movq %r14, %rbx
movq -0x40(%rbp), %r15
addq %r15, %r12
movq %r12, -0x48(%rbp)
leaq 0x1(%r15), %rdx
movzbl (%r15), %eax
leaq (%r15,%rax), %rsi
incq %rsi
leaq (%r15,%rax), %r13
addq $0x6, %r13
decq %rax
movb $0x0, -0x6(%r13)
movzbl -0x5(%r13), %ecx
movl -0x4(%r13), %r12d
leaq (%r12,%rsi), %r15
addq $0x5, %r15
movzbl %al, %esi
movq %rdi, %r14
movl %r12d, %r8d
movq %rbx, %r9
callq 0x13d74
movq %rax, -0x38(%rbp)
movq %r12, %rdi
callq 0xc030
movq -0x38(%rbp), %rcx
movq %rax, 0x10(%rcx)
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xc220
movq %r14, %rdi
addq %r12, (%rbx)
movq -0x48(%rbp), %r12
cmpq %r12, %r15
jb 0x10fa0
cmpl $0x4001, -0x2c(%rbp) # imm = 0x4001
jl 0x11024
movq -0x40(%rbp), %rdi
callq 0xc330
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.cpp
|
Ptex::v2_2::PtexReader::readLevel(int, Ptex::v2_2::PtexReader::Level*&)
|
void PtexReader::readLevel(int levelid, Level*& level)
{
// get read lock and make sure we still need to read
AutoMutex locker(readlock);
if (level) {
return;
}
// go ahead and read the level
LevelInfo& l = _levelinfo[levelid];
// keep new level local until finished
Level* newlevel = new Level(l.nfaces);
seek(_levelpos[levelid]);
readZipBlock(&newlevel->fdh[0], l.levelheadersize, FaceDataHeaderSize * l.nfaces);
computeOffsets(tell(), l.nfaces, &newlevel->fdh[0], &newlevel->offsets[0]);
// apply edits (if any) to level 0
if (levelid == 0) {
for (size_t i = 0, size = _faceedits.size(); i < size; i++) {
FaceEdit& e = _faceedits[i];
newlevel->fdh[e.faceid] = e.fdh;
newlevel->offsets[e.faceid] = e.pos;
}
}
// don't assign to result until level data is fully initialized
AtomicStore(&level, newlevel);
increaseMemUsed(level->memUsed());
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0xc380
cmpq $0x0, (%r15)
jne 0x1142f
movl %ebp, 0x4(%rsp)
movslq %ebp, %rbp
movq %rbp, %r13
shlq $0x4, %r13
addq 0x180(%r14), %r13
movl $0x48, %edi
callq 0xc290
movq %rax, %r12
movl 0xc(%r13), %esi
movq %rax, %rdi
callq 0x13250
movq 0x198(%r14), %rax
movq (%rax,%rbp,8), %rsi
movq %r14, %rdi
callq 0x13070
movq (%r12), %rsi
movl 0x8(%r13), %edx
movl 0xc(%r13), %ecx
shll $0x2, %ecx
movq %r14, %rdi
callq 0x10b68
movslq 0xc(%r13), %rdx
movq (%r12), %rax
movq 0x18(%r12), %rcx
testq %rdx, %rdx
je 0x113bc
movq 0x60(%r14), %rsi
shlq $0x3, %rdx
xorl %edi, %edi
movq %rax, %r8
movq %rsi, (%rcx,%rdi)
movl (%r8), %r9d
andl $0x3fffffff, %r9d # imm = 0x3FFFFFFF
addq %r9, %rsi
addq $0x4, %r8
addq $0x8, %rdi
cmpq %rdi, %rdx
jne 0x1139e
cmpl $0x0, 0x4(%rsp)
jne 0x11406
movq 0x1e0(%r14), %rdx
movq 0x1e8(%r14), %rsi
subq %rdx, %rsi
je 0x11406
sarq $0x4, %rsi
cmpq $0x1, %rsi
adcq $0x0, %rsi
addq $0xc, %rdx
movslq -0x4(%rdx), %rdi
movl (%rdx), %r8d
movl %r8d, (%rax,%rdi,4)
movq -0xc(%rdx), %rdi
movslq -0x4(%rdx), %r8
movq %rdi, (%rcx,%r8,8)
addq $0x10, %rdx
decq %rsi
jne 0x113e6
mfence
movq %r12, (%r15)
movq 0x8(%r12), %rax
subq (%r12), %rax
shrq $0x2, %rax
leaq (%rax,%rax,4), %rax
shlq $0x2, %rax
addq $0x48, %rax
je 0x1142f
lock
addq %rax, 0x2b0(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc1f0
movq %rax, %r14
movl $0x48, %esi
movq %r12, %rdi
callq 0xc2a0
jmp 0x1145a
movq %rax, %r14
movq %rbx, %rdi
callq 0xc1f0
movq %r14, %rdi
callq 0xc440
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.cpp
|
Ptex::v2_2::PtexReader::getPixel(int, int, int, float*, int, int)
|
void PtexReader::getPixel(int faceid, int u, int v,
float* result, int firstchan, int nchannelsArg)
{
memset(result, 0, sizeof(*result)*nchannelsArg);
// clip nchannels against actual number available
nchannelsArg = PtexUtils::min(nchannelsArg, _header.nchannels-firstchan);
if (nchannelsArg <= 0) return;
// get raw pixel data
PtexPtr<PtexFaceData> data ( getData(faceid) );
void* pixel = alloca(_pixelsize);
data->getPixel(u, v, pixel);
// adjust for firstchan offset
int datasize = DataSize(datatype());
if (firstchan)
pixel = (char*) pixel + datasize * firstchan;
// convert/copy to result as needed
if (datatype() == dt_float)
memcpy(result, pixel, datasize * nchannelsArg);
else
ConvertToFloat(result, pixel, datatype(), nchannelsArg);
}
|
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %ecx, -0x30(%rbp)
movl %edx, -0x2c(%rbp)
movl %esi, %ebx
movq %rdi, %r13
movslq 0x10(%rbp), %r14
movq %r14, %rdx
shlq $0x2, %rdx
movq %r8, -0x38(%rbp)
movq %r8, %rdi
xorl %esi, %esi
callq 0xc160
movzwl 0x9c(%r13), %r12d
subl %r15d, %r12d
cmpl %r12d, %r14d
cmovll %r14d, %r12d
testl %r12d, %r12d
jle 0x121f7
movq (%r13), %rax
movq %r13, %rdi
movl %ebx, %esi
callq *0x98(%rax)
movq %rax, %rbx
movslq 0x130(%r13), %rax
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq (%rbx), %rax
movq %rbx, %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movq %r14, %rcx
callq *0x28(%rax)
movl 0x94(%r13), %edx
leaq 0x6f89(%rip), %rax # 0x19140
movl (%rax,%rdx,4), %eax
imull %eax, %r15d
movslq %r15d, %rcx
addq %rcx, %r14
cmpq $0x3, %rdx
jne 0x121df
imull %r12d, %eax
movslq %eax, %rdx
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0xc220
jmp 0x121ee
movq -0x38(%rbp), %rdi
movq %r14, %rsi
movl %r12d, %ecx
callq 0x158d4
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1220a
jmp 0x1221e
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
callq 0xc440
movq %rax, %rdi
callq 0xdc45
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.cpp
|
Ptex::v2_2::PtexReader::errorData(bool)
|
FaceData* errorData(bool deleteOnRelease=false)
{
return new ErrorFace(&_errorPixel[0], _pixelsize, deleteOnRelease);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r15
movl $0x20, %edi
callq 0xc290
movq %rax, %rbx
movq 0x220(%r15), %r14
movslq 0x130(%r15), %r15
movw $0x0, 0x8(%rax)
leaq 0xc422(%rip), %rax # 0x1f7b8
movq %rax, (%rbx)
movl %r15d, 0xc(%rbx)
movq %r15, %rdi
callq 0xc030
movq %rax, 0x10(%rbx)
leaq 0xc8f8(%rip), %rcx # 0x1fca8
movq %rcx, (%rbx)
movb %bpl, 0x18(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xc220
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x20, %esi
movq %rbx, %rdi
callq 0xc2a0
movq %r14, %rdi
callq 0xc440
nop
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.h
|
Ptex::v2_2::PtexHashMap<Ptex::v2_2::PtexReader::ReductionKey, Ptex::v2_2::PtexReader::FaceData*>::tryInsert(Ptex::v2_2::PtexReader::ReductionKey&, Ptex::v2_2::PtexReader::FaceData*, unsigned long&)
|
Value tryInsert(Key& key, Value value, size_t& newMemUsed)
{
Entry* entries = lockEntriesAndGrowIfNeeded(newMemUsed);
uint32_t mask = _numEntries-1;
uint32_t hash = key.hash();
Value result = 0;
for (uint32_t i = hash;; ++i) {
Entry& e = entries[i & mask];
if (e.value == 0) {
e.value = value;
++_size;
PtexMemoryFence();
e.key.copy(key);
result = e.value;
break;
}
while (e.key.isEmpty()) ;
if (e.key.matches(key)) {
result = e.value;
break;
}
}
unlockEntries(entries);
return result;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rcx, %rsi
callq 0x155d2
movl 0x8(%rbx), %edx
decl %edx
movq (%r15), %rsi
xorl %ecx, %ecx
movl %esi, %r8d
andl %edx, %r8d
shlq $0x4, %r8
leaq (%rax,%r8), %rdi
cmpq $0x0, 0x8(%rax,%r8)
je 0x1346e
movq (%rdi), %r8
cmpq $-0x1, %r8
je 0x13458
movq (%rdi), %r9
movb $0x1, %r8b
cmpq (%r15), %r9
je 0x1347e
jmp 0x13485
movq %r14, 0x8(%rdi)
incl 0xc(%rbx)
mfence
movq (%r15), %rcx
movq %rcx, (%rdi)
movq 0x8(%rdi), %rcx
xorl %r8d, %r8d
incl %esi
testb %r8b, %r8b
jne 0x13442
mfence
movq %rax, (%rbx)
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexHashMap.h
|
Ptex::v2_2::PtexReader::MetaData::findKey(char const*, int&, Ptex::v2_2::MetaDataType&)
|
virtual bool findKey(const char* key, int& index, MetaDataType& type)
{
MetaMap::iterator iter = _map.find(key);
if (iter==_map.end()) {
index = -1;
return false;
}
index = iter->second.index;
type = iter->second.type;
return true;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0xd7d8
movq %r12, %rdi
movq %r13, %rsi
callq 0x13b66
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x137df
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc2a0
addq $0x18, %rbx
cmpq %rbx, %r12
je 0x137fa
movl 0x74(%r12), %eax
movl %eax, (%r15)
movl 0x48(%r12), %eax
movl %eax, (%r14)
jmp 0x13801
movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF
cmpq %rbx, %r12
setne %al
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13833
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xc2a0
movq %rbx, %rdi
callq 0xc440
nop
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.h
|
void Ptex::v2_2::PtexReader::MetaData::getValue<float>(int, Ptex::v2_2::MetaDataType, float const*&, int&)
|
void getValue(int index, MetaDataType requestedType, const T*& value, int& count)
{
if (index < 0 || index >= int(_entries.size())) {
value = 0;
count = 0;
return;
}
Entry* e = getEntry(index);
if (e && e->type == requestedType) {
value = (const T*) e->data;
count = int(e->datasize/sizeof(T));
}
else { value = 0; count = 0; }
}
|
pushq %rbp
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
testl %esi, %esi
js 0x13d16
movq 0x48(%rdi), %rax
subq 0x40(%rdi), %rax
shrq $0x3, %rax
cmpl %esi, %eax
jle 0x13d16
movl %edx, %ebp
callq 0x10e1a
testq %rax, %rax
je 0x13d16
cmpl %ebp, 0x8(%rax)
jne 0x13d16
movq 0x10(%rax), %rcx
movq %rcx, (%r14)
movl 0xc(%rax), %eax
shrl $0x2, %eax
jmp 0x13d1f
movq $0x0, (%r14)
xorl %eax, %eax
movl %eax, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexReader.h
|
Ptex::v2_2::PtexHashMap<Ptex::v2_2::PtexReader::ReductionKey, Ptex::v2_2::PtexReader::FaceData*>::deleteContents()
|
void deleteContents()
{
for (uint32_t i = 0; i < _numEntries; ++i) {
if (_entries[i].value) delete _entries[i].value;
}
delete [] _entries;
for (size_t i = 0; i < _oldEntries.size(); ++i) {
delete [] _oldEntries[i];
}
std::vector<Entry*>().swap(_oldEntries);
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x14c14
movl $0x8, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
cmpq $0x0, (%rax,%r14)
je 0x14c05
movq (%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0x14c05
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
movl 0x8(%rbx), %eax
addq $0x10, %r14
cmpq %rax, %r15
jb 0x14be9
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x14c21
callq 0xc330
movq 0x10(%rbx), %rdi
cmpq %rdi, 0x18(%rbx)
je 0x14c53
xorl %r14d, %r14d
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x14c3c
callq 0xc330
incq %r14
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
cmpq %rax, %r14
jb 0x14c2e
movq 0x20(%rbx), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
testq %rdi, %rdi
je 0x14c78
subq %rdi, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xc2a0
popq %rbx
popq %r14
popq %r15
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexHashMap.h
|
Ptex::v2_2::PtexUtils::interleave(void const*, int, int, int, void*, int, Ptex::v2_2::DataType, int)
|
void interleave(const void* src, int sstride, int uw, int vw,
void* dst, int dstride, DataType dt, int nchan)
{
switch (dt) {
case dt_uint8: interleave((const uint8_t*) src, sstride, uw, vw,
(uint8_t*) dst, dstride, nchan); break;
case dt_half:
case dt_uint16: interleave((const uint16_t*) src, sstride, uw, vw,
(uint16_t*) dst, dstride, nchan); break;
case dt_float: interleave((const float*) src, sstride, uw, vw,
(float*) dst, dstride, nchan); break;
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x40(%rsp), %eax
movl 0x38(%rsp), %r10d
leal -0x1(%r10), %r11d
cmpl $0x2, %r11d
jb 0x15bf4
cmpl $0x3, %r10d
je 0x15c7a
testl %r10d, %r10d
jne 0x15d05
testl %eax, %eax
je 0x15d05
cltq
leaq (%r8,%rax), %r10
imull %esi, %ecx
movslq %ecx, %r11
movslq %edx, %rbx
movslq %esi, %rsi
movslq %r9d, %r9
testl %ecx, %ecx
je 0x15be7
leaq (%rdi,%r11), %r14
movq %r8, %r15
testl %edx, %edx
je 0x15bdc
xorl %r12d, %r12d
movq %r15, %r13
movb (%rdi,%r12), %bpl
movb %bpl, (%r13)
addq %rax, %r13
incq %r12
cmpq %r12, %rbx
jne 0x15bc9
addq %rsi, %rdi
addq %r9, %r15
cmpq %r14, %rdi
jne 0x15bbf
incq %r8
cmpq %r10, %r8
jne 0x15bb4
jmp 0x15d05
testl %eax, %eax
je 0x15d05
cltq
leaq (%r8,%rax,2), %r10
movl %r9d, %ebx
shrl $0x1f, %ebx
addl %r9d, %ebx
sarl %ebx
movl %esi, %r11d
shrl $0x1f, %r11d
addl %esi, %r11d
sarl %r11d
imull %r11d, %ecx
movslq %ecx, %rsi
movslq %edx, %r9
movslq %r11d, %r11
movslq %ebx, %rbx
addq %r11, %r11
addq %r9, %r9
addq %rbx, %rbx
addq %rax, %rax
testl %ecx, %ecx
je 0x15c6c
leaq (%rdi,%rsi,2), %r14
movq %r8, %r15
testl %edx, %edx
je 0x15c61
movq %r15, %r12
xorl %r13d, %r13d
movzwl (%rdi,%r13), %ebp
movw %bp, (%r12)
addq $0x2, %r13
addq %rax, %r12
cmpq %r13, %r9
jne 0x15c4b
addq %r11, %rdi
addq %rbx, %r15
cmpq %r14, %rdi
jne 0x15c41
addq $0x2, %r8
cmpq %r10, %r8
jne 0x15c36
jmp 0x15d05
testl %eax, %eax
je 0x15d05
cltq
leal 0x3(%r9), %ebx
testl %r9d, %r9d
cmovnsl %r9d, %ebx
leaq (%r8,%rax,4), %r9
sarl $0x2, %ebx
leal 0x3(%rsi), %r11d
testl %esi, %esi
cmovnsl %esi, %r11d
sarl $0x2, %r11d
imull %r11d, %ecx
movslq %ecx, %rsi
movslq %edx, %r10
movslq %r11d, %r11
movslq %ebx, %rbx
shlq $0x2, %r11
shlq $0x2, %r10
shlq $0x2, %rbx
shlq $0x2, %rax
testl %ecx, %ecx
je 0x15cfc
leaq (%rdi,%rsi,4), %r14
movq %r8, %r15
testl %edx, %edx
je 0x15cf1
movq %r15, %r12
xorl %r13d, %r13d
movss (%rdi,%r13), %xmm0
movss %xmm0, (%r12)
addq $0x4, %r13
addq %rax, %r12
cmpq %r13, %r10
jne 0x15cd9
addq %r11, %rdi
addq %rbx, %r15
cmpq %r14, %rdi
jne 0x15ccf
addq $0x4, %r8
cmpq %r9, %r8
jne 0x15cc4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexUtils.cpp
|
Ptex::v2_2::PtexUtils::deinterleave(void const*, int, int, int, void*, int, Ptex::v2_2::DataType, int)
|
void deinterleave(const void* src, int sstride, int uw, int vw,
void* dst, int dstride, DataType dt, int nchan)
{
switch (dt) {
case dt_uint8: deinterleave((const uint8_t*) src, sstride, uw, vw,
(uint8_t*) dst, dstride, nchan); break;
case dt_half:
case dt_uint16: deinterleave((const uint16_t*) src, sstride, uw, vw,
(uint16_t*) dst, dstride, nchan); break;
case dt_float: deinterleave((const float*) src, sstride, uw, vw,
(float*) dst, dstride, nchan); break;
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x40(%rsp), %eax
movl 0x38(%rsp), %r10d
leal -0x1(%r10), %r11d
cmpl $0x2, %r11d
jb 0x15d9d
cmpl $0x3, %r10d
je 0x15e23
testl %r10d, %r10d
jne 0x15eae
testl %eax, %eax
je 0x15eae
cltq
leaq (%rdi,%rax), %r10
imull %esi, %ecx
movslq %ecx, %r11
movslq %edx, %rbx
movslq %esi, %rsi
movslq %r9d, %r9
testl %ecx, %ecx
je 0x15d90
leaq (%rdi,%r11), %r14
movq %rdi, %r15
testl %edx, %edx
je 0x15d85
xorl %r12d, %r12d
movq %r15, %r13
movb (%r13), %bpl
movb %bpl, (%r8,%r12)
addq %rax, %r13
incq %r12
cmpq %r12, %rbx
jne 0x15d72
addq %rsi, %r15
addq %r9, %r8
cmpq %r14, %r15
jne 0x15d68
incq %rdi
cmpq %r10, %rdi
jne 0x15d5d
jmp 0x15eae
testl %eax, %eax
je 0x15eae
cltq
leaq (%rdi,%rax,2), %r10
movl %r9d, %ebx
shrl $0x1f, %ebx
addl %r9d, %ebx
sarl %ebx
movl %esi, %r11d
shrl $0x1f, %r11d
addl %esi, %r11d
sarl %r11d
imull %r11d, %ecx
movslq %ecx, %rsi
movslq %edx, %r9
movslq %r11d, %r11
movslq %ebx, %rbx
addq %rbx, %rbx
addq %r9, %r9
addq %r11, %r11
addq %rax, %rax
testl %ecx, %ecx
je 0x15e15
leaq (%rdi,%rsi,2), %r14
movq %rdi, %r15
testl %edx, %edx
je 0x15e0a
movq %r15, %r12
xorl %r13d, %r13d
movzwl (%r12), %ebp
movw %bp, (%r8,%r13)
addq $0x2, %r13
addq %rax, %r12
cmpq %r13, %r9
jne 0x15df4
addq %r11, %r15
addq %rbx, %r8
cmpq %r14, %r15
jne 0x15dea
addq $0x2, %rdi
cmpq %r10, %rdi
jne 0x15ddf
jmp 0x15eae
testl %eax, %eax
je 0x15eae
cltq
leal 0x3(%r9), %ebx
testl %r9d, %r9d
cmovnsl %r9d, %ebx
leaq (%rdi,%rax,4), %r9
sarl $0x2, %ebx
leal 0x3(%rsi), %r11d
testl %esi, %esi
cmovnsl %esi, %r11d
sarl $0x2, %r11d
imull %r11d, %ecx
movslq %ecx, %rsi
movslq %edx, %r10
movslq %r11d, %r11
movslq %ebx, %rbx
shlq $0x2, %rbx
shlq $0x2, %r10
shlq $0x2, %r11
shlq $0x2, %rax
testl %ecx, %ecx
je 0x15ea5
leaq (%rdi,%rsi,4), %r14
movq %rdi, %r15
testl %edx, %edx
je 0x15e9a
movq %r15, %r12
xorl %r13d, %r13d
movss (%r12), %xmm0
movss %xmm0, (%r8,%r13)
addq $0x4, %r13
addq %rax, %r12
cmpq %r13, %r10
jne 0x15e82
addq %r11, %r15
addq %rbx, %r8
cmpq %r14, %r15
jne 0x15e78
addq $0x4, %rdi
cmpq %r9, %rdi
jne 0x15e6d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexUtils.cpp
|
Ptex::v2_2::PtexUtils::encodeDifference(void*, int, Ptex::v2_2::DataType)
|
void encodeDifference(void* data, int size, DataType dt)
{
switch (dt) {
case dt_uint8: encodeDifference(static_cast<uint8_t*>(data), size); break;
case dt_uint16: encodeDifference(static_cast<uint16_t*>(data), size); break;
default: break; // skip other types
}
}
|
cmpl $0x1, %edx
je 0x15ee7
testl %edx, %edx
jne 0x15f1b
testl %esi, %esi
je 0x15f1b
movslq %esi, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movb (%rdi,%rcx), %sil
movl %esi, %r8d
subb %dl, %r8b
movb %r8b, (%rdi,%rcx)
incq %rcx
movl %esi, %edx
cmpq %rcx, %rax
jne 0x15ecd
jmp 0x15f1b
leal 0x1(%rsi), %eax
cmpl $0x3, %eax
jb 0x15f1b
movl %esi, %eax
shrl $0x1f, %eax
addl %esi, %eax
sarl %eax
cltq
addq %rax, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movzwl (%rdi,%rcx), %esi
movl %esi, %r8d
subl %edx, %r8d
movw %r8w, (%rdi,%rcx)
addq $0x2, %rcx
movl %esi, %edx
cmpq %rcx, %rax
jne 0x15f01
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexUtils.cpp
|
Ptex::v2_2::PtexUtils::reduceu(void const*, int, int, int, void*, int, Ptex::v2_2::DataType, int)
|
void reduceu(const void* src, int sstride, int uw, int vw,
void* dst, int dstride, DataType dt, int nchan)
{
switch (dt) {
case dt_uint8: reduceu(static_cast<const uint8_t*>(src), sstride, uw, vw,
static_cast<uint8_t*>(dst), dstride, nchan); break;
case dt_half: reduceu(static_cast<const PtexHalf*>(src), sstride, uw, vw,
static_cast<PtexHalf*>(dst), dstride, nchan); break;
case dt_uint16: reduceu(static_cast<const uint16_t*>(src), sstride, uw, vw,
static_cast<uint16_t*>(dst), dstride, nchan); break;
case dt_float: reduceu(static_cast<const float*>(src), sstride, uw, vw,
static_cast<float*>(dst), dstride, nchan); break;
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl 0x70(%rsp), %eax
cmpq $0x3, %rax
ja 0x16608
movq %r8, %rbx
movq %rdi, %r14
movl 0x78(%rsp), %r13d
leaq 0x3359(%rip), %rdi # 0x196a4
movslq (%rdi,%rax,4), %rax
addq %rdi, %rax
jmpq *%rax
imull %esi, %ecx
testl %ecx, %ecx
je 0x16608
movslq %ecx, %rax
addq %r14, %rax
imull %r13d, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
subl %ecx, %r9d
subl %edx, %esi
movslq %edx, %rcx
movslq %r13d, %r15
movslq %esi, %rsi
movslq %r9d, %rdi
testl %edx, %edx
je 0x163bc
leaq (%r14,%rcx), %r8
testl %r13d, %r13d
je 0x163b4
xorl %r9d, %r9d
movzbl (%r14), %r10d
movzbl (%r14,%r15), %r11d
addl %r10d, %r11d
shrl %r11d
movb %r11b, (%rbx,%r9)
incq %r14
incq %r9
cmpq %r9, %r15
jne 0x16393
addq %r9, %rbx
addq %r15, %r14
cmpq %r8, %r14
jne 0x1638b
addq %rdi, %rbx
addq %rsi, %r14
cmpq %rax, %r14
jne 0x16383
jmp 0x16608
movl %esi, %eax
shrl $0x1f, %eax
addl %esi, %eax
sarl %eax
imull %eax, %ecx
testl %ecx, %ecx
je 0x16608
movslq %ecx, %rcx
leaq (%r14,%rcx,2), %rcx
movq %rcx, 0x20(%rsp)
imull %r13d, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
movl %r9d, %esi
shrl $0x1f, %esi
addl %r9d, %esi
sarl %esi
subl %ecx, %esi
subl %edx, %eax
movslq %edx, %rcx
movq %rcx, 0x8(%rsp)
movslq %r13d, %rcx
cltq
movq %rax, 0x18(%rsp)
movslq %esi, %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x28(%rsp)
leaq (%rcx,%rcx), %r12
leaq 0x9ede(%rip), %rbp # 0x20310
movss 0x322a(%rip), %xmm1 # 0x19664
movl %edx, 0x4(%rsp)
testl %edx, %edx
je 0x164a9
movq 0x8(%rsp), %rax
leaq (%r14,%rax,2), %rax
movq %rax, 0x30(%rsp)
testl %r13d, %r13d
je 0x16499
movl %r13d, %r15d
xorl %r13d, %r13d
movzwl (%r14), %eax
movss (%rbp,%rax,4), %xmm0
movzwl (%r14,%r12), %eax
addss (%rbp,%rax,4), %xmm0
mulss %xmm1, %xmm0
callq 0x1892a
movss 0x31e3(%rip), %xmm1 # 0x19664
movw %ax, (%rbx,%r13)
addq $0x2, %r14
addq $0x2, %r13
cmpq %r13, %r12
jne 0x1645b
addq %r13, %rbx
movl %r15d, %r13d
movq 0x28(%rsp), %rax
leaq (%r14,%rax,2), %r14
cmpq 0x30(%rsp), %r14
jne 0x16450
movq 0x18(%rsp), %rax
leaq (%r14,%rax,2), %r14
movq 0x10(%rsp), %rax
leaq (%rbx,%rax,2), %rbx
cmpq 0x20(%rsp), %r14
movl 0x4(%rsp), %edx
jne 0x1643e
jmp 0x16608
leal 0x3(%rsi), %edi
testl %esi, %esi
cmovnsl %esi, %edi
sarl $0x2, %edi
imull %edi, %ecx
testl %ecx, %ecx
je 0x16608
movslq %ecx, %rax
leaq (%r14,%rax,4), %rax
imull %r13d, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
leal 0x3(%r9), %r8d
testl %r9d, %r9d
cmovnsl %r9d, %r8d
sarl $0x2, %r8d
subl %ecx, %r8d
subl %edx, %edi
movslq %edx, %rcx
movslq %r13d, %r11
movslq %edi, %rsi
movslq %r8d, %rdi
leaq (,%r11,4), %r8
movss 0x313b(%rip), %xmm0 # 0x19664
testl %edx, %edx
je 0x16567
leaq (%r14,%rcx,4), %r9
testl %r13d, %r13d
je 0x1655e
xorl %r10d, %r10d
movss (%r14), %xmm1
addss (%r14,%r8), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rbx,%r10)
addq $0x4, %r14
addq $0x4, %r10
cmpq %r10, %r8
jne 0x16539
addq %r10, %rbx
leaq (%r14,%r11,4), %r14
cmpq %r9, %r14
jne 0x16531
leaq (%r14,%rsi,4), %r14
leaq (%rbx,%rdi,4), %rbx
cmpq %rax, %r14
jne 0x16529
jmp 0x16608
movl %esi, %edi
shrl $0x1f, %edi
addl %esi, %edi
sarl %edi
imull %edi, %ecx
testl %ecx, %ecx
je 0x16608
movslq %ecx, %rax
leaq (%r14,%rax,2), %rax
imull %r13d, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
movl %r9d, %r8d
shrl $0x1f, %r8d
addl %r9d, %r8d
sarl %r8d
subl %ecx, %r8d
subl %edx, %edi
movslq %edx, %rcx
movslq %r13d, %r15
movslq %edi, %rsi
movslq %r8d, %rdi
leaq (%r15,%r15), %r8
testl %edx, %edx
je 0x165fb
leaq (%r14,%rcx,2), %r9
testl %r13d, %r13d
je 0x165f2
xorl %r10d, %r10d
movzwl (%r14), %r11d
movzwl (%r14,%r8), %ebp
addl %r11d, %ebp
shrl %ebp
movw %bp, (%rbx,%r10)
addq $0x2, %r14
addq $0x2, %r10
cmpq %r10, %r8
jne 0x165cf
addq %r10, %rbx
leaq (%r14,%r15,2), %r14
cmpq %r9, %r14
jne 0x165c7
leaq (%r14,%rsi,2), %r14
leaq (%rbx,%rdi,2), %rbx
cmpq %rax, %r14
jne 0x165bf
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexUtils.cpp
|
Ptex::v2_2::PtexUtils::blend(void const*, float, void*, bool, int, Ptex::v2_2::DataType, int)
|
void blend(const void* src, float weight, void* dst, bool flip,
int rowlen, DataType dt, int nchan)
{
switch ((dt<<1) | int(flip)) {
case (dt_uint8<<1): blend(static_cast<const uint8_t*>(src), weight,
static_cast<uint8_t*>(dst), rowlen, nchan); break;
case (dt_uint8<<1 | 1): blendflip(static_cast<const uint8_t*>(src), weight,
static_cast<uint8_t*>(dst), rowlen, nchan); break;
case (dt_half<<1): blend(static_cast<const PtexHalf*>(src), weight,
static_cast<PtexHalf*>(dst), rowlen, nchan); break;
case (dt_half<<1 | 1): blendflip(static_cast<const PtexHalf*>(src), weight,
static_cast<PtexHalf*>(dst), rowlen, nchan); break;
case (dt_uint16<<1): blend(static_cast<const uint16_t*>(src), weight,
static_cast<uint16_t*>(dst), rowlen, nchan); break;
case (dt_uint16<<1 | 1): blendflip(static_cast<const uint16_t*>(src), weight,
static_cast<uint16_t*>(dst), rowlen, nchan); break;
case (dt_float<<1): blend(static_cast<const float*>(src), weight,
static_cast<float*>(dst), rowlen, nchan); break;
case (dt_float<<1 | 1): blendflip(static_cast<const float*>(src), weight,
static_cast<float*>(dst), rowlen, nchan); break;
}
}
|
leal (%rdx,%r8,2), %eax
cmpl $0x7, %eax
ja 0x17190
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movaps %xmm0, %xmm1
movq %rdi, %rbx
leaq 0x286d(%rip), %rdx # 0x196d4
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movss %xmm0, 0xc(%rsp)
jmpq *%rax
imull %ecx, %r9d
testl %r9d, %r9d
je 0x17182
movslq %r9d, %rax
xorl %ecx, %ecx
movzbl (%rbx,%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %edx
addb %dl, (%r15,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x16e88
jmp 0x17182
imull %ecx, %r9d
testl %r9d, %r9d
je 0x17182
movslq %r9d, %r14
addq %r14, %r14
xorl %r12d, %r12d
leaq 0x9447(%rip), %r13 # 0x20310
movzwl (%r15,%r12), %eax
movss (%r13,%rax,4), %xmm0
movss %xmm0, 0x8(%rsp)
movzwl (%rbx,%r12), %eax
movss (%r13,%rax,4), %xmm0
mulss %xmm1, %xmm0
callq 0x1892a
movzwl %ax, %eax
movss 0x8(%rsp), %xmm0
addss (%r13,%rax,4), %xmm0
callq 0x1892a
movss 0xc(%rsp), %xmm1
movw %ax, (%r15,%r12)
addq $0x2, %r12
cmpq %r12, %r14
jne 0x16ec9
jmp 0x17182
imull %ecx, %r9d
testl %r9d, %r9d
je 0x17182
movslq %r9d, %rax
addq %rax, %rax
xorl %ecx, %ecx
movzwl (%rbx,%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %edx
addw %dx, (%r15,%rcx)
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0x16f33
jmp 0x17182
movl %r9d, %eax
imull %ecx, %eax
testl %eax, %eax
je 0x17182
cltq
leaq (%rbx,%rax,2), %rax
decl %ecx
imull %r9d, %ecx
movslq %ecx, %rcx
leaq (%r15,%rcx,2), %rcx
leal (%r9,%r9), %edx
movslq %edx, %rdx
negq %rdx
movl %r9d, %esi
testl %r9d, %r9d
jle 0x16fbe
xorl %edi, %edi
xorl %r8d, %r8d
movzwl (%rbx,%r8,2), %r10d
xorps %xmm0, %xmm0
cvtsi2ss %r10d, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %r10d
addw %r10w, (%rcx,%r8,2)
incq %r8
addq $-0x2, %rdi
cmpl %r8d, %esi
jne 0x16f91
subq %rdi, %rbx
subq %rdi, %rcx
leaq (%rcx,%rdx,2), %rcx
cmpq %rax, %rbx
jne 0x16f87
jmp 0x17182
movl %r9d, %eax
imull %ecx, %eax
testl %eax, %eax
je 0x17182
cltq
leaq (%rbx,%rax,4), %rax
decl %ecx
imull %r9d, %ecx
movslq %ecx, %rcx
leaq (%r15,%rcx,4), %rcx
leal (%r9,%r9), %edx
movslq %edx, %rdx
negq %rdx
movl %r9d, %esi
testl %r9d, %r9d
jle 0x1702c
xorl %edi, %edi
xorl %r8d, %r8d
movss (%rbx,%r8,4), %xmm0
mulss %xmm1, %xmm0
addss (%rcx,%r8,4), %xmm0
movss %xmm0, (%rcx,%r8,4)
incq %r8
addq $-0x4, %rdi
cmpl %r8d, %esi
jne 0x17004
subq %rdi, %rbx
subq %rdi, %rcx
leaq (%rcx,%rdx,4), %rcx
cmpq %rax, %rbx
jne 0x16ffa
jmp 0x17182
movl %r9d, %eax
imull %ecx, %eax
testl %eax, %eax
je 0x17182
cltq
addq %rbx, %rax
decl %ecx
imull %r9d, %ecx
movslq %ecx, %rcx
addq %rcx, %r15
leal (%r9,%r9), %ecx
movslq %ecx, %rcx
negq %rcx
movl %r9d, %edx
testl %r9d, %r9d
jle 0x1708a
movzbl (%rbx), %esi
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %esi
addb %sil, (%r15)
incq %rbx
incq %r15
decl %edx
jne 0x1706b
addq %rcx, %r15
cmpq %rax, %rbx
jne 0x17063
jmp 0x17182
movl %r9d, %eax
imull %ecx, %eax
testl %eax, %eax
je 0x17182
cltq
leaq (%rbx,%rax,2), %rax
movq %rax, 0x20(%rsp)
decl %ecx
imull %r9d, %ecx
movslq %ecx, %rax
leaq (%r15,%rax,2), %r15
leal (%r9,%r9), %eax
cltq
negq %rax
movq %rax, 0x18(%rsp)
movl %r9d, %ebp
leaq 0x923b(%rip), %r12 # 0x20310
movq %r9, 0x10(%rsp)
testl %r9d, %r9d
jle 0x17140
xorl %r13d, %r13d
xorl %r14d, %r14d
movzwl (%r15,%r14,2), %eax
movss (%r12,%rax,4), %xmm0
movss %xmm0, 0x8(%rsp)
movzwl (%rbx,%r14,2), %eax
movss (%r12,%rax,4), %xmm0
mulss %xmm1, %xmm0
callq 0x1892a
movzwl %ax, %eax
movss 0x8(%rsp), %xmm0
addss (%r12,%rax,4), %xmm0
callq 0x1892a
movss 0xc(%rsp), %xmm1
movw %ax, (%r15,%r14,2)
incq %r14
addq $-0x2, %r13
cmpl %r14d, %ebp
jne 0x170e5
subq %r13, %rbx
subq %r13, %r15
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rax
leaq (%r15,%rax,2), %r15
cmpq 0x20(%rsp), %rbx
jne 0x170da
jmp 0x17182
imull %ecx, %r9d
testl %r9d, %r9d
je 0x17182
movslq %r9d, %rax
shlq $0x2, %rax
xorl %ecx, %ecx
movss (%rbx,%rcx), %xmm0
mulss %xmm1, %xmm0
addss (%r15,%rcx), %xmm0
movss %xmm0, (%r15,%rcx)
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x17164
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexUtils.cpp
|
void Ptex::v2_2::PtexUtils::(anonymous namespace)::average<unsigned short>(unsigned short const*, int, int, int, unsigned short*, int)
|
inline void average(const T* src, int sstride, int uw, int vw,
T* dst, int nchan)
{
float* buff = (float*) alloca(nchan*sizeof(float));
memset(buff, 0, nchan*sizeof(float));
sstride /= (int)sizeof(T);
int rowlen = uw*nchan;
int rowskip = sstride - rowlen;
for (const T* end = src + vw*sstride; src != end; src += rowskip)
for (const T* rowend = src + rowlen; src != rowend;)
for (int i = 0; i < nchan; i++) buff[i] += (float)*src++;
float scale = 1.0f/(float)(uw*vw);
for (int i = 0; i < nchan; i++) dst[i] = T(buff[i]*scale);
}
|
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r13d
movq %r8, %rbx
movl %ecx, -0x30(%rbp)
movl %edx, -0x2c(%rbp)
movl %esi, %r15d
movq %rdi, %r12
movslq %r9d, %rdx
movq %rsp, %r14
leaq 0xf(,%rdx,4), %rax
shlq $0x2, %rdx
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %r14, %rdi
xorl %esi, %esi
callq 0xc160
movl %r15d, %edi
shrl $0x1f, %edi
addl %r15d, %edi
movl -0x30(%rbp), %r15d
sarl %edi
movl %edi, %ecx
imull %r15d, %ecx
movl %r13d, %eax
testl %ecx, %ecx
je 0x17488
movslq %ecx, %rcx
leaq (%r12,%rcx,2), %rcx
movl %r13d, %edx
imull -0x2c(%rbp), %edx
subl %edx, %edi
movslq %edx, %rsi
movslq %edi, %rdi
leaq (%rax,%rax), %r8
testl %edx, %edx
je 0x1747f
leaq (%r12,%rsi,2), %r9
testl %r13d, %r13d
jle 0x1747a
xorl %r10d, %r10d
movzwl (%r12,%r10), %r11d
xorps %xmm0, %xmm0
cvtsi2ss %r11d, %xmm0
addss (%r14,%r10,2), %xmm0
movss %xmm0, (%r14,%r10,2)
addq $0x2, %r10
cmpq %r10, %r8
jne 0x17455
addq %r10, %r12
cmpq %r9, %r12
jne 0x1744d
leaq (%r12,%rdi,2), %r12
cmpq %rcx, %r12
jne 0x17445
testl %r13d, %r13d
jle 0x174bf
imull -0x2c(%rbp), %r15d
cvtsi2ss %r15d, %xmm1
movss 0x21bd(%rip), %xmm0 # 0x1965c
divss %xmm1, %xmm0
xorl %ecx, %ecx
movss (%r14,%rcx,4), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %edx
movw %dx, (%rbx,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x174a5
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexUtils.cpp
|
void Ptex::v2_2::PtexUtils::(anonymous namespace)::ApplyConst<Ptex::v2_2::PtexHalf, 3>(float, float*, void*, int)
|
operator float() const { return toFloat(bits); }
|
movzwl (%rsi), %eax
leaq 0x84c9(%rip), %rcx # 0x20310
movzwl 0x2(%rsi), %edx
movsd (%rdi), %xmm1
movss (%rcx,%rdx,4), %xmm2
movss (%rcx,%rax,4), %xmm3
unpcklps %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
movaps %xmm0, %xmm2
unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
mulps %xmm3, %xmm2
addps %xmm1, %xmm2
movlps %xmm2, (%rdi)
movzwl 0x4(%rsi), %eax
mulss (%rcx,%rax,4), %xmm0
addss 0x8(%rdi), %xmm0
movss %xmm0, 0x8(%rdi)
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexHalf.h
|
Ptex::v2_2::PtexHalf::fromFloat(float)
|
static uint16_t fromFloat(float val)
{
if (val==0) return 0;
union { uint32_t i; float f; } u;
u.f = val;
int e = f2hTable[(u.i>>23)&0x1ff];
if (e) return (uint16_t)(e + (((u.i&0x7fffff) + 0x1000) >> 13));
return fromFloat_except(u.i);
}
|
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x18937
jp 0x18937
xorl %eax, %eax
retq
movd %xmm0, %edi
movl %edi, %eax
shrl $0x17, %eax
leaq 0x479c9(%rip), %rcx # 0x60310
movzwl (%rcx,%rax,2), %eax
testw %ax, %ax
je 0x18c64
andl $0x7ff000, %edi # imm = 0x7FF000
addl $0x1000, %edi # imm = 0x1000
shrl $0xd, %edi
addl %edi, %eax
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexHalf.h
|
Ptex::v2_2::PtexHalf::fromFloat_except(unsigned int)
|
uint16_t PtexHalf::fromFloat_except(uint32_t i)
{
uint32_t s = ((i>>16) & 0x8000);
int32_t e = ((i>>13) & 0x3fc00) - 0x1c000;
if (e <= 0) {
// denormalized
union { uint32_t i; float f; } u;
u.i = i;
return (uint16_t)(s|int(fabs(u.f)*1.6777216e7 + .5));
}
if (e == 0x23c00)
// inf/nan, preserve msb bits of m for nan code
return (uint16_t)(s|0x7c00|((i&0x7fffff)>>13));
else
// overflow - convert to inf
return (uint16_t)(s|0x7c00);
}
|
movl %edi, %eax
shrl $0x10, %eax
andl $0x8000, %eax # imm = 0x8000
movl %edi, %ecx
shrl $0xd, %ecx
movl %ecx, %edx
andl $0x3fc00, %edx # imm = 0x3FC00
cmpl $0x1c000, %edx # imm = 0x1C000
ja 0x18ca8
andl $0x7fffffff, %edi # imm = 0x7FFFFFFF
movd %edi, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0xc37(%rip), %xmm0 # 0x198d0
addsd 0xc37(%rip), %xmm0 # 0x198d8
cvttsd2si %xmm0, %ecx
orl %ecx, %eax
retq
cmpl $0x3fc00, %edx # imm = 0x3FC00
jne 0x18cb8
andl $0x3ff, %ecx # imm = 0x3FF
orl %ecx, %eax
orl $0x7c00, %eax # imm = 0x7C00
retq
|
/mmp[P]pbrt-v4-ci-testing/src/ext/ptex/src/ptex/PtexHalf.cpp
|
ClassInfo::ClassInfo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Object* (*)())
|
ClassInfo(const std::string className, ObjectConstructorFn ctor)
:m_className(className), m_objectConstructor(ctor)
{
Object::Register(this); //classInfo的构造函数是传入类名和类对应的new函数然后自动注册进map中。
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %r15
leaq 0x2927(%rip), %rax # 0x4d58
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %r12
movq %r12, 0x8(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2614
movq %r14, 0x28(%r15)
movq %r15, %rdi
callq 0x27a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x247d
callq 0x20c0
movq %r14, %rdi
callq 0x2150
nop
|
/tsukinoying[P]cppReflection/Reflex.h
|
ClassInfo::~ClassInfo()
|
virtual ~ClassInfo(){}
|
pushq %rbx
movq %rdi, %rbx
leaq 0x2763(%rip), %rax # 0x4d58
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
leaq 0x18(%rbx), %rax
cmpq %rax, %rdi
je 0x260a
callq 0x20c0
movq %rbx, %rdi
popq %rbx
jmp 0x20c0
nop
|
/tsukinoying[P]cppReflection/Reflex.h
|
sqlite3_db_status
|
SQLITE_API int sqlite3_db_status(
sqlite3 *db, /* The database connection whose status is desired */
int op, /* Status verb */
int *pCurrent, /* Write current value here */
int *pHighwater, /* Write high-water mark here */
int resetFlag /* Reset high-water mark if true */
){
int rc = SQLITE_OK; /* Return code */
#ifdef SQLITE_ENABLE_API_ARMOR
if( !sqlite3SafetyCheckOk(db) || pCurrent==0|| pHighwater==0 ){
return SQLITE_MISUSE_BKPT;
}
#endif
sqlite3_mutex_enter(db->mutex);
switch( op ){
case SQLITE_DBSTATUS_LOOKASIDE_USED: {
*pCurrent = sqlite3LookasideUsed(db, pHighwater);
if( resetFlag ){
LookasideSlot *p = db->lookaside.pFree;
if( p ){
while( p->pNext ) p = p->pNext;
p->pNext = db->lookaside.pInit;
db->lookaside.pInit = db->lookaside.pFree;
db->lookaside.pFree = 0;
}
}
break;
}
case SQLITE_DBSTATUS_LOOKASIDE_HIT:
case SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE:
case SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: {
testcase( op==SQLITE_DBSTATUS_LOOKASIDE_HIT );
testcase( op==SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE );
testcase( op==SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL );
assert( (op-SQLITE_DBSTATUS_LOOKASIDE_HIT)>=0 );
assert( (op-SQLITE_DBSTATUS_LOOKASIDE_HIT)<3 );
*pCurrent = 0;
*pHighwater = db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT];
if( resetFlag ){
db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT] = 0;
}
break;
}
/*
** Return an approximation for the amount of memory currently used
** by all pagers associated with the given database connection. The
** highwater mark is meaningless and is returned as zero.
*/
case SQLITE_DBSTATUS_CACHE_USED_SHARED:
case SQLITE_DBSTATUS_CACHE_USED: {
int totalUsed = 0;
int i;
sqlite3BtreeEnterAll(db);
for(i=0; i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
Pager *pPager = sqlite3BtreePager(pBt);
int nByte = sqlite3PagerMemUsed(pPager);
if( op==SQLITE_DBSTATUS_CACHE_USED_SHARED ){
nByte = nByte / sqlite3BtreeConnectionCount(pBt);
}
totalUsed += nByte;
}
}
sqlite3BtreeLeaveAll(db);
*pCurrent = totalUsed;
*pHighwater = 0;
break;
}
/*
** *pCurrent gets an accurate estimate of the amount of memory used
** to store the schema for all databases (main, temp, and any ATTACHed
** databases. *pHighwater is set to zero.
*/
case SQLITE_DBSTATUS_SCHEMA_USED: {
int i; /* Used to iterate through schemas */
int nByte = 0; /* Used to accumulate return value */
sqlite3BtreeEnterAll(db);
db->pnBytesFreed = &nByte;
for(i=0; i<db->nDb; i++){
Schema *pSchema = db->aDb[i].pSchema;
if( ALWAYS(pSchema!=0) ){
HashElem *p;
nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (
pSchema->tblHash.count
+ pSchema->trigHash.count
+ pSchema->idxHash.count
+ pSchema->fkeyHash.count
);
nByte += sqlite3_msize(pSchema->tblHash.ht);
nByte += sqlite3_msize(pSchema->trigHash.ht);
nByte += sqlite3_msize(pSchema->idxHash.ht);
nByte += sqlite3_msize(pSchema->fkeyHash.ht);
for(p=sqliteHashFirst(&pSchema->trigHash); p; p=sqliteHashNext(p)){
sqlite3DeleteTrigger(db, (Trigger*)sqliteHashData(p));
}
for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){
sqlite3DeleteTable(db, (Table *)sqliteHashData(p));
}
}
}
db->pnBytesFreed = 0;
sqlite3BtreeLeaveAll(db);
*pHighwater = 0;
*pCurrent = nByte;
break;
}
/*
** *pCurrent gets an accurate estimate of the amount of memory used
** to store all prepared statements.
** *pHighwater is set to zero.
*/
case SQLITE_DBSTATUS_STMT_USED: {
struct Vdbe *pVdbe; /* Used to iterate through VMs */
int nByte = 0; /* Used to accumulate return value */
db->pnBytesFreed = &nByte;
for(pVdbe=db->pVdbe; pVdbe; pVdbe=pVdbe->pNext){
sqlite3VdbeClearObject(db, pVdbe);
sqlite3DbFree(db, pVdbe);
}
db->pnBytesFreed = 0;
*pHighwater = 0; /* IMP: R-64479-57858 */
*pCurrent = nByte;
break;
}
/*
** Set *pCurrent to the total cache hits or misses encountered by all
** pagers the database handle is connected to. *pHighwater is always set
** to zero.
*/
case SQLITE_DBSTATUS_CACHE_SPILL:
op = SQLITE_DBSTATUS_CACHE_WRITE+1;
/* Fall through into the next case */
case SQLITE_DBSTATUS_CACHE_HIT:
case SQLITE_DBSTATUS_CACHE_MISS:
case SQLITE_DBSTATUS_CACHE_WRITE:{
int i;
int nRet = 0;
assert( SQLITE_DBSTATUS_CACHE_MISS==SQLITE_DBSTATUS_CACHE_HIT+1 );
assert( SQLITE_DBSTATUS_CACHE_WRITE==SQLITE_DBSTATUS_CACHE_HIT+2 );
for(i=0; i<db->nDb; i++){
if( db->aDb[i].pBt ){
Pager *pPager = sqlite3BtreePager(db->aDb[i].pBt);
sqlite3PagerCacheStat(pPager, op, resetFlag, &nRet);
}
}
*pHighwater = 0; /* IMP: R-42420-56072 */
/* IMP: R-54100-20147 */
/* IMP: R-29431-39229 */
*pCurrent = nRet;
break;
}
/* Set *pCurrent to non-zero if there are unresolved deferred foreign
** key constraints. Set *pCurrent to zero if all foreign key constraints
** have been satisfied. The *pHighwater is always set to zero.
*/
case SQLITE_DBSTATUS_DEFERRED_FKS: {
*pHighwater = 0; /* IMP: R-11967-56545 */
*pCurrent = db->nDeferredImmCons>0 || db->nDeferredCons>0;
break;
}
default: {
rc = SQLITE_ERROR;
}
}
sqlite3_mutex_leave(db->mutex);
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r13d
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x2af39
movq %rsi, %r12
callq *0xa358a(%rip) # 0xce4c0
movq %r12, %rsi
cmpl $0xc, %esi
ja 0x2b2ea
movl %esi, %eax
leaq 0x7b9a5(%rip), %rcx # 0xa68f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, (%r15)
addl $-0x4, %esi
movl 0x16c(%rbx,%rsi,4), %eax
movl %eax, (%r14)
xorl %ebp, %ebp
testl %r13d, %r13d
je 0x2b315
movl $0x0, 0x16c(%rbx,%rsi,4)
jmp 0x2b315
cmpb $0x0, 0x69(%rbx)
jne 0x2af97
movq %rbx, %rdi
movq %rsi, %r12
callq 0x3ec19
movq %r12, %rsi
movq %r14, 0x8(%rsp)
movq %r15, 0x20(%rsp)
movl 0x28(%rbx), %eax
testl %eax, %eax
jle 0x2b2f1
xorl %r15d, %r15d
movl $0x8, %r14d
xorl %ebp, %ebp
movq %rbx, 0x18(%rsp)
movq 0x20(%rbx), %rcx
movq (%rcx,%r14), %r12
testq %r12, %r12
je 0x2b038
movl %ebp, 0x4(%rsp)
movq 0x8(%r12), %rax
movq (%rax), %r13
movl 0xbc(%r13), %eax
movzwl 0xb0(%r13), %ecx
leal 0x70(%rax,%rcx), %eax
movl %eax, 0x10(%rsp)
movq 0x118(%r13), %rax
movq 0x40(%rax), %rdi
movq %rsi, %rbx
callq *0xa3518(%rip) # 0xce518
movl %eax, %ebp
imull 0x10(%rsp), %ebp
movq %r13, %rdi
callq *0xa3468(%rip) # 0xce478
movq %rbx, %rsi
addl %ebp, %eax
addl 0xbc(%r13), %eax
cmpl $0xb, %esi
jne 0x2b02a
movq 0x8(%r12), %rcx
cltd
idivl 0x60(%rcx)
movq 0x18(%rsp), %rbx
movl 0x4(%rsp), %ebp
addl %eax, %ebp
movl 0x28(%rbx), %eax
incq %r15
movslq %eax, %rcx
addq $0x20, %r14
cmpq %rcx, %r15
jl 0x2afbc
jmp 0x2b2f3
movl $0x0, (%r14)
movl $0x1, %eax
cmpq $0x0, 0x298(%rbx)
jg 0x2b2e5
xorl %eax, %eax
cmpq $0x0, 0x290(%rbx)
setg %al
jmp 0x2b2e5
movl $0xa, %esi
movl 0x28(%rbx), %eax
xorl %ebp, %ebp
movl $0x0, %edx
testl %eax, %eax
jle 0x2b0d7
movq 0x20(%rbx), %rcx
addl $-0x7, %esi
addq $0x8, %rcx
xorl %r8d, %r8d
xorl %edx, %edx
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x2b0c8
movq 0x8(%rdi), %rdi
movq (%rdi), %rdi
addl 0xf0(%rdi,%rsi,4), %edx
testl %r13d, %r13d
je 0x2b0c8
movl $0x0, 0xf0(%rdi,%rsi,4)
movl 0x28(%rbx), %eax
incq %r8
movslq %eax, %rdi
addq $0x20, %rcx
cmpq %rdi, %r8
jl 0x2b09f
movl $0x0, (%r14)
movl %edx, (%r15)
jmp 0x2b315
leaq 0x14(%rsp), %rax
movl $0x0, (%rax)
movq %rax, 0x2a0(%rbx)
movq 0x8(%rbx), %r12
xorl %ebp, %ebp
movl $0x0, %eax
testq %r12, %r12
je 0x2b12c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2b425
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c824
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x2b108
movl 0x14(%rsp), %eax
movq $0x0, 0x2a0(%rbx)
movl $0x0, (%r14)
movl %eax, (%r15)
jmp 0x2b315
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b335
movl %eax, (%r15)
xorl %ebp, %ebp
testl %r13d, %r13d
je 0x2b315
movq 0x180(%rbx), %rax
testq %rax, %rax
je 0x2b315
movq %rax, %rdx
movq %rdx, %rcx
movq (%rdx), %rdx
testq %rdx, %rdx
jne 0x2b172
movq 0x178(%rbx), %rdx
movq %rdx, (%rcx)
movq %rax, 0x178(%rbx)
movq $0x0, 0x180(%rbx)
jmp 0x2b315
movq %r14, 0x8(%rsp)
movl $0x0, (%rsp)
cmpb $0x0, 0x69(%rbx)
jne 0x2b1b8
movq %rbx, %rdi
callq 0x3ec19
movq %rsp, %rax
movq %rax, 0x2a0(%rbx)
cmpl $0x0, 0x28(%rbx)
jle 0x2b2be
xorl %r12d, %r12d
movq 0x20(%rbx), %rax
movq %r12, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %r13
testq %r13, %r13
je 0x2b2ae
movl $0x20, %edi
callq *0xa328d(%rip) # 0xce480
movl 0x3c(%r13), %ecx
addl 0xc(%r13), %ecx
addl 0x24(%r13), %ecx
addl 0x54(%r13), %ecx
imull %eax, %ecx
addl (%rsp), %ecx
movl %ecx, (%rsp)
movq 0x18(%r13), %rdi
xorl %ebp, %ebp
movl $0x0, %eax
testq %rdi, %rdi
je 0x2b225
callq *0xa3256(%rip) # 0xce478
movl (%rsp), %ecx
addl %eax, %ecx
movl %ecx, (%rsp)
movq 0x48(%r13), %rdi
testq %rdi, %rdi
je 0x2b23e
callq *0xa323f(%rip) # 0xce478
movl %eax, %ebp
movl (%rsp), %ecx
addl %ebp, %ecx
movl %ecx, (%rsp)
movq 0x30(%r13), %rdi
xorl %ebp, %ebp
movl $0x0, %eax
testq %rdi, %rdi
je 0x2b25c
callq *0xa321f(%rip) # 0xce478
movl (%rsp), %ecx
addl %eax, %ecx
movl %ecx, (%rsp)
movq 0x60(%r13), %rdi
testq %rdi, %rdi
je 0x2b275
callq *0xa3208(%rip) # 0xce478
movl %eax, %ebp
movl (%rsp), %ecx
addl %ebp, %ecx
movl %ecx, (%rsp)
movq 0x40(%r13), %r14
testq %r14, %r14
je 0x2b294
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x2b39a
movq (%r14), %r14
jmp 0x2b27e
movq 0x10(%r13), %r14
testq %r14, %r14
je 0x2b2ae
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x2b403
movq (%r14), %r14
jmp 0x2b298
incq %r12
movslq 0x28(%rbx), %rax
cmpq %rax, %r12
jl 0x2b1cf
movq $0x0, 0x2a0(%rbx)
cmpb $0x0, 0x69(%rbx)
jne 0x2b2d7
movq %rbx, %rdi
callq 0x3ec71
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movl (%rsp), %eax
movl %eax, (%r15)
jmp 0x2b313
movl $0x1, %ebp
jmp 0x2b315
xorl %ebp, %ebp
cmpb $0x0, 0x69(%rbx)
jne 0x2b301
movq %rbx, %rdi
callq 0x3ec71
movq 0x20(%rsp), %rax
movl %ebp, (%rax)
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2b324
callq *0xa31ac(%rip) # 0xce4d0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VdbeClearObject
|
SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){
SubProgram *pSub, *pNext;
assert( p->db==0 || p->db==db );
releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
for(pSub=p->pProgram; pSub; pSub=pNext){
pNext = pSub->pNext;
vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
sqlite3DbFree(db, pSub);
}
if( p->magic!=VDBE_MAGIC_INIT ){
releaseMemArray(p->aVar, p->nVar);
sqlite3DbFree(db, p->pVList);
sqlite3DbFree(db, p->pFree);
}
vdbeFreeOpArray(db, p->aOp, p->nOp);
sqlite3DbFree(db, p->aColName);
sqlite3DbFree(db, p->zSql);
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
{
int i;
for(i=0; i<p->nScan; i++){
sqlite3DbFree(db, p->aScan[i].zName);
}
sqlite3DbFree(db, p->aScan);
}
#endif
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x80(%rsi), %rdi
movzwl 0xbc(%rsi), %esi
addl %esi, %esi
callq 0x49bf2
movq 0x110(%r14), %r15
testq %r15, %r15
je 0x2b47a
movq 0x28(%r15), %r12
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %rbx, %rdi
callq 0x49c81
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c824
movq %r12, %r15
testq %r12, %r12
jne 0x2b454
cmpl $0x16bceaa5, 0x24(%r14) # imm = 0x16BCEAA5
je 0x2b4bd
movq 0xa0(%r14), %rdi
movswl 0x20(%r14), %esi
callq 0x49bf2
movq 0xa8(%r14), %rsi
testq %rsi, %rsi
je 0x2b4a9
movq %rbx, %rdi
callq 0x3c824
movq 0xf0(%r14), %rsi
testq %rsi, %rsi
je 0x2b4bd
movq %rbx, %rdi
callq 0x3c824
movq 0x68(%r14), %rsi
movl 0xb8(%r14), %edx
movq %rbx, %rdi
callq 0x49c81
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x2b4e4
movq %rbx, %rdi
callq 0x3c824
movq 0xe8(%r14), %rsi
testq %rsi, %rsi
je 0x2b503
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3c824
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3_vfs_find
|
SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
sqlite3_vfs *pVfs = 0;
#if SQLITE_THREADSAFE
sqlite3_mutex *mutex;
#endif
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
if( rc ) return 0;
#endif
#if SQLITE_THREADSAFE
mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
sqlite3_mutex_enter(mutex);
for(pVfs = vfsList; pVfs; pVfs=pVfs->pNext){
if( zVfs==0 ) break;
if( strcmp(zVfs, pVfs->zName)==0 ) break;
}
sqlite3_mutex_leave(mutex);
return pVfs;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2b5a5
testl %eax, %eax
je 0x2b527
xorl %r15d, %r15d
jmp 0x2b597
movb $0x1, %bpl
cmpl $0x0, 0xa2f03(%rip) # 0xce434
je 0x2b553
movl $0x2, %edi
callq *0xa2f72(%rip) # 0xce4b0
testq %rax, %rax
je 0x2b553
movq %rax, %r14
movq %rax, %rdi
callq *0xa2f71(%rip) # 0xce4c0
xorl %ebp, %ebp
jmp 0x2b556
xorl %r14d, %r14d
testq %rbx, %rbx
sete %al
movq 0xa4eed(%rip), %r15 # 0xd0450
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x2b589
movq 0x18(%r15), %rsi
movq %rbx, %rdi
callq 0xa610
testl %eax, %eax
je 0x2b589
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x2b56d
xorl %r15d, %r15d
testb %bpl, %bpl
jne 0x2b597
movq %r14, %rdi
callq *0xa2f39(%rip) # 0xce4d0
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3_str_append
|
SQLITE_API void sqlite3_str_append(sqlite3_str *p, const char *z, int N){
assert( z!=0 || N==0 );
assert( p->zText!=0 || p->nChar==0 || p->accError );
assert( N>=0 );
assert( p->accError==0 || p->nAlloc==0 );
if( p->nChar+N >= p->nAlloc ){
enlargeAndAppend(p,z,N);
}else if( N ){
assert( p->zText );
p->nChar += N;
memcpy(&p->zText[p->nChar-N], z, N);
}
}
|
movl 0x18(%rdi), %eax
leal (%rax,%rdx), %ecx
cmpl 0x10(%rdi), %ecx
jae 0x2da69
testl %edx, %edx
je 0x2da6e
movl %ecx, 0x18(%rdi)
addq 0x8(%rdi), %rax
movslq %edx, %rdx
movq %rax, %rdi
jmp 0xa370
jmp 0x2dc1a
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
unixCurrentTime
|
static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
sqlite3_int64 i = 0;
int rc;
UNUSED_PARAMETER(NotUsed);
rc = unixCurrentTimeInt64(0, &i);
*prNow = i/86400000.0;
return rc;
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0xa700
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%r14)
imulq $0x3e8, (%r14), %rax # imm = 0x3E8
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rcx, %rdx
addq %rax, %rdx
movabsq $0xbfc83e532200, %rax # imm = 0xBFC83E532200
addq %rdx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x7c7e9(%rip), %xmm0 # 0xabbb0
movsd %xmm0, (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
unixCurrentTimeInt64
|
static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){
static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;
int rc = SQLITE_OK;
#if defined(NO_GETTOD)
time_t t;
time(&t);
*piNow = ((sqlite3_int64)t)*1000 + unixEpoch;
#elif OS_VXWORKS
struct timespec sNow;
clock_gettime(CLOCK_REALTIME, &sNow);
*piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_nsec/1000000;
#else
struct timeval sNow;
(void)gettimeofday(&sNow, 0); /* Cannot fail given valid arguments */
*piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000;
#endif
#ifdef SQLITE_TEST
if( sqlite3_current_time ){
*piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;
}
#endif
UNUSED_PARAMETER(NotUsed);
return rc;
}
|
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0xa700
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%r14)
imulq $0x3e8, (%r14), %rax # imm = 0x3E8
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rcx, %rdx
addq %rax, %rdx
movabsq $0xbfc83e532200, %rax # imm = 0xBFC83E532200
addq %rdx, %rax
movq %rax, (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
unixNextSystemCall
|
static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
int i = -1;
UNUSED_PARAMETER(p);
if( zName ){
for(i=0; i<ArraySize(aSyscall)-1; i++){
if( strcmp(zName, aSyscall[i].zName)==0 ) break;
}
}
for(i++; i<ArraySize(aSyscall); i++){
if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
}
return 0;
}
|
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x2f55d
movq %rsi, %rbx
leaq 0x9f37d(%rip), %r15 # 0xce8b0
xorl %r14d, %r14d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xa610
testl %eax, %eax
je 0x2f558
incq %r14
addq $0x18, %r15
cmpq $0x1c, %r14
jne 0x2f536
movl $0x1c, %r14d
movslq %r14d, %rcx
jmp 0x2f564
movq $-0x1, %rcx
leaq (%rcx,%rcx,2), %rax
addq $-0x1d, %rcx
leaq 0x9f33d(%rip), %rdx # 0xce8b0
leaq (%rdx,%rax,8), %rdx
addq $0x20, %rdx
xorl %eax, %eax
incq %rcx
je 0x2f593
leaq 0x18(%rdx), %rsi
cmpq $0x0, (%rdx)
movq %rsi, %rdx
je 0x2f57d
movq -0x20(%rsi), %rax
popq %rbx
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3_backup_init
|
SQLITE_API sqlite3_backup *sqlite3_backup_init(
sqlite3* pDestDb, /* Database to write to */
const char *zDestDb, /* Name of database within pDestDb */
sqlite3* pSrcDb, /* Database connection to read from */
const char *zSrcDb /* Name of database within pSrcDb */
){
sqlite3_backup *p; /* Value to return */
#ifdef SQLITE_ENABLE_API_ARMOR
if( !sqlite3SafetyCheckOk(pSrcDb)||!sqlite3SafetyCheckOk(pDestDb) ){
(void)SQLITE_MISUSE_BKPT;
return 0;
}
#endif
/* Lock the source database handle. The destination database
** handle is not locked in this routine, but it is locked in
** sqlite3_backup_step(). The user is required to ensure that no
** other thread accesses the destination handle for the duration
** of the backup operation. Any attempt to use the destination
** database connection while a backup is in progress may cause
** a malfunction or a deadlock.
*/
sqlite3_mutex_enter(pSrcDb->mutex);
sqlite3_mutex_enter(pDestDb->mutex);
if( pSrcDb==pDestDb ){
sqlite3ErrorWithMsg(
pDestDb, SQLITE_ERROR, "source and destination must be distinct"
);
p = 0;
}else {
/* Allocate space for a new sqlite3_backup object...
** EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a
** call to sqlite3_backup_init() and is destroyed by a call to
** sqlite3_backup_finish(). */
p = (sqlite3_backup *)sqlite3MallocZero(sizeof(sqlite3_backup));
if( !p ){
sqlite3Error(pDestDb, SQLITE_NOMEM_BKPT);
}
}
/* If the allocation succeeded, populate the new object. */
if( p ){
p->pSrc = findBtree(pDestDb, pSrcDb, zSrcDb);
p->pDest = findBtree(pDestDb, pDestDb, zDestDb);
p->pDestDb = pDestDb;
p->pSrcDb = pSrcDb;
p->iNext = 1;
p->isAttached = 0;
if( 0==p->pSrc || 0==p->pDest
|| checkReadTransaction(pDestDb, p->pDest)!=SQLITE_OK
){
/* One (or both) of the named databases did not exist or an OOM
** error was hit. Or there is a transaction open on the destination
** database. The error has already been written into the pDestDb
** handle. All that is left to do here is free the sqlite3_backup
** structure. */
sqlite3_free(p);
p = 0;
}
}
if( p ){
p->pSrc->nBackup++;
}
sqlite3_mutex_leave(pDestDb->mutex);
sqlite3_mutex_leave(pSrcDb->mutex);
return p;
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq 0x18(%rdx), %rdi
testq %rdi, %rdi
je 0x2f5d4
callq *0x9eeec(%rip) # 0xce4c0
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x2f5e3
callq *0x9eedd(%rip) # 0xce4c0
cmpq %r14, %rbx
je 0x2f693
movl $0x48, %edi
callq 0x2bce4
testq %rax, %rax
je 0x2f6ae
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x40(%rax)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2f85b
movq %rax, 0x28(%r15)
movq %r14, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2f85b
movq %rax, 0x8(%r15)
movq %r14, (%r15)
movq %rbx, 0x20(%r15)
movl $0x1, 0x18(%r15)
movl $0x0, 0x3c(%r15)
movq 0x28(%r15), %rcx
testq %rcx, %rcx
sete %dl
testq %rax, %rax
sete %sil
orb %dl, %sil
jne 0x2f689
cmpb $0x0, 0x10(%rax)
je 0x2f6f1
leaq 0x7cadc(%rip), %rdx # 0xac156
movq %r14, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x2f6f6
movq %r15, %rdi
callq 0x2be2e
jmp 0x2f6c3
leaq 0x7c628(%rip), %rdx # 0xabcc2
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x2f6f6
jmp 0x2f6c6
movl $0x7, 0x50(%r14)
movq %r14, %rdi
movl $0x7, %esi
callq 0x3ed3d
xorl %r15d, %r15d
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x2f6d5
callq *0x9edfb(%rip) # 0xce4d0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2f6e4
callq *0x9edec(%rip) # 0xce4d0
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
incl 0x18(%rcx)
jmp 0x2f6c6
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
findBtree
|
static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
int i = sqlite3FindDbName(pDb, zDb);
if( i==1 ){
Parse sParse;
int rc = 0;
memset(&sParse, 0, sizeof(sParse));
sParse.db = pDb;
if( sqlite3OpenTempDatabase(&sParse) ){
sqlite3ErrorWithMsg(pErrorDb, sParse.rc, "%s", sParse.zErrMsg);
rc = SQLITE_ERROR;
}
sqlite3DbFree(pErrorDb, sParse.zErrMsg);
sqlite3ParserReset(&sParse);
if( rc ){
return 0;
}
}
if( i<0 ){
sqlite3ErrorWithMsg(pErrorDb, SQLITE_ERROR, "unknown database %s", zDb);
return 0;
}
return pDb->aDb[i].pBt;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x3a521
movl %eax, %ebp
cmpl $0x1, %eax
jne 0x2f8e1
leaq 0x8(%rsp), %r15
movl $0x190, %edx # imm = 0x190
movq %r15, %rdi
xorl %esi, %esi
callq 0xa220
movq %r14, -0x8(%r15)
movq %rsp, %rdi
callq 0x3eda0
testl %eax, %eax
je 0x2f903
movl 0x18(%rsp), %esi
movq 0x8(%rsp), %r14
leaq 0x7c71f(%rip), %rdx # 0xabfd6
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2f6f6
testq %r14, %r14
je 0x2f8d4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c824
movq %rsp, %rdi
callq 0x3557b
xorl %r14d, %r14d
jmp 0x2f92c
testl %ebp, %ebp
jns 0x2f91d
leaq 0x7c788(%rip), %rdx # 0xac074
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2f6f6
jmp 0x2f92c
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x2f915
movq %rbx, %rdi
callq 0x3c824
movq %rsp, %rdi
callq 0x3557b
movq 0x20(%r14), %rax
movl %ebp, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %r14
movq %r14, %rax
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3BtreeEnter
|
SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
/* Some basic sanity checking on the Btree. The list of Btrees
** connected by pNext and pPrev should be in sorted order by
** Btree.pBt value. All elements of the list should belong to
** the same connection. Only shared Btrees are on the list. */
assert( p->pNext==0 || p->pNext->pBt>p->pBt );
assert( p->pPrev==0 || p->pPrev->pBt<p->pBt );
assert( p->pNext==0 || p->pNext->db==p->db );
assert( p->pPrev==0 || p->pPrev->db==p->db );
assert( p->sharable || (p->pNext==0 && p->pPrev==0) );
/* Check for locking consistency */
assert( !p->locked || p->wantToLock>0 );
assert( p->sharable || p->wantToLock==0 );
/* We should already hold a lock on the database connection */
assert( sqlite3_mutex_held(p->db->mutex) );
/* Unless the database is sharable and unlocked, then BtShared.db
** should already be set correctly. */
assert( (p->locked==0 && p->sharable) || p->pBt->db==p->db );
if( !p->sharable ) return;
p->wantToLock++;
if( p->locked ) return;
btreeLockCarefully(p);
}
|
cmpb $0x0, 0x11(%rdi)
je 0x2fee9
incl 0x14(%rdi)
cmpb $0x0, 0x12(%rdi)
je 0x46b8f
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3BtreeUpdateMeta
|
SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
BtShared *pBt = p->pBt;
unsigned char *pP1;
int rc;
assert( idx>=1 && idx<=15 );
sqlite3BtreeEnter(p);
assert( p->inTrans==TRANS_WRITE );
assert( pBt->pPage1!=0 );
pP1 = pBt->pPage1->aData;
rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
if( rc==SQLITE_OK ){
put4byte(&pP1[36 + idx*4], iMeta);
#ifndef SQLITE_OMIT_AUTOVACUUM
if( idx==BTREE_INCR_VACUUM ){
assert( pBt->autoVacuum || iMeta==0 );
assert( iMeta==0 || iMeta==1 );
pBt->incrVacuum = (u8)iMeta;
}
#endif
}
sqlite3BtreeLeave(p);
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movq 0x8(%rdi), %r12
cmpb $0x0, 0x11(%rdi)
je 0x307bc
incl 0x14(%rbx)
cmpb $0x0, 0x12(%rbx)
jne 0x307bc
movq %rbx, %rdi
callq 0x46b8f
movq 0x18(%r12), %rax
movq 0x50(%rax), %r13
movq 0x70(%rax), %rdi
callq 0x30914
movl %eax, %r14d
testl %eax, %eax
jne 0x307eb
movslq %r15d, %rax
movl %ebp, %ecx
bswapl %ecx
movl %ecx, 0x24(%r13,%rax,4)
cmpl $0x7, %eax
jne 0x307eb
movb %bpl, 0x22(%r12)
cmpb $0x0, 0x11(%rbx)
je 0x307fe
decl 0x14(%rbx)
jne 0x307fe
movq %rbx, %rdi
callq 0x46c15
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3_column_name
|
SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
return columnName(
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
}
|
pushq %rbp
pushq %r14
pushq %rbx
movzwl 0xbc(%rdi), %eax
cmpl %esi, %eax
jbe 0x3340b
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x333c8
callq *0x9b0f8(%rip) # 0xce4c0
movl %ebp, %eax
imulq $0x38, %rax, %rdi
addq 0x80(%rbx), %rdi
movl $0x1, %esi
callq 0x31895
cmpb $0x0, 0x61(%r14)
je 0x3340f
cmpl $0x0, 0xc4(%r14)
jne 0x33407
movb $0x0, 0x61(%r14)
movl $0x0, 0x158(%r14)
decl 0x160(%r14)
xorl %ebx, %ebx
jmp 0x33412
xorl %ebx, %ebx
jmp 0x33421
movq %rax, %rbx
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x33421
callq *0x9b0af(%rip) # 0xce4d0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
patternCompare
|
static int patternCompare(
const u8 *zPattern, /* The glob pattern */
const u8 *zString, /* The string to compare against the glob */
const struct compareInfo *pInfo, /* Information about how to do the compare */
u32 matchOther /* The escape char (LIKE) or '[' (GLOB) */
){
u32 c, c2; /* Next pattern and input string chars */
u32 matchOne = pInfo->matchOne; /* "?" or "_" */
u32 matchAll = pInfo->matchAll; /* "*" or "%" */
u8 noCase = pInfo->noCase; /* True if uppercase==lowercase */
const u8 *zEscaped = 0; /* One past the last escaped input char */
while( (c = Utf8Read(zPattern))!=0 ){
if( c==matchAll ){ /* Match "*" */
/* Skip over multiple "*" characters in the pattern. If there
** are also "?" characters, skip those as well, but consume a
** single character of the input string for each "?" skipped */
while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){
if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
return SQLITE_NOWILDCARDMATCH;
}
}
if( c==0 ){
return SQLITE_MATCH; /* "*" at the end of the pattern matches */
}else if( c==matchOther ){
if( pInfo->matchSet==0 ){
c = sqlite3Utf8Read(&zPattern);
if( c==0 ) return SQLITE_NOWILDCARDMATCH;
}else{
/* "[...]" immediately follows the "*". We have to do a slow
** recursive search in this case, but it is an unusual case. */
assert( matchOther<0x80 ); /* '[' is a single-byte character */
while( *zString ){
int bMatch = patternCompare(&zPattern[-1],zString,pInfo,matchOther);
if( bMatch!=SQLITE_NOMATCH ) return bMatch;
SQLITE_SKIP_UTF8(zString);
}
return SQLITE_NOWILDCARDMATCH;
}
}
/* At this point variable c contains the first character of the
** pattern string past the "*". Search in the input string for the
** first matching character and recursively continue the match from
** that point.
**
** For a case-insensitive search, set variable cx to be the same as
** c but in the other case and search the input string for either
** c or cx.
*/
if( c<=0x80 ){
char zStop[3];
int bMatch;
if( noCase ){
zStop[0] = sqlite3Toupper(c);
zStop[1] = sqlite3Tolower(c);
zStop[2] = 0;
}else{
zStop[0] = c;
zStop[1] = 0;
}
while(1){
zString += strcspn((const char*)zString, zStop);
if( zString[0]==0 ) break;
zString++;
bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
if( bMatch!=SQLITE_NOMATCH ) return bMatch;
}
}else{
int bMatch;
while( (c2 = Utf8Read(zString))!=0 ){
if( c2!=c ) continue;
bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
if( bMatch!=SQLITE_NOMATCH ) return bMatch;
}
}
return SQLITE_NOWILDCARDMATCH;
}
if( c==matchOther ){
if( pInfo->matchSet==0 ){
c = sqlite3Utf8Read(&zPattern);
if( c==0 ) return SQLITE_NOMATCH;
zEscaped = zPattern;
}else{
u32 prior_c = 0;
int seen = 0;
int invert = 0;
c = sqlite3Utf8Read(&zString);
if( c==0 ) return SQLITE_NOMATCH;
c2 = sqlite3Utf8Read(&zPattern);
if( c2=='^' ){
invert = 1;
c2 = sqlite3Utf8Read(&zPattern);
}
if( c2==']' ){
if( c==']' ) seen = 1;
c2 = sqlite3Utf8Read(&zPattern);
}
while( c2 && c2!=']' ){
if( c2=='-' && zPattern[0]!=']' && zPattern[0]!=0 && prior_c>0 ){
c2 = sqlite3Utf8Read(&zPattern);
if( c>=prior_c && c<=c2 ) seen = 1;
prior_c = 0;
}else{
if( c==c2 ){
seen = 1;
}
prior_c = c2;
}
c2 = sqlite3Utf8Read(&zPattern);
}
if( c2==0 || (seen ^ invert)==0 ){
return SQLITE_NOMATCH;
}
continue;
}
}
c2 = Utf8Read(zString);
if( c==c2 ) continue;
if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) && c<0x80 && c2<0x80 ){
continue;
}
if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue;
return SQLITE_NOMATCH;
}
return *zString==0 ? SQLITE_MATCH : SQLITE_NOMATCH;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x1c(%rsp)
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
leaq 0x10(%rsp), %rax
movq %rsi, (%rax)
movzbl 0x1(%rdx), %ebx
movzbl (%rdx), %r14d
movq %rdx, 0x20(%rsp)
movb 0x3(%rdx), %al
movb %al, 0x7(%rsp)
movq $0x0, 0x30(%rsp)
movl %r14d, 0x2c(%rsp)
movq 0x8(%rsp), %rax
movsbl (%rax), %r13d
testl %r13d, %r13d
js 0x359ed
incq %rax
movq %rax, 0x8(%rsp)
jmp 0x359fa
leaq 0x8(%rsp), %rdi
callq 0x61f46
movl %eax, %r13d
testl %r13d, %r13d
je 0x35ba5
cmpl %r14d, %r13d
je 0x35bb8
cmpl 0x1c(%rsp), %r13d
jne 0x35aa2
movq 0x20(%rsp), %rax
cmpb $0x0, 0x2(%rax)
je 0x35a83
leaq 0x10(%rsp), %rdi
callq 0x61f46
movl $0x1, %ebp
testl %eax, %eax
je 0x35d8b
movl %eax, %r13d
movl %ebx, %r15d
leaq 0x8(%rsp), %rdi
callq 0x61f46
xorl %r12d, %r12d
movl $0x0, %r14d
cmpl $0x5e, %eax
jne 0x35a67
leaq 0x8(%rsp), %rdi
callq 0x61f46
movl $0x1, %r14d
movl $0x0, %ebx
cmpl $0x5d, %eax
jne 0x35b37
xorl %ebx, %ebx
cmpl $0x5d, %r13d
sete %bl
jmp 0x35b28
leaq 0x8(%rsp), %rdi
callq 0x61f46
testl %eax, %eax
je 0x35d86
movl %eax, %r13d
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rcx
movsbl (%rcx), %eax
testl %eax, %eax
js 0x35ab8
incq %rcx
movq %rcx, 0x10(%rsp)
jmp 0x35ac2
leaq 0x10(%rsp), %rdi
callq 0x61f46
cmpl %eax, %r13d
je 0x359d5
cmpb $0x0, 0x7(%rsp)
je 0x35afd
movl %eax, %ecx
orl %r13d, %ecx
cmpl $0x7f, %ecx
ja 0x35afd
movl %r13d, %ecx
movl $0xff, %esi
andl %esi, %ecx
movl %eax, %edx
andl %esi, %edx
leaq 0x71fbf(%rip), %rsi # 0xa7ab0
movb (%rdx,%rsi), %dl
cmpb %dl, (%rcx,%rsi)
je 0x359d5
movl $0x1, %ebp
cmpl %ebx, %r13d
jne 0x35d8b
testl %eax, %eax
je 0x35d8b
movq 0x30(%rsp), %rax
cmpq %rax, 0x8(%rsp)
jne 0x359d5
jmp 0x35d8b
xorl %eax, %eax
movl %eax, %r12d
leaq 0x8(%rsp), %rdi
callq 0x61f46
cmpl $0x2d, %eax
je 0x35b60
cmpl $0x5d, %eax
je 0x35b4a
testl %eax, %eax
jne 0x35b98
jmp 0x35d8b
cmpl %r14d, %ebx
movl %r15d, %ebx
movl 0x2c(%rsp), %r14d
jne 0x359d5
jmp 0x35d8b
movq 0x8(%rsp), %rcx
movb (%rcx), %cl
cmpb $0x5d, %cl
je 0x35b98
testb %cl, %cl
sete %cl
testl %r12d, %r12d
sete %dl
orb %cl, %dl
jne 0x35b98
leaq 0x8(%rsp), %rdi
callq 0x61f46
cmpl %eax, %r13d
movl $0x1, %eax
cmoval %ebx, %eax
cmpl %r12d, %r13d
cmovael %eax, %ebx
jmp 0x35b28
cmpl %eax, %r13d
movl $0x1, %ecx
cmovel %ecx, %ebx
jmp 0x35b2a
movq 0x10(%rsp), %rax
xorl %ebp, %ebp
cmpb $0x0, (%rax)
setne %bpl
jmp 0x35d8b
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %r13
movq 0x8(%rsp), %rax
movsbl (%rax), %r15d
testl %r15d, %r15d
js 0x35bda
incq %rax
movq %rax, 0x8(%rsp)
jmp 0x35be5
movq %r13, %rdi
callq 0x61f46
movl %eax, %r15d
cmpl %r14d, %r15d
sete %al
cmpl %ebx, %r15d
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x35c13
cmpl %ebx, %r15d
jne 0x35bc2
movq %rbp, %rdi
callq 0x61f46
testl %eax, %eax
jne 0x35bc2
movl $0x2, %ebp
jmp 0x35d8b
testl %r15d, %r15d
je 0x35c8d
cmpl 0x1c(%rsp), %r15d
jne 0x35ca9
movq 0x20(%rsp), %rax
cmpb $0x0, 0x2(%rax)
je 0x35c94
movq 0x10(%rsp), %r15
movb (%r15), %bl
movl $0x2, %ebp
testb %bl, %bl
je 0x35d8b
movq 0x8(%rsp), %r12
decq %r12
movq %r12, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movl 0x1c(%rsp), %ecx
callq 0x35991
cmpl $0x1, %eax
jne 0x35d82
cmpb $-0x40, %bl
jb 0x35c7e
movb 0x1(%r15), %bl
incq %r15
movl %ebx, %eax
andb $-0x40, %al
negb %al
jo 0x35c6d
jmp 0x35c84
incq %r15
movb (%r15), %bl
testb %bl, %bl
jne 0x35c4b
jmp 0x35d8b
xorl %ebp, %ebp
jmp 0x35d8b
leaq 0x8(%rsp), %rdi
callq 0x61f46
movl %eax, %r15d
testl %eax, %eax
je 0x35c09
cmpl $0x81, %r15d
jae 0x35cdf
cmpb $0x0, 0x7(%rsp)
je 0x35d33
movl %r15d, %eax
leaq 0x71f0d(%rip), %rcx # 0xa7bd0
movb (%rax,%rcx), %cl
notb %cl
orb $-0x21, %cl
andb %cl, %r15b
leaq 0x71ddb(%rip), %rcx # 0xa7ab0
movb (%rax,%rcx), %al
movb $0x0, 0x2b(%rsp)
jmp 0x35d35
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r13
movq 0x10(%rsp), %rcx
movsbl (%rcx), %eax
testl %eax, %eax
js 0x35cff
incq %rcx
movq %rcx, 0x10(%rsp)
jmp 0x35d07
movq %r13, %rdi
callq 0x61f46
testl %eax, %eax
je 0x35c09
cmpl %r15d, %eax
jne 0x35ce9
movq 0x10(%rsp), %rsi
movq %r12, %rdi
movq 0x20(%rsp), %rdx
movl 0x1c(%rsp), %ecx
callq 0x35991
movl %eax, %ebp
cmpl $0x1, %eax
je 0x35ce9
jmp 0x35d8b
xorl %eax, %eax
leaq 0x29(%rsp), %r12
movb %r15b, (%r12)
movb %al, 0x1(%r12)
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0xa090
cmpb $0x0, (%r15,%rax)
je 0x35c09
addq %rax, %r15
incq %r15
movq %r13, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movl 0x1c(%rsp), %ecx
callq 0x35991
cmpl $0x1, %eax
je 0x35d4d
movl %eax, %ebp
jmp 0x35d8b
movl $0x1, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3_exec
|
SQLITE_API int sqlite3_exec(
sqlite3 *db, /* The database on which the SQL executes */
const char *zSql, /* The SQL to be executed */
sqlite3_callback xCallback, /* Invoke this callback routine */
void *pArg, /* First argument to xCallback() */
char **pzErrMsg /* Write error messages here */
){
int rc = SQLITE_OK; /* Return code */
const char *zLeftover; /* Tail of unprocessed SQL */
sqlite3_stmt *pStmt = 0; /* The current SQL statement */
char **azCols = 0; /* Names of result columns */
int callbackIsInit; /* True if callback data is initialized */
if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
if( zSql==0 ) zSql = "";
sqlite3_mutex_enter(db->mutex);
sqlite3Error(db, SQLITE_OK);
while( rc==SQLITE_OK && zSql[0] ){
int nCol;
char **azVals = 0;
pStmt = 0;
rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);
assert( rc==SQLITE_OK || pStmt==0 );
if( rc!=SQLITE_OK ){
continue;
}
if( !pStmt ){
/* this happens for a comment or white-space */
zSql = zLeftover;
continue;
}
callbackIsInit = 0;
nCol = sqlite3_column_count(pStmt);
while( 1 ){
int i;
rc = sqlite3_step(pStmt);
/* Invoke the callback function if required */
if( xCallback && (SQLITE_ROW==rc ||
(SQLITE_DONE==rc && !callbackIsInit
&& db->flags&SQLITE_NullCallback)) ){
if( !callbackIsInit ){
azCols = sqlite3DbMallocRaw(db, (2*nCol+1)*sizeof(const char*));
if( azCols==0 ){
goto exec_out;
}
for(i=0; i<nCol; i++){
azCols[i] = (char *)sqlite3_column_name(pStmt, i);
/* sqlite3VdbeSetColName() installs column names as UTF8
** strings so there is no way for sqlite3_column_name() to fail. */
assert( azCols[i]!=0 );
}
callbackIsInit = 1;
}
if( rc==SQLITE_ROW ){
azVals = &azCols[nCol];
for(i=0; i<nCol; i++){
azVals[i] = (char *)sqlite3_column_text(pStmt, i);
if( !azVals[i] && sqlite3_column_type(pStmt, i)!=SQLITE_NULL ){
sqlite3OomFault(db);
goto exec_out;
}
}
azVals[i] = 0;
}
if( xCallback(pArg, nCol, azVals, azCols) ){
/* EVIDENCE-OF: R-38229-40159 If the callback function to
** sqlite3_exec() returns non-zero, then sqlite3_exec() will
** return SQLITE_ABORT. */
rc = SQLITE_ABORT;
sqlite3VdbeFinalize((Vdbe *)pStmt);
pStmt = 0;
sqlite3Error(db, SQLITE_ABORT);
goto exec_out;
}
}
if( rc!=SQLITE_ROW ){
rc = sqlite3VdbeFinalize((Vdbe *)pStmt);
pStmt = 0;
zSql = zLeftover;
while( sqlite3Isspace(zSql[0]) ) zSql++;
break;
}
}
sqlite3DbFree(db, azCols);
azCols = 0;
}
exec_out:
if( pStmt ) sqlite3VdbeFinalize((Vdbe *)pStmt);
sqlite3DbFree(db, azCols);
rc = sqlite3ApiExit(db, rc);
if( rc!=SQLITE_OK && pzErrMsg ){
*pzErrMsg = sqlite3DbStrDup(0, sqlite3_errmsg(db));
if( *pzErrMsg==0 ){
rc = SQLITE_NOMEM_BKPT;
sqlite3Error(db, SQLITE_NOMEM);
}
}else if( pzErrMsg ){
*pzErrMsg = 0;
}
assert( (rc&db->errMask)==rc );
sqlite3_mutex_leave(db->mutex);
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x8(%rsp)
callq 0x36192
testl %eax, %eax
je 0x3601c
testq %r14, %r14
leaq 0x7010f(%rip), %rbx # 0xa5efc
cmovneq %r14, %rbx
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x35e00
callq *0x986c0(%rip) # 0xce4c0
movl $0x0, 0x50(%r15)
cmpq $0x0, 0x150(%r15)
je 0x35e1c
movq %r15, %rdi
xorl %esi, %esi
callq 0x3ed3d
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r12
movq %r15, 0x18(%rsp)
cmpb $0x0, (%rbx)
je 0x360d3
movq $0x0, 0x8(%rsp)
movq %r14, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x80, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x36a8f
testl %eax, %eax
jne 0x360d7
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x36008
movzwl 0xbc(%rax), %r14d
movl %r14d, %eax
shll $0x4, %eax
orq $0x8, %rax
movq %rax, 0x38(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %ebx, %ebx
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x320b6
cmpq $0x0, 0x30(%rsp)
je 0x35faa
cmpl $0x64, %eax
movl %eax, 0x14(%rsp)
jne 0x35eba
testl %r15d, %r15d
jne 0x35f1d
jmp 0x35edb
cmpl $0x65, %eax
jne 0x35fb8
testl %r15d, %r15d
jne 0x35fb8
movq 0x18(%rsp), %rax
testb $0x1, 0x31(%rax)
je 0x35fb8
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x3c8cb
testq %rax, %rax
je 0x360c5
movq %rax, %r13
testq %r14, %r14
je 0x35f16
xorl %r15d, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x333a2
movq %rax, (%r13,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x35efe
cmpl $0x64, 0x14(%rsp)
jne 0x35f86
leaq (,%r14,8), %rbx
addq %r13, %rbx
testq %r14, %r14
je 0x35f7c
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0x332dc
movq %rax, (%rbx,%r15,8)
testq %rax, %rax
jne 0x35f6f
movq 0x8(%rsp), %r12
movq %r12, %rdi
movl %r15d, %esi
callq 0x33157
movl 0x8(%rax), %ebp
movq %r12, %rdi
callq 0x331c0
movl $0xaaaaaaaa, %eax # imm = 0xAAAAAAAA
btl %ebp, %eax
jae 0x3604c
incq %r15
cmpq %r15, %r14
jne 0x35f30
movq %r14, %rax
jmp 0x35f7e
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
movq 0x40(%rsp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
movq %r13, %rcx
callq *0x30(%rsp)
movl $0x1, %r15d
testl %eax, %eax
jne 0x3608d
movl 0x14(%rsp), %eax
cmpl $0x64, %eax
je 0x35e91
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x314f2
movl %eax, %ebp
movq $0x0, 0x8(%rsp)
movq 0x28(%rsp), %rbx
decq %rbx
leaq 0x71bf6(%rip), %rcx # 0xa7bd0
movzbl 0x1(%rbx), %eax
incq %rbx
testb $0x1, (%rax,%rcx)
jne 0x35fda
testq %r13, %r13
movq 0x18(%rsp), %r15
je 0x35ffc
movq %r15, %rdi
movq %r13, %rsi
callq 0x3c824
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r12
jmp 0x3600f
xorl %ebp, %ebp
movq 0x28(%rsp), %rbx
testl %ebp, %ebp
je 0x35e2b
jmp 0x360d9
leaq 0x75fc7(%rip), %rsi # 0xabfea
leaq 0x7a394(%rip), %rdx # 0xb03be
leaq 0x75de5(%rip), %r8 # 0xabe16
movl $0x15, %ebp
movl $0x15, %edi
movl $0x1cb04, %ecx # imm = 0x1CB04
xorl %eax, %eax
callq 0x2df95
jmp 0x36181
movq 0x18(%rsp), %rax
cmpb $0x0, 0x61(%rax)
je 0x3605e
movq 0x20(%rsp), %r14
jmp 0x36086
cmpb $0x0, 0x62(%rax)
movq 0x20(%rsp), %r14
jne 0x36086
movb $0x1, 0x61(%rax)
cmpl $0x0, 0xc4(%rax)
jle 0x36080
movl $0x1, 0x158(%rax)
incl 0x160(%rax)
movl $0x64, %ebp
jmp 0x360e6
movq 0x8(%rsp), %rdi
callq 0x314f2
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rbx
movl $0x4, 0x50(%rbx)
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3ed3d
movl $0x4, %ebp
movq 0x20(%rsp), %r14
jmp 0x360fd
xorl %r13d, %r13d
movq 0x20(%rsp), %r14
movl 0x14(%rsp), %ebp
jmp 0x360e6
xorl %ebp, %ebp
jmp 0x360d9
movl %eax, %ebp
movq 0x8(%rsp), %r12
xorl %r13d, %r13d
movq 0x20(%rsp), %r14
testq %r12, %r12
je 0x360f3
movq %r12, %rdi
callq 0x314f2
testq %r13, %r13
movq 0x18(%rsp), %rbx
je 0x36108
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3c824
cmpl $0xc0a, %ebp # imm = 0xC0A
je 0x3611b
cmpb $0x0, 0x61(%rbx)
jne 0x3611b
andl 0x54(%rbx), %ebp
jmp 0x36128
movq %rbx, %rdi
callq 0x49e82
movl $0x7, %ebp
testq %r14, %r14
je 0x36166
testl %ebp, %ebp
je 0x36166
movq %rbx, %rdi
callq 0x36212
xorl %edi, %edi
movq %rax, %rsi
callq 0x32ebf
movq %rax, (%r14)
testq %rax, %rax
jne 0x36172
movl $0x7, 0x50(%rbx)
movl $0x7, %ebp
movq %rbx, %rdi
movl $0x7, %esi
callq 0x3ed3d
jmp 0x36172
testq %r14, %r14
je 0x36172
movq $0x0, (%r14)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x36181
callq *0x9834f(%rip) # 0xce4d0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3LockAndPrepare
|
static int sqlite3LockAndPrepare(
sqlite3 *db, /* Database handle. */
const char *zSql, /* UTF-8 encoded SQL statement. */
int nBytes, /* Length of zSql in bytes. */
u32 prepFlags, /* Zero or more SQLITE_PREPARE_* flags */
Vdbe *pOld, /* VM being reprepared */
sqlite3_stmt **ppStmt, /* OUT: A pointer to the prepared statement */
const char **pzTail /* OUT: End of parsed string */
){
int rc;
int cnt = 0;
#ifdef SQLITE_ENABLE_API_ARMOR
if( ppStmt==0 ) return SQLITE_MISUSE_BKPT;
#endif
*ppStmt = 0;
if( !sqlite3SafetyCheckOk(db)||zSql==0 ){
return SQLITE_MISUSE_BKPT;
}
sqlite3_mutex_enter(db->mutex);
sqlite3BtreeEnterAll(db);
do{
/* Make multiple attempts to compile the SQL, until it either succeeds
** or encounters a permanent error. A schema problem after one schema
** reset is considered a permanent error. */
rc = sqlite3Prepare(db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail);
assert( rc==SQLITE_OK || *ppStmt==0 );
}while( rc==SQLITE_ERROR_RETRY
|| (rc==SQLITE_SCHEMA && (sqlite3ResetOneSchema(db,-1), cnt++)==0) );
sqlite3BtreeLeaveAll(db);
rc = sqlite3ApiExit(db, rc);
assert( (rc&db->errMask)==rc );
sqlite3_mutex_leave(db->mutex);
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
movq %r8, 0x48(%rsp)
movl %ecx, 0x14(%rsp)
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq %r9, 0x40(%rsp)
movq $0x0, (%r9)
callq 0x36192
testq %r14, %r14
je 0x37038
testl %eax, %eax
je 0x37038
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
movq %r14, 0x8(%rsp)
je 0x36aee
callq *0x979d7(%rip) # 0xce4c0
movq 0x8(%rsp), %r14
cmpb $0x0, 0x69(%rbx)
jne 0x36b01
movq %rbx, %rdi
callq 0x3ec19
movq 0x8(%rsp), %r14
movl 0x4(%rsp), %eax
leaq 0x1(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq %rax, 0x28(%rsp)
addq %r14, %rax
movq %rax, 0x30(%rsp)
movb $0x1, %al
leaq 0x50(%rsp), %r13
movl %eax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movl $0xc4, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0xa220
movl $0xa0, %edx
leaq 0x148(%rsp), %rdi
xorl %esi, %esi
callq 0xa220
movq 0x48(%rsp), %rax
movq %rax, 0x178(%rsp)
testb $0x1, 0x14(%rsp)
je 0x36b71
movb $0x1, 0x74(%rsp)
incl 0x160(%rbx)
movl 0x28(%rbx), %eax
testl %eax, %eax
jle 0x36bea
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x20(%rbx), %rcx
movq 0x8(%rcx,%r14), %r13
testq %r13, %r13
je 0x36bdb
cmpb $0x0, 0x11(%r13)
je 0x36ba5
incl 0x14(%r13)
cmpb $0x0, 0x12(%r13)
jne 0x36ba5
movq %r13, %rdi
callq 0x46b8f
movq %r13, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x46c32
movl %eax, %r12d
cmpb $0x0, 0x11(%r13)
je 0x36bcf
decl 0x14(%r13)
jne 0x36bcf
movq %r13, %rdi
callq 0x46c15
testl %r12d, %r12d
jne 0x36c63
movl 0x28(%rbx), %eax
incq %rbp
movslq %eax, %rcx
addq $0x20, %r14
cmpq %rcx, %rbp
jl 0x36b7d
movq %rbx, %rdi
callq 0x61b3e
movq %rbx, 0x50(%rsp)
cmpl $0x0, 0x4(%rsp)
movq 0x8(%rsp), %rsi
js 0x36c4f
je 0x36c11
movq 0x28(%rsp), %rax
cmpb $0x0, -0x1(%rsi,%rax)
je 0x36c4f
movl 0x4(%rsp), %eax
cmpl %eax, 0x80(%rbx)
leaq 0x50(%rsp), %r13
movq %rbx, %rdi
jge 0x36c89
movl $0x12, %esi
leaq 0x76b12(%rip), %rdx # 0xad743
xorl %eax, %eax
callq 0x2f6f6
cmpb $0x0, 0x61(%rbx)
jne 0x37066
movl 0x54(%rbx), %r12d
andl $0x12, %r12d
jmp 0x36fde
leaq 0x50(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x37962
jmp 0x36cf8
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rcx
movq %rbx, %rdi
movl %r12d, %esi
leaq 0x76aad(%rip), %rdx # 0xad725
xorl %eax, %eax
callq 0x2f6f6
leaq 0x50(%rsp), %r13
jmp 0x36fde
movq 0x38(%rsp), %rsi
callq 0x3c8cb
testq %rax, %rax
je 0x36ceb
movq %rax, %r12
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movq 0x28(%rsp), %r15
movq %r15, %rdx
callq 0xa370
movb $0x0, (%r12,%r15)
movq %r13, %rdi
movq %r12, %rsi
leaq 0x18(%rsp), %rdx
callq 0x37962
movq 0x180(%rsp), %rax
subq %r12, %rax
addq %r14, %rax
movq %rax, 0x180(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c824
jmp 0x36cf8
movq 0x30(%rsp), %rax
movq %rax, 0x180(%rsp)
movq 0x220(%rsp), %rcx
cmpl $0x65, 0x68(%rsp)
jne 0x36d0f
movl $0x0, 0x68(%rsp)
cmpb $0x0, 0x6d(%rsp)
je 0x36df9
movq 0x50(%rsp), %r12
cmpl $0x0, 0x28(%r12)
jle 0x36df1
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x20(%r12), %rax
movq 0x8(%rax,%r14), %rbp
testq %rbp, %rbp
je 0x36d9d
movb 0x10(%rbp), %r15b
testb %r15b, %r15b
jne 0x36d59
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2feea
testl %eax, %eax
jne 0x36db0
movq %rbp, %rdi
movl $0x1, %esi
leaq 0x24(%rsp), %rdx
callq 0x559f6
movl 0x24(%rsp), %eax
movq 0x20(%r12), %rcx
movq 0x18(%rcx,%r14), %rcx
cmpl (%rcx), %eax
je 0x36d90
movq %r12, %rdi
movl %r13d, %esi
callq 0x55988
movl $0x11, 0x68(%rsp)
testb %r15b, %r15b
jne 0x36d9d
movq %rbp, %rdi
callq 0x5e10a
incq %r13
movslq 0x28(%r12), %rax
addq $0x20, %r14
cmpq %rax, %r13
jl 0x36d31
jmp 0x36df1
cmpl $0xc0a, %eax # imm = 0xC0A
je 0x36dbc
cmpl $0x7, %eax
jne 0x36df1
cmpb $0x0, 0x61(%r12)
jne 0x36df1
cmpb $0x0, 0x62(%r12)
jne 0x36df1
movb $0x1, 0x61(%r12)
cmpl $0x0, 0xc4(%r12)
jle 0x36de9
movl $0x1, 0x158(%r12)
incl 0x160(%r12)
movq 0x220(%rsp), %rcx
cmpb $0x0, 0x61(%rbx)
je 0x36e07
movl $0x7, 0x68(%rsp)
testq %rcx, %rcx
je 0x36e17
movq 0x180(%rsp), %rax
movq %rax, (%rcx)
movl 0x68(%rsp), %r12d
testl %r12d, %r12d
sete %cl
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
setne %dl
movb 0x15b(%rsp), %al
testb %al, %al
setne %sil
andb %dl, %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x36ecc
xorl %r14d, %r14d
xorl %ecx, %ecx
cmpb $0x2, %al
sete %r14b
setne %cl
leal 0x4(,%rcx,4), %esi
leal (,%r14,8), %r13d
leaq 0x8(,%r14,4), %rbp
callq 0x61fbe
shll $0x5, %r14d
leaq 0x71891(%rip), %rax # 0xa8710
addq %rax, %r14
xorl %r15d, %r15d
movq 0x60(%rsp), %rax
movq (%rax), %rcx
cmpb $0x0, 0x61(%rcx)
jne 0x36ebc
movslq (%r14), %rsi
leaq 0x71873(%rip), %rcx # 0xa8710
addq %rcx, %rsi
movq 0x80(%rax), %rdi
addq %r15, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x31b16
incq %r13
addq $0x4, %r14
addq $0x38, %r15
cmpq %rbp, %r13
jb 0x36e85
cmpb $0x0, 0xb5(%rbx)
movq 0x60(%rsp), %r13
jne 0x36f40
testq %r13, %r13
je 0x36f5a
movq 0x180(%rsp), %rax
movl 0x14(%rsp), %ecx
movb %cl, 0xc0(%r13)
testb %cl, %cl
js 0x36f01
movl $0x0, 0x10c(%r13)
movq 0x8(%rsp), %r15
subq %r15, %rax
movslq %eax, %rbp
movq (%r13), %rdi
leaq 0x1(%rbp), %rsi
callq 0x3c8cb
movq %rax, %r14
testq %rax, %rax
je 0x36f34
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xa370
movb $0x0, (%r14,%rbp)
movq %r14, 0xe8(%r13)
movq 0x60(%rsp), %r13
testq %r13, %r13
je 0x36f5a
testl %r12d, %r12d
jne 0x36f50
cmpb $0x0, 0x61(%rbx)
je 0x36f5d
movq %r13, %rdi
callq 0x314f2
jmp 0x36f65
xorl %r13d, %r13d
movq 0x40(%rsp), %rax
movq %r13, (%rax)
movq 0x18(%rsp), %r13
testq %r13, %r13
je 0x36f98
movq %rbx, %rdi
movl %r12d, %esi
leaq 0x7505a(%rip), %rdx # 0xabfd6
movq %r13, %rcx
xorl %eax, %eax
callq 0x2f6f6
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3c824
leaq 0x50(%rsp), %r13
jmp 0x36fd1
movl %r12d, 0x50(%rbx)
testl %r12d, %r12d
leaq 0x50(%rsp), %r13
jne 0x36fb0
cmpq $0x0, 0x150(%rbx)
je 0x36fd1
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3ed3d
jmp 0x36fd1
movq 0x8(%rsi), %rax
movq %rax, 0x1c8(%rsp)
movq %rbx, %rdi
callq 0x3c824
movq 0x1c8(%rsp), %rsi
testq %rsi, %rsi
jne 0x36fbd
movq %r13, %rdi
callq 0x3557b
cmpl $0x201, %r12d # imm = 0x201
je 0x36b26
cmpl $0x11, %r12d
jne 0x3707e
movq %rbx, %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x55988
testb $0x1, 0x20(%rsp)
movl $0x0, %eax
jne 0x36b22
cmpb $0x0, 0x69(%rbx)
jne 0x37028
movq %rbx, %rdi
callq 0x3ec71
cmpb $0x0, 0x61(%rbx)
jne 0x370a1
movl 0x54(%rbx), %r12d
andl $0x11, %r12d
jmp 0x370af
leaq 0x74fab(%rip), %rsi # 0xabfea
leaq 0x79378(%rip), %rdx # 0xb03be
leaq 0x74dc9(%rip), %r8 # 0xabe16
movl $0x15, %r12d
movl $0x15, %edi
movl $0x1e012, %ecx # imm = 0x1E012
xorl %eax, %eax
callq 0x2df95
jmp 0x370be
movq %rbx, %rdi
callq 0x49e82
leaq 0x50(%rsp), %rdi
callq 0x3557b
movl $0x7, %r12d
cmpb $0x0, 0x69(%rbx)
jne 0x3708c
movq %rbx, %rdi
callq 0x3ec71
cmpl $0xc0a, %r12d # imm = 0xC0A
je 0x370a1
cmpb $0x0, 0x61(%rbx)
jne 0x370a1
andl 0x54(%rbx), %r12d
jmp 0x370af
movq %rbx, %rdi
callq 0x49e82
movl $0x7, %r12d
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x370be
callq *0x97412(%rip) # 0xce4d0
movl %r12d, %eax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3DbFreeNN
|
SQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3 *db, void *p){
assert( db==0 || sqlite3_mutex_held(db->mutex) );
assert( p!=0 );
if( db ){
if( db->pnBytesFreed ){
measureAllocationSize(db, p);
return;
}
if( isLookaside(db, p) ){
LookasideSlot *pBuf = (LookasideSlot*)p;
#ifdef SQLITE_DEBUG
/* Trash all content in the buffer being freed */
memset(p, 0xaa, db->lookaside.sz);
#endif
pBuf->pNext = db->lookaside.pFree;
db->lookaside.pFree = pBuf;
return;
}
}
assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
assert( db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
sqlite3_free(p);
}
|
testq %rdi, %rdi
je 0x3c857
cmpq $0x0, 0x2a0(%rdi)
jne 0x3c85f
cmpq %rsi, 0x188(%rdi)
ja 0x3c857
cmpq %rsi, 0x190(%rdi)
jbe 0x3c857
movq 0x180(%rdi), %rax
movq %rax, (%rsi)
movq %rsi, 0x180(%rdi)
retq
movq %rsi, %rdi
jmp 0x2be2e
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
closePendingFds
|
static void closePendingFds(unixFile *pFile){
unixInodeInfo *pInode = pFile->pInode;
UnixUnusedFd *p;
UnixUnusedFd *pNext;
assert( unixFileMutexHeld(pFile) );
for(p=pInode->pUnused; p; p=pNext){
pNext = p->pNext;
robust_close(pFile, p->fd, __LINE__);
sqlite3_free(p);
}
pInode->pUnused = 0;
}
|
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r15
movq 0x28(%r15), %r14
testq %r14, %r14
je 0x3e4ca
movq %rdi, %rbx
movq 0x8(%r14), %r12
movl (%r14), %esi
movq %rbx, %rdi
movl $0x8271, %edx # imm = 0x8271
callq 0x3e4de
movq %r14, %rdi
callq 0x2be2e
movq %r12, %r14
testq %r12, %r12
jne 0x3e4a6
movq $0x0, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
btreeEnterAll
|
static void SQLITE_NOINLINE btreeEnterAll(sqlite3 *db){
int i;
int skipOk = 1;
Btree *p;
assert( sqlite3_mutex_held(db->mutex) );
for(i=0; i<db->nDb; i++){
p = db->aDb[i].pBt;
if( p && p->sharable ){
sqlite3BtreeEnter(p);
skipOk = 0;
}
}
db->noSharedCache = skipOk;
}
|
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x28(%rdi), %eax
movb $0x1, %cl
testl %eax, %eax
jle 0x3ec68
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rdx
movq (%rdx,%r14), %rdi
testq %rdi, %rdi
je 0x3ec59
cmpb $0x0, 0x11(%rdi)
je 0x3ec59
incl 0x14(%rdi)
cmpb $0x0, 0x12(%rdi)
jne 0x3ec57
callq 0x46b8f
movl 0x28(%rbx), %eax
xorl %ecx, %ecx
incq %r15
movslq %eax, %rdx
addq $0x20, %r14
cmpq %rdx, %r15
jl 0x3ec33
movb %cl, 0x69(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
pagerStress
|
static int pagerStress(void *p, PgHdr *pPg){
Pager *pPager = (Pager *)p;
int rc = SQLITE_OK;
assert( pPg->pPager==pPager );
assert( pPg->flags&PGHDR_DIRTY );
/* The doNotSpill NOSYNC bit is set during times when doing a sync of
** journal (and adding a new header) is not allowed. This occurs
** during calls to sqlite3PagerWrite() while trying to journal multiple
** pages belonging to the same sector.
**
** The doNotSpill ROLLBACK and OFF bits inhibits all cache spilling
** regardless of whether or not a sync is required. This is set during
** a rollback or by user request, respectively.
**
** Spilling is also prohibited when in an error state since that could
** lead to database corruption. In the current implementation it
** is impossible for sqlite3PcacheFetch() to be called with createFlag==3
** while in the error state, hence it is impossible for this routine to
** be called in the error state. Nevertheless, we include a NEVER()
** test for the error state as a safeguard against future changes.
*/
if( NEVER(pPager->errCode) ) return SQLITE_OK;
testcase( pPager->doNotSpill & SPILLFLAG_ROLLBACK );
testcase( pPager->doNotSpill & SPILLFLAG_OFF );
testcase( pPager->doNotSpill & SPILLFLAG_NOSYNC );
if( pPager->doNotSpill
&& ((pPager->doNotSpill & (SPILLFLAG_ROLLBACK|SPILLFLAG_OFF))!=0
|| (pPg->flags & PGHDR_NEED_SYNC)!=0)
){
return SQLITE_OK;
}
pPager->aStat[PAGER_STAT_SPILL]++;
pPg->pDirty = 0;
if( pagerUseWal(pPager) ){
/* Write a single frame for this page to the log. */
rc = subjournalPageIfRequired(pPg);
if( rc==SQLITE_OK ){
rc = pagerWalFrames(pPager, pPg, 0, 0);
}
}else{
#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
if( pPager->tempFile==0 ){
rc = sqlite3JournalCreate(pPager->jfd);
if( rc!=SQLITE_OK ) return pager_error(pPager, rc);
}
#endif
/* Sync the journal file if required. */
if( pPg->flags&PGHDR_NEED_SYNC
|| pPager->eState==PAGER_WRITER_CACHEMOD
){
rc = syncJournal(pPager, 1);
}
/* Write the contents of the page out to the database file. */
if( rc==SQLITE_OK ){
assert( (pPg->flags&PGHDR_NEED_SYNC)==0 );
rc = pager_write_pagelist(pPager, pPg);
}
}
/* Mark the page as clean. */
if( rc==SQLITE_OK ){
PAGERTRACE(("STRESS %d page %d\n", PAGERID(pPager), pPg->pgno));
sqlite3PcacheMakeClean(pPg);
}
return pager_error(pPager, rc);
}
|
xorl %eax, %eax
cmpl $0x0, 0x2c(%rdi)
je 0x400c9
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb 0x18(%rdi), %cl
testb %cl, %cl
je 0x400ee
testb $0x3, %cl
jne 0x4017d
testb $0x8, 0x34(%r14)
jne 0x4017d
incl 0xfc(%rbx)
movq $0x0, 0x20(%r14)
cmpq $0x0, 0x120(%rbx)
je 0x40123
movq %r14, %rdi
callq 0x40210
testl %eax, %eax
jne 0x40150
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x403a0
jmp 0x4014c
testb $0x8, 0x34(%r14)
jne 0x40130
cmpb $0x3, 0x14(%rbx)
jne 0x40141
movq %rbx, %rdi
movl $0x1, %esi
callq 0x40b8f
testl %eax, %eax
jne 0x40150
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40d51
testl %eax, %eax
je 0x40173
cmpb $0xd, %al
je 0x4015c
movzbl %al, %ecx
cmpl $0xa, %ecx
jne 0x4017d
movl %eax, 0x2c(%rbx)
movb $0x6, 0x14(%rbx)
leaq 0x2ec7(%rip), %rcx # 0x43031
movq %rcx, 0x108(%rbx)
jmp 0x4017d
movq %r14, %rdi
callq 0x40ea4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
memjrnlTruncate
|
static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
MemJournal *p = (MemJournal *)pJfd;
if( ALWAYS(size==0) ){
memjrnlFreeChunks(p);
p->nSize = 0;
p->endpoint.pChunk = 0;
p->endpoint.iOffset = 0;
p->readpoint.pChunk = 0;
p->readpoint.iOffset = 0;
}
return SQLITE_OK;
}
|
testq %rsi, %rsi
jne 0x413d8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x413b8
movq (%rdi), %r15
callq 0x2be2e
movq %r15, %rdi
testq %r15, %r15
jne 0x413a8
movl $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
xorl %eax, %eax
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3WalFindFrame
|
SQLITE_PRIVATE int sqlite3WalFindFrame(
Wal *pWal, /* WAL handle */
Pgno pgno, /* Database page number to read data for */
u32 *piRead /* OUT: Frame number (or zero) */
){
u32 iRead = 0; /* If !=0, WAL frame to return data from */
u32 iLast = pWal->hdr.mxFrame; /* Last page in WAL for this reader */
int iHash; /* Used to loop through N hash tables */
int iMinHash;
/* This routine is only be called from within a read transaction. */
assert( pWal->readLock>=0 || pWal->lockError );
/* If the "last page" field of the wal-index header snapshot is 0, then
** no data will be read from the wal under any circumstances. Return early
** in this case as an optimization. Likewise, if pWal->readLock==0,
** then the WAL is ignored by the reader so return early, as if the
** WAL were empty.
*/
if( iLast==0 || (pWal->readLock==0 && pWal->bShmUnreliable==0) ){
*piRead = 0;
return SQLITE_OK;
}
/* Search the hash table or tables for an entry matching page number
** pgno. Each iteration of the following for() loop searches one
** hash table (each hash table indexes up to HASHTABLE_NPAGE frames).
**
** This code might run concurrently to the code in walIndexAppend()
** that adds entries to the wal-index (and possibly to this hash
** table). This means the value just read from the hash
** slot (aHash[iKey]) may have been added before or after the
** current read transaction was opened. Values added after the
** read transaction was opened may have been written incorrectly -
** i.e. these slots may contain garbage data. However, we assume
** that any slots written before the current read transaction was
** opened remain unmodified.
**
** For the reasons above, the if(...) condition featured in the inner
** loop of the following block is more stringent that would be required
** if we had exclusive access to the hash-table:
**
** (aPgno[iFrame]==pgno):
** This condition filters out normal hash-table collisions.
**
** (iFrame<=iLast):
** This condition filters out entries that were added to the hash
** table after the current read-transaction had started.
*/
iMinHash = walFramePage(pWal->minFrame);
for(iHash=walFramePage(iLast); iHash>=iMinHash; iHash--){
WalHashLoc sLoc; /* Hash table location */
int iKey; /* Hash slot index */
int nCollide; /* Number of hash collisions remaining */
int rc; /* Error code */
rc = walHashGet(pWal, iHash, &sLoc);
if( rc!=SQLITE_OK ){
return rc;
}
nCollide = HASHTABLE_NSLOT;
for(iKey=walHash(pgno); sLoc.aHash[iKey]; iKey=walNextHash(iKey)){
u32 iFrame = sLoc.aHash[iKey] + sLoc.iZero;
if( iFrame<=iLast && iFrame>=pWal->minFrame
&& sLoc.aPgno[sLoc.aHash[iKey]]==pgno ){
assert( iFrame>iRead || CORRUPT_DB );
iRead = iFrame;
}
if( (nCollide--)==0 ){
return SQLITE_CORRUPT_BKPT;
}
}
if( iRead ) break;
}
#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
/* If expensive assert() statements are available, do a linear search
** of the wal-index file content. Make sure the results agree with the
** result obtained using the hash indexes above. */
{
u32 iRead2 = 0;
u32 iTest;
assert( pWal->bShmUnreliable || pWal->minFrame>0 );
for(iTest=iLast; iTest>=pWal->minFrame && iTest>0; iTest--){
if( walFramePgno(pWal, iTest)==pgno ){
iRead2 = iTest;
break;
}
}
assert( iRead==iRead2 );
}
#endif
*piRead = iRead;
return SQLITE_OK;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl 0x58(%rdi), %r13d
testl %r13d, %r13d
je 0x4167b
movq %rdi, %r14
cmpw $0x0, 0x3c(%rdi)
jne 0x41642
cmpb $0x0, 0x46(%r14)
je 0x4167b
movl $0x1000, %ebx # imm = 0x1000
leal (%rbx,%r13), %r12d
addl 0x78(%r14), %ebx
movabsq $0xffffffff021, %rax # imm = 0xFFFFFFFF021
addq %rax, %rbx
shrq $0xc, %rbx
addq %rax, %r12
shrq $0xc, %r12
xorl %r15d, %r15d
movl $0x0, %eax
cmpl %ebx, %r12d
jge 0x41689
movl %eax, (%rdx)
jmp 0x41771
movl $0x0, (%rdx)
xorl %r15d, %r15d
jmp 0x41771
movq %rdx, 0x8(%rsp)
movl %esi, 0x4(%rsp)
imull $0x17f, %esi, %r15d # imm = 0x17F
andl $0x1fff, %r15d # imm = 0x1FFF
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl %r12d, %esi
movq %rdx, %rbp
callq 0x42a30
testl %eax, %eax
jne 0x41783
movq 0x10(%rsp), %rcx
cmpw $0x0, (%rcx,%r15,2)
je 0x41722
leaq (%rcx,%r15,2), %r9
movl 0x20(%rsp), %edx
xorl %eax, %eax
movl $0xffffdfff, %esi # imm = 0xFFFFDFFF
movq 0x18(%rsp), %rdi
movl %r15d, %r8d
movl 0x4(%rsp), %r11d
movzwl (%r9), %r10d
addl %edx, %r10d
cmpl %r13d, %r10d
ja 0x41705
cmpl 0x78(%r14), %r10d
jb 0x41705
movzwl (%r9), %r9d
movl (%rdi,%r9,4), %r9d
cmpl %r11d, %r9d
cmovel %r10d, %eax
incl %esi
je 0x41745
incl %r8d
andl $0x1fff, %r8d # imm = 0x1FFF
leaq (%rcx,%r8,2), %r9
cmpw $0x0, (%r9)
jne 0x416e4
testl %eax, %eax
jne 0x41738
leal -0x1(%r12), %eax
cmpl %ebx, %r12d
movl %eax, %r12d
movq %rbp, %rdx
jg 0x416a5
xorl %eax, %eax
movq 0x8(%rsp), %rdx
xorl %r15d, %r15d
jmp 0x41674
leaq 0x6a89e(%rip), %rsi # 0xabfea
leaq 0x6a9ba(%rip), %rdx # 0xac10d
leaq 0x6a6bc(%rip), %r8 # 0xabe16
movl $0xb, %r15d
movl $0xb, %edi
movl $0xed21, %ecx # imm = 0xED21
xorl %eax, %eax
callq 0x2df95
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r15d
jmp 0x41771
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
walIndexWriteHdr
|
static void walIndexWriteHdr(Wal *pWal){
volatile WalIndexHdr *aHdr = walIndexHdr(pWal);
const int nCksum = offsetof(WalIndexHdr, aCksum);
assert( pWal->writeLock );
pWal->hdr.isInit = 1;
pWal->hdr.iVersion = WALINDEX_MAX_VERSION;
walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);
memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
walShmBarrier(pWal);
memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
}
|
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rax
movq (%rax), %rbx
leaq 0x48(%rdi), %r14
movb $0x1, 0x54(%rdi)
movl $0x2de218, 0x48(%rdi) # imm = 0x2DE218
xorl %eax, %eax
movl $0x40, %ecx
xorl %edx, %edx
addl %eax, %edx
addl 0x8(%rdi,%rcx), %edx
addl 0xc(%rdi,%rcx), %eax
addl %edx, %eax
addq $0x8, %rcx
cmpq $0x68, %rcx
jb 0x4198e
movl %edx, 0x70(%rdi)
movl %eax, 0x74(%rdi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x50(%rbx)
movups %xmm1, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
cmpb $0x2, 0x3f(%rdi)
je 0x419d4
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
walRestartHdr
|
static void walRestartHdr(Wal *pWal, u32 salt1){
volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
int i; /* Loop counter */
u32 *aSalt = pWal->hdr.aSalt; /* Big-endian salt values */
pWal->nCkpt++;
pWal->hdr.mxFrame = 0;
sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
walIndexWriteHdr(pWal);
pInfo->nBackfill = 0;
pInfo->nBackfillAttempted = 0;
pInfo->aReadMark[1] = 0;
for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
assert( pInfo->aReadMark[0]==0 );
}
|
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rax
movq (%rax), %rbx
incl 0x88(%rdi)
xorl %r14d, %r14d
movl %r14d, 0x58(%rdi)
movl 0x68(%rdi), %eax
bswapl %eax
incl %eax
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, 0x68(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x69(%rdi)
movb %ah, 0x6a(%rdi)
movb %al, 0x6b(%rdi)
movl %esi, 0x6c(%rdi)
callq 0x4196b
movl %r14d, 0x60(%rbx)
movl %r14d, 0x80(%rbx)
movl %r14d, 0x68(%rbx)
movl $0xffffffff, 0x6c(%rbx,%r14,4) # imm = 0xFFFFFFFF
incq %r14
cmpq $0x3, %r14
jne 0x41a41
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
walIndexTryHdr
|
static int walIndexTryHdr(Wal *pWal, int *pChanged){
u32 aCksum[2]; /* Checksum on the header content */
WalIndexHdr h1, h2; /* Two copies of the header content */
WalIndexHdr volatile *aHdr; /* Header in shared memory */
/* The first page of the wal-index must be mapped at this point. */
assert( pWal->nWiData>0 && pWal->apWiData[0] );
/* Read the header. This might happen concurrently with a write to the
** same area of shared memory on a different CPU in a SMP,
** meaning it is possible that an inconsistent snapshot is read
** from the file. If this happens, return non-zero.
**
** There are two copies of the header at the beginning of the wal-index.
** When reading, read [0] first then [1]. Writes are in the reverse order.
** Memory barriers are used to prevent the compiler or the hardware from
** reordering the reads and writes.
*/
aHdr = walIndexHdr(pWal);
memcpy(&h1, (void *)&aHdr[0], sizeof(h1));
walShmBarrier(pWal);
memcpy(&h2, (void *)&aHdr[1], sizeof(h2));
if( memcmp(&h1, &h2, sizeof(h1))!=0 ){
return 1; /* Dirty read */
}
if( h1.isInit==0 ){
return 1; /* Malformed header - probably all zeros */
}
walChecksumBytes(1, (u8*)&h1, sizeof(h1)-sizeof(h1.aCksum), 0, aCksum);
if( aCksum[0]!=h1.aCksum[0] || aCksum[1]!=h1.aCksum[1] ){
return 1; /* Checksum does not match */
}
if( memcmp(&pWal->hdr, &h1, sizeof(WalIndexHdr)) ){
*pChanged = 1;
memcpy(&pWal->hdr, &h1, sizeof(WalIndexHdr));
pWal->szPage = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
testcase( pWal->szPage<=32768 );
testcase( pWal->szPage>=65536 );
}
/* The header was successfully read. Return zero. */
return 0;
}
|
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movq (%rax), %r15
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpb $0x2, 0x3f(%rdi)
je 0x426af
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movups 0x30(%r15), %xmm0
movups 0x40(%r15), %xmm1
movups 0x50(%r15), %xmm2
leaq 0x30(%rsp), %rsi
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rsp, %rdi
movl $0x30, %edx
callq 0xa490
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x42775
cmpb $0x0, 0xc(%rsp)
je 0x42775
xorl %ecx, %ecx
movq $-0x8, %rdx
xorl %esi, %esi
addl %ecx, %esi
addl 0x8(%rsp,%rdx), %esi
addl 0xc(%rsp,%rdx), %ecx
addl %esi, %ecx
addq $0x8, %rdx
cmpq $0x20, %rdx
jb 0x42700
cmpl 0x28(%rsp), %esi
jne 0x42775
cmpl 0x2c(%rsp), %ecx
jne 0x42775
leaq 0x48(%rbx), %r15
movq %rsp, %rsi
movl $0x30, %edx
movq %r15, %rdi
callq 0xa490
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x42775
movl $0x1, (%r14)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movzwl 0x56(%rbx), %ecx
movl %ecx, %edx
shll $0x10, %edx
orl %ecx, %edx
andl $0x1fe00, %edx # imm = 0x1FE00
movl %edx, 0x38(%rbx)
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
walEncodeFrame
|
static void walEncodeFrame(
Wal *pWal, /* The write-ahead log */
u32 iPage, /* Database page number for frame */
u32 nTruncate, /* New db size (or 0 for non-commit frames) */
u8 *aData, /* Pointer to page data */
u8 *aFrame /* OUT: Write encoded frame here */
){
int nativeCksum; /* True for native byte-order checksums */
u32 *aCksum = pWal->hdr.aFrameCksum;
assert( WAL_FRAME_HDRSIZE==24 );
sqlite3Put4byte(&aFrame[0], iPage);
sqlite3Put4byte(&aFrame[4], nTruncate);
if( pWal->iReCksum==0 ){
memcpy(&aFrame[8], pWal->hdr.aSalt, 8);
nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
sqlite3Put4byte(&aFrame[16], aCksum[0]);
sqlite3Put4byte(&aFrame[20], aCksum[1]);
}else{
memset(&aFrame[8], 0, 16);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movl %esi, %eax
movl %esi, %ecx
shrl $0x18, %ecx
movb %cl, (%r8)
movl %esi, %ecx
shrl $0x10, %ecx
movb %cl, 0x1(%r8)
movb %ah, 0x2(%rbx)
movb %al, 0x3(%r8)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0x4(%r8)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x5(%r8)
movb %dh, 0x6(%rbx)
movb %dl, 0x7(%r8)
cmpl $0x0, 0x7c(%rdi)
je 0x42aea
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
jmp 0x42b3e
movq %rdi, %r14
leaq 0x60(%rdi), %r12
movq 0x68(%rdi), %rax
movq %rax, 0x8(%rbx)
xorl %ebp, %ebp
cmpb $0x0, 0x55(%rdi)
sete %bpl
movl %ebp, %edi
movq %rbx, %rsi
movl $0x8, %edx
movq %r12, %rcx
movq %r12, %r8
callq 0x415c0
movl 0x38(%r14), %edx
movl %ebp, %edi
movq %r15, %rsi
movq %r12, %rcx
movq %r12, %r8
callq 0x415c0
movl 0x60(%r14), %eax
bswapl %eax
movl %eax, 0x10(%rbx)
movl 0x64(%r14), %eax
bswapl %eax
movl %eax, 0x14(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3PcacheFetchFinish
|
SQLITE_PRIVATE PgHdr *sqlite3PcacheFetchFinish(
PCache *pCache, /* Obtain the page from this cache */
Pgno pgno, /* Page number obtained */
sqlite3_pcache_page *pPage /* Page obtained by prior PcacheFetch() call */
){
PgHdr *pPgHdr;
assert( pPage!=0 );
pPgHdr = (PgHdr *)pPage->pExtra;
if( !pPgHdr->pPage ){
return pcacheFetchFinishWithInit(pCache, pgno, pPage);
}
pCache->nRefSum++;
pPgHdr->nRef++;
assert( sqlite3PcachePageSanity(pPgHdr) );
return pPgHdr;
}
|
movq 0x8(%rdx), %rax
cmpq $0x0, (%rax)
je 0x4350b
incl 0x18(%rdi)
incw 0x36(%rax)
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
accessPayload
|
static int accessPayload(
BtCursor *pCur, /* Cursor pointing to entry to read from */
u32 offset, /* Begin reading this far into payload */
u32 amt, /* Read this many bytes */
unsigned char *pBuf, /* Write the bytes into this buffer */
int eOp /* zero to read. non-zero to write. */
){
unsigned char *aPayload;
int rc = SQLITE_OK;
int iIdx = 0;
MemPage *pPage = pCur->pPage; /* Btree page of current entry */
BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
#ifdef SQLITE_DIRECT_OVERFLOW_READ
unsigned char * const pBufStart = pBuf; /* Start of original out buffer */
#endif
assert( pPage );
assert( eOp==0 || eOp==1 );
assert( pCur->eState==CURSOR_VALID );
assert( pCur->ix<pPage->nCell );
assert( cursorHoldsMutex(pCur) );
getCellInfo(pCur);
aPayload = pCur->info.pPayload;
assert( offset+amt <= pCur->info.nPayload );
assert( aPayload > pPage->aData );
if( (uptr)(aPayload - pPage->aData) > (pBt->usableSize - pCur->info.nLocal) ){
/* Trying to read or write past the end of the data is an error. The
** conditional above is really:
** &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
** but is recast into its current form to avoid integer overflow problems
*/
return SQLITE_CORRUPT_PAGE(pPage);
}
/* Check if data must be read/written to/from the btree page itself. */
if( offset<pCur->info.nLocal ){
int a = amt;
if( a+offset>pCur->info.nLocal ){
a = pCur->info.nLocal - offset;
}
rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);
offset = 0;
pBuf += a;
amt -= a;
}else{
offset -= pCur->info.nLocal;
}
if( rc==SQLITE_OK && amt>0 ){
const u32 ovflSize = pBt->usableSize - 4; /* Bytes content per ovfl page */
Pgno nextPage;
nextPage = get4byte(&aPayload[pCur->info.nLocal]);
/* If the BtCursor.aOverflow[] has not been allocated, allocate it now.
**
** The aOverflow[] array is sized at one entry for each overflow page
** in the overflow chain. The page number of the first overflow page is
** stored in aOverflow[0], etc. A value of 0 in the aOverflow[] array
** means "not yet known" (the cache is lazily populated).
*/
if( (pCur->curFlags & BTCF_ValidOvfl)==0 ){
int nOvfl = (pCur->info.nPayload-pCur->info.nLocal+ovflSize-1)/ovflSize;
if( pCur->aOverflow==0
|| nOvfl*(int)sizeof(Pgno) > sqlite3MallocSize(pCur->aOverflow)
){
Pgno *aNew = (Pgno*)sqlite3Realloc(
pCur->aOverflow, nOvfl*2*sizeof(Pgno)
);
if( aNew==0 ){
return SQLITE_NOMEM_BKPT;
}else{
pCur->aOverflow = aNew;
}
}
memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));
pCur->curFlags |= BTCF_ValidOvfl;
}else{
/* If the overflow page-list cache has been allocated and the
** entry for the first required overflow page is valid, skip
** directly to it.
*/
if( pCur->aOverflow[offset/ovflSize] ){
iIdx = (offset/ovflSize);
nextPage = pCur->aOverflow[iIdx];
offset = (offset%ovflSize);
}
}
assert( rc==SQLITE_OK && amt>0 );
while( nextPage ){
/* If required, populate the overflow page-list cache. */
assert( pCur->aOverflow[iIdx]==0
|| pCur->aOverflow[iIdx]==nextPage
|| CORRUPT_DB );
pCur->aOverflow[iIdx] = nextPage;
if( offset>=ovflSize ){
/* The only reason to read this page is to obtain the page
** number for the next page in the overflow chain. The page
** data is not required. So first try to lookup the overflow
** page-list cache, if any, then fall back to the getOverflowPage()
** function.
*/
assert( pCur->curFlags & BTCF_ValidOvfl );
assert( pCur->pBtree->db==pBt->db );
if( pCur->aOverflow[iIdx+1] ){
nextPage = pCur->aOverflow[iIdx+1];
}else{
rc = getOverflowPage(pBt, nextPage, 0, &nextPage);
}
offset -= ovflSize;
}else{
/* Need to read this page properly. It contains some of the
** range of data that is being read (eOp==0) or written (eOp!=0).
*/
#ifdef SQLITE_DIRECT_OVERFLOW_READ
sqlite3_file *fd; /* File from which to do direct overflow read */
#endif
int a = amt;
if( a + offset > ovflSize ){
a = ovflSize - offset;
}
#ifdef SQLITE_DIRECT_OVERFLOW_READ
/* If all the following are true:
**
** 1) this is a read operation, and
** 2) data is required from the start of this overflow page, and
** 3) there is no open write-transaction, and
** 4) the database is file-backed, and
** 5) the page is not in the WAL file
** 6) at least 4 bytes have already been read into the output buffer
**
** then data can be read directly from the database file into the
** output buffer, bypassing the page-cache altogether. This speeds
** up loading large records that span many overflow pages.
*/
if( eOp==0 /* (1) */
&& offset==0 /* (2) */
&& pBt->inTransaction==TRANS_READ /* (3) */
&& (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (4) */
&& 0==sqlite3PagerUseWal(pBt->pPager, nextPage) /* (5) */
&& &pBuf[-4]>=pBufStart /* (6) */
){
u8 aSave[4];
u8 *aWrite = &pBuf[-4];
assert( aWrite>=pBufStart ); /* due to (6) */
memcpy(aSave, aWrite, 4);
rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));
nextPage = get4byte(aWrite);
memcpy(aWrite, aSave, 4);
}else
#endif
{
DbPage *pDbPage;
rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage,
(eOp==0 ? PAGER_GET_READONLY : 0)
);
if( rc==SQLITE_OK ){
aPayload = sqlite3PagerGetData(pDbPage);
nextPage = get4byte(aPayload);
rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);
sqlite3PagerUnref(pDbPage);
offset = 0;
}
}
amt -= a;
if( amt==0 ) return rc;
pBuf += a;
}
if( rc ) break;
iIdx++;
}
}
if( rc==SQLITE_OK && amt>0 ){
/* Overflow chain ends prematurely */
return SQLITE_CORRUPT_PAGE(pPage);
}
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
movl %edx, %ebx
movl %esi, %r13d
movq %rdi, %r15
movq 0x20(%rdi), %r12
movq 0x88(%rdi), %rbp
callq 0x48447
movq 0x38(%r15), %r14
movq %r14, %rcx
subq 0x50(%rbp), %rcx
movq %r12, 0x20(%rsp)
movl 0x34(%r12), %edx
movzwl 0x44(%r15), %eax
subl %eax, %edx
cmpq %rdx, %rcx
jbe 0x48507
leaq 0x63b05(%rip), %rsi # 0xabfea
leaq 0x63c21(%rip), %rdx # 0xac10d
leaq 0x63923(%rip), %r8 # 0xabe16
movl $0xb, %ebp
movl $0xb, %edi
movl $0x10700, %ecx # imm = 0x10700
jmp 0x48795
movl %eax, %r12d
subl %r13d, %r12d
jbe 0x4853f
leal (%rbx,%r13), %ecx
cmpl %eax, %ecx
cmovbel %ebx, %r12d
movl %r13d, %r13d
addq %r14, %r13
cmpl $0x0, 0x14(%rsp)
je 0x48546
movq 0x70(%rbp), %rdi
callq 0x30914
movl %eax, %ebp
movslq %r12d, %rax
testl %ebp, %ebp
je 0x48559
movq 0x8(%rsp), %r13
jmp 0x48574
subl %eax, %r13d
xorl %ebp, %ebp
jmp 0x48582
movslq %r12d, %rbp
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rdi, %r13
movq %rbp, %rdx
jmp 0x4856a
movq %r13, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rsi
movq %rax, %rbp
movq %rax, %rdx
callq 0xa370
movq %rbp, %rax
xorl %ebp, %ebp
addq %rax, %r13
movq %r13, 0x8(%rsp)
subl %r12d, %ebx
xorl %r13d, %r13d
testl %ebp, %ebp
jne 0x48769
testl %ebx, %ebx
je 0x48769
movq 0x20(%rsp), %rax
movl 0x34(%rax), %eax
leal -0x4(%rax), %esi
movzwl 0x44(%r15), %ecx
movl (%r14,%rcx), %ebp
bswapl %ebp
movl %ebp, 0x4(%rsp)
testb $0x4, 0x1(%r15)
movl %esi, (%rsp)
jne 0x48628
movl 0x40(%r15), %edx
subl %ecx, %eax
addl %edx, %eax
addl $-0x5, %eax
xorl %edi, %edi
xorl %edx, %edx
divl %esi
movl %eax, %r12d
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x485ed
leal (,%r12,4), %r14d
movq %rax, %rdi
callq *0x85e94(%rip) # 0xce478
movq 0x10(%r15), %rdi
cmpl %eax, %r14d
jle 0x4860d
leal (%r12,%r12), %eax
movslq %eax, %rsi
shlq $0x2, %rsi
callq 0x2beca
testq %rax, %rax
je 0x487ad
movq %rax, %rdi
movq %rax, 0x10(%r15)
movslq %r12d, %rdx
shlq $0x2, %rdx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0xa220
orb $0x4, 0x1(%r15)
movl (%rsp), %esi
jmp 0x4864a
movq 0x10(%r15), %rcx
movl %r13d, %eax
xorl %edx, %edx
divl %esi
xorl %r14d, %r14d
cmpl $0x0, (%rcx,%rax,4)
je 0x4864a
movslq %eax, %r14
movl (%rcx,%r14,4), %ebp
movl %ebp, 0x4(%rsp)
movl %edx, %r13d
testl %ebp, %ebp
je 0x48767
xorl %eax, %eax
cmpl $0x0, 0x14(%rsp)
sete %al
addl %eax, %eax
movl %eax, 0x2c(%rsp)
leaq 0x4(,%r14,4), %r14
movq 0x10(%r15), %rax
movl %ebp, -0x4(%rax,%r14)
movl %r13d, %r12d
subl %esi, %r12d
jae 0x486b5
leal (%rbx,%r13), %eax
movl %esi, %r12d
subl %r13d, %r12d
cmpl %esi, %eax
cmovbel %ebx, %r12d
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movl %ebp, %esi
leaq 0x30(%rsp), %rdx
movl 0x2c(%rsp), %ecx
callq *0x108(%rdi)
movslq %r12d, %rdx
testl %eax, %eax
je 0x486c5
movl %eax, %ebp
movl (%rsp), %esi
jmp 0x48749
movl (%rax,%r14), %eax
testl %eax, %eax
je 0x48703
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
jmp 0x4871b
movq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rax
addl $0x4, %r13d
addq %rax, %r13
movl (%rax), %eax
bswapl %eax
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x14(%rsp)
movq %rdx, 0x18(%rsp)
je 0x48720
callq 0x30914
movl %eax, %ebp
testl %eax, %eax
jne 0x4872f
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
jmp 0x48728
movq 0x20(%rsp), %rdi
movl %ebp, %esi
xorl %edx, %edx
leaq 0x4(%rsp), %rcx
callq 0x487b4
movl (%rsp), %esi
movl %eax, %ebp
movl %r12d, %r13d
jmp 0x48753
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xa370
xorl %ebp, %ebp
movq 0x30(%rsp), %rdi
xorl %r13d, %r13d
testq %rdi, %rdi
je 0x48741
callq 0x44dd4
movl (%rsp), %esi
movq 0x18(%rsp), %rdx
subl %r12d, %ebx
je 0x4879c
addq %rdx, 0x8(%rsp)
testl %ebp, %ebp
jne 0x48769
movl 0x4(%rsp), %ebp
addq $0x4, %r14
testl %ebp, %ebp
jne 0x4866a
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x4879c
testl %ebx, %ebx
je 0x4879c
leaq 0x63872(%rip), %rsi # 0xabfea
leaq 0x6398e(%rip), %rdx # 0xac10d
leaq 0x63690(%rip), %r8 # 0xabe16
movl $0xb, %ebp
movl $0xb, %edi
movl $0x10795, %ecx # imm = 0x10795
xorl %eax, %eax
callq 0x2df95
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7, %ebp
jmp 0x4879c
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
getOverflowPage
|
static int getOverflowPage(
BtShared *pBt, /* The database file */
Pgno ovfl, /* Current overflow page number */
MemPage **ppPage, /* OUT: MemPage handle (may be NULL) */
Pgno *pPgnoNext /* OUT: Next overflow page number */
){
Pgno next = 0;
MemPage *pPage = 0;
int rc = SQLITE_OK;
assert( sqlite3_mutex_held(pBt->mutex) );
assert(pPgnoNext);
#ifndef SQLITE_OMIT_AUTOVACUUM
/* Try to find the next page in the overflow list using the
** autovacuum pointer-map pages. Guess that the next page in
** the overflow list is page number (ovfl+1). If that guess turns
** out to be wrong, fall back to loading the data of page
** number ovfl to determine the next page number.
*/
if( pBt->autoVacuum ){
Pgno pgno;
Pgno iGuess = ovfl+1;
u8 eType;
while( PTRMAP_ISPAGE(pBt, iGuess) || iGuess==PENDING_BYTE_PAGE(pBt) ){
iGuess++;
}
if( iGuess<=btreePagecount(pBt) ){
rc = ptrmapGet(pBt, iGuess, &eType, &pgno);
if( rc==SQLITE_OK && eType==PTRMAP_OVERFLOW2 && pgno==ovfl ){
next = iGuess;
rc = SQLITE_DONE;
}
}
}
#endif
assert( next==0 || rc==SQLITE_DONE );
if( rc==SQLITE_OK ){
rc = btreeGetPage(pBt, ovfl, &pPage, (ppPage==0) ? PAGER_GET_READONLY : 0);
assert( rc==SQLITE_OK || pPage==0 );
if( rc==SQLITE_OK ){
next = get4byte(pPage->aData);
}
}
*pPgnoNext = next;
if( ppPage ){
*ppPage = pPage;
}else{
releasePage(pPage);
}
return (rc==SQLITE_DONE ? SQLITE_OK : rc);
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq $0x0, 0x8(%rsp)
cmpb $0x0, 0x21(%rdi)
je 0x48850
movl 0x860be(%rip), %ecx # 0xce8a0
movl $0xcccccccd, %edi # imm = 0xCCCCCCCD
movl %ebp, %r8d
movl %r8d, %r12d
leal 0x1(%r12), %r8d
movl $0x0, %eax
cmpl $0x2, %r8d
jb 0x48835
movl 0x34(%r15), %r9d
imulq %rdi, %r9
shrq $0x22, %r9
incl %r9d
leal -0x1(%r12), %esi
movl %esi, %eax
xorl %edx, %edx
divl %r9d
subl %edx, %esi
movl %ecx, %eax
xorl %edx, %edx
divl 0x30(%r15)
leal 0x1(%rsi), %edx
xorl %r9d, %r9d
cmpl %eax, %edx
sete %r9b
leal (%rsi,%r9), %eax
addl $0x2, %eax
cmpl %eax, %r8d
je 0x487ea
movl %ecx, %eax
xorl %edx, %edx
divl 0x30(%r15)
cmpl %eax, %r12d
je 0x487ea
incl %r12d
cmpl 0x3c(%r15), %r12d
jbe 0x48875
xorl %ecx, %ecx
testq %rbx, %rbx
sete %cl
addl %ecx, %ecx
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x4722e
testl %eax, %eax
je 0x488a6
movl %eax, %r13d
xorl %r12d, %r12d
jmp 0x488b8
leaq 0x7(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %r15, %rdi
movl %r12d, %esi
callq 0x488ff
movl %eax, %r13d
testl %eax, %eax
jne 0x488f1
cmpb $0x4, 0x7(%rsp)
jne 0x488f1
cmpl %ebp, 0x14(%rsp)
jne 0x48850
movl $0x65, %r13d
jmp 0x488b8
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl (%rax), %r12d
bswapl %r12d
xorl %r13d, %r13d
movl %r12d, (%r14)
movq 0x8(%rsp), %rax
testq %rbx, %rbx
je 0x488ca
movq %rax, (%rbx)
jmp 0x488d8
testq %rax, %rax
je 0x488d8
movq 0x70(%rax), %rdi
callq 0x44dd4
xorl %eax, %eax
cmpl $0x65, %r13d
cmovnel %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r13d, %r13d
jne 0x48870
jmp 0x48850
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
relocatePage
|
static int relocatePage(
BtShared *pBt, /* Btree */
MemPage *pDbPage, /* Open page to move */
u8 eType, /* Pointer map 'type' entry for pDbPage */
Pgno iPtrPage, /* Pointer map 'page-no' entry for pDbPage */
Pgno iFreePage, /* The location to move pDbPage to */
int isCommit /* isCommit flag passed to sqlite3PagerMovepage */
){
MemPage *pPtrPage; /* The page that contains a pointer to pDbPage */
Pgno iDbPage = pDbPage->pgno;
Pager *pPager = pBt->pPager;
int rc;
assert( eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 ||
eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE );
assert( sqlite3_mutex_held(pBt->mutex) );
assert( pDbPage->pBt==pBt );
/* Move page iDbPage from its current location to page number iFreePage */
TRACE(("AUTOVACUUM: Moving %d to free page %d (ptr page %d type %d)\n",
iDbPage, iFreePage, iPtrPage, eType));
rc = sqlite3PagerMovepage(pPager, pDbPage->pDbPage, iFreePage, isCommit);
if( rc!=SQLITE_OK ){
return rc;
}
pDbPage->pgno = iFreePage;
/* If pDbPage was a btree-page, then it may have child pages and/or cells
** that point to overflow pages. The pointer map entries for all these
** pages need to be changed.
**
** If pDbPage is an overflow page, then the first 4 bytes may store a
** pointer to a subsequent overflow page. If this is the case, then
** the pointer map needs to be updated for the subsequent overflow page.
*/
if( eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE ){
rc = setChildPtrmaps(pDbPage);
if( rc!=SQLITE_OK ){
return rc;
}
}else{
Pgno nextOvfl = get4byte(pDbPage->aData);
if( nextOvfl!=0 ){
ptrmapPut(pBt, nextOvfl, PTRMAP_OVERFLOW2, iFreePage, &rc);
if( rc!=SQLITE_OK ){
return rc;
}
}
}
/* Fix the database pointer on page iPtrPage that pointed at iDbPage so
** that it points at iFreePage. Also fix the pointer map entry for
** iPtrPage.
*/
if( eType!=PTRMAP_ROOTPAGE ){
rc = btreeGetPage(pBt, iPtrPage, &pPtrPage, 0);
if( rc!=SQLITE_OK ){
return rc;
}
rc = sqlite3PagerWrite(pPtrPage->pDbPage);
if( rc!=SQLITE_OK ){
releasePage(pPtrPage);
return rc;
}
rc = modifyPagePointer(pPtrPage, iDbPage, iFreePage, eType);
releasePage(pPtrPage);
if( rc==SQLITE_OK ){
ptrmapPut(pBt, iFreePage, eType, iPtrPage, &rc);
}
}
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movl %r8d, 0x4(%rsp)
movl %ecx, %r12d
movl %edx, (%rsp)
movq %rsi, %r13
movl 0x4(%rsi), %eax
movl %eax, 0x1c(%rsp)
movq %rdi, 0x20(%rsp)
movq (%rdi), %rbx
movq 0x70(%rsi), %r15
cmpb $0x0, 0x10(%rbx)
je 0x492eb
movq %r15, %rdi
callq 0x30914
testl %eax, %eax
jne 0x4947b
movzwl 0x34(%r15), %eax
testb $0x2, %al
je 0x49309
movq %r15, %rdi
callq 0x40210
testl %eax, %eax
jne 0x4947b
movzwl 0x34(%r15), %eax
movl %r12d, 0xc(%rsp)
xorl %r12d, %r12d
testl %r14d, %r14d
jne 0x49321
movl %eax, %ecx
andl $0x8, %ecx
je 0x49321
movl 0x30(%r15), %r12d
andl $0xfff7, %eax # imm = 0xFFF7
movw %ax, 0x34(%r15)
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x434b9
movq %rax, %rbp
testq %rax, %rax
je 0x49368
movzwl 0x34(%rbp), %eax
andl $0x8, %eax
orw %ax, 0x34(%r15)
cmpb $0x0, 0x10(%rbx)
je 0x49360
movl 0x1c(%rbx), %esi
incl %esi
movq %rbp, %rdi
callq 0x49997
jmp 0x49368
movq %rbp, %rdi
callq 0x43624
movl 0x30(%r15), %r14d
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq 0x49997
movq %r15, %rdi
callq 0x44e83
testq %rbp, %rbp
je 0x4939e
cmpb $0x0, 0x10(%rbx)
je 0x4939e
movq %rbp, %rdi
movl %r14d, %esi
callq 0x49997
movq %rbp, %rdi
callq 0x44dd4
testl %r12d, %r12d
je 0x493f7
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl %r12d, %esi
xorl %ecx, %ecx
callq *0x108(%rbx)
testl %eax, %eax
je 0x493de
movl %eax, %ebp
cmpl 0x20(%rbx), %r12d
ja 0x4947d
movq 0x40(%rbx), %rdi
movq 0x110(%rbx), %rdx
movl %r12d, %esi
callq 0x499db
jmp 0x4947d
movq 0x10(%rsp), %rdi
orw $0x8, 0x34(%rdi)
callq 0x44e83
movq 0x10(%rsp), %rdi
callq 0x44dd4
movl $0x0, 0x8(%rsp)
movl 0x4(%rsp), %r12d
movl %r12d, 0x4(%r13)
movl (%rsp), %eax
andb $-0x5, %al
cmpb $0x1, %al
jne 0x49431
movq %r13, %rdi
callq 0x49563
testl %eax, %eax
movl 0xc(%rsp), %r15d
jne 0x4947b
xorl %ebp, %ebp
cmpb $0x1, (%rsp)
movq 0x20(%rsp), %r13
jne 0x49465
jmp 0x4947d
movq 0x50(%r13), %rax
movl (%rax), %esi
bswapl %esi
testl %esi, %esi
movl 0xc(%rsp), %r15d
movq 0x20(%rsp), %r13
je 0x49465
leaq 0x8(%rsp), %rbx
movq %r13, %rdi
movl $0x4, %edx
movl %r12d, %ecx
movq %rbx, %r8
callq 0x49643
movl (%rbx), %ebp
testl %ebp, %ebp
jne 0x4947d
leaq 0x10(%rsp), %rdx
movq %r13, %rdi
movl %r15d, %esi
xorl %ecx, %ecx
callq 0x4722e
testl %eax, %eax
je 0x4948e
movl %eax, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rbx
movq 0x70(%rbx), %rdi
callq 0x30914
testl %eax, %eax
je 0x494ad
movl %eax, %ebp
movq 0x70(%rbx), %rdi
callq 0x44dd4
jmp 0x4947d
movzbl (%rsp), %r14d
movq %rbx, %rdi
movl 0x1c(%rsp), %esi
movl %r12d, %edx
movl %r14d, %ecx
callq 0x497af
movl %eax, %ebp
movl %eax, 0x8(%rsp)
movq 0x70(%rbx), %rdi
callq 0x44dd4
testl %ebp, %ebp
jne 0x4947d
leaq 0x8(%rsp), %rbx
movq %r13, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl %r15d, %ecx
movq %rbx, %r8
callq 0x49643
movl (%rbx), %ebp
jmp 0x4947d
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
setChildPtrmaps
|
static int setChildPtrmaps(MemPage *pPage){
int i; /* Counter variable */
int nCell; /* Number of cells in page pPage */
int rc; /* Return code */
BtShared *pBt = pPage->pBt;
Pgno pgno = pPage->pgno;
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);
if( rc!=SQLITE_OK ) return rc;
nCell = pPage->nCell;
for(i=0; i<nCell; i++){
u8 *pCell = findCell(pPage, i);
ptrmapPutOvflPtr(pPage, pCell, &rc);
if( !pPage->leaf ){
Pgno childPgno = get4byte(pCell);
ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
}
}
if( !pPage->leaf ){
Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
}
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x48(%rdi), %r14
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rsp)
cmpb $0x0, (%rdi)
je 0x49621
movl $0x0, (%rsp)
movzwl 0x16(%r15), %ebp
testq %rbp, %rbp
je 0x495f2
xorl %ebx, %ebx
movq %rsp, %r12
movzwl 0x18(%r15), %eax
movq 0x60(%r15), %rcx
movzbl (%rcx,%rbx,2), %edx
shll $0x8, %edx
movzbl 0x1(%rcx,%rbx,2), %r13d
orl %edx, %r13d
andl %eax, %r13d
addq 0x50(%r15), %r13
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x49ac9
cmpb $0x0, 0x8(%r15)
jne 0x495ea
movl (%r13), %esi
bswapl %esi
movq %r14, %rdi
movl $0x5, %edx
movl 0x4(%rsp), %ecx
movq %r12, %r8
callq 0x49643
incq %rbx
cmpq %rbx, %rbp
jne 0x4959b
cmpb $0x0, 0x8(%r15)
jne 0x4961c
movq 0x50(%r15), %rax
movzbl 0x9(%r15), %ecx
movl 0x8(%rax,%rcx), %esi
bswapl %esi
movq %rsp, %r8
movq %r14, %rdi
movl $0x5, %edx
movl 0x4(%rsp), %ecx
callq 0x49643
movl (%rsp), %eax
jmp 0x49634
movq %r15, %rdi
callq 0x45221
movl %eax, (%rsp)
testl %eax, %eax
je 0x4958c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
modifyPagePointer
|
static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
if( eType==PTRMAP_OVERFLOW2 ){
/* The pointer is always the first 4 bytes of the page in this case. */
if( get4byte(pPage->aData)!=iFrom ){
return SQLITE_CORRUPT_PAGE(pPage);
}
put4byte(pPage->aData, iTo);
}else{
int i;
int nCell;
int rc;
rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);
if( rc ) return rc;
nCell = pPage->nCell;
for(i=0; i<nCell; i++){
u8 *pCell = findCell(pPage, i);
if( eType==PTRMAP_OVERFLOW1 ){
CellInfo info;
pPage->xParseCell(pPage, pCell, &info);
if( info.nLocal<info.nPayload ){
if( pCell+info.nSize > pPage->aData+pPage->pBt->usableSize ){
return SQLITE_CORRUPT_PAGE(pPage);
}
if( iFrom==get4byte(pCell+info.nSize-4) ){
put4byte(pCell+info.nSize-4, iTo);
break;
}
}
}else{
if( get4byte(pCell)==iFrom ){
put4byte(pCell, iTo);
break;
}
}
}
if( i==nCell ){
if( eType!=PTRMAP_BTREE ||
get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
return SQLITE_CORRUPT_PAGE(pPage);
}
put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
}
}
return SQLITE_OK;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r14d
movq %rdi, %r15
cmpl $0x4, %ecx
jne 0x497ea
movq 0x50(%r15), %rax
movl (%rax), %ecx
bswapl %ecx
cmpl %r14d, %ecx
jne 0x498a5
bswapl %edx
movl %edx, (%rax)
movl $0x0, 0x4(%rsp)
jmp 0x4994c
movl %ecx, %r12d
movl %edx, 0x8(%rsp)
cmpb $0x0, (%r15)
je 0x498ce
movzwl 0x16(%r15), %eax
movl $0x0, 0x4(%rsp)
movl $0x0, %ebx
testl %eax, %eax
je 0x498f1
movl %eax, 0xc(%rsp)
movl %eax, %ebp
xorl %ebx, %ebx
movzwl 0x18(%r15), %eax
movq 0x60(%r15), %rcx
movzbl (%rcx,%rbx,2), %edx
shll $0x8, %edx
movzbl 0x1(%rcx,%rbx,2), %r13d
orl %edx, %r13d
andl %eax, %r13d
addq 0x50(%r15), %r13
cmpb $0x3, %r12b
jne 0x4988c
movq %r15, %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
callq *0x80(%r15)
movzwl 0x24(%rsp), %eax
cmpl %eax, 0x20(%rsp)
jbe 0x49897
movzwl 0x26(%rsp), %eax
addq %rax, %r13
movq 0x48(%r15), %rax
movl 0x34(%rax), %eax
addq 0x50(%r15), %rax
cmpq %rax, %r13
ja 0x4995f
movl -0x4(%r13), %eax
bswapl %eax
cmpl %r14d, %eax
jne 0x49897
jmp 0x49988
movl (%r13), %eax
bswapl %eax
cmpl %r14d, %eax
je 0x498e3
incq %rbx
cmpq %rbx, %rbp
jne 0x4981d
jmp 0x498f5
leaq 0x6273e(%rip), %rsi # 0xabfea
leaq 0x6285a(%rip), %rdx # 0xac10d
leaq 0x6255c(%rip), %r8 # 0xabe16
movl $0xb, 0x4(%rsp)
movl $0xb, %edi
movl $0x1027b, %ecx # imm = 0x1027B
jmp 0x49945
movq %r15, %rdi
callq 0x45221
movl %eax, 0x4(%rsp)
testl %eax, %eax
jne 0x4994c
jmp 0x497fb
movl 0x8(%rsp), %eax
bswapl %eax
movl %eax, (%r13)
movl 0xc(%rsp), %eax
cmpl %eax, %ebx
jne 0x4994c
cmpb $0x5, %r12b
jne 0x4991e
movq 0x50(%r15), %rax
movzbl 0x9(%r15), %ecx
movl 0x8(%rax,%rcx), %edx
bswapl %edx
cmpl %r14d, %edx
jne 0x4991e
movl 0x8(%rsp), %edx
bswapl %edx
movl %edx, 0x8(%rax,%rcx)
jmp 0x497dd
leaq 0x626c5(%rip), %rsi # 0xabfea
leaq 0x627e1(%rip), %rdx # 0xac10d
leaq 0x624e3(%rip), %r8 # 0xabe16
movl $0xb, 0x4(%rsp)
movl $0xb, %edi
movl $0x102a0, %ecx # imm = 0x102A0
xorl %eax, %eax
callq 0x2df95
movl 0x4(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x62684(%rip), %rsi # 0xabfea
leaq 0x627a0(%rip), %rdx # 0xac10d
leaq 0x624a2(%rip), %r8 # 0xabe16
movl $0xb, 0x4(%rsp)
movl $0xb, %edi
movl $0x1028e, %ecx # imm = 0x1028E
jmp 0x49945
movl 0x8(%rsp), %eax
bswapl %eax
movl %eax, -0x4(%r13)
jmp 0x497dd
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3BitvecClear
|
SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
if( p==0 ) return;
assert( i>0 );
i--;
while( p->iDivisor ){
u32 bin = i/p->iDivisor;
i = i%p->iDivisor;
p = p->u.apSub[bin];
if (!p) {
return;
}
}
if( p->iSize<=BITVEC_NBIT ){
p->u.aBitmap[i/BITVEC_SZELEM] &= ~(1 << (i&(BITVEC_SZELEM-1)));
}else{
unsigned int j;
u32 *aiValues = pBuf;
memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
memset(p->u.aHash, 0, sizeof(p->u.aHash));
p->nSet = 0;
for(j=0; j<BITVEC_NINT; j++){
if( aiValues[j] && aiValues[j]!=(i+1) ){
u32 h = BITVEC_HASH(aiValues[j]-1);
p->nSet++;
while( p->u.aHash[h] ){
h++;
if( h>=BITVEC_NINT ) h = 0;
}
p->u.aHash[h] = aiValues[j];
}
}
}
}
|
testq %rdi, %rdi
je 0x49ac8
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
decl %r14d
movl 0x8(%rbx), %ecx
testl %ecx, %ecx
je 0x49a19
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
movq 0x10(%rbx,%rax,8), %rbx
movl %edx, %r14d
testq %rbx, %rbx
jne 0x499f9
jmp 0x49abf
cmpl $0xf80, (%rbx) # imm = 0xF80
ja 0x49a3e
movl %r14d, %ecx
andb $0x7, %cl
movl $0x1, %eax
shll %cl, %eax
shrl $0x3, %r14d
notb %al
andb %al, 0x10(%rbx,%r14)
jmp 0x49abf
leaq 0x10(%rbx), %r12
movl $0x1f0, %edx # imm = 0x1F0
movq %r15, %rdi
movq %r12, %rsi
callq 0xa370
xorl %r13d, %r13d
movl $0x1f0, %edx # imm = 0x1F0
movq %r12, %rdi
xorl %esi, %esi
callq 0xa220
movl $0x0, 0x4(%rbx)
incl %r14d
xorl %eax, %eax
movl (%r15,%rax,4), %ecx
testl %ecx, %ecx
je 0x49ab6
cmpl %r14d, %ecx
je 0x49ab6
decl %ecx
movl %ecx, %edx
shrl $0x2, %edx
imulq $0x21084211, %rdx, %rdx # imm = 0x21084211
shrq $0x22, %rdx
incl 0x4(%rbx)
imull $0x7c, %edx, %edx
subl %edx, %ecx
cmpl $0x0, 0x10(%rbx,%rcx,4)
je 0x49aae
incl %ecx
cmpl $0x7c, %ecx
cmovael %r13d, %ecx
cmpl $0x0, (%r12,%rcx,4)
jne 0x49a9e
movl (%r15,%rax,4), %edx
movl %edx, (%r12,%rcx,4)
incq %rax
cmpq $0x7c, %rax
jne 0x49a70
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
ptrmapPutOvflPtr
|
static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
CellInfo info;
if( *pRC ) return;
assert( pCell!=0 );
pPage->xParseCell(pPage, pCell, &info);
if( info.nLocal<info.nPayload ){
Pgno ovfl = get4byte(&pCell[info.nSize-4]);
ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC);
}
}
|
cmpl $0x0, (%rdx)
je 0x49acf
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %r12
movq %r12, %rdx
callq *0x80(%rdi)
movzwl 0x14(%r12), %eax
cmpl %eax, 0x10(%r12)
jbe 0x49b1d
movzwl 0x16(%rsp), %eax
movl -0x4(%r15,%rax), %esi
bswapl %esi
movq 0x48(%r14), %rdi
movl 0x4(%r14), %ecx
movl $0x3, %edx
movq %rbx, %r8
callq 0x49643
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3BtreeTripAllCursors
|
SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int writeOnly){
BtCursor *p;
int rc = SQLITE_OK;
assert( (writeOnly==0 || writeOnly==1) && BTCF_WriteFlag==1 );
if( pBtree ){
sqlite3BtreeEnter(pBtree);
for(p=pBtree->pBt->pCursor; p; p=p->pNext){
if( writeOnly && (p->curFlags & BTCF_WriteFlag)==0 ){
if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){
rc = saveCursorPosition(p);
if( rc!=SQLITE_OK ){
(void)sqlite3BtreeTripAllCursors(pBtree, rc, 0);
break;
}
}
}else{
sqlite3BtreeClearCursor(p);
p->eState = CURSOR_FAULT;
p->skipNext = errCode;
}
btreeReleaseAllCursorPages(p);
}
sqlite3BtreeLeave(pBtree);
}
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x49bb8
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
cmpb $0x0, 0x11(%rdi)
je 0x49b59
incl 0x14(%rbx)
cmpb $0x0, 0x12(%rbx)
jne 0x49b59
movq %rbx, %rdi
callq 0x46b8f
movq 0x8(%rbx), %rax
movq 0x10(%rax), %r12
xorl %ebp, %ebp
testq %r12, %r12
je 0x49bce
testl %r14d, %r14d
je 0x49b8c
testb $0x1, 0x1(%r12)
jne 0x49b8c
movzbl (%r12), %eax
testb $-0x3, %al
jne 0x49ba9
movq %r12, %rdi
callq 0x48345
testl %eax, %eax
je 0x49ba9
jmp 0x49bbc
movq 0x18(%r12), %rdi
callq 0x2be2e
movq $0x0, 0x18(%r12)
movb $0x4, (%r12)
movl %r15d, 0x4(%r12)
movq %r12, %rdi
callq 0x48382
movq 0x28(%r12), %r12
jmp 0x49b63
xorl %ebp, %ebp
jmp 0x49be1
movl %eax, %r13d
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x49b29
movl %r13d, %ebp
cmpb $0x0, 0x11(%rbx)
je 0x49be1
decl 0x14(%rbx)
jne 0x49be1
movq %rbx, %rdi
callq 0x46c15
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
freeP4
|
static void freeP4(sqlite3 *db, int p4type, void *p4){
assert( db );
switch( p4type ){
case P4_FUNCCTX: {
freeP4FuncCtx(db, (sqlite3_context*)p4);
break;
}
case P4_REAL:
case P4_INT64:
case P4_DYNAMIC:
case P4_DYNBLOB:
case P4_INTARRAY: {
sqlite3DbFree(db, p4);
break;
}
case P4_KEYINFO: {
if( db->pnBytesFreed==0 ) sqlite3KeyInfoUnref((KeyInfo*)p4);
break;
}
#ifdef SQLITE_ENABLE_CURSOR_HINTS
case P4_EXPR: {
sqlite3ExprDelete(db, (Expr*)p4);
break;
}
#endif
case P4_FUNCDEF: {
freeEphemeralFunction(db, (FuncDef*)p4);
break;
}
case P4_MEM: {
if( db->pnBytesFreed==0 ){
sqlite3ValueFree((sqlite3_value*)p4);
}else{
freeP4Mem(db, (Mem*)p4);
}
break;
}
case P4_VTAB : {
if( db->pnBytesFreed==0 ) sqlite3VtabUnlock((VTable *)p4);
break;
}
}
}
|
addl $0x11, %esi
cmpl $0xa, %esi
ja 0x49d33
leaq 0x5ce2b(%rip), %rax # 0xa6b0c
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testq %rdx, %rdx
je 0x49d33
movq %rdx, %rsi
jmp 0x3c824
cmpq $0x0, 0x2a0(%rdi)
jne 0x49d33
movq %rdx, %rdi
jmp 0x49da8
cmpq $0x0, 0x2a0(%rdi)
je 0x49d39
movq %rdx, %rsi
jmp 0x49d75
testb $0x10, 0x4(%rdx)
jne 0x49cef
jmp 0x49d33
testq %rdx, %rdx
je 0x49d33
cmpq $0x0, 0x2a0(%rdi)
jne 0x49d33
decl (%rdx)
je 0x49d41
retq
movq %rdx, %rsi
jmp 0x49d47
movq %rdx, %rdi
jmp 0x319d9
movq 0x10(%rdx), %rdi
jmp 0x49cef
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VtabUnlock
|
SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
sqlite3 *db = pVTab->db;
assert( db );
assert( pVTab->nRef>0 );
assert( db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE );
pVTab->nRef--;
if( pVTab->nRef==0 ){
sqlite3_vtab *p = pVTab->pVtab;
if( p ){
p->pModule->xDisconnect(p);
}
sqlite3DbFree(db, pVTab);
}
}
|
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
decl 0x18(%rdi)
je 0x49dbc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x49dce
movq (%rdi), %rax
callq *0x20(%rax)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3c824
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3OsCurrentTimeInt64
|
SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *pTimeOut){
int rc;
/* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()
** method to get the current date and time if that method is available
** (if iVersion is 2 or greater and the function pointer is not NULL) and
** will fall back to xCurrentTime() if xCurrentTimeInt64() is
** unavailable.
*/
if( pVfs->iVersion>=2 && pVfs->xCurrentTimeInt64 ){
rc = pVfs->xCurrentTimeInt64(pVfs, pTimeOut);
}else{
double r;
rc = pVfs->xCurrentTime(pVfs, &r);
*pTimeOut = (sqlite3_int64)(r*86400000.0);
}
return rc;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, (%rdi)
jl 0x49e04
movq 0x88(%rdi), %rax
testq %rax, %rax
je 0x49e04
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movq %rsp, %r14
movq %r14, %rsi
callq *0x78(%rdi)
movsd (%r14), %xmm0
mulsd 0x61d96(%rip), %xmm0 # 0xabbb0
cvttsd2si %xmm0, %rcx
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VdbeTransferError
|
SQLITE_PRIVATE int sqlite3VdbeTransferError(Vdbe *p){
sqlite3 *db = p->db;
int rc = p->rc;
if( p->zErrMsg ){
db->bBenignMalloc++;
sqlite3BeginBenignMalloc();
if( db->pErr==0 ) db->pErr = sqlite3ValueNew(db);
sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT);
sqlite3EndBenignMalloc();
db->bBenignMalloc--;
}else if( db->pErr ){
sqlite3ValueSetNull(db->pErr);
}
db->errCode = rc;
return rc;
}
|
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movl 0x38(%rdi), %ebp
cmpq $0x0, 0x90(%rdi)
je 0x4a42b
movq %rdi, %r14
incb 0x62(%rbx)
movq 0x8652e(%rip), %rax # 0xd08e8
testq %rax, %rax
je 0x4a3c1
callq *%rax
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
jne 0x4a3f3
movl $0x38, %esi
movq %rbx, %rdi
callq 0x330be
testq %rax, %rax
je 0x4a444
movq %rax, %rdi
movw $0x1, 0x8(%rax)
movq %rbx, 0x28(%rax)
movq %rax, 0x150(%rbx)
movq 0x90(%r14), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0x31b16
movq 0x864d9(%rip), %rax # 0xd08f0
testq %rax, %rax
je 0x4a41e
callq *%rax
decb 0x62(%rbx)
movl %ebp, 0x50(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0x4a421
testb $0x24, 0x9(%rdi)
je 0x4a451
callq 0x4b857
jmp 0x4a421
movq $0x0, 0x150(%rbx)
jmp 0x4a410
movw $0x1, 0x8(%rdi)
jmp 0x4a421
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VdbeEnter
|
SQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe *p){
int i;
sqlite3 *db;
Db *aDb;
int nDb;
if( DbMaskAllZero(p->lockMask) ) return; /* The common case */
db = p->db;
aDb = db->aDb;
nDb = db->nDb;
for(i=0; i<nDb; i++){
if( i!=1 && DbMaskTest(p->lockMask,i) && ALWAYS(aDb[i].pBt!=0) ){
sqlite3BtreeEnter(aDb[i].pBt);
}
}
}
|
cmpl $0x0, 0xc8(%rdi)
je 0x4a4c9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movslq 0x28(%rax), %r14
testq %r14, %r14
jle 0x4a4be
movq 0x20(%rax), %r15
addq $0x8, %r15
xorl %r12d, %r12d
cmpq $0x1, %r12
je 0x4a4b2
movl 0xc8(%rbx), %eax
btl %r12d, %eax
jae 0x4a4b2
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4a4b2
cmpb $0x0, 0x11(%rdi)
je 0x4a4b2
incl 0x14(%rdi)
cmpb $0x0, 0x12(%rdi)
jne 0x4a4b2
callq 0x46b8f
incq %r12
addq $0x20, %r15
cmpq %r12, %r14
jne 0x4a484
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3RollbackAll
|
SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
int i;
int inTrans = 0;
int schemaChange;
assert( sqlite3_mutex_held(db->mutex) );
sqlite3BeginBenignMalloc();
/* Obtain all b-tree mutexes before making any calls to BtreeRollback().
** This is important in case the transaction being rolled back has
** modified the database schema. If the b-tree mutexes are not taken
** here, then another shared-cache connection might sneak in between
** the database rollback and schema reset, which can cause false
** corruption reports in some cases. */
sqlite3BtreeEnterAll(db);
schemaChange = (db->mDbFlags & DBFLAG_SchemaChange)!=0 && db->init.busy==0;
for(i=0; i<db->nDb; i++){
Btree *p = db->aDb[i].pBt;
if( p ){
if( sqlite3BtreeIsInTrans(p) ){
inTrans = 1;
}
sqlite3BtreeRollback(p, tripCode, !schemaChange);
}
}
sqlite3VtabRollback(db);
sqlite3EndBenignMalloc();
if( schemaChange ){
sqlite3ExpirePreparedStatements(db, 0);
sqlite3ResetAllSchemasOfConnection(db);
}
sqlite3BtreeLeaveAll(db);
/* Any deferred constraint violations have now been resolved. */
db->nDeferredCons = 0;
db->nDeferredImmCons = 0;
db->flags &= ~SQLITE_DeferFKs;
/* If one has been configured, invoke the rollback-hook callback */
if( db->xRollbackCallback && (inTrans || !db->autoCommit) ){
db->xRollbackCallback(db->pRollbackArg);
}
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x86407(%rip), %rax # 0xd08e8
testq %rax, %rax
je 0x4a4e8
callq *%rax
cmpb $0x0, 0x69(%rbx)
jne 0x4a4f6
movq %rbx, %rdi
callq 0x3ec19
testb $0x1, 0x2c(%rbx)
jne 0x4a501
xorl %r14d, %r14d
jmp 0x4a50c
cmpb $0x0, 0xb5(%rbx)
sete %r14b
movl 0x28(%rbx), %eax
testl %eax, %eax
jle 0x4a572
movl %r14d, 0x4(%rsp)
movl %r14d, %ecx
xorb $0x1, %cl
movzbl %cl, %r14d
xorl %r12d, %r12d
movl $0x8, %r13d
xorl %r15d, %r15d
movq 0x20(%rbx), %rcx
movq (%rcx,%r13), %rdi
testq %rdi, %rdi
je 0x4a555
cmpb $0x2, 0x10(%rdi)
movl $0x1, %eax
cmovel %eax, %r15d
movl %ebp, %esi
movl %r14d, %edx
callq 0x31010
movl 0x28(%rbx), %eax
incq %r12
movslq %eax, %rcx
addq $0x20, %r13
cmpq %rcx, %r12
jl 0x4a52e
testl %r15d, %r15d
sete %bpl
movl 0x4(%rsp), %r14d
jmp 0x4a575
movb $0x1, %bpl
movq %rbx, %rdi
movl $0x88, %esi
callq 0x4b32d
movq 0x86367(%rip), %rax # 0xd08f0
testq %rax, %rax
je 0x4a590
callq *%rax
testb %r14b, %r14b
je 0x4a5bf
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x4a5b7
movzwl 0xc1(%rax), %ecx
andl $-0x4, %ecx
incl %ecx
movw %cx, 0xc1(%rax)
movq 0x10(%rax), %rax
jmp 0x4a599
movq %rbx, %rdi
callq 0x30810
cmpb $0x0, 0x69(%rbx)
jne 0x4a5cd
movq %rbx, %rdi
callq 0x3ec71
xorps %xmm0, %xmm0
movups %xmm0, 0x290(%rbx)
andb $-0x9, 0x32(%rbx)
movq 0x110(%rbx), %rax
testq %rax, %rax
je 0x4a5f2
testb %bpl, %bpl
je 0x4a601
cmpb $0x0, 0x5f(%rbx)
je 0x4a601
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x108(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3CloseSavepoints
|
SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){
while( db->pSavepoint ){
Savepoint *pTmp = db->pSavepoint;
db->pSavepoint = pTmp->pNext;
sqlite3DbFree(db, pTmp);
}
db->nSavepoint = 0;
db->nStatement = 0;
db->isTransactionSavepoint = 0;
}
|
pushq %rbx
movq %rdi, %rbx
movq 0x278(%rdi), %rsi
testq %rsi, %rsi
je 0x4a644
movq 0x18(%rsi), %rax
movq %rax, 0x278(%rbx)
movq %rbx, %rdi
callq 0x3c824
movq 0x278(%rbx), %rsi
jmp 0x4a623
movq $0x0, 0x284(%rbx)
movb $0x0, 0x67(%rbx)
popq %rbx
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
vdbeCommit
|
static int vdbeCommit(sqlite3 *db, Vdbe *p){
int i;
int nTrans = 0; /* Number of databases with an active write-transaction
** that are candidates for a two-phase commit using a
** master-journal */
int rc = SQLITE_OK;
int needXcommit = 0;
#ifdef SQLITE_OMIT_VIRTUALTABLE
/* With this option, sqlite3VtabSync() is defined to be simply
** SQLITE_OK so p is not used.
*/
UNUSED_PARAMETER(p);
#endif
/* Before doing anything else, call the xSync() callback for any
** virtual module tables written in this transaction. This has to
** be done before determining whether a master journal file is
** required, as an xSync() callback may add an attached database
** to the transaction.
*/
rc = sqlite3VtabSync(db, p);
/* This loop determines (a) if the commit hook should be invoked and
** (b) how many database files have open write transactions, not
** including the temp database. (b) is important because if more than
** one database file has an open write transaction, a master journal
** file is required for an atomic commit.
*/
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( sqlite3BtreeIsInTrans(pBt) ){
/* Whether or not a database might need a master journal depends upon
** its journal mode (among other things). This matrix determines which
** journal modes use a master journal and which do not */
static const u8 aMJNeeded[] = {
/* DELETE */ 1,
/* PERSIST */ 1,
/* OFF */ 0,
/* TRUNCATE */ 1,
/* MEMORY */ 0,
/* WAL */ 0
};
Pager *pPager; /* Pager associated with pBt */
needXcommit = 1;
sqlite3BtreeEnter(pBt);
pPager = sqlite3BtreePager(pBt);
if( db->aDb[i].safety_level!=PAGER_SYNCHRONOUS_OFF
&& aMJNeeded[sqlite3PagerGetJournalMode(pPager)]
&& sqlite3PagerIsMemdb(pPager)==0
){
assert( i!=1 );
nTrans++;
}
rc = sqlite3PagerExclusiveLock(pPager);
sqlite3BtreeLeave(pBt);
}
}
if( rc!=SQLITE_OK ){
return rc;
}
/* If there are any write-transactions at all, invoke the commit hook */
if( needXcommit && db->xCommitCallback ){
rc = db->xCommitCallback(db->pCommitArg);
if( rc ){
return SQLITE_CONSTRAINT_COMMITHOOK;
}
}
/* The simple case - no more than one database file (not counting the
** TEMP database) has a transaction active. There is no need for the
** master-journal.
**
** If the return value of sqlite3BtreeGetFilename() is a zero length
** string, it means the main database is :memory: or a temp file. In
** that case we do not support atomic multi-file commits, so use the
** simple case then too.
*/
if( 0==sqlite3Strlen30(sqlite3BtreeGetFilename(db->aDb[0].pBt))
|| nTrans<=1
){
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
rc = sqlite3BtreeCommitPhaseOne(pBt, 0);
}
}
/* Do the commit only if all databases successfully complete phase 1.
** If one of the BtreeCommitPhaseOne() calls fails, this indicates an
** IO error while deleting or truncating a journal file. It is unlikely,
** but could happen. In this case abandon processing and return the error.
*/
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
rc = sqlite3BtreeCommitPhaseTwo(pBt, 0);
}
}
if( rc==SQLITE_OK ){
sqlite3VtabCommit(db);
}
}
/* The complex case - There is a multi-file write-transaction active.
** This requires a master journal file to ensure the transaction is
** committed atomically.
*/
#ifndef SQLITE_OMIT_DISKIO
else{
sqlite3_vfs *pVfs = db->pVfs;
char *zMaster = 0; /* File-name for the master journal */
char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);
sqlite3_file *pMaster = 0;
i64 offset = 0;
int res;
int retryCount = 0;
int nMainFile;
/* Select a master journal file name */
nMainFile = sqlite3Strlen30(zMainFile);
zMaster = sqlite3MPrintf(db, "%s-mjXXXXXX9XXz", zMainFile);
if( zMaster==0 ) return SQLITE_NOMEM_BKPT;
do {
u32 iRandom;
if( retryCount ){
if( retryCount>100 ){
sqlite3_log(SQLITE_FULL, "MJ delete: %s", zMaster);
sqlite3OsDelete(pVfs, zMaster, 0);
break;
}else if( retryCount==1 ){
sqlite3_log(SQLITE_FULL, "MJ collide: %s", zMaster);
}
}
retryCount++;
sqlite3_randomness(sizeof(iRandom), &iRandom);
sqlite3_snprintf(13, &zMaster[nMainFile], "-mj%06X9%02X",
(iRandom>>8)&0xffffff, iRandom&0xff);
/* The antipenultimate character of the master journal name must
** be "9" to avoid name collisions when using 8+3 filenames. */
assert( zMaster[sqlite3Strlen30(zMaster)-3]=='9' );
sqlite3FileSuffix3(zMainFile, zMaster);
rc = sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS, &res);
}while( rc==SQLITE_OK && res );
if( rc==SQLITE_OK ){
/* Open the master journal. */
rc = sqlite3OsOpenMalloc(pVfs, zMaster, &pMaster,
SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_MASTER_JOURNAL, 0
);
}
if( rc!=SQLITE_OK ){
sqlite3DbFree(db, zMaster);
return rc;
}
/* Write the name of each database file in the transaction into the new
** master journal file. If an error occurs at this point close
** and delete the master journal file. All the individual journal files
** still have 'null' as the master journal pointer, so they will roll
** back independently if a failure occurs.
*/
for(i=0; i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( sqlite3BtreeIsInTrans(pBt) ){
char const *zFile = sqlite3BtreeGetJournalname(pBt);
if( zFile==0 ){
continue; /* Ignore TEMP and :memory: databases */
}
assert( zFile[0]!=0 );
rc = sqlite3OsWrite(pMaster, zFile, sqlite3Strlen30(zFile)+1, offset);
offset += sqlite3Strlen30(zFile)+1;
if( rc!=SQLITE_OK ){
sqlite3OsCloseFree(pMaster);
sqlite3OsDelete(pVfs, zMaster, 0);
sqlite3DbFree(db, zMaster);
return rc;
}
}
}
/* Sync the master journal file. If the IOCAP_SEQUENTIAL device
** flag is set this is not required.
*/
if( 0==(sqlite3OsDeviceCharacteristics(pMaster)&SQLITE_IOCAP_SEQUENTIAL)
&& SQLITE_OK!=(rc = sqlite3OsSync(pMaster, SQLITE_SYNC_NORMAL))
){
sqlite3OsCloseFree(pMaster);
sqlite3OsDelete(pVfs, zMaster, 0);
sqlite3DbFree(db, zMaster);
return rc;
}
/* Sync all the db files involved in the transaction. The same call
** sets the master journal pointer in each individual journal. If
** an error occurs here, do not delete the master journal file.
**
** If the error occurs during the first call to
** sqlite3BtreeCommitPhaseOne(), then there is a chance that the
** master journal file will be orphaned. But we cannot delete it,
** in case the master journal file name was written into the journal
** file before the failure occurred.
*/
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
rc = sqlite3BtreeCommitPhaseOne(pBt, zMaster);
}
}
sqlite3OsCloseFree(pMaster);
assert( rc!=SQLITE_BUSY );
if( rc!=SQLITE_OK ){
sqlite3DbFree(db, zMaster);
return rc;
}
/* Delete the master journal file. This commits the transaction. After
** doing this the directory is synced again before any individual
** transaction files are deleted.
*/
rc = sqlite3OsDelete(pVfs, zMaster, 1);
sqlite3DbFree(db, zMaster);
zMaster = 0;
if( rc ){
return rc;
}
/* All files and directories have already been synced, so the following
** calls to sqlite3BtreeCommitPhaseTwo() are only closing files and
** deleting or truncating journals. If something goes wrong while
** this is happening we don't really care. The integrity of the
** transaction is already guaranteed, but some stray 'cold' journals
** may be lying around. Returning an error code won't help matters.
*/
disable_simulated_io_errors();
sqlite3BeginBenignMalloc();
for(i=0; i<db->nDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
sqlite3BtreeCommitPhaseTwo(pBt, 1);
}
}
sqlite3EndBenignMalloc();
enable_simulated_io_errors();
sqlite3VtabCommit(db);
}
#endif
return rc;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1e0(%rdi), %r12
movq $0x0, 0x1e0(%rdi)
xorl %r13d, %r13d
movslq 0x1bc(%rbx), %rax
cmpq %rax, %r13
jge 0x4a6ca
movq (%r12,%r13,8), %rax
movq 0x10(%rax), %r15
xorl %ebp, %ebp
testq %r15, %r15
je 0x4a6b7
movq (%r15), %rax
movq 0x78(%rax), %rax
testq %rax, %rax
je 0x4a6b7
movq %r15, %rdi
callq *%rax
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x4b566
incq %r13
testl %ebp, %ebp
je 0x4a67e
movq %r12, 0x1e0(%rbx)
jmp 0x4ab94
movq %r12, 0x1e0(%rbx)
xorl %r12d, %r12d
movq $-0x1, %r13
movl $0x0, (%rsp)
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
incq %r13
cmpq %rax, %r13
jge 0x4a783
movq 0x20(%rbx), %rax
movq 0x8(%rax,%r12), %r14
xorl %ebp, %ebp
testq %r14, %r14
je 0x4a772
cmpb $0x2, 0x10(%r14)
jne 0x4a772
cmpb $0x0, 0x11(%r14)
je 0x4a72a
incl 0x14(%r14)
cmpb $0x0, 0x12(%r14)
jne 0x4a72a
movq %r14, %rdi
callq 0x46b8f
movq 0x20(%rbx), %rax
movq 0x8(%r14), %rcx
movq (%rcx), %rdi
cmpb $0x1, 0x10(%rax,%r12)
je 0x4a750
movzbl 0x9(%rdi), %eax
movl $0x34, %ecx
btq %rax, %rcx
jb 0x4a750
cmpb $0x1, 0x10(%rdi)
adcl $0x0, (%rsp)
callq 0x42cd6
movl %eax, %ebp
movl $0x1, %r15d
cmpb $0x0, 0x11(%r14)
je 0x4a772
decl 0x14(%r14)
jne 0x4a772
movq %r14, %rdi
callq 0x46c15
addq $0x20, %r12
testl %ebp, %ebp
je 0x4a6e5
jmp 0x4ab94
testl %r15d, %r15d
je 0x4a7aa
movq 0x100(%rbx), %rax
testq %rax, %rax
je 0x4a7aa
movq 0xf8(%rbx), %rdi
callq *%rax
movl $0x213, %ebp # imm = 0x213
testl %eax, %eax
jne 0x4ab94
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %r14
movb 0x13(%r14), %bpl
testb %bpl, %bpl
je 0x4a7cb
leaq 0x5b733(%rip), %rdi # 0xa5efc
jmp 0x4a7d7
movq 0xd0(%r14), %rdi
testq %rdi, %rdi
je 0x4a809
callq 0xa190
shlq $0x22, %rax
je 0x4a809
cmpl $0x1, (%rsp)
jle 0x4a809
movq (%rbx), %r15
testb %bpl, %bpl
je 0x4a88d
movq $0x0, 0x18(%rsp)
leaq 0x5b6f8(%rip), %r14 # 0xa5efc
jmp 0x4a8a6
movq $-0x1, %r14
movl $0x8, %r15d
movslq 0x28(%rbx), %rax
incq %r14
cmpq %rax, %r14
jge 0x4a849
movq 0x20(%rbx), %rax
movq (%rax,%r15), %rdi
testq %rdi, %rdi
je 0x4a83a
xorl %esi, %esi
callq 0x30cc4
movl %eax, %ebp
jmp 0x4a83c
xorl %ebp, %ebp
addq $0x20, %r15
testl %ebp, %ebp
je 0x4a816
jmp 0x4ab94
movq $-0x1, %r14
movl $0x8, %r15d
movslq 0x28(%rbx), %rax
incq %r14
cmpq %rax, %r14
jge 0x4ab85
movq 0x20(%rbx), %rax
movq (%rax,%r15), %rdi
testq %rdi, %rdi
je 0x4a87e
xorl %esi, %esi
callq 0x30b64
movl %eax, %ebp
jmp 0x4a880
xorl %ebp, %ebp
addq $0x20, %r15
testl %ebp, %ebp
je 0x4a856
jmp 0x4ab94
movq 0xd0(%r14), %r14
movq $0x0, 0x18(%rsp)
testq %r14, %r14
je 0x4aa97
movq %r14, %rdi
callq 0xa190
movq %rax, %r12
andl $0x3fffffff, %r12d # imm = 0x3FFFFFFF
leaq 0x61905(%rip), %rsi # 0xac1c4
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x34e94
testq %rax, %rax
je 0x4a972
movq %r15, 0x8(%rsp)
movq %rax, (%rsp)
addq %rax, %r12
leaq 0x61909(%rip), %r15 # 0xac1f1
leaq 0x24(%rsp), %r14
xorl %r13d, %r13d
testl %r13d, %r13d
movq (%rsp), %rbp
je 0x4a91b
cmpl $0x64, %r13d
ja 0x4a97c
cmpl $0x1, %r13d
jne 0x4a91b
movl $0xd, %edi
leaq 0x618d1(%rip), %rsi # 0xac1e2
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2df95
movl $0x4, %edi
leaq 0x20(%rsp), %rsi
callq 0x2e10b
movl 0x20(%rsp), %ecx
movzbl %cl, %r8d
shrl $0x8, %ecx
movl $0xd, %edi
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2dece
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq *0x38(%rdi)
movl %eax, %ebp
testl %eax, %eax
jne 0x4a967
incl %r13d
cmpl $0x0, 0x24(%rsp)
jne 0x4a8f0
testl %ebp, %ebp
movq 0x8(%rsp), %r14
jne 0x4a9c2
jmp 0x4a9a3
movl $0x7, %ebp
jmp 0x4ab94
leaq 0x61851(%rip), %rsi # 0xac1d4
movl $0xd, %edi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x2df95
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq *0x30(%r14)
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movq (%rsp), %rsi
movl $0x4016, %ecx # imm = 0x4016
xorl %r8d, %r8d
callq 0x4b4d1
testl %eax, %eax
je 0x4a9d3
movl %eax, %ebp
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x3c824
jmp 0x4ab94
movl 0x28(%rbx), %eax
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rsp)
testl %eax, %eax
jle 0x4aa68
movl $0x8, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x20(%rbx), %rcx
movq (%rcx,%r15), %rcx
testq %rcx, %rcx
je 0x4aa59
cmpb $0x2, 0x10(%rcx)
jne 0x4aa59
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
movq 0xd8(%rcx), %r14
testq %r14, %r14
je 0x4aa59
movq %r14, %rdi
callq 0xa190
andl $0x3fffffff, %eax # imm = 0x3FFFFFFF
leal 0x1(%rax), %edx
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movq %r13, %rcx
callq *0x18(%rax)
testl %eax, %eax
jne 0x4aba5
movq %r14, %rdi
callq 0xa190
andl $0x3fffffff, %eax # imm = 0x3FFFFFFF
addq %rax, %r13
incq %r13
movl 0x28(%rbx), %eax
incq %r12
movslq %eax, %rcx
addq $0x20, %r15
cmpq %rcx, %r12
jl 0x4a9f4
movq 0x10(%rsp), %r13
movq (%r13), %rax
movq %r13, %rdi
callq *0x60(%rax)
btl $0xa, %eax
jb 0x4aaa2
movq (%r13), %rax
movq %r13, %rdi
movl $0x2, %esi
callq *0x28(%rax)
testl %eax, %eax
je 0x4aaa2
movl %eax, %ebp
jmp 0x4abac
xorl %r14d, %r14d
xorl %r12d, %r12d
jmp 0x4a8b8
movq $-0x1, %r14
movl $0x8, %r12d
movslq 0x28(%rbx), %r15
incq %r14
cmpq %r15, %r14
jge 0x4aae1
movq 0x20(%rbx), %rax
movq (%rax,%r12), %rdi
testq %rdi, %rdi
je 0x4aad5
movq (%rsp), %rsi
callq 0x30cc4
movl %eax, %ebp
jmp 0x4aad7
xorl %ebp, %ebp
addq $0x20, %r12
testl %ebp, %ebp
je 0x4aaaf
jmp 0x4aae3
xorl %ebp, %ebp
movq (%r13), %rax
testq %rax, %rax
je 0x4aafa
movq %r13, %rdi
callq *0x8(%rax)
movq $0x0, (%r13)
movq %r13, %rdi
callq 0x2be2e
cmpq %r15, %r14
jl 0x4a9c2
movq 0x8(%rsp), %rdi
movq (%rsp), %r14
movq %r14, %rsi
movl $0x1, %edx
callq *0x30(%rdi)
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c824
testl %ebp, %ebp
jne 0x4ab94
movq 0x85db1(%rip), %rax # 0xd08e8
testq %rax, %rax
je 0x4ab3e
callq *%rax
movl 0x28(%rbx), %eax
testl %eax, %eax
jle 0x4ab77
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rcx
movq (%rcx,%r14), %rdi
testq %rdi, %rdi
je 0x4ab68
movl $0x1, %esi
callq 0x30b64
movl 0x28(%rbx), %eax
incq %r15
movslq %eax, %rcx
addq $0x20, %r14
cmpq %rcx, %r15
jl 0x4ab4e
movq 0x85d72(%rip), %rax # 0xd08f0
testq %rax, %rax
je 0x4ab85
callq *%rax
movq %rbx, %rdi
movl $0x80, %esi
callq 0x4b32d
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebp
movq 0x10(%rsp), %r13
movq (%r13), %rax
testq %rax, %rax
movq 0x8(%rsp), %r14
je 0x4abc8
movq %r13, %rdi
callq *0x8(%rax)
movq $0x0, (%r13)
movq %r13, %rdi
callq 0x2be2e
movq %r14, %rdi
movq (%rsp), %rsi
xorl %edx, %edx
callq *0x30(%r14)
jmp 0x4a9c2
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VdbeFrameRestore
|
SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
Vdbe *v = pFrame->v;
closeCursorsInFrame(v);
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
v->anExec = pFrame->anExec;
#endif
v->aOp = pFrame->aOp;
v->nOp = pFrame->nOp;
v->aMem = pFrame->aMem;
v->nMem = pFrame->nMem;
v->apCsr = pFrame->apCsr;
v->nCursor = pFrame->nCursor;
v->db->lastRowid = pFrame->lastRowid;
v->nChange = pFrame->nChange;
v->db->nChange = pFrame->nDbChange;
sqlite3VdbeDeleteAuxData(v->db, &v->pAuxData, -1, 0);
v->pAuxData = pFrame->pAuxData;
pFrame->pAuxData = 0;
return pFrame->pc;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movq %r14, %rdi
callq 0x4ac70
movq 0x10(%rbx), %rax
movq %rax, 0x68(%r14)
movl 0x58(%rbx), %eax
movl %eax, 0xb8(%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x70(%r14)
movl 0x5c(%rbx), %eax
movl %eax, 0x28(%r14)
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r14)
movl 0x50(%rbx), %eax
movl %eax, 0x2c(%r14)
movq 0x40(%rbx), %rax
movq (%r14), %rdi
movq %rax, 0x38(%rdi)
movl 0x68(%rbx), %eax
movl %eax, 0x3c(%r14)
movl 0x6c(%rbx), %eax
movl %eax, 0x74(%rdi)
leaq 0x118(%r14), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x4acc8
movq 0x48(%rbx), %rax
movq %rax, 0x118(%r14)
movq $0x0, 0x48(%rbx)
movl 0x54(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VdbeFreeCursor
|
SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
if( pCx==0 ){
return;
}
assert( pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE );
switch( pCx->eCurType ){
case CURTYPE_SORTER: {
sqlite3VdbeSorterClose(p->db, pCx);
break;
}
case CURTYPE_BTREE: {
if( pCx->isEphemeral ){
if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx);
/* The pCx->pCursor will be close automatically, if it exists, by
** the call above. */
}else{
assert( pCx->uc.pCursor!=0 );
sqlite3BtreeCloseCursor(pCx->uc.pCursor);
}
break;
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
case CURTYPE_VTAB: {
sqlite3_vtab_cursor *pVCur = pCx->uc.pVCur;
const sqlite3_module *pModule = pVCur->pVtab->pModule;
assert( pVCur->pVtab->nRef>0 );
pVCur->pVtab->nRef--;
pModule->xClose(pVCur);
break;
}
#endif
}
}
|
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x4adcd
movq %rsi, %rbx
movzbl (%rsi), %eax
testl %eax, %eax
je 0x4ada9
cmpl $0x2, %eax
je 0x4ad94
cmpl $0x1, %eax
jne 0x4adcd
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x4adcd
movq (%rdi), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4b018
movq 0x40(%r14), %rdi
callq 0x2be2e
movq %r15, %rdi
movq %r14, %rsi
callq 0x3c824
movq $0x0, 0x30(%rbx)
jmp 0x4adcd
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movq (%rax), %rcx
decl 0x8(%rax)
popq %rbx
popq %r14
popq %r15
jmpq *0x38(%rcx)
testb $0x1, 0x5(%rbx)
jne 0x4adbd
movq 0x30(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4af62
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4adcd
popq %rbx
popq %r14
popq %r15
jmp 0x4add3
popq %rbx
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3BtreeClose
|
SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
BtShared *pBt = p->pBt;
BtCursor *pCur;
/* Close all cursors opened via this handle. */
assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
pCur = pBt->pCursor;
while( pCur ){
BtCursor *pTmp = pCur;
pCur = pCur->pNext;
if( pTmp->pBtree==p ){
sqlite3BtreeCloseCursor(pTmp);
}
}
/* Rollback any active transaction and free the handle structure.
** The call to sqlite3BtreeRollback() drops any table-locks held by
** this handle.
*/
sqlite3BtreeRollback(p, SQLITE_OK, 0);
sqlite3BtreeLeave(p);
/* If there are still other outstanding references to the shared-btree
** structure, return now. The remainder of this procedure cleans
** up the shared-btree.
*/
assert( p->wantToLock==0 && p->locked==0 );
if( !p->sharable || removeFromSharingList(pBt) ){
/* The pBt is no longer on the sharing list, so we can access
** it without having to hold the mutex.
**
** Clean out and delete the BtShared object.
*/
assert( !pBt->pCursor );
sqlite3PagerClose(pBt->pPager, p->db);
if( pBt->xFreeSchema && pBt->pSchema ){
pBt->xFreeSchema(pBt->pSchema);
}
sqlite3DbFree(0, pBt->pSchema);
freeTempSpace(pBt);
sqlite3_free(pBt);
}
#ifndef SQLITE_OMIT_SHARED_CACHE
assert( p->wantToLock==0 );
assert( p->locked==0 );
if( p->pPrev ) p->pPrev->pNext = p->pNext;
if( p->pNext ) p->pNext->pPrev = p->pPrev;
#endif
sqlite3_free(p);
return SQLITE_OK;
}
|
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
cmpb $0x0, 0x11(%rdi)
je 0x4adf9
incl 0x14(%rbx)
cmpb $0x0, 0x12(%rbx)
jne 0x4adf9
movq %rbx, %rdi
callq 0x46b8f
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x4ae19
movq 0x28(%rdi), %r15
cmpq %rbx, 0x8(%rdi)
jne 0x4ae11
callq 0x4af62
movq %r15, %rdi
testq %r15, %r15
jne 0x4ae02
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x31010
cmpb $0x0, 0x11(%rbx)
je 0x4aedc
decl 0x14(%rbx)
jne 0x4ae46
movq %rbx, %rdi
callq 0x46c15
cmpb $0x0, 0x11(%rbx)
je 0x4aedc
movb $0x1, %bpl
cmpl $0x0, 0x835e4(%rip) # 0xce434
je 0x4ae72
movl $0x2, %edi
callq *0x83653(%rip) # 0xce4b0
testq %rax, %rax
je 0x4ae72
movq %rax, %r15
movq %rax, %rdi
callq *0x83652(%rip) # 0xce4c0
xorl %ebp, %ebp
jmp 0x4ae75
xorl %r15d, %r15d
movl 0x60(%r14), %r12d
leal -0x1(%r12), %eax
movl %eax, 0x60(%r14)
cmpl $0x1, %r12d
jg 0x4aec8
movq 0x85a51(%rip), %rcx # 0xd08e0
cmpq %r14, %rcx
je 0x4aeab
testq %rcx, %rcx
je 0x4aeb9
movq %rcx, %rax
movq 0x68(%rcx), %rcx
cmpq %r14, %rcx
jne 0x4ae94
addq $0x68, %rax
jmp 0x4aeb2
leaq 0x85a2e(%rip), %rax # 0xd08e0
movq 0x68(%r14), %rcx
movq %rcx, (%rax)
movq 0x50(%r14), %rdi
testq %rdi, %rdi
je 0x4aec8
callq *0x835f0(%rip) # 0xce4b8
testb %bpl, %bpl
jne 0x4aed6
movq %r15, %rdi
callq *0x835fa(%rip) # 0xce4d0
cmpl $0x1, %r12d
jg 0x4af38
movq (%r14), %rdi
movq (%rbx), %rsi
callq 0x3fe6d
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x4aefb
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x4aefb
callq *%rax
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x4af09
callq 0x2be2e
movq 0x80(%r14), %rdi
testq %rdi, %rdi
je 0x4af30
addq $-0x4, %rdi
movq %rdi, 0x80(%r14)
callq 0x42f51
movq $0x0, 0x80(%r14)
movq %r14, %rdi
callq 0x2be2e
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x4af49
movq %rax, 0x20(%rcx)
testq %rax, %rax
je 0x4af52
movq %rcx, 0x28(%rax)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2be2e
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
vdbeSorterJoinThread
|
static int vdbeSorterJoinThread(SortSubtask *pTask){
int rc = SQLITE_OK;
if( pTask->pThread ){
#ifdef SQLITE_DEBUG_SORTER_THREADS
int bDone = pTask->bDone;
#endif
void *pRet = SQLITE_INT_TO_PTR(SQLITE_ERROR);
vdbeSorterBlockDebug(pTask, !bDone, "enter");
(void)sqlite3ThreadJoin(pTask->pThread, &pRet);
vdbeSorterBlockDebug(pTask, !bDone, "exit");
rc = SQLITE_PTR_TO_INT(pRet);
assert( pTask->bDone==1 );
pTask->bDone = 0;
pTask->pThread = 0;
}
return rc;
}
|
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x4b27e
movq %rdi, %rbx
movq $0x1, (%rsp)
cmpl $0x0, 0x8(%r14)
je 0x4b282
movq 0x10(%r14), %rax
movq %rax, (%rsp)
jmp 0x4b28d
xorl %eax, %eax
jmp 0x4b2a6
movq (%r14), %rdi
movq %rsp, %rsi
callq 0xa3c0
movq %r14, %rdi
callq 0x2be2e
movl (%rsp), %eax
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
vdbeIncrFree
|
static void vdbeIncrFree(IncrMerger *pIncr){
if( pIncr ){
#if SQLITE_MAX_WORKER_THREADS>0
if( pIncr->bUseThread ){
vdbeSorterJoinThread(pIncr->pTask);
if( pIncr->aFile[0].pFd ) sqlite3OsCloseFree(pIncr->aFile[0].pFd);
if( pIncr->aFile[1].pFd ) sqlite3OsCloseFree(pIncr->aFile[1].pFd);
}
#endif
vdbeMergeEngineFree(pIncr->pMerger);
sqlite3_free(pIncr);
}
}
|
testq %rdi, %rdi
je 0x4b32c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x20(%rdi)
je 0x4b314
movq (%rbx), %rdi
callq 0x4b256
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x4b2ee
movq (%r14), %rax
testq %rax, %rax
je 0x4b2e6
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x2be2e
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x4b314
movq (%r14), %rax
testq %rax, %rax
je 0x4b30c
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x2be2e
movq 0x8(%rbx), %rdi
callq 0x4b215
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2be2e
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
callFinaliser
|
static void callFinaliser(sqlite3 *db, int offset){
int i;
if( db->aVTrans ){
VTable **aVTrans = db->aVTrans;
db->aVTrans = 0;
for(i=0; i<db->nVTrans; i++){
VTable *pVTab = aVTrans[i];
sqlite3_vtab *p = pVTab->pVtab;
if( p ){
int (*x)(sqlite3_vtab *);
x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);
if( x ) x(p);
}
pVTab->iSavepoint = 0;
sqlite3VtabUnlock(pVTab);
}
sqlite3DbFree(db, aVTrans);
db->nVTrans = 0;
}
}
|
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x1e0(%rdi), %r14
testq %r14, %r14
je 0x4b3ae
movq %rdi, %rbx
movq $0x0, 0x1e0(%rdi)
cmpl $0x0, 0x1bc(%rdi)
jle 0x4b399
movl %esi, %r12d
xorl %r13d, %r13d
movq (%r14,%r13,8), %r15
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x4b37a
movq (%rdi), %rax
movq (%rax,%r12), %rax
testq %rax, %rax
je 0x4b37a
callq *%rax
movl $0x0, 0x20(%r15)
movq %r15, %rdi
callq 0x49da8
incq %r13
movslq 0x1bc(%rbx), %rax
cmpq %rax, %r13
jl 0x4b35f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c824
movl $0x0, 0x1bc(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
sqlite3VdbeError
|
SQLITE_PRIVATE void sqlite3VdbeError(Vdbe *p, const char *zFormat, ...){
va_list ap;
sqlite3DbFree(p->db, p->zErrMsg);
va_start(ap, zFormat);
p->zErrMsg = sqlite3VMPrintf(p->db, zFormat, ap);
va_end(ap);
}
|
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4b417
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x90(%rdi), %rsi
testq %rsi, %rsi
je 0x4b42b
movq (%rbx), %rdi
callq 0x3c824
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rdx)
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3ecbe
movq %rax, 0x90(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
|
/glotzerlab[P]libgetar/sqlite3/sqlite3.c
|
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.