Re: Assembling span-dependent instructions

anton@mips.complang.tuwien.ac.at (Anton Ertl)
Thu, 28 Jul 2022 05:56:28 GMT

          From comp.compilers

Related articles
Assembling span-dependent instructions anton@mips.complang.tuwien.ac.at (2022-07-27)
Re: Assembling span-dependent instructions 480-992-1380@kylheku.com (Kaz Kylheku) (2022-07-27)
Re: Assembling span-dependent instructions anton@mips.complang.tuwien.ac.at (2022-07-28)
Re: Assembling span-dependent instructions antispam@math.uni.wroc.pl (2022-07-28)
Re: Assembling span-dependent instructions gah4@u.washington.edu (gah4) (2022-07-29)
Re: Assembling span-dependent instructions 480-992-1380@kylheku.com (Kaz Kylheku) (2022-07-29)
| List of all articles for this month |

From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers,comp.arch
Date: Thu, 28 Jul 2022 05:56:28 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 22-07-049 22-07-052
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="12712"; mail-complaints-to="abuse@iecc.com"
Keywords: code, optimize
Posted-Date: 29 Jul 2022 16:29:15 EDT

Kaz Kylheku <480-992-1380@kylheku.com> writes:
>On 2022-07-27, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> However, one can also construct cases where making the code larger can
>> reduce the minimum size of the immediate operand, e.g.:
>>
>> foo:
>> movl foo+133-bar(%rdi),%eax
>> bar:
>
>That's weird; what is accessed this way, relative to the code,
>and does it occur in compiler output?


I designed this example based on the examples in the paper, not as
something occuring in practice.


The examples in the paper involved several span-dependent instructions
and looked unusual to me, but I convinced myself that something like
that could occur in practice, with data close to code addressed using
some pointer into the code (like %rip-relative on AMD64, or the global
pointer on various position-independent ABIs for other architectures).


- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.