qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gautam Bhat <mindentropy@gmail.com>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: How does "rsi" get set in x86 prologue?
Date: Thu, 2 Jan 2025 00:56:47 +0530	[thread overview]
Message-ID: <CAM2a4uxJFhw71emxdZrB4SF-JSzJy_-bL=g9ke7OmjUoOXUDYQ@mail.gmail.com> (raw)

I am trying to understanding the generated code for the x86 target. On
EPILOGUE code below:

0x7fff98000000:  55                       pushq    %rbp
0x7fff98000001:  53                       pushq    %rbx
0x7fff98000002:  41 54                    pushq    %r12
0x7fff98000004:  41 55                    pushq    %r13
0x7fff98000006:  41 56                    pushq    %r14
0x7fff98000008:  41 57                    pushq    %r15
0x7fff9800000a:  48 8b ef                 movq     %rdi, %rbp
0x7fff9800000d:  48 81 c4 78 fb ff ff     addq     $-0x488, %rsp
0x7fff98000014:  ff e6                    jmpq     *%rsi
0x7fff98000016:  33 c0                    xorl     %eax, %eax
0x7fff98000018:  48 81 c4 88 04 00 00     addq     $0x488, %rsp
0x7fff9800001f:  c5 f8 77                 vzeroupper
0x7fff98000022:  41 5f                    popq     %r15
0x7fff98000024:  41 5e                    popq     %r14
0x7fff98000026:  41 5d                    popq     %r13
0x7fff98000028:  41 5c                    popq     %r12
0x7fff9800002a:  5b                       popq     %rbx
0x7fff9800002b:  5d                       popq     %rbp
0x7fff9800002c:  c3                       retq

Can someone help me understand in which file or where in the source
does the "rsi" get set to jump? (0x7fff98000014:  ff e6   jmpq
*%rsi)

Thanks,
Gautam.


             reply	other threads:[~2025-01-01 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-01 19:26 Gautam Bhat [this message]
2025-01-02 10:15 ` How does "rsi" get set in x86 prologue? Alex Bennée
2025-01-30 15:34   ` Gautam Bhat
2025-01-31 12:58     ` Alex Bennée

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='CAM2a4uxJFhw71emxdZrB4SF-JSzJy_-bL=g9ke7OmjUoOXUDYQ@mail.gmail.com' \
    --to=mindentropy@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).