Searched refs:program_len (Results 1 – 6 of 6) sorted by relevance
/hardware/google/apf/ |
D | apf_disassembler.c | 30 uint32_t program_len = 0; in main() local 35 while (scanf("%2x", &byte) == 1 && program_len < sizeof(program)) { in main() 36 program[program_len++] = byte; in main() 39 for (uint32_t pc = 0; pc < program_len;) { in main() 40 pc = apf_disassemble(program, program_len, pc); in main()
|
D | apf_run.c | 96 void packet_handler(uint8_t* program, uint32_t program_len, uint32_t ram_len, in packet_handler() argument 103 int ret = accept_packet(program, program_len, ram_len, packet, packet_len, in packet_handler() 110 void apf_trace_hook(uint32_t pc, const uint32_t* regs, const uint8_t* program, uint32_t program_len, in apf_trace_hook() argument 116 apf_disassemble(program, program_len, pc); in apf_trace_hook() 120 void file_handler(uint8_t* program, uint32_t program_len, uint32_t ram_len, const char* filename, in file_handler() argument 150 int result = accept_packet(program, program_len, ram_len, apf_packet, in file_handler() 185 uint32_t program_len; in main() local 198 program_len = parse_hex(optarg, &program); in main() 271 program = realloc(program, program_len + data_len); in main() 272 memcpy(program + program_len, data, data_len); in main() [all …]
|
D | disassembler.c | 57 static void print_jump_target(uint32_t target, uint32_t program_len) { in print_jump_target() argument 58 if (target == program_len) { in print_jump_target() 60 } else if (target == program_len + 1) { in print_jump_target() 67 uint32_t apf_disassemble(const uint8_t* program, uint32_t program_len, uint32_t pc) { in apf_disassemble() argument 70 if (pc == program_len) { in apf_disassemble() 75 if (pc == program_len + 1) { in apf_disassemble() 90 for (uint32_t i = 0; i < imm_len && pc < program_len; i++) in apf_disassemble() 111 print_jump_target(pc + imm, program_len); in apf_disassemble() 130 for (i = 0; i < cmp_imm_len && pc < program_len; i++) in apf_disassemble() 135 print_jump_target(pc + imm + cmp_imm, program_len); in apf_disassemble() [all …]
|
D | apf_interpreter.c | 26 uint32_t program_len, const uint8_t *packet, uint32_t packet_len, 29 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 45 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len, in accept_packet() argument 49 #define IN_PROGRAM_BOUNDS(p) (ENFORCE_UNSIGNED(p) && (p) < program_len) in accept_packet() 56 (p) >= program_len && \ in accept_packet() 72 memory[MEMORY_OFFSET_PROGRAM_SIZE] = program_len; in accept_packet() 87 uint32_t instructions_remaining = program_len; in accept_packet() 90 APF_TRACE_HOOK(pc, registers, program, program_len, packet, packet_len, memory, ram_len); in accept_packet() 91 if (pc == program_len) { in accept_packet() 93 } else if (pc == (program_len + 1)) { in accept_packet()
|
D | disassembler.h | 21 uint32_t apf_disassemble(const uint8_t* program, uint32_t program_len, uint32_t pc);
|
D | apf_interpreter.h | 58 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len,
|