From: Richard Henderson <rth@twiddle.net>
To: Alexander Graf <agraf@csgraf.de>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PULL 05/11] tcg-s390: Move ldst helpers out of line
Date: Thu, 29 Jan 2015 09:12:44 -0800 [thread overview]
Message-ID: <54CA6A0C.4040008@twiddle.net> (raw)
In-Reply-To: <A85632E8-A946-4F90-9252-F2E9D3E507A7@csgraf.de>
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~
next prev parent reply other threads:[~2015-01-29 17:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 16:39 [Qemu-devel] [PULL 00/12] tcg s390 updates Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 01/11] tcg-s390: Fix off-by-one in wraparound andi Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 02/11] tcg-s390: Convert to TCGMemOp Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 03/11] tcg-s390: Integrate endianness into TCGMemOp Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 04/11] tcg-s390: Convert to new ldst opcodes Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 05/11] tcg-s390: Move ldst helpers out of line Richard Henderson
2015-01-29 16:01 ` Alexander Graf
2015-01-29 17:12 ` Richard Henderson [this message]
2014-05-15 16:39 ` [Qemu-devel] [PULL 06/11] tcg-s390: Use more risbg in the tlb sequence Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 07/11] tcg-s390: Implement tcg_register_jit Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 08/11] tcg-s390: Allow immediate operands to add2 and sub2 Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 09/11] tcg-s390: Improve setcond Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 10/11] tcg-s390: Don't force -march=z990 Richard Henderson
2014-05-15 16:39 ` [Qemu-devel] [PULL 11/11] tcg-s390: Implement direct chaining of TBs Richard Henderson
2014-05-15 18:45 ` [Qemu-devel] [PULL 00/12] tcg s390 updates Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54CA6A0C.4040008@twiddle.net \
--to=rth@twiddle.net \
--cc=agraf@csgraf.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.