Sujet : Re: Stealing a Great Idea from the 6600
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.archDate : 26. Apr 2024, 02:02:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v0euek$3a2rc$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 4/25/2024 4:01 PM, George Neuner wrote:
On Tue, 23 Apr 2024 17:58:41 +0000, mitchalsup@aol.com (MitchAlsup1)
wrote:
George Neuner wrote:
>
On Sun, 21 Apr 2024 00:43:21 +0000, mitchalsup@aol.com (MitchAlsup1)
wrote:
>
Address arithmetic is ADD only and does not care about signs or
overflow. There is no concept of a negative base register or a
negative index register (or, for that matter, a negative displace-
ment), overflow, underflow, carry, ...
>
Stack frame pointers often point to the middle of the frame and need
to access data using both positive and negative displacements.
>
Yes, one accesses callee saved registers with positive displacements
and local variables with negative accesses. One simply needs to know
where the former stops and the later begins. ENTER and EXIT know this
by the register count and by the stack allocation size.
>
Some GC schemes use negative displacements to access object headers.
>
Those are negative displacements not negative bases or indexes.
I was reacting to your message (quoted fully above) which,
paraphrased, says "address arithmetic is add only and there is no
concept of a negative displacement".
In one sense you are correct: the result of the calculation has to be
considered as unsigned in the range 0..max_memory ... ie. there is no
concept of negative *address*.
However, the components being added to form the address, I believe are
a different matter.
I agree that negative base is meaningless.
However, negative index and negative displacement both do have
meaning. The inclusion of specialized index registers is debatable
[I'm in the GPR camp], but I do believe that index and displacement
*values* both always should be considered as signed.
Agreed in the sense that negative displacements exist.
However, can note that positive displacements tend to be significantly more common than negative ones. Whether or not it makes sense to have a negative displacement, depending mostly on the probability of greater than half of the missed displacements being negative.
From what I can tell, this seems to be:
~ 10 bits, scaled.
~ 13 bits, unscaled.
So, say, an ISA like RISC-V might have had a slightly hit rate with unsigned displacements than with signed displacements, but if one added 1 or 2 bits, signed would have still been a clear winner (or, with 1 or 2 fewer bits, unsigned a clear winner).
I ended up going with signed displacements for XG2, but it was pretty close to break-even in this case (when expanding from the 9-bit unsigned displacements in Baseline).
Granted, all signed or all-unsigned might be better from an ISA design consistency POV.
If one had 16-bit displacements, then unscaled displacements would make sense; otherwise scaled displacements seem like a win (misaligned displacements being much less common than aligned displacements).
But, admittedly, main reason I went with unscaled for GBR-rel and PC-rel Load/Store, was because using scaled displacements here would have required more relocation types (nevermind if the hit rate for unscaled 9-bit displacements is "pretty weak").
Though, did end up later adding specialized Scaled GBR-Rel Load/Store ops (to improve code density), so it might have been better in retrospect had I instead just went the "keep it scaled and add more reloc types to compensate" option.
...
YMMV.
Date | Sujet | # | | Auteur |
17 Apr 24 | Stealing a Great Idea from the 6600 | 128 | | John Savard |
18 Apr 24 | Re: Stealing a Great Idea from the 6600 | 125 | | MitchAlsup1 |
18 Apr 24 | Re: Stealing a Great Idea from the 6600 | 124 | | John Savard |
18 Apr 24 | Re: Stealing a Great Idea from the 6600 | 123 | | MitchAlsup1 |
19 Apr 24 | Re: Stealing a Great Idea from the 6600 | 122 | | John Savard |
19 Apr 24 | Re: Stealing a Great Idea from the 6600 | 121 | | John Savard |
19 Apr 24 | Re: Stealing a Great Idea from the 6600 | 120 | | MitchAlsup1 |
20 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | John Savard |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | John Savard |
20 Apr 24 | Re: Stealing a Great Idea from the 6600 | 117 | | John Savard |
20 Apr 24 | Re: Stealing a Great Idea from the 6600 | 116 | | John Savard |
20 Apr 24 | Re: Stealing a Great Idea from the 6600 | 115 | | MitchAlsup1 |
20 Apr 24 | Re: Stealing a Great Idea from the 6600 | 105 | | BGB |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 104 | | MitchAlsup1 |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 63 | | John Savard |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 15 | | John Savard |
25 Apr 24 | Re: Stealing a Great Idea from the 6600 | 14 | | Lawrence D'Oliveiro |
25 Apr 24 | Re: Stealing a Great Idea from the 6600 | 12 | | MitchAlsup1 |
25 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Lawrence D'Oliveiro |
30 Apr 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 10 | | John Levine |
3 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 9 | | Anton Ertl |
3 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 7 | | John Levine |
4 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 6 | | Thomas Koenig |
4 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 4 | | John Levine |
4 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 3 | | MitchAlsup1 |
5 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 2 | | Thomas Koenig |
5 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 1 | | MitchAlsup1 |
28 Jul 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 1 | | Lawrence D'Oliveiro |
3 May 24 | Re: a bit of history, Stealing a Great Idea from the 6600 | 1 | | MitchAlsup1 |
25 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | John Savard |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 47 | | MitchAlsup1 |
23 Apr 24 | Re: Stealing a Great Idea from the 6600 | 45 | | George Neuner |
23 Apr 24 | Re: Stealing a Great Idea from the 6600 | 44 | | MitchAlsup1 |
25 Apr 24 | Re: Stealing a Great Idea from the 6600 | 43 | | George Neuner |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 42 | | BGB |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 41 | | MitchAlsup1 |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | Anton Ertl |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | MitchAlsup1 |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 4 | | BGB |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | MitchAlsup1 |
27 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | BGB |
26 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | MitchAlsup1 |
27 Apr 24 | Re: Stealing a Great Idea from the 6600 | 34 | | BGB |
27 Apr 24 | Re: Stealing a Great Idea from the 6600 | 33 | | MitchAlsup1 |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 32 | | BGB |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 31 | | MitchAlsup1 |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 30 | | BGB |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 24 | | BGB |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 23 | | BGB |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 22 | | Thomas Koenig |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 21 | | BGB |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 20 | | BGB |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | Thomas Koenig |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | BGB |
29 Jul 24 | Re: Stealing a Great Idea from the 6600 | 16 | | Lawrence D'Oliveiro |
29 Jul 24 | Re: Stealing a Great Idea from the 6600 | 6 | | BGB |
30 Jul 24 | Re: Stealing a Great Idea from the 6600 | 5 | | Lawrence D'Oliveiro |
30 Jul 24 | Re: Stealing a Great Idea from the 6600 | 4 | | BGB |
31 Jul 24 | Re: Stealing a Great Idea from the 6600 | 3 | | Lawrence D'Oliveiro |
31 Jul 24 | Re: Stealing a Great Idea from the 6600 | 2 | | BGB |
1 Aug 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Lawrence D'Oliveiro |
29 Jul 24 | Re: Stealing a Great Idea from the 6600 | 9 | | Terje Mathisen |
29 Jul 24 | Re: Stealing a Great Idea from the 6600 | 8 | | MitchAlsup1 |
30 Jul 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Lawrence D'Oliveiro |
30 Jul 24 | Re: Stealing a Great Idea from the 6600 | 4 | | Michael S |
30 Jul 24 | Re: Stealing a Great Idea from the 6600 | 3 | | MitchAlsup1 |
31 Jul 24 | Re: Stealing a Great Idea from the 6600 | 2 | | BGB |
1 Aug 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Lawrence D'Oliveiro |
1 Aug 24 | Re: Stealing a Great Idea from the 6600 | 2 | | Thomas Koenig |
1 Aug 24 | Re: Stealing a Great Idea from the 6600 | 1 | | MitchAlsup1 |
29 Jul 24 | Re: Stealing a Great Idea from the 6600 | 1 | | George Neuner |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 5 | | MitchAlsup1 |
28 Apr 24 | Re: Stealing a Great Idea from the 6600 | 4 | | BGB |
29 Apr 24 | Re: Stealing a Great Idea from the 6600 | 3 | | MitchAlsup1 |
29 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | BGB |
29 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Thomas Koenig |
29 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Tim Rentsch |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 40 | | BGB |
21 Apr 24 | Re: Stealing a Great Idea from the 6600 | 39 | | MitchAlsup1 |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 3 | | BGB |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | MitchAlsup1 |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | BGB |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | John Savard |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | BGB |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 33 | | Terje Mathisen |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 1 | | BGB |
13 Jun 24 | Re: Stealing a Great Idea from the 6600 | 31 | | Kent Dickey |
13 Jun 24 | Re: Stealing a Great Idea from the 6600 | 16 | | Stefan Monnier |
13 Jun 24 | Re: Stealing a Great Idea from the 6600 | 15 | | BGB |
13 Jun 24 | Re: Stealing a Great Idea from the 6600 | 14 | | MitchAlsup1 |
14 Jun 24 | Re: Stealing a Great Idea from the 6600 | 13 | | BGB |
18 Jun 24 | Re: Stealing a Great Idea from the 6600 | 12 | | MitchAlsup1 |
19 Jun 24 | Re: Stealing a Great Idea from the 6600 | 8 | | BGB |
19 Jun 24 | Re: Stealing a Great Idea from the 6600 | 7 | | MitchAlsup1 |
19 Jun 24 | Re: Stealing a Great Idea from the 6600 | 5 | | BGB |
19 Jun 24 | Re: Stealing a Great Idea from the 6600 | 4 | | MitchAlsup1 |
20 Jun 24 | Re: Stealing a Great Idea from the 6600 | 3 | | Thomas Koenig |
20 Jun 24 | Re: Stealing a Great Idea from the 6600 | 2 | | MitchAlsup1 |
21 Jun 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Thomas Koenig |
20 Jun 24 | Re: Stealing a Great Idea from the 6600 | 1 | | John Savard |
19 Jun 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Thomas Koenig |
20 Jun 24 | Re: Stealing a Great Idea from the 6600 | 1 | | MitchAlsup1 |
31 Jul 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Lawrence D'Oliveiro |
13 Jun 24 | Re: Stealing a Great Idea from the 6600 | 13 | | MitchAlsup1 |
14 Jun 24 | Re: Stealing a Great Idea from the 6600 | 1 | | Terje Mathisen |
22 Apr 24 | Re: Stealing a Great Idea from the 6600 | 9 | | John Savard |
18 Apr 24 | Re: Stealing a Great Idea from the 6600 | 2 | | Lawrence D'Oliveiro |