qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 05/11] tcg-s390: Move ldst helpers out of line


From: Richard Henderson
Subject: Re: [Qemu-devel] [PULL 05/11] tcg-s390: Move ldst helpers out of line
Date: Thu, 29 Jan 2015 09:12:44 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 01/29/2015 08:01 AM, Alexander Graf wrote:
>> -static void tcg_finish_qemu_ldst(TCGContext* s, tcg_insn_unit *label2_ptr)
>> +static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *lb)
>> {
>> -    /* patch branch */
>> -    label2_ptr[1] = s->code_ptr - label2_ptr;
>> +    TCGReg addr_reg = lb->addrlo_reg;
>> +    TCGReg data_reg = lb->datalo_reg;
>> +    TCGMemOp opc = lb->opc;
>> +
>> +    patch_reloc(lb->label_ptr[0], R_390_PC16DBL, (intptr_t)s->code_ptr, -2);
> 
> Under certain situations this seems to create a jump to itself:
> 
> (gdb) 
> 0x000000009082a3f0 in code_gen_buffer ()
> 1: x/i $pc
> => 0x9082a3f0 <code_gen_buffer+8561648>:      
>     jlh       0x9082a3f0 <code_gen_buffer+8561648>
> 
> Any idea why exactly this would happen? Or do we endless loop on purpose? ;)

You mean we actually arrive at this patch_reloc in that case?

Jump-to-self is, if I'm not mistaken, the uninitialized state
before we arrive here to output the slow path.  I would have
expected this symptom to indicate that we *hadn't* patched a
jump rather than the reverse.

My first guess is that there's some sort of data corruption going on.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]