Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #32226 > unrolled thread

Agner's Proposal for an ideal extensible instruction set

Started byJean-Marc Bourguet <jm@bourguet.org>
First post2015-12-28 15:50 +0100
Last post2015-12-28 19:56 +0100
Articles 12 on this page of 32 — 15 participants

Back to article view | Back to comp.arch


Contents

  Agner's Proposal for an ideal extensible instruction set Jean-Marc Bourguet <jm@bourguet.org> - 2015-12-28 15:50 +0100
    Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-28 07:12 -0800
      Re: Agner's Proposal for an ideal extensible instruction set Piotr Wyderski <peter.pan@neverland.mil> - 2016-01-26 16:38 +0100
        Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2016-01-29 12:10 -0800
    Re: Agner's Proposal for an ideal extensible instruction set "James Van Buskirk" <not_valid@comcast.net> - 2015-12-28 09:48 -0700
      Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-28 10:29 -0800
      Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-28 23:01 +0100
        Re: Agner's Proposal for an ideal extensible instruction set "James Van Buskirk" <not_valid@comcast.net> - 2015-12-28 16:25 -0700
          Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-28 16:10 -0800
            Re: Agner's Proposal for an ideal extensible instruction set "James Van Buskirk" <not_valid@comcast.net> - 2015-12-28 18:23 -0700
              Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-28 19:41 -0800
                Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-29 10:52 +0100
                  Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-29 02:22 -0800
                    Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-29 12:58 +0100
                      Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-29 12:16 -0800
                    Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-29 07:25 -0800
                      Re: Agner's Proposal for an ideal extensible instruction set Walter Banks <walter@bytecraft.com> - 2015-12-29 12:27 -0500
                      Re: Agner's Proposal for an ideal extensible instruction set Robert Wessel <robertwessel2@yahoo.com> - 2015-12-29 11:46 -0600
                      Re: Agner's Proposal for an ideal extensible instruction set paul wallich <pw@panix.com> - 2015-12-29 13:00 -0500
                      Re: Agner's Proposal for an ideal extensible instruction set mrs@kithrup.com (Mike Stump) - 2015-12-29 22:21 +0000
              Re: Agner's Proposal for an ideal extensible instruction set anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-29 10:16 +0000
          Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-29 10:49 +0100
            Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-29 02:36 -0800
    Re: Agner's Proposal for an ideal extensible instruction set "Paul A. Clayton" <paaronclayton@gmail.com> - 2015-12-28 09:23 -0800
      Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-28 10:31 -0800
        Re: Agner's Proposal for an ideal extensible instruction set Erik Trulsson <erikt@Update.UU.SE> - 2016-01-20 15:33 +0000
          Re: Agner's Proposal for an ideal extensible instruction set Casper H.S. Dik <Casper.Dik@OrSPaMcle.COM> - 2016-01-20 15:39 +0000
            Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-20 18:31 +0100
          Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2016-01-20 11:14 -0800
            Re: Agner's Proposal for an ideal extensible instruction set mrs@kithrup.com (Mike Stump) - 2016-01-26 03:36 +0000
        Re: Agner's Proposal for an ideal extensible instruction set Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-20 16:44 -0500
    Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-28 19:56 +0100

Page 2 of 2 — ← Prev page 1 [2]


#32257

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-12-29 10:16 +0000
Message-ID<2015Dec29.111631@mips.complang.tuwien.ac.at>
In reply to#32251
"James Van Buskirk" <not_valid@comcast.net> writes:
>
>
>"Ivan Godard"  wrote in message news:n5sirr$ip3$1@dont-email.me... 
>
>> You really going to use static addresses that can be loaded as literals?
>
>> You might consider why load-time ASLR is used.

To make attacks harder.  So the loader has to fix up the literals.  Or
the ABI requires PIC.  Either way, no problem.

