bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* How to fix code blocks?
@ 2023-01-02 14:00 Marc Nieper-Wißkirchen
  2023-01-02 14:42 ` Bruno Haible
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Nieper-Wißkirchen @ 2023-01-02 14:00 UTC (permalink / raw)
  To: bug-gnulib@gnu.org List

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)
header:
        skip (16)
entry1:
        jump label1
        align (16)
entry2:
       ...
label1:
       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.

Thanks,

Marc


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-02 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02 14:00 How to fix code blocks? Marc Nieper-Wißkirchen
2023-01-02 14:42 ` Bruno Haible
2023-01-02 14:46   ` Marc Nieper-Wißkirchen

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).