Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Niklas Holsti <niklas.holsti@tidorum.invalid> |
|---|---|
| Newsgroups | comp.arch |
| Subject | Re: Register windows |
| Date | 2025-07-18 23:17 +0300 |
| Organization | Tidorum Ltd |
| Message-ID | <mdvoejFmi67U1@mid.individual.net> (permalink) |
| References | (17 earlier) <1059tti$16il5$1@dont-email.me> <f19813b55e635188c81f989aa63f0462@www.novabbs.org> <jwvldomkdua.fsf-monnier+comp.arch@gnu.org> <mdv6hmFheagU1@mid.individual.net> <jwvfretfs4u.fsf-monnier+comp.arch@gnu.org> |
On 2025-07-18 18:29, Stefan Monnier wrote:
>> The Mill "belt" (I assume this is what you call the "stack") corresponds to
>> the "first-class registers": all computations take operands from the belt
>> and push results to the belt. When a function is called, it sees a fresh
>> belt with only its "in" arguments; when the function returns, it leaves its
>> "out" results pushed on the belt that the caller sees.
>
> That's right. The belt is the closest that the Mill has to "first-class
> registers", tho in a sense it addresses elements of the forwarding
> network more than "registers".
Yes. Values on the belt do not stay at fixed addresses ("register
numbers", "names") but move to new addresses (larger offsets from the
"top") as computations push more results on the belt. As I understand
it, the HW implementation is indeed like a renaming/forwarding network,
although the "names" (offsets from the "top") are known to the compiler
because of the static instruction sheduling and known latencies of all
operations.
> What I meant by "stack" is the place where scratch registers and
> in-flight belt values get pushed/popped when you enter/leave a function,
> which give you a kind of "register window" functionality.
Ah, apologies for my wrong assumption. (But calling that a "stack" risks
confusion with the normal SW stack in memory, which is certainly still
needed in a Mill processor, for example to pass function arguments by
reference.)
I agree that the Mill architecture, with its "new belt for each call"
and "new scratch-pad for each call" programmer's model, is similar to
register-window designs.
> IIRC the Mill
> documents it as living in memory but the moment when stack elements
> actually reach memory was never clearly specified, so I assume the
> idea was that it could be kept in "second class registers" (IIRC
> that was managed by the "spiller" you refer to).
As I understood it, the HW implementation of the Mill's
function-specific belt and function-specific scratch-pad is not meant to
be visible to a normal application program running in a Mill processor.
A function executing in a normal program cannot access the belt of its
caller, nor the scratch-pad of its caller.
For debuggers and other system tools that need such visiblity the intent
was to provide a dedicated (HW-dependent) interface or "service",
essentially an interface to the spiller HW. But the structure of the
spiller and its buffers and memory areas is not part of the visible Mill
architecture, rather it is specific to each implementation ("model") of
a Mill processor core.
> Of course, in a traditional CPU, the top of the stack is kept in the L1
> cache and only ever touches the higher levels of the memory hierarchy
> when cache pressure is very high or upon context switches, so the L1
> cache plays a similar role.
A similar role from the performance point of view, yes, with the
difference that data in the L1 cache is accessed via normal load/store
instructions, while the spiller data structures would not be accessible
in that way.
As I understood it, the spiller would have some private internal buffers
for your "stack", and would use main memory (via the caches) as backup
when the private buffers overflowed. Thus the most recently spilled data
would be either in the spiller's private buffers or in the L1 cache.
> Not sure if a set of "second class
> registers" dedicated to storing the top of the stack (like SPARC has,
> and the Mill seemed to want to have) can be made to be faster and/or
> lower power than the L1 cache to justify the effort.
I am not a HW guy, but I think the answer is yes. However, speed is not
the only advanage of such "second class" registers: they can also make
for a simpler programmer's model where the second-class registers are
hidden, implicit, and need not (and perhaps cannot) be named in the
instructions.
Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Why I've Dropped In quadibloc <quadibloc@gmail.com> - 2025-06-23 03:43 +0000
The Third Wish quadibloc <quadibloc@gmail.com> - 2025-06-23 12:43 +0000
Re: The Third Wish quadibloc <quadibloc@gmail.com> - 2025-06-23 12:47 +0000
Re: The Third Wish quadibloc <quadibloc@gmail.com> - 2025-06-24 17:19 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-06-24 21:57 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-06-25 07:31 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-06-27 05:28 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-02 05:16 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-02 07:04 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-03 05:52 +0000
Re: The Third Wish Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-02 22:57 -0700
Re: The Third Wish Thomas Koenig <tkoenig@netcologne.de> - 2025-07-03 06:59 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-03 09:43 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-03 11:24 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-03 11:35 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-16 01:11 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-16 01:08 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-16 18:22 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 23:36 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-16 23:58 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 03:42 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 04:01 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 04:10 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 04:24 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 15:16 +0000
Register windows (was: The Third Wish) Stefan Monnier <monnier@iro.umontreal.ca> - 2025-07-17 12:20 -0400
Re: Register windows mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 16:53 +0000
Re: Register windows (was: The Third Wish) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-07-17 17:38 +0000
Re: Register windows (was: The Third Wish) scott@slp53.sl.home (Scott Lurndal) - 2025-07-17 19:17 +0000
Re: Register windows mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 19:38 +0000
Re: Register windows Stefan Monnier <monnier@iro.umontreal.ca> - 2025-07-17 16:18 -0400
Re: Register windows Niklas Holsti <niklas.holsti@tidorum.invalid> - 2025-07-18 18:11 +0300
Re: Register windows Stefan Monnier <monnier@iro.umontreal.ca> - 2025-07-18 11:29 -0400
Re: Register windows Niklas Holsti <niklas.holsti@tidorum.invalid> - 2025-07-18 23:17 +0300
Re: Register windows mitchalsup@aol.com (MitchAlsup1) - 2025-07-20 17:28 +0000
Re: Register windows George Neuner <gneuner2@comcast.net> - 2025-07-20 22:27 -0400
Re: Register windows Niklas Holsti <niklas.holsti@tidorum.invalid> - 2025-07-21 12:11 +0300
Re: Register windows John Savard <quadibloc@invalid.invalid> - 2025-07-21 15:42 +0000
Where's Ivan was Re: Register windows Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-20 22:27 -0700
Re: Where's Ivan was Re: Register windows John Savard <quadibloc@invalid.invalid> - 2025-07-21 15:45 +0000
Re: Where's Ivan was Re: Register windows Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-21 12:05 -0700
Re: Where's Ivan was Re: Register windows scott@slp53.sl.home (Scott Lurndal) - 2025-07-21 19:56 +0000
Re: Where's Ivan was Re: Register windows Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-21 22:02 -0700
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 15:02 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 14:59 +0000
Re: The Third Wish anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-07-17 16:28 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 19:21 +0000
Re: The Third Wish EricP <ThatWouldBeTelling@thevillage.com> - 2025-07-18 12:29 -0400
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 14:49 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 18:03 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 18:27 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 20:04 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 21:00 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 21:26 +0000
Re: The Third Wish Thomas Koenig <tkoenig@netcologne.de> - 2025-07-18 19:47 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-19 02:51 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 21:29 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 21:45 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 21:58 +0000
Re: The Third Wish antispam@fricas.org (Waldek Hebisch) - 2025-07-18 15:39 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-18 17:08 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-18 19:38 +0000
Re: The Third Wish Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-17 12:20 -0700
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 19:52 +0000
PRF size (was: The Third Wish) Stefan Monnier <monnier@iro.umontreal.ca> - 2025-07-17 16:34 -0400
Re: PRF size mitchalsup@aol.com (MitchAlsup1) - 2025-07-17 21:38 +0000
Re: PRF size EricP <ThatWouldBeTelling@thevillage.com> - 2025-07-20 11:47 -0400
Re: PRF size mitchalsup@aol.com (MitchAlsup1) - 2025-07-20 17:34 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-17 20:32 +0000
Re: The Third Wish Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-17 21:35 -0700
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-18 11:18 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-18 11:28 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-18 11:33 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-18 15:12 +0000
Re: The Third Wish Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-18 08:46 -0700
Re: The Third Wish scott@slp53.sl.home (Scott Lurndal) - 2025-07-18 16:25 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-18 17:14 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-18 19:39 +0000
Re: The Third Wish anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-07-18 16:24 +0000
Re: The Third Wish Stephen Fuld <sfuld@alumni.cmu.edu.invalid> - 2025-07-18 11:40 -0700
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-18 19:45 +0000
Re: The Third Wish EricP <ThatWouldBeTelling@thevillage.com> - 2025-07-18 14:07 -0400
Re: The Third Wish antispam@fricas.org (Waldek Hebisch) - 2025-07-18 16:10 +0000
Re: The Third Wish anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-07-17 17:06 +0000
Re: The Third Wish antispam@fricas.org (Waldek Hebisch) - 2025-07-18 16:37 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-16 18:09 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-15 22:24 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 00:00 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 00:22 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 01:49 +0000
Re: The Third Wish Thomas Koenig <tkoenig@netcologne.de> - 2025-07-16 17:33 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 23:24 +0000
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 23:26 +0000
Re: The Third Wish mitchalsup@aol.com (MitchAlsup1) - 2025-07-16 18:06 +0000
Re: The Third Wish "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-07-16 14:55 -0700
Re: The Third Wish John Savard <quadibloc@invalid.invalid> - 2025-07-16 12:26 +0000
csiph-web