>I thought that ASLR was at orthogonal trajectories to the immediate
>addresses.  In Windows, an executable or DLL can get loaded
>anywhere so the OS must be capable of filling in any required pointers
>at load time anyhow.  Must be fun on Alpha where the pointers are
>scattered across 4 instructions.

The general way to load 64-bit immediates on Alpha is to load it from
a table that is addressed through the GP (global pointer, $29) or the
PV (current procedure, $27) register.  My guess is that literals to be
filled in by the linker or loader are handled in that way.

- anton
-- 
M. Anton Ertl                    Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html

[toc] | [prev] | [next] | [standalone]


#32254

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2015-12-29 10:49 +0100
Message-ID<n5tkuu$8o8$1@speranza.aioe.org>
In reply to#32249
James Van Buskirk wrote:
> "Terje Mathisen"  wrote in message news:n5sbfn$nqe$1@speranza.aioe.org...
>
>> If you want to be able to use the second or third dword as an
>> immediate, then you cannot reserve any bits to be used as a marker.
>
> Who sez?  2  bits from first dword, 31 each from the other two, I get 64
> bits.
> Gotta do something like that because not being able to load a pointer in
> one shot is an abomination.
>
If you split up immediates then you have to spend the wires needed to 
route them back together, this might be costly.

I do agree that the ability to load full-size immediates is in fact very 
important, and the increasing difference between sequential code access 
and memory/cache loads, it is becoming even more important.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [next] | [standalone]


#32258

FromIvan Godard <ivan@millcomputing.com>
Date2015-12-29 02:36 -0800
Message-ID<n5tnis$gjv$1@dont-email.me>
In reply to#32254
On 12/29/2015 1:49 AM, Terje Mathisen wrote:
> James Van Buskirk wrote:
>> "Terje Mathisen"  wrote in message news:n5sbfn$nqe$1@speranza.aioe.org...
>>
>>> If you want to be able to use the second or third dword as an
>>> immediate, then you cannot reserve any bits to be used as a marker.
>>
>> Who sez?  2  bits from first dword, 31 each from the other two, I get 64
>> bits.
>> Gotta do something like that because not being able to load a pointer in
>> one shot is an abomination.
>>
> If you split up immediates then you have to spend the wires needed to
> route them back together, this might be costly.
>
> I do agree that the ability to load full-size immediates is in fact very
> important, and the increasing difference between sequential code access
> and memory/cache loads, it is becoming even more important.

Definitely. One requirement for the Mill design was to support 
immediates of all widths, including quad on family members that have 
native quad. As a wide-issue machine, Mill also has to support multiple 
literals in a single instruction, possibly of mixed widths, although no 
more than one per operation within the instruction.

We considered a varying-length encoding such as Mitch's; actually rather 
similar now that I think of it, but the inherently linear parse meant 
that we couldn't get more than 6-8 operations per instruction without an 
unreasonable number of decode stages and we wanted 3-4 times that 
operation width. The solution of course was to remove the literals from 
their operations and concatenate them off by themselves, so that the 
rest of the encoding had an easy-to-parse fixed size; usage bits in each 
operation then let us chop the literal block up as needed, but the 
chopping is all in parallel. Our 3-cycle fetch-to-issue time is critical 
to the CPU, and was one of the hardest parts to get right.

[toc] | [prev] | [next] | [standalone]


#32236

From"Paul A. Clayton" <paaronclayton@gmail.com>
Date2015-12-28 09:23 -0800
Message-ID<4bc104bf-2522-4a48-a48d-e44d88f21347@googlegroups.com>
In reply to#32226
On Monday, December 28, 2015 at 9:50:12 AM UTC-5, Jean-Marc Bourguet wrote:
> This may be interesting that discussion on existence of God ;-)
> 
> http://agner.org/optimize/blog/read.php?i=421


