bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Marc Nieper-Wißkirchen" <marc.nieper+gnu@gmail.com>
To: "bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
Subject: How to fix code blocks?
Date: Mon, 2 Jan 2023 15:00:31 +0100	[thread overview]
Message-ID: <CAEYrNrSVaJskvqCmrjKrov_K8n33EyTA5_zNFBv-s3x31FG-fw@mail.gmail.com> (raw)

For purposes of dynamically calling code, I need the following layout
of the assembled code:

0x00: 16-byte header
0x10: entry point #1
0x20: entry point #2

I want to use the new align/skip instructions for this.  My code
generator currently looks like this:

        align (16)
        skip (16)
        jump label1
        align (16)
       jump entry2 ; or some other code

However, with setup, GNU lightning often "optimizes" the block order
so that entry1 is no longer at the correct offset.  How can I reliably
prohibit this?  Putting skip (1) after the second align (16) seems to
help in my experiments.



             reply	other threads:[~2023-01-02 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 14:00 Marc Nieper-Wißkirchen [this message]
2023-01-02 14:42 ` How to fix code blocks? Bruno Haible
2023-01-02 14:46   ` Marc Nieper-Wißkirchen

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:

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEYrNrSVaJskvqCmrjKrov_K8n33EyTA5_zNFBv-s3x31FG-fw@mail.gmail.com \
    --to=marc.nieper+gnu@gmail.com \
    --cc=bug-gnulib@gnu.org \


* 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 read-only IMAP folder(s) and NNTP newsgroup(s).