36print_int_cfun(int64_t val)
38 fprintf(stderr,
"%lld\n", (
long long int)val);
47 if (opnd.num_bits < 64 && opnd.type != OPND_IMM)
53 mov(cb, RAX, const_ptr_opnd((
void*)&print_int_cfun));
60print_ptr_cfun(
void *val)
62 fprintf(stderr,
"%p\n", val);
69 assert (opnd.num_bits == 64);
74 mov(cb, RAX, const_ptr_opnd((
void*)&print_ptr_cfun));
81print_str_cfun(
const char *str)
83 fprintf(stderr,
"%s\n", str);
91 size_t len = strlen(str);
96 lea(cb, RDI, mem_opnd(8, RIP, 5));
97 jmp32(cb, (int32_t)len + 1);
100 for (
size_t i = 0; i < len; ++i)
101 cb_write_byte(cb, (uint8_t)str[i]);
102 cb_write_byte(cb, 0);
105 mov(cb, RAX, const_ptr_opnd((
void*)&print_str_cfun));
#define RBIMPL_ATTR_MAYBE_UNUSED()
Wraps (or simulates) [[maybe_unused]]