name string | code string | asm string | file string |
|---|---|---|---|
void fmt::v8::detail::for_each_codepoint<fmt::v8::detail::compute_width(fmt::v8::basic_string_view<char>)::count_code_points>(fmt::v8::basic_string_view<char>, fmt::v8::detail::compute_width(fmt::v8::basic_string_view<char>)::count_code_points)::'lambda'(char const*, char const*)::operator()(char const*, char const*) c... | explicit FMT_CONSTEXPR width_checker(ErrorHandler& eh) : handler_(eh) {} | pushq %rbp
pushq %r14
pushq %rbx
movzbl (%rsi), %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x33fee(%rip), %r8 # 0xfc807
movsbq (%rax,%r8), %r8
xorl %eax, %eax
testq %r8, %r8
sete %al
addq %r8, %rax
js 0xc8915
movsbl %cl, %ecx
movzbl 0x2(%rsi), %r9d
movl %r9d, %r8d
andl $0x3f, %r8d
shll $0x6, %r8d
movzbl 0x1(%rsi), ... | /johnor[P]n_e_s_vis/build_O1/_deps/fmt-src/include/fmt/format.h |
fmt::v8::detail::compute_width(fmt::v8::basic_string_view<char>)::count_code_points::operator()(unsigned int, fmt::v8::basic_string_view<char>) const | FMT_CONSTEXPR auto operator()(uint32_t cp, string_view) const -> bool {
*count += detail::to_unsigned(
1 +
(cp >= 0x1100 &&
(cp <= 0x115f || // Hangul Jamo init. consonants
cp == 0x2329 || // LEFT-POINTING ANGLE BRACKET
cp == 0x232a || // RIGHT-POINTING AN... | movl $0x1, %eax
cmpl $0x1100, %esi # imm = 0x1100
jb 0xc8a13
cmpl $0x1160, %esi # imm = 0x1160
setb %al
leal -0x2329(%rsi), %ecx
cmpl $0x2, %ecx
setb %cl
orb %al, %cl
movl $0x2, %eax
jne 0xc8a13
leal -0x2e80(%rsi), %ecx
cmpl $0x7650, %ecx # imm = 0x7650
setb %cl
cmpl $0x303f, %esi ... | /johnor[P]n_e_s_vis/build_O1/_deps/fmt-src/include/fmt/format.h |
n_e_s::core::MemBankFactory::create_nes_ppu_mem_banks(n_e_s::core::IRom*) | MemBankList MemBankFactory::create_nes_ppu_mem_banks(IRom *rom) {
MemBankList mem_banks;
// Rom, make sure this is first so the mapper can decide if it wants to
// handle the address or not.
mem_banks.push_back(std::make_unique<PpuRomTranslator>(rom));
// Palettes
mem_banks.push_back(std::make... | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x10, %edi
callq 0xc910
leaq 0x62ebd(%rip), %rcx # 0x12bea8
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0xc916e
movq (%rsp), %rdi
te... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/membank_factory.cpp |
n_e_s::core::MappedMemBank<(unsigned short)8192, (unsigned short)16383, (unsigned short)8>::read_byte(unsigned short) const | uint8_t read_byte(uint16_t addr) const override {
return reader_(addr);
} | pushq %rax
movw %si, 0x6(%rsp)
cmpq $0x0, 0x18(%rdi)
je 0xc93e8
movq %rdi, %rax
addq $0x8, %rdi
leaq 0x6(%rsp), %rsi
callq *0x20(%rax)
popq %rcx
retq
callq 0xc310
nop
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mapped_membank.h |
n_e_s::core::MemBankControllerIO::read_byte(unsigned short) const | uint8_t read_byte(uint16_t addr) const override {
// Source: https://wiki.nesdev.com/w/index.php/Standard_controller
// In the NES and Famicom, the top three (or five) bits are not
// driven, and so retain the bits of the previous byte on the bus.
// Usually this is the most significant ... | movq %rdi, %rax
cmpw %si, 0x1c(%rdi)
jne 0xc94f0
movq 0x8(%rax), %rdi
movb 0x18(%rax), %cl
leal 0x1(%rcx), %edx
movb %dl, 0x18(%rax)
jmp 0xc9503
cmpw %si, 0x1e(%rax)
jne 0xc9523
movq 0x10(%rax), %rdi
movb 0x19(%rax), %cl
leal 0x1(%rcx), %edx
movb %dl, 0x19(%rax)
xorl %esi, %esi
testb $0x1, 0x1a(%rax)
jne 0xc9515
movb $... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/membank_controller_io.h |
n_e_s::core::MemBankControllerIO::write_byte(unsigned short, unsigned char) | void write_byte(uint16_t addr, uint8_t data) override {
if (addr == controller1_addr_) {
if (((data1_ & static_cast<uint8_t>(0x01)) == 0x01) &&
((data & static_cast<uint8_t>(0x01)) == 0x00)) {
// Neg flank on bit 0 should latch controller button states -
... | cmpw %si, 0x1c(%rdi)
jne 0xc9542
testb $0x1, %dl
jne 0xc953e
movb 0x1a(%rdi), %al
andb $0x1, %al
je 0xc953e
movw $0x0, 0x18(%rdi)
movb %dl, 0x1a(%rdi)
retq
cmpw %si, 0x1e(%rdi)
jne 0xc954b
movb %dl, 0x1b(%rdi)
retq
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/membank_controller_io.h |
n_e_s::core::MmuFactory::create_empty() | std::unique_ptr<IMmu> MmuFactory::create_empty() {
return std::make_unique<Mmu>();
} | pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x20, %edi
callq 0xc910
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x63455(%rip), %rcx # 0x12ca18
addq $0x10, %rcx
movq %rcx, (%rax)
movups %xmm0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, 0x18(%rax)
leaq 0x8(%rsp), %rdi
movq %rcx, (%rdi)
movq ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mmu_factory.cpp |
n_e_s::core::MmuFactory::create(std::vector<std::unique_ptr<n_e_s::core::IMemBank, std::default_delete<n_e_s::core::IMemBank>>, std::allocator<std::unique_ptr<n_e_s::core::IMemBank, std::default_delete<n_e_s::core::IMemBank>>>>) | std::unique_ptr<IMmu> MmuFactory::create(MemBankList mem_banks) {
std::unique_ptr<IMmu> immu = std::make_unique<Mmu>();
auto mmu = static_cast<Mmu *>(immu.get());
for (std::unique_ptr<IMemBank> &mem_bank : mem_banks) {
mmu->add_mem_bank(std::move(mem_bank));
}
return immu;
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x20, %edi
callq 0xc910
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
leaq 0x633f9(%rip), %rax # 0x12ca18
addq $0x10, %rax
movq %rax, (%r14)
xorl %eax, %eax
movq %rax, 0x1... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mmu_factory.cpp |
n_e_s::core::Mos6502::execute() | void Mos6502::execute() {
if (pipeline_.done()) {
if (nmi_) {
pipeline_ = create_nmi();
nmi_ = false;
} else {
pipeline_ = parse_next_instruction();
}
} else {
pipeline_.execute_step();
}
++state_.cycle;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
movq %r14, %rdi
callq 0xd19f8
testb %al, %al
je 0xc9860
leaq 0x68(%rbx), %r14
cmpb $0x1, 0x58(%rbx)
jne 0xc986a
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc98a6
movb (%r15), %al
movb %al, 0x60(%rbx)
leaq 0x10(%rsp)... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_nmi() | Pipeline Mos6502::create_nmi() {
// Dummy read
mmu_->read_byte(registers_->pc);
Pipeline result;
result.push([this] {
// Dummy read
mmu_->read_byte(registers_->pc);
});
result.push([this] {
stack_.push_byte(static_cast<uint8_t>(registers_->pc >> 8u));
});
result.... | pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rdi
movzwl (%rax), %esi
movq (%rdi), %rax
callq *0x18(%rax)
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_left_shift_instruction(n_e_s::core::Opcode, bool) | Pipeline Mos6502::create_left_shift_instruction(Opcode opcode,
bool shift_in_carry) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
result.push([this, opcode, shift_in_carry] {
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movl %r12d, %edi
callq 0x12e24
movl %eax, %ebx
movb $0x1, (%r14)
leaq 0x8(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
mo... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_branch_instruction(std::function<bool ()> const&) | Pipeline Mos6502::create_branch_instruction(
const std::function<bool()> &condition) {
Pipeline result;
result.push_conditional([this, condition] {
if (!condition()) {
++registers_->pc;
return StepResult::Stop;
}
return StepResult::Continue;
});
... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
movb $0x1, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rbx, %rdi
xo... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_addressing_steps(n_e_s::core::AddressMode, n_e_s::core::MemoryAccess) | Pipeline Mos6502::create_addressing_steps(AddressMode address_mode,
const MemoryAccess access) {
Pipeline result;
switch (address_mode) {
case AddressMode::Zeropage:
result.append(create_zeropage_addressing_steps(access));
break;
case AddressMode::ZeropageX:
result.appen... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
m... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_and_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_and_instruction(Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
result.push([this] {
const uint8_t operand = mmu_->read_byte(effective_addr... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_sub_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_sub_instruction(Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
result.push([this] {
// SBC simply takes the ones complement of the second ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_compare_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_compare_instruction(Opcode opcode) {
uint8_t *reg{};
if (opcode.family == Family::CPX) {
reg = ®isters_->x;
} else if (opcode.family == Family::CPY) {
reg = ®isters_->y;
} else if (opcode.family == Family::CMP) {
reg = ®isters_->a;
}
con... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x2a, %edx
je 0xcce5b
cmpl $0x28, %edx
je 0xcce51
cmpl $0x24, %edx
jne 0xcce65
movq 0x8(%r15), %r13
addq $0x4, %r13
jmp 0xcce68
movq 0x8(%r15), %r13
addq $0x3, %r13
jmp 0xcce68
movq 0... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_inc_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_inc_instruction(const Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
result.push([this] {
const uint8_t new_value = tmp_ + static_cast<uin... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_eor_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_eor_instruction(Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
result.push([this] {
const uint8_t operand = mmu_->read_byte(effective_addr... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_slo_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_slo_instruction(Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
// SLO = ASL + ORA
result.push([this] {
// ASL
const uint16_t t... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_rla_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_rla_instruction(Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
// RLA = ROL + AND
result.push([this] {
// ROL
uint16_t temp_re... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_sre_instruction(n_e_s::core::Opcode) | Pipeline Mos6502::create_sre_instruction(Opcode opcode) {
const MemoryAccess memory_access = get_memory_access(opcode.family);
Pipeline result;
result.append(create_addressing_steps(opcode.address_mode, memory_access));
// SRE = LSR + EOR
result.push([this] {
// LSR
const uint8_t sh... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %edi
callq 0x12e24
movl %eax, %r12d
movb $0x1, (%r14)
leaq 0x8(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x38(%r... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::set_overflow(unsigned char, unsigned char, unsigned short) | void Mos6502::set_overflow(uint8_t reg_value,
uint8_t operand,
uint16_t resulting_value) {
// See: http://www.righto.com/2012/12/the-6502-overflow-flag-explained.html
auto a = static_cast<uint8_t>(reg_value ^ resulting_value);
auto b = static_cast<uint8_t>(operand ^ resulting_value);
con... | xorl %ecx, %esi
xorl %ecx, %edx
andl %esi, %edx
movq 0x8(%rdi), %rax
movb 0x6(%rax), %cl
andb $-0x41, %cl
shrb %dl
andb $0x40, %dl
orb %cl, %dl
movb %dl, 0x6(%rax)
retq
nop
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_zeropage_addressing_steps(n_e_s::core::MemoryAccess) | Pipeline Mos6502::create_zeropage_addressing_steps(MemoryAccess access) {
Pipeline result;
if (access == MemoryAccess::Read || access == MemoryAccess::Write) {
result.push([this] {
effective_address_ = mmu_->read_byte(registers_->pc);
++registers_->pc;
});
} else {
... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rbx, %rdi
xorl %esi, %e... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_absolute_addressing_steps(n_e_s::core::MemoryAccess) | Pipeline Mos6502::create_absolute_addressing_steps(const MemoryAccess access) {
Pipeline result;
result.push([this] { tmp_ = mmu_->read_byte(registers_->pc++); });
result.push([this] {
const uint16_t upper = mmu_->read_byte(registers_->pc++) << 8u;
effective_address_ = upper | tmp_;
});
... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rbx, %rdi
xorl %esi, %e... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_absolute_indexed_addressing_steps(unsigned char const*, n_e_s::core::MemoryAccess) | Pipeline Mos6502::create_absolute_indexed_addressing_steps(
const uint8_t *index_reg,
const MemoryAccess access) {
Pipeline result;
result.push([this] { tmp_ = mmu_->read_byte(registers_->pc++); });
result.push([this, index_reg] {
const uint16_t address_high = mmu_->read_byte(registe... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
mo... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::Mos6502::create_indirect_indexed_addressing_steps(n_e_s::core::MemoryAccess) | Pipeline Mos6502::create_indirect_indexed_addressing_steps(
const MemoryAccess access) {
Pipeline result;
result.push([this] { tmp_ = mmu_->read_byte(registers_->pc++); });
result.push([this] { tmp2_ = mmu_->read_byte(tmp_); });
result.push([this] {
// The effective address is always fet... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rbx, %rdi
xorl %esi, %e... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mos6502.cpp |
n_e_s::core::NesController::~NesController() | void set(Button button, bool state) override {
switch (button) {
case Button::A:
a_ = state;
break;
case Button::B:
b_ = state;
break;
case Button::Select:
select_ = state;
break;
case Button::Start:
... | movl $0x10, %esi
jmp 0xc940
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/nes_controller.h |
n_e_s::core::Pipeline::append(n_e_s::core::Pipeline const&) | void Pipeline::append(const Pipeline &pipeline) {
std::copy(pipeline.steps_.begin(),
pipeline.steps_.end(),
std::back_inserter(steps_));
} | subq $0x48, %rsp
movups 0x18(%rsi), %xmm0
movups 0x28(%rsi), %xmm1
movups 0x38(%rsi), %xmm2
movups 0x48(%rsi), %xmm3
leaq 0x8(%rdi), %rdx
leaq 0x28(%rsp), %rdi
movups %xmm0, (%rdi)
movups %xmm1, 0x10(%rdi)
leaq 0x8(%rsp), %rsi
movups %xmm2, (%rsi)
movups %xmm3, 0x10(%rsi)
callq 0xd1c66
addq $0x48, %rsp
retq
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/pipeline.cpp |
n_e_s::core::Pipeline::clear() | void Pipeline::clear() {
while (!steps_.empty()) {
steps_.pop_front();
}
continue_ = true;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
cmpq 0x18(%rdi), %rax
je 0xd1a33
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0xd1c26
movq 0x38(%rbx), %rax
cmpq 0x18(%rbx), %rax
jne 0xd1a21
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/pipeline.cpp |
n_e_s::core::Pipeline::execute_step() | void Pipeline::execute_step() {
if (!steps_.empty()) {
const StepResult res = steps_.front()();
steps_.pop_front();
continue_ = res != StepResult::Stop;
if (res == StepResult::Skip) {
execute_step();
}
}
} | pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq 0x18(%rbx), %rdi
cmpq %rdi, 0x38(%rbx)
je 0xd1a72
cmpq $0x0, 0x10(%rdi)
je 0xd1a77
callq *0x18(%rdi)
movl %eax, %ebp
movq %r14, %rdi
callq 0xd1c26
cmpl $0x2, %ebp
setne (%rbx)
cmpl $0x1, %ebp
je 0xd1a49
popq %rbx
popq %r14
popq %rbp
retq
callq 0... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/pipeline.cpp |
n_e_s::core::RomFactory::from_bytes(std::istream&) | std::unique_ptr<IRom> RomFactory::from_bytes(std::istream &bytestream) {
std::vector<uint8_t> bytes(streamsize(bytestream));
if (bytes.size() < 16) {
throw std::invalid_argument(
"File isn't big enough to contain a header");
}
if (!bytestream.read(reinterpret_cast<char *>(&bytes... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xcc50
movq %r14, %rdi
callq 0xd1a0
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xcc50
testq %r15, %r15
js 0xd24c4
leaq 0x50(... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom_factory.cpp |
n_e_s::core::Mmu::get_mem_bank(unsigned short) const | IMemBank *Mmu::get_mem_bank(uint16_t addr) const {
auto it = std::find_if(begin(mem_banks_), end(mem_banks_), equal(addr));
if (it != end(mem_banks_)) {
return (*it).get();
}
return nullptr;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %r12
movq %r12, %r13
subq %r15, %r13
sarq $0x5, %r13
testq %r13, %r13
jle 0xd2a46
incq %r13
addq $0x10, %r15
movzwl %bp, %r14d
movq -0x10(%r15), %rdi
movq (%rdi), %rax
movl ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/mmu.cpp |
n_e_s::core::Ppu::read_byte(unsigned short) | uint8_t Ppu::read_byte(uint16_t addr) {
uint8_t byte = 0;
if (addr == kPpuStatus) {
byte = registers_->status.value();
registers_->write_toggle = false;
clear_vblank_flag();
} else if (addr == kOamData) {
byte = oam_data_[registers_->oamaddr];
} else if (addr == kPpuData... | pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2007, %esi # imm = 0x2007
je 0xd2cbe
cmpl $0x2004, %esi # imm = 0x2004
je 0xd2caf
cmpl $0x2002, %esi # imm = 0x2002
jne 0xd2cec
movq 0x8(%rbx), %rax
movb 0x6(%rax), %bpl
movb $0x0, 0xe(%rax)
movl %ebp, %ecx
andb $0x7f, %cl
movb %cl, ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::Ppu::write_byte(unsigned short, unsigned char) | void Ppu::write_byte(uint16_t addr, uint8_t byte) {
if (addr == kPpuCtrl) {
const auto new_ctrl = PpuCtrl(byte);
// Trigger nmi if the nmi-enabled flag goes from 0 to 1 during vblank.
if (!registers_->ctrl.is_set(7u) && new_ctrl.is_set(7u) &&
registers_->status.is_set(7u)) {
... | pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
leal -0x2000(%rsi), %eax
cmpl $0x7, %eax
ja 0xd2dd2
leaq 0x2c887(%rip), %rcx # 0xff600
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb %bl, %bl
jns 0xd2da9
movq 0x8(%r14), %rax
cmpb $0x0, 0x4(%rax)
js 0xd2da9
cmpb $0x0, 0x6(%rax)
jns 0xd2d... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::Ppu::execute() | std::optional<Pixel> Ppu::execute() {
std::optional<Pixel> pixel;
if (is_pre_render_scanline()) {
execute_pre_render_scanline();
} else if (is_visible_scanline()) {
pixel = execute_visible_scanline();
} else if (is_post_render_scanline()) {
execute_post_render_scanline();
} ... | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movzwl (%rax), %eax
cmpl $0x105, %eax # imm = 0x105
jne 0xd2f41
movq %rbx, %rdi
callq 0xd2fb8
xorl %r15d, %r15d
jmp 0xd2f6e
movzwl %ax, %ecx
cmpl $0xef, %ecx
ja 0xd2f94
movq %rbx, %rdi
callq 0xd30ec
movq %rbx, %rdi
callq 0xd32d8
movq %rbx,... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::Ppu::execute_vblank_scanline() | uint16_t &Ppu::scanline() {
return registers_->scanline;
} | movq 0x8(%rdi), %rcx
cmpw $0xf1, (%rcx)
jne 0xd3042
cmpw $0x1, 0x2(%rcx)
jne 0xd3042
orb $-0x80, 0x6(%rcx)
cmpb $0x0, 0x4(%rcx)
js 0xd3043
retq
movq %rdi, %rax
cmpq $0x0, 0x28(%rdi)
je 0xd3054
leaq 0x18(%rax), %rdi
jmpq *0x30(%rax)
pushq %rax
callq 0xc310
| /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::Ppu::update_counters() | uint16_t &Ppu::cycle() {
return registers_->cycle;
} | movq 0x8(%rdi), %rax
movzwl 0x2(%rax), %ecx
cmpl $0x154, %ecx # imm = 0x154
jne 0xd3090
movw $0x0, 0x2(%rax)
movzwl (%rax), %ecx
cmpl $0x105, %ecx # imm = 0x105
jne 0xd3097
movw $0x0, (%rax)
movb 0xf(%rax), %cl
movl %ecx, %edx
xorb $0x1, %dl
movb %dl, 0xf(%rax)
testb %cl, %cl
je 0xd309d
retq
incl ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::Ppu::fetch() | void Ppu::fetch() {
if ((cycle() >= 1 && cycle() <= 256) ||
(cycle() >= 321 && cycle() <= 336)) {
shift_registers();
const uint16_t background_pattern_table_base_address =
registers_->ctrl.is_set(4u) ? 0x1000u : 0x0000u;
const uint8_t fine_scroll_y = registers_->v... | pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movzwl 0x2(%rax), %esi
leal -0x1(%rsi), %r9d
movzwl %r9w, %ecx
cmpl $0x100, %ecx # imm = 0x100
setae %cl
leal -0x141(%rsi), %edx
cmpw $0x10, %dx
setae %dl
testb %dl, %cl
jne 0xd320b
movzwl 0x14(%rax), %r8d
addl %r8d, %r8d
movw %r8w, 0x14(%... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::Ppu::increase_scroll_counters() | void Ppu::increase_scroll_counters() {
if (!registers_->mask.is_rendering_enabled()) {
return;
}
// During pixels 280 through 304 of this scanline, the vertical scroll bits
// are reloaded if rendering is enabled. vert(v) == vert(t)
if (scanline() == kPreRenderScanline) {
if (cycle(... | movq 0x8(%rdi), %rax
testb $0x18, 0x5(%rax)
je 0xd3394
cmpw $0x105, (%rax) # imm = 0x105
jne 0xd3317
movzwl 0x2(%rax), %ecx
addl $0xfffffee8, %ecx # imm = 0xFFFFFEE8
cmpw $0x18, %cx
ja 0xd3317
movzwl 0xa(%rax), %ecx
andl $0xffff841f, %ecx # imm = 0xFFFF841F
movzwl 0xc(%rax), %edx
andl $0x7be0, %edx... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/ppu.cpp |
n_e_s::core::PpuVram::increase_y() | [[nodiscard]] constexpr uint8_t fine_scroll_y() const {
return static_cast<uint8_t>(value_ >> 12u) & 0b0000'0111u;
} | movzwl (%rdi), %ecx
movl %ecx, %edx
notl %edx
movl %ecx, %eax
andl $0x8fff, %eax # imm = 0x8FFF
testl $0x7000, %edx # imm = 0x7000
jne 0xd3576
movw %ax, (%rdi)
movzwl %cx, %edx
shrl $0x5, %edx
movl %ecx, %eax
andl $0x8c1f, %eax # imm = 0x8C1F
movl %edx, %esi
notb %sil
testb $0x1f, %sil
je ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/include/nes/core/ppu_registers.h |
n_e_s::core::Nrom::ppu_read_byte(unsigned short) const | uint8_t Nrom::ppu_read_byte(uint16_t addr) const {
if (addr <= kChrEnd) {
return chr_rom_.at(addr);
}
const auto [index, addr_mod] =
translate_nametable_addr(addr, header().mirroring());
return nametables_[index][addr_mod];
} | pushq %rbx
movq %rdi, %rbx
cmpl $0x1fff, %esi # imm = 0x1FFF
ja 0xd3812
movzwl %si, %esi
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
subq %rax, %rdx
cmpq %rsi, %rdx
jbe 0xd3840
addq %rsi, %rax
jmp 0xd383c
movzbl 0xe(%rbx), %edx
andl $0x1, %edx
movzwl %si, %esi
movq %rbx, %rdi
callq 0xd384e
movslq %eax, %rcx
s... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom/nrom.cpp |
n_e_s::core::Nrom::translate_nametable_addr(unsigned short, n_e_s::core::Mirroring) const | std::pair<int, uint16_t> Nrom::translate_nametable_addr(uint16_t addr,
Mirroring m) const {
// Nametables
// Range Size Desc
// $2000-$23FF $0400 Nametable 0
// $2400-$27FF $0400 Nametable 1
// $2800-$2BFF $0400 Nametable 2
// $2C00-$2FFF $0400 Nametable 3
// $3... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
andl $0xfff, %ebp # imm = 0xFFF
testl %edx, %edx
je 0xd3883
testb $0x1, 0xe(%rdi)
je 0xd38be
movzwl %bp, %eax
cmpl $0x400, %eax # imm = 0x400
jb 0xd388d
cmpl $0x7ff, %eax # imm = 0x7FF
ja 0xd3898
andl $0x3ff, %esi ... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom/nrom.cpp |
n_e_s::core::Nrom::ppu_write_byte(unsigned short, unsigned char) | void Nrom::ppu_write_byte(uint16_t addr, uint8_t byte) {
if (addr <= kChrEnd) {
chr_rom_.at(addr) = byte;
}
const auto [index, addr_mod] =
translate_nametable_addr(addr, header().mirroring());
nametables_[index][addr_mod] = byte;
} | pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %eax
movq %rdi, %r14
movzwl %ax, %esi
cmpl $0x1fff, %eax # imm = 0x1FFF
ja 0xd3998
movq 0x30(%r14), %rax
movq 0x38(%r14), %rdx
subq %rax, %rdx
cmpq %rsi, %rdx
jbe 0xd39c5
movb %bl, (%rax,%rsi)
movzbl 0xe(%r14), %edx
andl $0x1, %edx
movq %r14, %rdi
ca... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom/nrom.cpp |
n_e_s::core::Mapper2::Mapper2(n_e_s::core::INesHeader const&, std::vector<unsigned char, std::allocator<unsigned char>>, std::vector<unsigned char, std::allocator<unsigned char>>) | Mapper2::Mapper2(const INesHeader &h,
std::vector<uint8_t> prg_rom,
std::vector<uint8_t> chr_mem)
: IRom(h),
select_bank_hi_(h.prg_rom_size - 1),
prg_rom_(std::move(prg_rom)),
chr_mem_(std::move(chr_mem)),
nametables_{} {
if (prg_rom_.size() !=
... | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58fe2(%rip), %rax # 0x12cb88
movq %rax, (%rdi)
movups (%rsi), %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x59021(%rip), %rax # 0x12cbd8
movq %rax, (%rdi)
movb $0x0, 0x18(%rdi)
movb 0x4(%rsi), %al
decb %al
movb %al, 0x19(%rdi)
movq (%rdx), %rax
movq... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom/mapper_2.cpp |
n_e_s::core::Mapper2::cpu_read_byte(unsigned short) const | uint8_t Mapper2::cpu_read_byte(uint16_t addr) const {
if (addr >= kSwitchablePrgRomStart && addr <= kSwitchablePrgRomEnd) {
const uint32_t mapped_addr =
select_bank_low_ * 0x4000u + (addr & 0x3FFFu);
return prg_rom_[mapped_addr];
}
if (addr >= kLastBankPrgRomStart) {
... | pushq %rbp
pushq %r14
pushq %rbx
movswl %si, %eax
cmpl $0xffffbfff, %eax # imm = 0xFFFFBFFF
jg 0xd3cf0
leaq 0x18(%rdi), %rax
jmp 0xd3cff
movzwl %si, %ebp
cmpl $0xc000, %ebp # imm = 0xC000
jb 0xd3d19
leaq 0x19(%rdi), %rax
movzbl (%rax), %eax
shll $0xe, %eax
andl $0x3fff, %esi # imm = 0x3FFF
orl... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom/mapper_2.cpp |
n_e_s::core::Mapper2::ppu_read_byte(unsigned short) const | uint8_t Mapper2::ppu_read_byte(uint16_t addr) const {
if (addr <= kChrEnd) {
return chr_mem_.at(addr);
}
const auto [index, addr_mod] =
translate_nametable_addr(addr, header().mirroring());
return nametables_[index][addr_mod];
} | pushq %rbx
movq %rdi, %rbx
cmpl $0x1fff, %esi # imm = 0x1FFF
ja 0xd3d96
movzwl %si, %esi
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rdx
subq %rax, %rdx
cmpq %rsi, %rdx
jbe 0xd3dc4
addq %rsi, %rax
jmp 0xd3dc0
movzbl 0xe(%rbx), %edx
andl $0x1, %edx
movzwl %si, %esi
movq %rbx, %rdi
callq 0xd3dd2
movslq %eax, %rcx
s... | /johnor[P]n_e_s_vis/build_O1/_deps/nes_core-src/core/src/rom/mapper_2.cpp |
sf::RenderTexture::create(unsigned int, unsigned int, bool) | bool RenderTexture::create(unsigned int width, unsigned int height, bool depthBuffer)
{
return create(width, height, ContextSettings(depthBuffer ? 32 : 0));
} | subq $0x28, %rsp
shll $0x5, %ecx
leaq 0xc(%rsp), %rax
movl %ecx, (%rax)
movaps 0x2b799(%rip), %xmm0 # 0xff820
movups %xmm0, 0x4(%rax)
movl $0x0, 0x14(%rax)
movb $0x0, 0x18(%rax)
movq %rax, %rcx
callq 0xd40a4
addq $0x28, %rsp
retq
nop
| /johnor[P]n_e_s_vis/build_O1/_deps/sfml-src/src/SFML/Graphics/RenderTexture.cpp |
sf::RenderTexture::create(unsigned int, unsigned int, sf::ContextSettings const&) | bool RenderTexture::create(unsigned int width, unsigned int height, const ContextSettings& settings)
{
// Create the texture
if (!m_texture.create(width, height))
{
err() << "Impossible to create render texture (failed to create the target texture)" << std::endl;
return false;
}
// ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x1e8(%rdi), %r12
movq %r12, %rdi
callq 0x3e1cc
testb %al, %al
je 0xd4114
movq %r12, %rdi
xorl %esi, %esi
callq 0x3f9b4
movq 0x1e0(%rbx), %rdi
testq %rdi, %rdi
je 0xd40e6
movq (%rdi), %rax
callq ... | /johnor[P]n_e_s_vis/build_O1/_deps/sfml-src/src/SFML/Graphics/RenderTexture.cpp |
scala::read_scl(std::basic_ifstream<char, std::char_traits<char>>&) | scale read_scl(std::ifstream& input_file){
/*
C++ Code to parse the Scala scale file, as documented here:
http://www.huygens-fokker.org/scala/scl_format.html
A couple of extensions:
- Allow white-space before the comment character. Spec is a little ambiguous.
- ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rsi, %r14
movq %rdi, %r15
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xd0(%rsp)
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
... | /MarkCWirt[P]libscala-file/src/scala_scl.cpp |
scala::scale::scale() | scale () {
// The first degree is a scala file is always implicit. Make it explicit.
degrees.push_back( *(new degree(0.0)));
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x8, %edi
callq 0x112a0
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x1223a
addq $0x8, %rsp
popq %rbx
popq %r14
re... | /MarkCWirt[P]libscala-file/src/scala_file.hpp |
entropy_update | static int entropy_update( mbedtls_entropy_context *ctx, unsigned char source_id,
const unsigned char *data, size_t len )
{
unsigned char header[2];
unsigned char tmp[MBEDTLS_ENTROPY_BLOCK_SIZE];
size_t use_len = len;
const unsigned char *p = data;
int ret = 0;
if( us... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %r14
movl %esi, %r12d
movq %rdi, %rbx
cmpq $0x41, %rcx
jb 0x10173
leaq 0x10(%rsp), %r15
movq %rdx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x1e070
testl %eax, %eax
jne 0x101c4
movl $0x40, %r14d
jmp 0x10176
movq %rdx, %... | /ARMmbed[P]mbed-crypto/library/entropy.c |
psa_key_agreement_raw_internal | static psa_status_t psa_key_agreement_raw_internal( psa_algorithm_t alg,
psa_key_slot_t *private_key,
const uint8_t *peer_key,
size_t peer_key_length,
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp # imm = 0x288
movl $0xffffff7a, %r12d # imm = 0xFFFFFF7A
cmpl $0x30200000, %edi # imm = 0x30200000
jne 0x14900
movzbl 0x1(%rsi), %eax
shll $0x8, %eax
movl $0xffffff79, %r12d # imm = 0xFFFFFF79
cmpl $0x7100, %e... | /ARMmbed[P]mbed-crypto/library/psa_crypto.c |
psa_close_key | psa_status_t psa_close_key( psa_key_handle_t handle )
{
psa_status_t status;
psa_key_slot_t *slot;
if( handle == 0 )
return( PSA_SUCCESS );
status = psa_get_key_slot( handle, &slot );
if( status != PSA_SUCCESS )
return( status );
return( psa_wipe_key_slot( slot ) );
} | testl %edi, %edi
je 0x15858
movl $0xffffff77, %eax # imm = 0xFFFFFF77
testb $0x1, 0x405bc(%rip) # 0x55de0
je 0x15857
leal -0x21(%rdi), %ecx
movl $0xffffff78, %eax # imm = 0xFFFFFF78
cmpw $-0x20, %cx
jb 0x15857
movzwl %di, %ecx
decl %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
leaq 0x3ff98(%rip), %rdi ... | /ARMmbed[P]mbed-crypto/library/psa_crypto_slot_management.c |
mbedtls_internal_ripemd160_process | int mbedtls_internal_ripemd160_process( mbedtls_ripemd160_context *ctx,
const unsigned char data[64] )
{
uint32_t A, B, C, D, E, Ap, Bp, Cp, Dp, Ep, X[16];
GET_UINT32_LE( X[ 0], data, 0 );
GET_UINT32_LE( X[ 1], data, 4 );
GET_UINT32_LE( X[ 2], data, 8 );
G... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
movl (%rsi), %r11d
movq %r11, -0x48(%rsp)
movl 0x4(%rsi), %r14d
movq %r14, -0x58(%rsp)
movl 0x14(%rsi), %ebx
movq %rbx, -0x60(%rsp)
movl 0x8(%rdi), %ecx
movl 0xc(%rdi), %r8d
movl 0x10(%rdi), %eax
movl 0x14(%rdi), %r9d
movl 0x... | /ARMmbed[P]mbed-crypto/library/ripemd160.c |
mbedtls_ripemd160_finish_ret | int mbedtls_ripemd160_finish_ret( mbedtls_ripemd160_context *ctx,
unsigned char output[20] )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
uint32_t last, padn;
uint32_t high, low;
unsigned char msglen[8];
high = ( ctx->total[0] >> 29 )
| ( ctx->total[... | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
shldl $0x3, %eax, %ecx
leal (,%rax,8), %edx
leaq 0x8(%rsp), %r15
movb %dl, (%r15)
movl %eax, %edx
shrl $0x5, %edx
movb %dl, 0x1(%r15)
movl %eax, %edx
shrl $0xd, %edx
movb %dl, 0x2(%r15)
movl %eax, %e... | /ARMmbed[P]mbed-crypto/library/ripemd160.c |
mbedtls_ripemd160_self_test | int mbedtls_ripemd160_self_test( int verbose )
{
int i, ret = 0;
unsigned char output[20];
memset( output, 0, sizeof output );
for( i = 0; i < TESTS; i++ )
{
if( verbose != 0 )
mbedtls_printf( " RIPEMD-160 test #%d: ", i + 1 );
ret = mbedtls_ripemd160_ret( ripemd160_t... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
pxor %xmm0, %xmm0
movq %rsp, %r14
movdqa %xmm0, (%r14)
movl $0x0, 0x10(%r14)
leaq 0x2567e(%rip), %r13 # 0x3ced0
leaq 0x25907(%rip), %rbp # 0x3d160
leaq 0x25940(%rip), %r15 # 0x3d1a0
xorl %r12d, %r12d
testl %eb... | /ARMmbed[P]mbed-crypto/library/ripemd160.c |
mbedtls_rsa_pkcs1_decrypt | int mbedtls_rsa_pkcs1_decrypt( mbedtls_rsa_context *ctx,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng,
int mode, size_t *olen,
const unsigned char *input,
unsigned char *output,
... | movq %r9, %r10
movq %r8, %rax
movl 0x148(%rdi), %r8d
cmpl $0x1, %r8d
je 0x197b0
testl %r8d, %r8d
jne 0x197cd
movq %rax, %r8
movq %r10, %r9
jmp 0x1954f
pushq %rax
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq 0x18(%rsp)
pushq 0x18(%rsp)
pushq %r10
pushq %rax
callq 0x19299
addq $0x20, %rsp
popq %rcx
retq
movl $0xffffbf00, %eax ... | /ARMmbed[P]mbed-crypto/library/rsa.c |
mbedtls_timing_self_test | int mbedtls_timing_self_test( int verbose )
{
unsigned long cycles = 0, ratio = 0;
unsigned long millisecs = 0, secs = 0;
int hardfail = 0;
struct mbedtls_timing_hr_time hires;
uint32_t a = 0, b = 0;
mbedtls_timing_delay_context ctx;
if( verbose != 0 )
mbedtls_printf( " TIMING test... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edi, %ebp
testl %edi, %edi
je 0x1e4de
leaq 0x1fce4(%rip), %rdi # 0x3e1af
callq 0xe090
leaq 0x1fbc9(%rip), %rdi # 0x3e0a0
xorl %eax, %eax
callq 0xe0e0
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0xe130
movl $0x0, 0x378f4(%ri... | /ARMmbed[P]mbed-crypto/library/timing.c |
busy_msleep | static void busy_msleep( unsigned long msec )
{
struct mbedtls_timing_hr_time hires;
unsigned long i = 0; /* for busy-waiting */
volatile unsigned long j; /* to prevent optimisation */
(void) mbedtls_timing_get_timer( &hires, 1 );
while( mbedtls_timing_get_timer( &hires, 0 ) < msec )
i++;
... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0xe130
movq $-0x1, %r15
leaq 0x8(%rsp), %r14
movabsq $0x20c49ba5e353f7cf, %r12 # imm = 0x20C49BA5E353F7CF
movq %r14, %rdi
xorl %esi, %esi
callq 0xe130
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq ... | /ARMmbed[P]mbed-crypto/library/timing.c |
mbedtls_mpi_shrink | int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs )
{
mbedtls_mpi_uint *p;
size_t i;
MPI_VALIDATE_RET( X != NULL );
if( nblimbs > MBEDTLS_MPI_MAX_LIMBS )
return( MBEDTLS_ERR_MPI_ALLOC_FAILED );
/* Actually resize up if there are currently fewer than nblimbs limbs. */
if( X->n <= n... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xfffffff0, %ebp # imm = 0xFFFFFFF0
cmpq $0x2710, %rsi # imm = 0x2710
ja 0x1eafe
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
cmpq %rsi, %r15
jbe 0x1eb0f
movq %r15, %rcx
movq %rcx, %rax
cmpq $0x1, %rcx
je 0x1eaa4
... | /ARMmbed[P]mbed-crypto/library/bignum.c |
mbedtls_ccm_star_encrypt_and_tag | int mbedtls_ccm_star_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
const unsigned char *iv, size_t iv_len,
const unsigned char *add, size_t add_len,
const unsigned char *input, unsigned char *output,
unsigned... | subq $0x28, %rsp
movq %r8, %rax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movaps 0x30(%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
movups %xmm1, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq %r9, (%rsp)
xorl %esi, %esi
movq %rax, %r9
callq 0x22dc6
addq $0x28, %rsp
retq
| /ARMmbed[P]mbed-crypto/library/ccm.c |
mbedtls_cipher_set_padding_mode | int mbedtls_cipher_set_padding_mode( mbedtls_cipher_context_t *ctx,
mbedtls_cipher_padding_t mode )
{
CIPHER_VALIDATE_RET( ctx != NULL );
if( NULL == ctx->cipher_info || MBEDTLS_MODE_CBC != ctx->cipher_info->mode )
{
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
... | movq (%rdi), %rcx
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
testq %rcx, %rcx
je 0x23d4a
cmpl $0x2, 0x4(%rcx)
jne 0x23d4a
movl $0xffff9f80, %eax # imm = 0xFFFF9F80
cmpl $0x4, %esi
ja 0x23d4a
movl %esi, %eax
leaq 0x2ecdf(%rip), %rcx # 0x52a10
movq (%rcx,%rax,8), %rcx
leaq 0x2ecfc(%rip), %rdx # 0x52a38... | /ARMmbed[P]mbed-crypto/library/cipher.c |
mbedtls_cipher_finish | int mbedtls_cipher_finish( mbedtls_cipher_context_t *ctx,
unsigned char *output, size_t *olen )
{
CIPHER_VALIDATE_RET( ctx != NULL );
CIPHER_VALIDATE_RET( output != NULL );
CIPHER_VALIDATE_RET( olen != NULL );
if( ctx->cipher_info == NULL )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT... | pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x2422e
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, (%rdx)
movl 0x4(%rax), %ecx
leal -0x3(%rcx), %edx
cmpl $0x7, %edx
jae 0x24220
movl $0x5f, %esi
btl %edx, %esi
jb 0x2422a
movl (%rax), %edx
andl $-0x2, %edx
cmpl $0x48, %edx
jne 0x242... | /ARMmbed[P]mbed-crypto/library/cipher.c |
get_one_and_zeros_padding | static int get_one_and_zeros_padding( unsigned char *input, size_t input_len,
size_t *data_len )
{
size_t i;
unsigned char done = 0, prev_done, bad;
if( NULL == input || NULL == data_len )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
bad = 0x80;
*data_... | testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
jne 0x2442f
movq $0x0, (%rdx)
testq %rsi, %rsi
je 0x24430
decq %rsi
xorl %eax, %eax
movb $-0x80, %r10b
xorl %r9d, %r9d
xorl %r8d, %r8d
cmpb $0x0, (%rdi,%rsi)
movl %r10d, %ecx
setne %r8b
orl %r9d, %r8d
cmpl %... | /ARMmbed[P]mbed-crypto/library/cipher.c |
get_zeros_padding | static int get_zeros_padding( unsigned char *input, size_t input_len,
size_t *data_len )
{
size_t i;
unsigned char done = 0, prev_done;
if( NULL == input || NULL == data_len )
return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
*data_len = 0;
for( i = input_len; i > ... | testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
jne 0x24530
movq $0x0, (%rdx)
xorl %eax, %eax
testq %rsi, %rsi
je 0x24530
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %r8d, %r9d
xorl %r8d, %r8d
cmpb $0x0, -0x1(%rdi,%rsi)
setne %r8b
orl %r9d, %r8d
cmpl %r9d, %r8d
... | /ARMmbed[P]mbed-crypto/library/cipher.c |
arc4_ctx_alloc | static void * arc4_ctx_alloc( void )
{
mbedtls_arc4_context *ctx;
ctx = mbedtls_calloc( 1, sizeof( mbedtls_arc4_context ) );
if( ctx == NULL )
return( NULL );
mbedtls_arc4_init( ctx );
return( ctx );
} | pushq %rbx
movl $0x1, %edi
movl $0x108, %esi # imm = 0x108
callq 0xe1a0
movq %rax, %rbx
testq %rax, %rax
je 0x249f8
movq %rbx, %rdi
callq 0x366c8
movq %rbx, %rax
popq %rbx
retq
| /ARMmbed[P]mbed-crypto/library/cipher_wrap.c |
cmac_multiply_by_u | static int cmac_multiply_by_u( unsigned char *output,
const unsigned char *input,
size_t blocksize )
{
const unsigned char R_128 = 0x87;
const unsigned char R_64 = 0x1B;
unsigned char R_n, mask;
unsigned char overflow = 0x00;
int i;
... | cmpq $0x10, %rdx
je 0x257c8
movl $0xffff9f00, %eax # imm = 0xFFFF9F00
cmpq $0x8, %rdx
jne 0x25800
movb $0x1b, %al
jmp 0x257ca
movb $-0x79, %al
leaq 0x1(%rdx), %rcx
xorl %r8d, %r8d
movb -0x2(%rsi,%rcx), %r9b
addb %r9b, %r9b
orb %r8b, %r9b
movb %r9b, -0x2(%rdi,%rcx)
movb -0x2(%rsi,%rcx), %r8b
shrb $0x7, %r8b
decq %... | /ARMmbed[P]mbed-crypto/library/cmac.c |
mbedtls_ctr_drbg_set_nonce_len | int mbedtls_ctr_drbg_set_nonce_len( mbedtls_ctr_drbg_context *ctx,
size_t len )
{
/* If mbedtls_ctr_drbg_seed() has already been called, it's
* too late. Return the error code that's closest to making sense. */
if( ctx->f_entropy != NULL )
return( MBEDTLS_ERR_CTR... | movl $0xffffffcc, %eax # imm = 0xFFFFFFCC
cmpq $0x0, 0x148(%rdi)
je 0x25857
retq
movl $0xffffffc8, %eax # imm = 0xFFFFFFC8
cmpq $0x180, %rsi # imm = 0x180
ja 0x25856
movl %esi, 0x10(%rdi)
xorl %eax, %eax
retq
| /ARMmbed[P]mbed-crypto/library/ctr_drbg.c |
mbedtls_des_setkey | void mbedtls_des_setkey( uint32_t SK[32], const unsigned char key[MBEDTLS_DES_KEY_SIZE] )
{
int i;
uint32_t X, Y, T;
GET_UINT32_BE( X, key, 0 );
GET_UINT32_BE( Y, key, 4 );
/*
* Permuted Choice 1
*/
T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4);
T = ((Y ) ^ X) ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, -0x8(%rsp)
movzbl (%rsi), %ecx
movl %ecx, %eax
shll $0x18, %eax
movzbl 0x1(%rsi), %edx
shll $0x10, %edx
orl %eax, %edx
movzbl 0x2(%rsi), %eax
shll $0x8, %eax
movzbl 0x3(%rsi), %r8d
orl %edx, %r8d
orl %eax, %r8d
movl 0x4(%rsi), %edx
bswapl %edx... | /ARMmbed[P]mbed-crypto/library/des.c |
mbedtls_md_clone | int mbedtls_md_clone( mbedtls_md_context_t *dst,
const mbedtls_md_context_t *src )
{
if( dst == NULL || dst->md_info == NULL ||
src == NULL || src->md_info == NULL ||
dst->md_info != src->md_info )
{
return( MBEDTLS_ERR_MD_BAD_INPUT_DATA );
}
switch( src->m... | movl $0xffffaf00, %eax # imm = 0xFFFFAF00
testq %rdi, %rdi
je 0x2f212
movq (%rdi), %rcx
testq %rcx, %rcx
sete %dl
testq %rsi, %rsi
sete %r8b
orb %dl, %r8b
jne 0x2f212
movq (%rsi), %rdx
cmpq %rdx, %rcx
je 0x2f213
retq
pushq %rax
movl 0x8(%rdx), %ecx
addl $-0x3, %ecx
cmpl $0x6, %ecx
ja 0x2f27a
leaq 0x12716(%rip), %... | /ARMmbed[P]mbed-crypto/library/md.c |
mbedtls_md_starts | int mbedtls_md_starts( mbedtls_md_context_t *ctx )
{
if( ctx == NULL || ctx->md_info == NULL )
return( MBEDTLS_ERR_MD_BAD_INPUT_DATA );
switch( ctx->md_info->type )
{
#if defined(MBEDTLS_MD2_C)
case MBEDTLS_MD_MD2:
return( mbedtls_md2_starts_ret( ctx->md_ctx ) );
#endif
#if defi... | testq %rdi, %rdi
je 0x2f3e6
movq (%rdi), %rax
testq %rax, %rax
je 0x2f3e6
movl 0x8(%rax), %eax
addl $-0x3, %eax
cmpl $0x6, %eax
ja 0x2f3e6
leaq 0x125a0(%rip), %rcx # 0x41974
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rdi), %rdi
jmp 0x2f9e7
movl $0xffffaf00, %eax # imm = 0xFFFFAF00
retq
mo... | /ARMmbed[P]mbed-crypto/library/md.c |
mbedtls_md_file | int mbedtls_md_file( const mbedtls_md_info_t *md_info, const char *path, unsigned char *output )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
FILE *f;
size_t n;
mbedtls_md_context_t ctx;
unsigned char buf[1024];
if( md_info == NULL )
return( MBEDTLS_ERR_MD_BAD_INPUT_DATA );
i... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x420, %rsp # imm = 0x420
testq %rdi, %rdi
je 0x2f615
movq %rdx, %r14
movq %rdi, %r15
leaq 0xd372(%rip), %rax # 0x3c913
movq %rsi, %rdi
movq %rax, %rsi
callq 0xe290
testq %rax, %rax
je 0x2f61c
movq %rax, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi... | /ARMmbed[P]mbed-crypto/library/md.c |
mbedtls_pk_verify_ext | int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options,
mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hash_len,
const unsigned char *sig, size_t sig_len )
{
PK_VALIDATE_RET( ctx != NULL );
PK_VALIDATE... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdx), %rax
movl $0xffffc180, %r12d # imm = 0xFFFFC180
testq %rax, %rax
je 0x30dbf
movq %r9, %r13
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %r15d
movq %r8, (%rsp)
callq *0x18(%rax)
testl %eax, %eax
je 0x30db2
movq 0... | /ARMmbed[P]mbed-crypto/library/pk.c |
rsa_sign_wrap | static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hash_len,
unsigned char *sig, size_t *sig_len,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
mbedtls_rsa_context * rsa = (mbedtls_rsa_context *) ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testl %esi, %esi
sete %al
shrq $0x20, %rcx
setne %cl
testb %cl, %al
je 0x31071
movl $0xffffc180, %eax # imm = 0xFFFFC180
addq $0x8, %rsp
jmp 0x310ac
movq %r9, %r12
movq %r8, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi,... | /ARMmbed[P]mbed-crypto/library/pk_wrap.c |
rsa_encrypt_wrap | static int rsa_encrypt_wrap( void *ctx,
const unsigned char *input, size_t ilen,
unsigned char *output, size_t *olen, size_t osize,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
mbedtls_rsa_context * rsa = (mbedtls_rsa_context *) ctx;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %rbp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
callq 0x1815e
movq %rax, (%rbp)
cmpq %r13, %rax
jbe 0x3114a
movl $0xffffbc00, %eax # imm = 0xFFFFBC00
jmp 0x31168
movq 0x48(%rsp), %rdx
movq 0x... | /ARMmbed[P]mbed-crypto/library/pk_wrap.c |
eckey_verify_wrap | static int eckey_verify_wrap( void *ctx, mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hash_len,
const unsigned char *sig, size_t sig_len )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
mbedtls_ecdsa_context ecdsa;
mbedtls_ecdsa_init( &ecdsa ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp # imm = 0x158
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r13
movq %rsp, %rbp
movq %rbp, %rdi
callq 0x2865e
movq %rbp, %rdi
movq %r13, %rsi
callq 0x285fa
movl %eax, %ebp
testl %eax, %eax
jne 0x31... | /ARMmbed[P]mbed-crypto/library/pk_wrap.c |
eckey_sign_wrap | static int eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg,
const unsigned char *hash, size_t hash_len,
unsigned char *sig, size_t *sig_len,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movq %r9, 0x8(%rsp)
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r13
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2865e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x285fa
movl %eax, %r1... | /ARMmbed[P]mbed-crypto/library/pk_wrap.c |
mbedtls_pk_parse_keyfile | int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx,
const char *path, const char *pwd )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t n;
unsigned char *buf;
PK_VALIDATE_RET( ctx != NULL );
PK_VALIDATE_RET( path != NULL );
if( ( ret = mbedtls_pk_load_file( p... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r12
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
callq 0x315b0
movl %eax, %ebp
testl %eax, %eax
jne 0x31721
movq (%rsp), %rbx
movq 0x8(%rsp), %r14
testq %r15, %r15
je 0x316f9
movq %r15, %rdi
callq... | /ARMmbed[P]mbed-crypto/library/pkparse.c |
pk_parse_key_sec1_der | static int pk_parse_key_sec1_der( mbedtls_ecp_keypair *eck,
const unsigned char *key,
size_t keylen )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
int version, pubkey_done;
size_t len;
mbedtls_asn1_buf params;
unsigned char *p... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rsi, (%rdi)
addq %rdx, %rsi
leaq 0x10(%rsp), %rdx
movl $0x30, %ecx
callq 0x36981
testl %eax, %eax
jne 0x327c1
leaq 0x8(%rsp), %rdi
movq (%rdi), %r15
addq 0x10(%rsp), %r15
leaq 0x1c(%rsp), %rdx
movq %r15, %rsi
callq 0... | /ARMmbed[P]mbed-crypto/library/pkparse.c |
pk_write_ec_pubkey | static int pk_write_ec_pubkey( unsigned char **p, unsigned char *start,
mbedtls_ecp_keypair *ec )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t len = 0;
unsigned char buf[MBEDTLS_ECP_MAX_PT_LEN];
if( ( ret = mbedtls_ecp_point_write_binary( &ec->grp, &ec->Q,
... | pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0x110(%rdx), %rsi
leaq 0x10(%rsp), %r8
movl $0x85, %r9d
movq %rdx, %rdi
xorl %edx, %edx
callq 0x28add
testl %eax, %eax
jne 0x32ec1
movq (%rbx), %rdi
movl $0xffffff94, %eax # imm = 0xFFFFFF94
movq %rd... | /ARMmbed[P]mbed-crypto/library/pkwrite.c |
mbedtls_pk_write_key_der | int mbedtls_pk_write_key_der( mbedtls_pk_context *key, unsigned char *buf, size_t size )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned char *c;
size_t len = 0;
PK_VALIDATE_RET( key != NULL );
if( size == 0 )
return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
PK_VALIDATE_RET( buf !=... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl $0xffffff94, %r14d # imm = 0xFFFFFF94
testq %rdx, %rdx
je 0x333ce
movq %rsi, %rbx
movq %rdi, %r15
addq %rsi, %rdx
movq %rdx, 0x8(%rsp)
callq 0x30f8c
cmpl $0x1, %eax
jne 0x33130
movq 0x8(%r15), %r15
leaq 0x10(%rsp), %r14
movq %r... | /ARMmbed[P]mbed-crypto/library/pkwrite.c |
mbedtls_pk_write_key_pem | int mbedtls_pk_write_key_pem( mbedtls_pk_context *key, unsigned char *buf, size_t size )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned char output_buf[PRV_DER_MAX_BYTES];
const char *begin, *end;
size_t olen = 0;
PK_VALIDATE_RET( key != NULL );
PK_VALIDATE_RET( buf != NULL || size... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1640, %rsp # imm = 0x1640
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movl $0x162f, %edx # imm = 0x162F
movq %r15, %rsi
callq 0x3304e
movl %eax, %ebp
testl %eax, %eax
js 0x3364d
movq %r12, %... | /ARMmbed[P]mbed-crypto/library/pkwrite.c |
mbedtls_poly1305_starts | int mbedtls_poly1305_starts( mbedtls_poly1305_context *ctx,
const unsigned char key[32] )
{
POLY1305_VALIDATE_RET( ctx != NULL );
POLY1305_VALIDATE_RET( key != NULL );
/* r &= 0x0ffffffc0ffffffc0ffffffc0fffffff */
ctx->r[0] = BYTES_TO_U32_LE( key, 0 ) & 0x0FFFFFFFU;
ct... | pushq %rbx
movq %rdi, %rbx
movzwl (%rsi), %eax
movzbl 0x2(%rsi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0x3(%rsi), %eax
andl $0xf, %eax
shll $0x18, %eax
orl %ecx, %eax
movl %eax, (%rdi)
movl $0xffffffc, %eax # imm = 0xFFFFFFC
movl 0x4(%rsi), %ecx
andl %eax, %ecx
movl %ecx, 0x4(%rdi)
movl 0x8(%rsi), %ecx
and... | /ARMmbed[P]mbed-crypto/library/poly1305.c |
mbedtls_poly1305_update | int mbedtls_poly1305_update( mbedtls_poly1305_context *ctx,
const unsigned char *input,
size_t ilen )
{
size_t offset = 0U;
size_t remaining = ilen;
size_t queue_free_len;
size_t nblocks;
POLY1305_VALIDATE_RET( ctx != NULL );
POLY1305_... | testq %rdx, %rdx
je 0x33810
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x33789
movl $0x10, %r12d
subq %rax, %r12
movq %r15, %r13
leaq (%rbx,%rax), %rdi
addq $0x34, %rdi
subq %r12, %r13
jae 0x3378e
movq %r14, %rsi
movq ... | /ARMmbed[P]mbed-crypto/library/poly1305.c |
mbedtls_aes_setkey_enc | int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
unsigned int keybits )
{
unsigned int i;
uint32_t *RK;
AES_VALIDATE_RET( ctx != NULL );
AES_VALIDATE_RET( key != NULL );
switch( keybits )
{
case 128: ctx->nr = 10; break;
case 1... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp # imm = 0x818
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x80, %edx
je 0x33db0
cmpl $0x100, %r12d # imm = 0x100
je 0x33da9
movl $0xffffffe0, %eax # imm = 0xFFFFFFE0
cmpl $0xc0, %r12d
jne 0x343e6
mo... | /ARMmbed[P]mbed-crypto/library/aes.c |
mbedtls_aes_crypt_xts | int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
int mode,
size_t length,
const unsigned char data_unit[16],
const unsigned char *input,
unsigned char *output )
{
int ret = ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbp
movl %esi, 0xc(%rsp)
addq $-0x1000001, %rdx # imm = 0xFEFFFFFF
movl $0xffffffde, %eax # imm = 0xFFFFFFDE
cmpq $-0xfffff1, %rdx # imm = 0xFF00000F
jb 0x3529f
movq %r9, %r13
movq %r8, %r12
movq %rdi, %rbx... | /ARMmbed[P]mbed-crypto/library/aes.c |
mbedtls_aes_crypt_cfb128 | int mbedtls_aes_crypt_cfb128( mbedtls_aes_context *ctx,
int mode,
size_t length,
size_t *iv_off,
unsigned char iv[16],
const unsigned char *input,
unsigned char *output )
{
int c... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq (%rcx), %rbp
movl $0xffffffdf, %eax # imm = 0xFFFFFFDF
cmpq $0xf, %rbp
ja 0x355c5
movq %r9, %r14
movq %r8, %r15
movq %rdx, %r12
movq %rcx, 0x10(%rsp)
movq 0x50(%rsp), %rbx
testl %esi, %esi
je 0x3557a
testq... | /ARMmbed[P]mbed-crypto/library/aes.c |
mbedtls_aesni_crypt_ecb | int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx,
int mode,
const unsigned char input[16],
unsigned char output[16] )
{
asm( "movdqu (%3), %%xmm0 \n\t" // load input
"movdqu (%1), %%xmm1 \n\t" // load round key 0
"pxor... | movl (%rdi), %eax
movq 0x8(%rdi), %rdi
movdqu (%rdx), %xmm0
movdqu (%rdi), %xmm1
pxor %xmm1, %xmm0
addq $0x10, %rdi
subl $0x1, %eax
testl %esi, %esi
je 0x36255
movdqu (%rdi), %xmm1
aesenc %xmm1, %xmm0
addq $0x10, %rdi
subl $0x1, %eax
jne 0x36238
movdqu (%rdi), %xmm1
aesenclast %xmm1, %xmm0
jmp 0x36270
movdqu (%rdi), %x... | /ARMmbed[P]mbed-crypto/library/aesni.c |
mbedtls_asn1_get_bitstring | int mbedtls_asn1_get_bitstring( unsigned char **p, const unsigned char *end,
mbedtls_asn1_bitstring *bs)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
/* Certificate type is a single byte bitstring */
if( ( ret = mbedtls_asn1_get_tag( p, end, &bs->len, MBEDTLS_ASN1_BIT_STRING )... | pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq (%rdi), %rcx
movq %rsi, %rdx
subq %rcx, %rdx
movl $0xffffffa0, %eax # imm = 0xFFFFFFA0
testq %rdx, %rdx
jle 0x36b94
movl $0xffffff9e, %eax # imm = 0xFFFFFF9E
cmpb $0x3, (%rcx)
jne 0x36b94
movq %rsi, %rbx
movq %rdi, %r14
incq %rcx
movq %rcx, (%rdi)
movq %... | /ARMmbed[P]mbed-crypto/library/asn1parse.c |
mbedtls_asn1_find_named_data | mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list,
const char *oid, size_t len )
{
while( list != NULL )
{
if( list->oid.len == len &&
memcmp( list->oid.p, oid, len ) == 0 )
{
break;
}
... | pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x36ff4
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpq %r14, 0x8(%rbx)
jne 0x36feb
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xe250
testl %eax, %eax
je 0x36ff6
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x36fd2
xorl %ebx, %ebx
movq %rbx, %rax
... | /ARMmbed[P]mbed-crypto/library/asn1parse.c |
mbedtls_asn1_write_null | int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len )
{
if( len < 0x80 )
{
if( *p - start < 1 )
return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
*--(*p) = (unsigned char) len;
return( 1 );
}
if( len <= 0xFF )
{
if( *p - start < 2 )
... | movq (%rdi), %rcx
movq %rcx, %rdx
subq %rsi, %rdx
movl $0xffffff94, %eax # imm = 0xFFFFFF94
testq %rdx, %rdx
jle 0x372ba
leaq -0x1(%rcx), %rdx
movq %rdx, (%rdi)
movb $0x0, -0x1(%rcx)
movq (%rdi), %rcx
movq %rcx, %rdx
subq %rsi, %rdx
testq %rdx, %rdx
jle 0x372ba
leaq -0x1(%rcx), %rax
movq %rax, (%rdi)
movb $0x5, -... | /ARMmbed[P]mbed-crypto/library/asn1write.c |
mbedtls_asn1_write_named_bitstring | int mbedtls_asn1_write_named_bitstring( unsigned char **p,
unsigned char *start,
const unsigned char *buf,
size_t bits )
{
size_t unused_bits, byte_len;
const unsigned char *cur_byte;
unsi... | testq %rcx, %rcx
je 0x3761b
movq %rcx, %rax
leaq 0x7(%rcx), %r9
movl %r9d, %ecx
andl $0xf8, %ecx
subl %eax, %ecx
shrq $0x3, %r9
movzbl -0x1(%rdx,%r9), %r10d
movl %r10d, %r8d
shrl %cl, %r8d
btl %ecx, %r10d
jb 0x3761d
leaq (%rdx,%r9), %rcx
decq %rcx
decq %rax
movq %rax, %r9
subq $0x1, %r9
jb 0x3761b
testb $0x7, %al
je 0x... | /ARMmbed[P]mbed-crypto/library/asn1write.c |
mbedtls_blowfish_crypt_cfb64 | int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
int mode,
size_t length,
size_t *iv_off,
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
const unsigned char *input,
un... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq (%rcx), %rbp
movl $0xffffffea, %eax # imm = 0xFFFFFFEA
cmpq $0x7, %rbp
ja 0x37d10
movq %r9, %r14
movq %r8, %r15
movq %rdx, %r12
movq %rcx, 0x10(%rsp)
movq 0x50(%rsp), %rbx
testl %esi, %esi
je 0x37cc5
testq... | /ARMmbed[P]mbed-crypto/library/blowfish.c |
mbedtls_camellia_crypt_cbc | int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
int mode,
size_t length,
unsigned char iv[16],
const unsigned char *input,
unsigned char *output ... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movl $0xffffffda, %eax # imm = 0xFFFFFFDA
testb $0xf, %r12b
jne 0x38b4a
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdi, %r13
testl %esi, %esi
je 0x38b05
testq %r12, %r12
je 0x38b48
xorl %eax, %eax
movb (%r15,%rax), %c... | /ARMmbed[P]mbed-crypto/library/camellia.c |
mbedtls_pem_read_buffer | int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const char *footer,
const unsigned char *data, const unsigned char *pwd,
size_t pwdlen, size_t *use_len )
{
int ret, enc;
size_t len;
unsigned char *buf;
const unsigned char *s1, *s2, *en... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
testq %rdi, %rdi
je 0x39aba
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq %rcx, %rdi
callq 0xe2e0
movl $0xffffef80, %ebp # imm = 0xFFFFEF80
testq %rax, %rax
je 0x39ab... | /ARMmbed[P]mbed-crypto/library/pem.c |
mbedtls_base64_decode | int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen,
const unsigned char *src, size_t slen )
{
size_t i, n;
uint32_t j, x;
unsigned char *p;
/* First pass: check for validity and get output length */
for( i = n = j = 0; i < slen; i++ )
{
/* Skip s... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %r8, %r8
je 0x3b483
xorl %ebx, %ebx
leaq 0xa423(%rip), %r9 # 0x457c0
xorl %r11d, %r11d
xorl %eax, %eax
leaq 0x1(%rax), %r10
cmpq %r10, %r8
cmovaq %r8, %r10
movq %r10, %r15
subq %rax, %r15
leaq (%rcx,%rax), %r12
xorl %r14d, %r14d
cmpb $0x20, (%r12,%r14)
... | /ARMmbed[P]mbed-crypto/library/base64.c |
main | int
main()
{
unsigned int i, j;
struct timespec start, end;
long long t;
clock_gettime(CLOCK_ID, &start);
for (i = 0;i < N;i++) {
for (j = 0;j < sizeof(sizes) / sizeof(int);j++) {
if (p)
free(p);
p = malloc(sizes[j]);
}
}
clock_gettime(... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x8(%rsp), %rsi
movl $0x1, %edi
callq 0x1050
xorl %ebx, %ebx
movq 0x2ec1(%rip), %rax # 0x4070
leaq 0xe5a(%rip), %r15 # 0x2010
xorl %r14d, %r14d
testq %rax, %rax
je 0x11c6
movq %rax, %rdi
callq 0x1030
movslq (%r14,%r15), %rdi
callq 0x1070
movq ... | /yuyichao[P]explore/general_c/realloc/main.c |
AddSuccCnt() | void AddSuccCnt()
{
int now = time(NULL);
if (now >iTime)
{
printf("time %d Succ Cnt %d Fail Cnt %d\n", iTime, iSuccCnt, iFailCnt);
iTime = now;
iSuccCnt = 0;
iFailCnt = 0;
}
else
{
iSuccCnt++;
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x5160
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xaae7(%rip), %eax # 0x10194
jle 0x56ee
movl 0xaadf(%rip), %esi # 0x10194
movl 0xaadd(%rip), %edx # 0x10198
movl 0xaadb(%rip), %ecx # 0x1019c
leaq 0x693c(%rip), %... | /abhinavabcd[P]libco/example_echocli.cpp |
AddFailCnt() | void AddFailCnt()
{
int now = time(NULL);
if (now >iTime)
{
printf("time %d Succ Cnt %d Fail Cnt %d\n", iTime, iSuccCnt, iFailCnt);
iTime = now;
iSuccCnt = 0;
iFailCnt = 0;
}
else
{
iFailCnt++;
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x5160
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xaa67(%rip), %eax # 0x10194
jle 0x576e
movl 0xaa5f(%rip), %esi # 0x10194
movl 0xaa5d(%rip), %edx # 0x10198
movl 0xaa5b(%rip), %ecx # 0x1019c
leaq 0x68bc(%rip), %... | /abhinavabcd[P]libco/example_echocli.cpp |
main | int main(int argc,char *argv[])
{
stEndPoint endpoint;
endpoint.ip = argv[1];
endpoint.port = atoi(argv[2]);
int cnt = atoi( argv[3] );
int proccnt = atoi( argv[4] );
struct sigaction sa;
sa.sa_handler = SIG_IGN;
sigaction( SIGPIPE, &sa, NULL );
for(int k=0;k<proccnt;k++)
{
pid_t pid = fork();
if( pi... | pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5260
movw %ax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5260
movl... | /abhinavabcd[P]libco/example_echocli.cpp |
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.