• Home
  • Raw
  • Download

Lines Matching refs:buf

74 		uint8_t buf[16];  member
88 static size_t bcj_x86(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_x86() argument
108 if ((buf[i] & 0xFE) != 0xE8) in bcj_x86()
117 b = buf[i + 4 - mask_to_bit_num[prev_mask]]; in bcj_x86()
129 if (bcj_x86_test_msbyte(buf[i + 4])) { in bcj_x86()
130 src = get_unaligned_le32(buf + i + 1); in bcj_x86()
146 put_unaligned_le32(dest, buf + i + 1); in bcj_x86()
160 static size_t bcj_powerpc(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_powerpc() argument
166 instr = get_unaligned_be32(buf + i); in bcj_powerpc()
172 put_unaligned_be32(instr, buf + i); in bcj_powerpc()
181 static size_t bcj_ia64(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_ia64() argument
223 mask = branch_table[buf[i] & 0x1F]; in bcj_ia64()
232 instr |= (uint64_t)(buf[i + j + byte_pos]) in bcj_ia64()
254 buf[i + j + byte_pos] in bcj_ia64()
265 static size_t bcj_arm(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_arm() argument
271 if (buf[i + 3] == 0xEB) { in bcj_arm()
272 addr = (uint32_t)buf[i] | ((uint32_t)buf[i + 1] << 8) in bcj_arm()
273 | ((uint32_t)buf[i + 2] << 16); in bcj_arm()
277 buf[i] = (uint8_t)addr; in bcj_arm()
278 buf[i + 1] = (uint8_t)(addr >> 8); in bcj_arm()
279 buf[i + 2] = (uint8_t)(addr >> 16); in bcj_arm()
288 static size_t bcj_armthumb(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_armthumb() argument
294 if ((buf[i + 1] & 0xF8) == 0xF0 in bcj_armthumb()
295 && (buf[i + 3] & 0xF8) == 0xF8) { in bcj_armthumb()
296 addr = (((uint32_t)buf[i + 1] & 0x07) << 19) in bcj_armthumb()
297 | ((uint32_t)buf[i] << 11) in bcj_armthumb()
298 | (((uint32_t)buf[i + 3] & 0x07) << 8) in bcj_armthumb()
299 | (uint32_t)buf[i + 2]; in bcj_armthumb()
303 buf[i + 1] = (uint8_t)(0xF0 | ((addr >> 19) & 0x07)); in bcj_armthumb()
304 buf[i] = (uint8_t)(addr >> 11); in bcj_armthumb()
305 buf[i + 3] = (uint8_t)(0xF8 | ((addr >> 8) & 0x07)); in bcj_armthumb()
306 buf[i + 2] = (uint8_t)addr; in bcj_armthumb()
316 static size_t bcj_sparc(struct xz_dec_bcj *s, uint8_t *buf, size_t size) in bcj_sparc() argument
322 instr = get_unaligned_be32(buf + i); in bcj_sparc()
329 put_unaligned_be32(instr, buf + i); in bcj_sparc()
346 uint8_t *buf, size_t *pos, size_t size) in bcj_apply() argument
350 buf += *pos; in bcj_apply()
356 filtered = bcj_x86(s, buf, size); in bcj_apply()
361 filtered = bcj_powerpc(s, buf, size); in bcj_apply()
366 filtered = bcj_ia64(s, buf, size); in bcj_apply()
371 filtered = bcj_arm(s, buf, size); in bcj_apply()
376 filtered = bcj_armthumb(s, buf, size); in bcj_apply()
381 filtered = bcj_sparc(s, buf, size); in bcj_apply()
404 memcpy(b->out + b->out_pos, s->temp.buf, copy_size); in bcj_flush()
409 memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size); in bcj_flush()
451 memcpy(b->out + b->out_pos, s->temp.buf, s->temp.size); in xz_dec_bcj_run()
471 memcpy(s->temp.buf, b->out + b->out_pos, s->temp.size); in xz_dec_bcj_run()
495 b->out = s->temp.buf; in xz_dec_bcj_run()
497 b->out_size = sizeof(s->temp.buf); in xz_dec_bcj_run()
509 bcj_apply(s, s->temp.buf, &s->temp.filtered, s->temp.size); in xz_dec_bcj_run()