First, I disagree somewhat on the rationale behind this ISA 
design. IMO, the software distribution format should be a 
higher level abstraction than the instruction set (i.e., 
executed binary). This provides much looser constraints of 
hardware compatibility. Such is probably impractical for 
market (less lock-in/profitability) and debugging (debugging 
to implementation vs. to specification) reasons.

I am also skeptical that one ISA for all ("general purpose") 
computing is the best goal. (Agner Fog's ISA excludes 32-bit 
versions, which limits how far down it would go. E.g., it is 
probably not suitable for microcontrollers.)

I recognize that there are benefits to executable binary 
compatibility, and I would expect that compatible lines 
(of shorter lifetimes) would be developed.

One obvious mistake is the use of the all-zero instruction 
as a nop. There seems to be wide agreement among professional 
computer architects that all-zero should generate an 
exception/be an illegal instruction (so that executing data 
pages accidentally becomes less likely). All zero as nop 
facilitates nop slides.

(Agner Fog did get right that undefined encodings should be 
reserved for hints (producing nops when not supported).)

I disagree with some of the choices in that I am inclined 
toward using specialization to support optimization. E.g., 
I am not as strong a supporter of register orthogonality 
(though the proposed ISA has some non-orthogonal aspects to 
registers, e.g., lower number of predict registers).

(I think I would also have given more emphasis to multithreading,
including variable context sizes and shared contexts [banked/
shadow registers are naturally aligned with thread contexts] and 
joining thread scheduling aspects with other resource management 
aspects like power-saving. It is also interesting that little 
space seems to have been given to security (including 
virtualization). Architectural factors can facilitate lower-
overhead permission changes.)

I like the goal of supporting broad software compatibility 
across operating systems, though I am skeptical that such 
could be implemented (non-technical hindrances). Defining 
interfaces (even if near-optimal) does not guarantee their 
use; it only takes a little not-invented-here spirit to 
mess up a collaborative system.

I skimmed through most of the post and have not given 
it much consideration.

[toc] | [prev] | [next] | [standalone]


#32240

FromQuadibloc <jsavard@ecn.ab.ca>
Date2015-12-28 10:31 -0800
Message-ID<7ba182f1-7b77-4278-ba5a-38accb3b197b@googlegroups.com>
In reply to#32236
On Monday, December 28, 2015 at 10:23:45 AM UTC-7, Paul A. Clayton wrote:

> First, I disagree somewhat on the rationale behind this ISA 
> design. IMO, the software distribution format should be a 
> higher level abstraction than the instruction set (i.e., 
> executed binary). This provides much looser constraints of 
> hardware compatibility. Such is probably impractical for 
> market (less lock-in/profitability) and debugging (debugging 
> to implementation vs. to specification) reasons.

Well, for whatever reason, nobody seems to do it that way.

Distributing software in a higher-level form also makes it potentially easier to disassemble and crack.

John Savard

[toc] | [prev] | [next] | [standalone]


#32955

FromErik Trulsson <erikt@Update.UU.SE>
Date2016-01-20 15:33 +0000
Message-ID<n7o9bo$psj$1@Iltempo.Update.UU.SE>
In reply to#32240
Quadibloc <jsavard@ecn.ab.ca> wrote:
> On Monday, December 28, 2015 at 10:23:45 AM UTC-7, Paul A. Clayton wrote:
> 
>> First, I disagree somewhat on the rationale behind this ISA 
>> design. IMO, the software distribution format should be a 
>> higher level abstraction than the instruction set (i.e., 
>> executed binary). This provides much looser constraints of 
>> hardware compatibility. Such is probably impractical for 
>> market (less lock-in/profitability) and debugging (debugging 
>> to implementation vs. to specification) reasons.
> 
> Well, for whatever reason, nobody seems to do it that way.
> 
> Distributing software in a higher-level form also makes it potentially easier to disassemble and crack.

Make that _almost_ nobody.  See IBM's OS/400 (or whatever it is called this
year)

[toc] | [prev] | [next] | [standalone]


#32956

FromCasper H.S. Dik <Casper.Dik@OrSPaMcle.COM>
Date2016-01-20 15:39 +0000
Message-ID<569faa14$0$23865$e4fe514c@news.xs4all.nl>
In reply to#32955
Erik Trulsson <erikt@Update.UU.SE> writes:

>Quadibloc <jsavard@ecn.ab.ca> wrote:
>> On Monday, December 28, 2015 at 10:23:45 AM UTC-7, Paul A. Clayton wrote:
>> 
>>> First, I disagree somewhat on the rationale behind this ISA 
>>> design. IMO, the software distribution format should be a 
>>> higher level abstraction than the instruction set (i.e., 
>>> executed binary). This provides much looser constraints of 
>>> hardware compatibility. Such is probably impractical for 
>>> market (less lock-in/profitability) and debugging (debugging 
>>> to implementation vs. to specification) reasons.
>> 
>> Well, for whatever reason, nobody seems to do it that way.
>> 
>> Distributing software in a higher-level form also makes it potentially easier to disassemble and crack.

>Make that _almost_ nobody.  See IBM's OS/400 (or whatever it is called this
>year)

Isn't that what Android is also doing?

Casper

[toc] | [prev] | [next] | [standalone]


#32962

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2016-01-20 18:31 +0100
Message-ID<n7og9r$10bm$1@gioia.aioe.org>
In reply to#32956
Casper H.S. Dik wrote:
> Erik Trulsson <erikt@Update.UU.SE> writes:
>
>> Quadibloc <jsavard@ecn.ab.ca> wrote:
>>> On Monday, December 28, 2015 at 10:23:45 AM UTC-7, Paul A. Clayton wrote:
>>>
>>>> First, I disagree somewhat on the rationale behind this ISA
>>>> design. IMO, the software distribution format should be a
>>>> higher level abstraction than the instruction set (i.e.,
>>>> executed binary). This provides much looser constraints of
>>>> hardware compatibility. Such is probably impractical for
>>>> market (less lock-in/profitability) and debugging (debugging
>>>> to implementation vs. to specification) reasons.
>>>
>>> Well, for whatever reason, nobody seems to do it that way.
>>>
>>> Distributing software in a higher-level form also makes it potentially easier to disassemble and crack.
>
>> Make that _almost_ nobody.  See IBM's OS/400 (or whatever it is called this
>> year)
>
> Isn't that what Android is also doing?

Sure.

By total running volume (nr of occupied cpu years) I would hazard a 
guess that Android + regular Java and .Net programs have already passed 
all binary code.

Of course if we look at actual cpu usage the google/facebook/processing 
centers, plus all the hpc farms which tends to run at close to 100% 
efficiency then even cell phones have a long way to go due to many 
orders of magnitude lower power budgets.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [next] | [standalone]


#32970

FromIvan Godard <ivan@millcomputing.com>
Date2016-01-20 11:14 -0800
Message-ID<n7om6b$de8$1@dont-email.me>
In reply to#32955
On 1/20/2016 7:33 AM, Erik Trulsson wrote:
> Quadibloc <jsavard@ecn.ab.ca> wrote:
>> On Monday, December 28, 2015 at 10:23:45 AM UTC-7, Paul A. Clayton wrote:
>>
>>> First, I disagree somewhat on the rationale behind this ISA
>>> design. IMO, the software distribution format should be a
>>> higher level abstraction than the instruction set (i.e.,
>>> executed binary). This provides much looser constraints of
>>> hardware compatibility. Such is probably impractical for
>>> market (less lock-in/profitability) and debugging (debugging
>>> to implementation vs. to specification) reasons.
>>
>> Well, for whatever reason, nobody seems to do it that way.
>>
>> Distributing software in a higher-level form also makes it potentially easier to disassemble and crack.
>
> Make that _almost_ nobody.  See IBM's OS/400 (or whatever it is called this
> year)
>
Unclear. The attacker would to modify the distributed form into 
something that the translator will turn into the machine code that will 
be exploitable, so you are two steps removed rather than just one. Were 
I an attacker, I'd work as close to the final executable form as possible.

[toc] | [prev] | [next] | [standalone]


#33127

Frommrs@kithrup.com (Mike Stump)
Date2016-01-26 03:36 +0000
Message-ID<o1JJCr.1rBD@kithrup.com>
In reply to#32970
In article <n7om6b$de8$1@dont-email.me>,
Ivan Godard  <ivan@millcomputing.com> wrote:
>Unclear. The attacker would to modify the distributed form into 
>something that the translator will turn into the machine code that will 
>be exploitable, so you are two steps removed rather than just one. Were 
>I an attacker, I'd work as close to the final executable form as possible.

But, if you were a good attacker, you would actually exploit
_anything_ that is exploitable, going after the easiest things first
unless you had the funding to actually skip all the easy exploits and
go after the hard to exploit things.

[toc] | [prev] | [next] | [standalone]


#32981

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2016-01-20 16:44 -0500
Message-ID<jwvio2okjxl.fsf-monnier+comp.arch@gnu.org>
In reply to#32240
>> First, I disagree somewhat on the rationale behind this ISA
>> design. IMO, the software distribution format should be a
>> higher level abstraction than the instruction set (i.e.,
>> executed binary). This provides much looser constraints of
>> hardware compatibility. Such is probably impractical for
>> market (less lock-in/profitability) and debugging (debugging
>> to implementation vs. to specification) reasons.
> Well, for whatever reason, nobody seems to do it that way.

Not over here, where more and more software is distributed as
auto-downloaded Javascript in web pages.

> Distributing software in a higher-level form also makes it potentially
> easier to disassemble and crack.

Nobody really cares, actually (I mean, some people do, but most of
them are just wrong: they care out of an unfounded fear).


        Stefan

[toc] | [prev] | [next] | [standalone]


#32241

FromTerje Mathisen <terje.mathisen@tmsw.no>
Date2015-12-28 19:56 +0100
Message-ID<n5s0kf$t9n$1@speranza.aioe.org>
In reply to#32226
Jean-Marc Bourguet wrote:
>
> This may be interesting that discussion on existence of God ;-)
>
> http://agner.org/optimize/blog/read.php?i=421
>
> Yours,
>
Thanks, that was fun!

Significant parts of this reads like 'almost, but not quite Mill', i.e. 
they have an orthogonal instruction set but missed the use of register 
(belt slot) meta data to allow the same instruction to be used on both 
vector and scalar data, with all supported data sizes from 8 to at least 
64 but normally 128 bits.

Limited predication is less generally useful than Mill None/NAR tagging, 
but seems like a worthwhile feature in this design.

I do believe they make a mistake by not allowing at least 16-bit 
granularity in the instruction sizes, Mitch have told us repeatedly that 
he can decode his new instruction format very efficiently indeed even if 
he supports significantly more than 3 different instruction lengths.

The one feature I _really_ liked was the support for 8/32/64-bit fp 
immediates, with the 8-bit version being the real hack:

Each 8-bit (signed) immediate would be converted to the FP value with 
the same numeric value, so you could use this for immediates in the 
-128.0 to 127.0 range: It seems obvious that you would implement this 
with a small (256-entry) lookup table in the decoder, silently 
converting these instructions to the corresponding but 2-3X larger 
version with a float or double immediate.

I do suspect that it would be more useful if you instead interpreted 
these values as 4:4 fixed-point, since that would allow you to encode 
1/2, 1/4, 1/8, 15/16 etc, but at this point I'd rather use the fact that 
we have a FP lookup table and use that table to encode the 256 most used 
FP constants, something which would surely include values like pi, e, 
phi, G, log(2) etc.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.arch


csiph-web