Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

The disks are getting full; purge a file today.


devel / comp.lang.forth / Re: The stack -- any ideas?

SubjectAuthor
* The stack -- any ideas?Zbig
`* Re: The stack -- any ideas?none
 `- Re: The stack -- any ideas?Zbig

1
The stack -- any ideas?

<07173d87-1679-4b55-8b68-863f1094d4d4n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24642&group=comp.lang.forth#24642

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:145:b0:774:10b8:4e7b with SMTP id e5-20020a05620a014500b0077410b84e7bmr5802qkn.1.1695286379246;
Thu, 21 Sep 2023 01:52:59 -0700 (PDT)
X-Received: by 2002:a05:6870:a8ae:b0:1bf:a06f:ce6f with SMTP id
eb46-20020a056870a8ae00b001bfa06fce6fmr1878971oab.9.1695286378727; Thu, 21
Sep 2023 01:52:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 21 Sep 2023 01:52:58 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=83.22.127.152; posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 83.22.127.152
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <07173d87-1679-4b55-8b68-863f1094d4d4n@googlegroups.com>
Subject: The stack -- any ideas?
From: zbigniew2011@gmail.com (Zbig)
Injection-Date: Thu, 21 Sep 2023 08:52:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1375
 by: Zbig - Thu, 21 Sep 2023 08:52 UTC

It seems that according to formal requirements
( https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/using-the-stack-in-aarch32-and-aarch64 )
the stack in the case of ARM systems must be as full of holes
as Swiss cheese. I wonder if this „excess” space on the stack
could be (reasonably) used somehow.

Re: The stack -- any ideas?

<nnd$342dc440$2ebf2802@63c8085c9895dcb3>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24643&group=comp.lang.forth#24643

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <07173d87-1679-4b55-8b68-863f1094d4d4n@googlegroups.com>
Subject: Re: The stack -- any ideas?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$342dc440$2ebf2802@63c8085c9895dcb3>
Organization: KPN B.V.
Date: Thu, 21 Sep 2023 13:04:29 +0200
Path: i2pn2.org!i2pn.org!paganini.bofh.team!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 40
Injection-Date: Thu, 21 Sep 2023 13:04:29 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2378
 by: none - Thu, 21 Sep 2023 11:04 UTC

In article <07173d87-1679-4b55-8b68-863f1094d4d4n@googlegroups.com>,
Zbig <zbigniew2011@gmail.com> wrote:
>It seems that according to formal requirements
>(
>https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/using-the-stack-in-aarch32-and-aarch64 )
>the stack in the case of ARM systems must be as full of holes
>as Swiss cheese. I wonder if this „excess” space on the stack
>could be (reasonably) used somehow.

You must understand that "the stack" is only relevant if you have
implemented you Forth in c, on top of the bad choice to
use the return stack of c for something Forth related, be it
the return stack of the data stack.

In my implementation of Forth the choice which of the 32
registers represent the stack pointer is arbitrary up to the
point you do system calls. System calls are better separated
out in a special word. The only time to worry is implementing
this word.
The Forth runs in user space in Linux, so getting entangled
in interrupts is non-existent.

In 64 bit Windows the situation is a bit different for the i86.
There you are obliged to use the Windows return stack for
system calls ('DLL calls'). I had no particular problems to
cope with the 16 byte alignment of this stack, once I was
aware of it.

Most run Forth's on 8 Gbyte memory. Wasting a byte here
and there is no big deal.
I have some single board 64 bit arm. Even those come with
Gbyte ram's.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: The stack -- any ideas?

<f910ae99-8fc5-4128-b400-b4758c06ecddn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24644&group=comp.lang.forth#24644

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5b14:0:b0:40f:dc70:fdc9 with SMTP id m20-20020ac85b14000000b0040fdc70fdc9mr74645qtw.13.1695294843235;
Thu, 21 Sep 2023 04:14:03 -0700 (PDT)
X-Received: by 2002:a05:6808:2020:b0:3a7:805:f419 with SMTP id
q32-20020a056808202000b003a70805f419mr2549484oiw.6.1695294843000; Thu, 21 Sep
2023 04:14:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 21 Sep 2023 04:14:02 -0700 (PDT)
In-Reply-To: <nnd$342dc440$2ebf2802@63c8085c9895dcb3>
Injection-Info: google-groups.googlegroups.com; posting-host=83.22.127.152; posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 83.22.127.152
References: <07173d87-1679-4b55-8b68-863f1094d4d4n@googlegroups.com> <nnd$342dc440$2ebf2802@63c8085c9895dcb3>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f910ae99-8fc5-4128-b400-b4758c06ecddn@googlegroups.com>
Subject: Re: The stack -- any ideas?
From: zbigniew2011@gmail.com (Zbig)
Injection-Date: Thu, 21 Sep 2023 11:14:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2251
 by: Zbig - Thu, 21 Sep 2023 11:14 UTC

> You must understand that "the stack" is only relevant if you have
> implemented you Forth in c, on top of the bad choice to
> use the return stack of c for something Forth related, be it
> the return stack of the data stack.

I stumbled upon this today, and from what I understood
(maybe I'm mistaken) seemed, that just any stack implemented
the way shown in the article:
// Allocate a variable-length array of bytes on the stack.
sub sp, sp, x0 // x0 holds the length.
and sp, sp, #0xfffffffffffffff0 // Align sp.
…has to be 8-byte aligned (in 32-bit system) for some
(yet) mysterious reasons.

If I'm correct (I agree I may be not quite correct) any stack
implemented on ARM looks exactly like the above?

> Most run Forth's on 8 Gbyte memory.

…except the ones running on STM32 and similar. ;)

And actually I didn't mean „memory saving” that much, like
rather some „smart” stack management, taking advantage
of that „unexpected free space”.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor