Re: Split instruction and immediate stream

Liste des GroupesRevenir à c arch 
Sujet : Re: Split instruction and immediate stream
De : mitchalsup (at) *nospam* aol.com (MitchAlsup1)
Groupes : comp.arch
Date : 23. Mar 2025, 21:02:59
Autres entêtes
Organisation : Rocksolid Light
Message-ID : <b44e9a132028a7c1a8bc91fad3240247@www.novabbs.org>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Rocksolid Light
On Sun, 23 Mar 2025 17:54:19 +0000, Robert Finch wrote:

On 2025-03-23 8:12 a.m., Marcus wrote:
Den 2025-03-23 kl. 04:06, skrev Robert Finch:
On 2025-03-22 11:04 a.m., Thomas Koenig wrote:
Marcus <m.delete@this.bitsnbites.eu> schrieb:

It does not quite work yet. Constants are placed and code is moved,
but the linked program does not have the correct references yet.
>
Experimental, but looking like things will work.
>
>
Although I have not tried any of these techniques, here are my thoughts.
>
Why not always place the constant next to (right after) the instruction
that references it, instead of at an offset within the cache line?
>
That is a very good idea. It is the same thing almost as using a
variable length instruction.
>
LB650 uses a smaller constant packet (16-bits) than the instruction. So,
instructions would need to be able to be aligned at 16-bit boundaries.
LB650 instruction are fixed 32-bit. There is also the possibility of
sharing the same constants, although slim.
Consider stack pointer displacements:: local x is always [SP,offset(X)]
since these are mostly 16-bit displacements, they are already optimal.
But consider local-static data:: displacement( x ) varies with IP,
unless the compiler 'eats' an instruction to load the address--which
is generally not that great of an idea.
Then consider extern-global data:: you are likely using 32-bit
(tiny-medium model) or 64-bit (large and huge model). The 32-bit
form is arguably IP-relative, the 64-bit form can be argued either
way.
My overall argument is that there are unlikely to be "all that many"
exactly equal constants in a dozen instructions that is that cache
line.

The effect should be very similar, but now you have a simpler offset
(it's always zero) and you eliminate the problem with having to keep
track of where the constants are in order to prevent the PC/IP from
running into the constant area.
>
I wish I had thought of that last night. But I have coded things now.
Never let a done (but mediocre) solution prevent better solutions--
that is for your Boss to decide.

Got the compiler / assembler going. The listings are a few percent
shorter than the PowerPC. It may be due to bugs yet. I think the
difference may be the PowerPC burns up bits using pairs of instructions
for high/low halves of the constant.
>
The vbcc compiler for the PowerPC was modified.

Date Sujet#  Auteur
8 Mar 25 * Split instruction and immediate stream28Thomas Koenig
8 Mar 25 +* Re: Split instruction and immediate stream4MitchAlsup1
8 Mar 25 i+- Re: Split instruction and immediate stream1BGB
9 Mar 25 i`* Re: Split instruction and immediate stream2MitchAlsup1
9 Mar 25 i `- Re: Split instruction and immediate stream1BGB
8 Mar 25 +* Re: Split instruction and immediate stream2Terje Mathisen
8 Mar 25 i`- Re: Split instruction and immediate stream1Thomas Koenig
9 Mar 25 `* Re: Split instruction and immediate stream21Robert Finch
9 Mar 25  +* Re: Split instruction and immediate stream2Thomas Koenig
9 Mar 25  i`- Re: Split instruction and immediate stream1George Neuner
9 Mar 25  +* Re: Split instruction and immediate stream5BGB
9 Mar 25  i`* Re: Split instruction and immediate stream4Robert Finch
9 Mar 25  i `* Re: Split instruction and immediate stream3MitchAlsup1
9 Mar 25  i  `* Re: Split instruction and immediate stream2Thomas Koenig
9 Mar 25  i   `- Re: Split instruction and immediate stream1MitchAlsup1
9 Mar 25  `* Re: Split instruction and immediate stream13MitchAlsup1
9 Mar 25   +- Re: Split instruction and immediate stream1BGB
22 Mar 25   `* Re: Split instruction and immediate stream11Marcus
22 Mar 25    `* Re: Split instruction and immediate stream10Thomas Koenig
23 Mar 25     `* Re: Split instruction and immediate stream9Robert Finch
23 Mar 25      +* Re: Split instruction and immediate stream5Marcus
23 Mar 25      i+- Re: Split instruction and immediate stream1MitchAlsup1
23 Mar 25      i`* Re: Split instruction and immediate stream3Robert Finch
23 Mar 25      i +- Re: Split instruction and immediate stream1MitchAlsup1
24 Mar 25      i `- Re: Split instruction and immediate stream1Anton Ertl
23 Mar 25      `* Re: Split instruction and immediate stream3Thomas Koenig
24 Mar 25       +- Re: Split instruction and immediate stream1Robert Finch
24 Mar 25       `- Re: Split instruction and immediate stream1BGB

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal