void invalidate_addr_r10();
void invalidate_addr_r12();
-const u_int invalidate_addr_reg[16] = {
- (int)invalidate_addr_r0,
- (int)invalidate_addr_r1,
- (int)invalidate_addr_r2,
- (int)invalidate_addr_r3,
- (int)invalidate_addr_r4,
- (int)invalidate_addr_r5,
- (int)invalidate_addr_r6,
- (int)invalidate_addr_r7,
- (int)invalidate_addr_r8,
- (int)invalidate_addr_r9,
- (int)invalidate_addr_r10,
+const void *invalidate_addr_reg[16] = {
+ invalidate_addr_r0,
+ invalidate_addr_r1,
+ invalidate_addr_r2,
+ invalidate_addr_r3,
+ invalidate_addr_r4,
+ invalidate_addr_r5,
+ invalidate_addr_r6,
+ invalidate_addr_r7,
+ invalidate_addr_r8,
+ invalidate_addr_r9,
+ invalidate_addr_r10,
0,
- (int)invalidate_addr_r12,
+ invalidate_addr_r12,
0,
0,
- 0};
+ 0
+};
/* Linker */
static void emit_call(const void *a_)
{
int a = (int)a_;
- assem_debug("bl %x (%x+%x)%s\n",a,(int)out,a-(int)out-8,func_name(a_));
+ assem_debug("bl %p%s\n", log_addr(a), func_name(a_));
u_int offset=genjmp(a);
output_w32(0xeb000000|offset);
}
static void emit_jmp(const void *a_)
{
int a = (int)a_;
- assem_debug("b %x (%x+%x)%s\n",a,(int)out,a-(int)out-8,func_name(a_));
+ assem_debug("b %p%s\n", log_addr(a_), func_name(a_));
u_int offset=genjmp(a);
output_w32(0xea000000|offset);
}
static void emit_jne(const void *a_)
{
int a = (int)a_;
- assem_debug("bne %x\n",a);
+ assem_debug("bne %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x1a000000|offset);
}
static void emit_jeq(const void *a_)
{
int a = (int)a_;
- assem_debug("beq %x\n",a);
+ assem_debug("beq %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x0a000000|offset);
}
static void emit_js(const void *a_)
{
int a = (int)a_;
- assem_debug("bmi %x\n",a);
+ assem_debug("bmi %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x4a000000|offset);
}
static void emit_jns(const void *a_)
{
int a = (int)a_;
- assem_debug("bpl %x\n",a);
+ assem_debug("bpl %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x5a000000|offset);
}
static void emit_jl(const void *a_)
{
int a = (int)a_;
- assem_debug("blt %x\n",a);
+ assem_debug("blt %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0xba000000|offset);
}
static void emit_jge(const void *a_)
{
int a = (int)a_;
- assem_debug("bge %x\n",a);
+ assem_debug("bge %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0xaa000000|offset);
}
static void emit_jo(const void *a_)
{
int a = (int)a_;
- assem_debug("bvs %x\n",a);
+ assem_debug("bvs %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x6a000000|offset);
}
static void emit_jno(const void *a_)
{
int a = (int)a_;
- assem_debug("bvc %x\n",a);
+ assem_debug("bvc %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x7a000000|offset);
}
static void emit_jc(const void *a_)
{
int a = (int)a_;
- assem_debug("bcs %x\n",a);
+ assem_debug("bcs %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x2a000000|offset);
}
static void emit_jcc(const void *a_)
{
int a = (int)a_;
- assem_debug("bcc %x\n",a);
+ assem_debug("bcc %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x3a000000|offset);
}
output_w32(0xe7d00000|rd_rn_rm(rt,base,r)|0x620);
}
-static void emit_callne(int a)
+static void emit_callne(const void *a_)
{
- assem_debug("blne %x\n",a);
+ int a = (int)a_;
+ assem_debug("blne %p\n", log_addr(a_));
u_int offset=genjmp(a);
output_w32(0x1b000000|offset);
}
output_w32(0x52800000|rd_rn_rm(rt,rs,0)|armval);
}
-static void emit_jno_unlikely(int a)
+static void emit_jno_unlikely(void *a_)
{
- //emit_jno(a);
- assem_debug("addvc pc,pc,#? (%x)\n",/*a-(int)out-8,*/a);
+ //emit_jno(a_);
+ assert(a_ == NULL);
+ assem_debug("addvc pc,pc,#? (%p)\n", /*a-(int)out-8,*/ log_addr(a_));
output_w32(0x72800000|rd_rn_rm(15,15,0));
}
static void do_readstub(int n)
{
- assem_debug("do_readstub %x\n",start+stubs[n].a*4);
+ assem_debug("do_readstub %p\n", log_addr(start + stubs[n].a*4));
literal_pool(256);
set_jump_target(stubs[n].addr, out);
enum stub_type type=stubs[n].type;
static void do_writestub(int n)
{
- assem_debug("do_writestub %x\n",start+stubs[n].a*4);
+ assem_debug("do_writestub %p\n", log_addr(start + stubs[n].a*4));
literal_pool(256);
set_jump_target(stubs[n].addr, out);
enum stub_type type=stubs[n].type;
static void emit_call(const void *a)
{
intptr_t diff = (u_char *)a - out;
- assem_debug("bl %p (%p+%lx)%s\n", a, out, diff, func_name(a));
+ assem_debug("bl %p%s\n", log_addr(a), func_name(a));
assert(!(diff & 3));
if (-134217728 <= diff && diff <= 134217727)
output_w32(0x94000000 | ((diff >> 2) & 0x03ffffff));
static void emit_jmp(const void *a)
{
- assem_debug("b %p (%p+%lx)%s\n", a, out, (u_char *)a - out, func_name(a));
+ assem_debug("b %p%s\n", log_addr(a), func_name(a));
u_int offset = genjmp(a);
output_w32(0x14000000 | offset);
}
static void emit_jne(const void *a)
{
- assem_debug("bne %p\n", a);
+ assem_debug("bne %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_NE);
}
static void emit_jeq(const void *a)
{
- assem_debug("beq %p\n", a);
+ assem_debug("beq %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_EQ);
}
static void emit_js(const void *a)
{
- assem_debug("bmi %p\n", a);
+ assem_debug("bmi %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_MI);
}
static void emit_jns(const void *a)
{
- assem_debug("bpl %p\n", a);
+ assem_debug("bpl %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_PL);
}
static void emit_jl(const void *a)
{
- assem_debug("blt %p\n", a);
+ assem_debug("blt %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_LT);
}
static void emit_jge(const void *a)
{
- assem_debug("bge %p\n", a);
+ assem_debug("bge %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_GE);
}
static void emit_jo(const void *a)
{
- assem_debug("bvs %p\n", a);
+ assem_debug("bvs %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_VS);
}
static void emit_jno(const void *a)
{
- assem_debug("bvc %p\n", a);
+ assem_debug("bvc %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_VC);
}
static void emit_jc(const void *a)
{
- assem_debug("bcs %p\n", a);
+ assem_debug("bcs %p\n", log_addr(a));
u_int offset = genjmpcc(a);
output_w32(0x54000000 | (offset << 5) | COND_CS);
}
static void emit_cb(u_int isnz, u_int is64, const void *a, u_int r)
{
- assem_debug("cb%sz %s,%p\n", isnz?"n":"", is64?regname64[r]:regname[r], a);
+ assem_debug("cb%sz %s,%p\n", isnz?"n":"", is64?regname64[r]:regname[r], log_addr(a));
u_int offset = genjmpcc(a);
is64 = is64 ? 0x80000000 : 0;
isnz = isnz ? 0x01000000 : 0;