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


Groups > comp.arch > #31688 > unrolled thread

Intel MPX

Started byStephen Fuld <SFuld@alumni.cmu.edu.invalid>
First post2015-12-09 12:26 -0800
Last post2015-12-21 09:39 -0800
Articles 9 on this page of 69 — 22 participants

Back to article view | Back to comp.arch


Contents

  Intel MPX Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2015-12-09 12:26 -0800
    Re: Intel MPX Quadibloc <jsavard@ecn.ab.ca> - 2015-12-09 13:04 -0800
    Re: Intel MPX Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-09 23:27 +0100
      Re: Intel MPX Melzzzzz <mel@zzzzz.com> - 2015-12-10 00:41 +0100
        Re: Intel MPX Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-10 12:22 +0100
    Re: Intel MPX jacko <jackokring@gmail.com> - 2015-12-09 17:36 -0800
      Re: Intel MPX Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-10 12:36 +0100
        Re: Intel MPX Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-10 03:58 -0800
          Re: Intel MPX already5chosen@yahoo.com - 2015-12-10 07:39 -0800
            Re: Intel MPX anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-10 16:41 +0000
              Re: Intel MPX jacko <jackokring@gmail.com> - 2015-12-10 10:06 -0800
                Re: Intel MPX jacko <jackokring@gmail.com> - 2015-12-10 11:14 -0800
                  Re: Intel MPX jacko <jackokring@gmail.com> - 2015-12-10 11:23 -0800
        Re: Intel MPX jacko <jackokring@gmail.com> - 2015-12-10 07:37 -0800
    Re: Intel MPX timcaffrey@aol.com - 2015-12-15 09:51 -0800
      Re: Intel MPX Megol <golem960@gmail.com> - 2015-12-15 09:57 -0800
        Re: Intel MPX Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2015-12-15 11:07 -0800
        Re: Intel MPX Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-16 02:21 -0800
          Re: Intel MPX Quadibloc <jsavard@ecn.ab.ca> - 2015-12-16 08:01 -0800
            Re: Intel MPX Niklas Holsti <niklas.holsti@tidorum.invalid> - 2015-12-16 18:17 +0200
              Re: Intel MPX already5chosen@yahoo.com - 2015-12-16 08:31 -0800
              Re: Intel MPX George Neuner <gneuner2@comcast.net> - 2015-12-16 13:06 -0500
              Re: Intel MPX Quadibloc <jsavard@ecn.ab.ca> - 2015-12-16 13:03 -0800
                Re: Intel MPX Niklas Holsti <niklas.holsti@tidorum.invalid> - 2015-12-16 23:42 +0200
                  Re: Intel MPX Bill Findlay <yaldnif.w@blueyonder.co.uk> - 2015-12-16 23:34 +0000
                Re: Intel MPX Bill Findlay <yaldnif.w@blueyonder.co.uk> - 2015-12-16 23:34 +0000
                  Re: Intel MPX William Edwards <willvarfar@gmail.com> - 2015-12-16 23:39 -0800
                    Re: Intel MPX already5chosen@yahoo.com - 2015-12-17 04:44 -0800
                    Re: Intel MPX anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-18 13:29 +0000
                      Re: Intel MPX nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-18 14:42 +0000
                        Re: Intel MPX Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-18 07:19 -0800
                          Re: Intel MPX nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-18 15:49 +0000
                        Re: Intel MPX anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-21 17:04 +0000
                          Re: Intel MPX nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-21 18:10 +0000
                            Re: Intel MPX Quadibloc <jsavard@ecn.ab.ca> - 2015-12-21 10:29 -0800
                              Re: Intel MPX nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-21 19:36 +0000
                  Re: Intel MPX Noob <root@127.0.0.1> - 2015-12-18 22:29 +0100
                    Re: Ada vs C Noob <root@127.0.0.1> - 2015-12-18 22:37 +0100
                      Re: Ada vs C nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-19 11:37 +0000
                        Re: Ada vs C Anonymous <no_email@invalid.invalid> - 2015-12-19 17:19 +0000
                          Re: Ada vs C nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-19 18:32 +0000
            Re: Intel MPX already5chosen@yahoo.com - 2015-12-16 08:25 -0800
            Re: Intel MPX Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-16 12:17 -0800
              Re: Intel MPX jacko <jackokring@gmail.com> - 2015-12-16 12:30 -0800
            Re: Intel MPX Megol <golem960@gmail.com> - 2015-12-16 13:42 -0800
          Re: Intel MPX Megol <golem960@gmail.com> - 2015-12-16 13:24 -0800
            Re: Intel MPX Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-17 13:56 +0100
              Re: Intel MPX already5chosen@yahoo.com - 2015-12-17 05:22 -0800
                Re: Intel MPX Chris Gray <cg@GraySage.COM> - 2015-12-17 10:59 -0700
              Re: Intel MPX Tom Gardner <spamjunk@blueyonder.co.uk> - 2015-12-17 14:22 +0000
                Re: Intel MPX Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-17 15:48 +0100
                  Re: Intel MPX Tom Gardner <spamjunk@blueyonder.co.uk> - 2015-12-17 15:04 +0000
        Re: Intel MPX Walter Banks <walter@bytecraft.com> - 2015-12-17 06:10 -0500
          Re: Intel MPX already5chosen@yahoo.com - 2015-12-17 03:33 -0800
            Re: Intel MPX Walter Banks <walter@bytecraft.com> - 2015-12-17 08:19 -0500
              Re: Intel MPX already5chosen@yahoo.com - 2015-12-17 05:32 -0800
            Re: Intel MPX Niklas Holsti <niklas.holsti@tidorum.invalid> - 2015-12-17 23:02 +0200
              Re: Intel MPX MitchAlsup <MitchAlsup@aol.com> - 2015-12-18 15:01 -0800
                Re: Intel MPX Ivan Godard <ivan@millcomputing.com> - 2015-12-18 16:45 -0800
                Re: Ada vs C Niklas Holsti <niklas.holsti@tidorum.invalid> - 2015-12-19 06:29 +0200
                  Re: Ada vs C Ivan Godard <ivan@millcomputing.com> - 2015-12-18 20:55 -0800
                    Re: Ada vs C Anonymous <no_email@invalid.invalid> - 2015-12-19 06:11 +0000
                      displays for nested functions (was Ada vs C) Ivan Godard <ivan@millcomputing.com> - 2015-12-18 23:07 -0800
                        Re: displays for nested functions (was Ada vs C) Anonymous <no_email@invalid.invalid> - 2015-12-19 17:19 +0000
                      Re: Ada vs C nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-19 11:46 +0000
                        Re: Ada vs C jacko <jackokring@gmail.com> - 2015-12-19 05:59 -0800
                          Re: Ada vs C nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-19 14:11 +0000
                            Re: Ada vs C jacko <jackokring@gmail.com> - 2015-12-19 06:29 -0800
                  Re: Ada vs C timcaffrey@aol.com - 2015-12-21 09:39 -0800

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


#31985 — Re: Ada vs C

FromIvan Godard <ivan@millcomputing.com>
Date2015-12-18 20:55 -0800
SubjectRe: Ada vs C
Message-ID<n52nrt$qpu$1@dont-email.me>
In reply to#31984
On 12/18/2015 8:29 PM, Niklas Holsti wrote:
<snip>


> But it also depends on how the SW uses the HW. As I understand it, the
> most accessible Ada compiler (GNAT) uses a "secondary stack" to hold
> such dynamically sized, locally created objects, with a fixed-size
> pointer from the main stack to the secondary stack. But the same
> referencing problem occurs if the interior subprograms are recursive.
> Probably the interior subprogram must be passed a pointer (not visible
> in the source code) to the stack frame of the lexically exterior
> subprogram.

Nesting was also used for thread management in some languages with 
nested functions; a function could spawn a contained function several 
times, with the containing function acting as thread manager for them. 
The greatest useful nesting depth I ever saw in practice was 7, of which 
one was the OS, one the RTS (things like errno), one the "main" 
application, two were nested threads, and two were worker subroutines. 
You called the OS or RTS services like any other down-stack function 
call, which made for a nice clean design. The display had 32 entries, 
which was at least 2X overkill.


I think the KDF9 had a similar arrangement - Nick, do you know?

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


#31986 — Re: Ada vs C

FromAnonymous <no_email@invalid.invalid>
Date2015-12-19 06:11 +0000
SubjectRe: Ada vs C
Message-ID<ddkaohF6gc5U1@mid.individual.net>
In reply to#31985
Ivan Godard <ivan@millcomputing.com> wrote:
> On 12/18/2015 8:29 PM, Niklas Holsti wrote:
> <snip>
> 
> 
>> But it also depends on how the SW uses the HW. As I understand it, the
>> most accessible Ada compiler (GNAT) uses a "secondary stack" to hold
>> such dynamically sized, locally created objects, with a fixed-size
>> pointer from the main stack to the secondary stack. But the same
>> referencing problem occurs if the interior subprograms are recursive.
>> Probably the interior subprogram must be passed a pointer (not visible
>> in the source code) to the stack frame of the lexically exterior
>> subprogram.
> 
> Nesting was also used for thread management in some languages with 
> nested functions; a function could spawn a contained function several 
> times, with the containing function acting as thread manager for them. 
> The greatest useful nesting depth I ever saw in practice was 7, of which 
> one was the OS, one the RTS (things like errno), one the "main" 
> application, two were nested threads, and two were worker subroutines. 
> You called the OS or RTS services like any other down-stack function 
> call, which made for a nice clean design. The display had 32 entries, 
> which was at least 2X overkill.
> 
> 
> I think the KDF9 had a similar arrangement - Nick, do you know?

That sounds nothing KDF9.  See:

http://www.findlayw.plus.com/KDF9

--
Bill Findlay



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


#31987 — displays for nested functions (was Ada vs C)

FromIvan Godard <ivan@millcomputing.com>
Date2015-12-18 23:07 -0800
Subjectdisplays for nested functions (was Ada vs C)
Message-ID<n52viq$ce3$1@dont-email.me>
In reply to#31986
On 12/18/2015 10:11 PM, Anonymous wrote:
> Ivan Godard <ivan@millcomputing.com> wrote:
>> On 12/18/2015 8:29 PM, Niklas Holsti wrote:
>> <snip>
>>
>>
>>> But it also depends on how the SW uses the HW. As I understand it, the
>>> most accessible Ada compiler (GNAT) uses a "secondary stack" to hold
>>> such dynamically sized, locally created objects, with a fixed-size
>>> pointer from the main stack to the secondary stack. But the same
>>> referencing problem occurs if the interior subprograms are recursive.
>>> Probably the interior subprogram must be passed a pointer (not visible
>>> in the source code) to the stack frame of the lexically exterior
>>> subprogram.
>>
>> Nesting was also used for thread management in some languages with
>> nested functions; a function could spawn a contained function several
>> times, with the containing function acting as thread manager for them.
>> The greatest useful nesting depth I ever saw in practice was 7, of which
>> one was the OS, one the RTS (things like errno), one the "main"
>> application, two were nested threads, and two were worker subroutines.
>> You called the OS or RTS services like any other down-stack function
>> call, which made for a nice clean design. The display had 32 entries,
>> which was at least 2X overkill.
>>
>>
>> I think the KDF9 had a similar arrangement - Nick, do you know?
>
> That sounds nothing KDF9.  See:
>
> http://www.findlayw.plus.com/KDF9

Thanks for the citation. Looks like the KDF9 hardware had no display, 
but the Whetstone system and WALGOL compiler maintained a display in 
software. The reference explicitly cites the KDF9 WALGOL as the source 
of the hardware display in the B6500, although I was surprised to read 
that it was Ben Dent who put that in; I had though Bob Barton did. One 
way or the other, it was already in by the time I arrived in Pasadena. 
Incidentally, Ben Dent was the best boss I have ever had, bar none, and 
extraordinary for engineering at that time, being black.

One 6500 oddity was the floating representation of the display 
registers, which let you have 32 display levels even with only 16 bits 
in a VALC/NAMC instruction. Had they used only 16 displays they could 
have doubled the address range of each level, though I never heard that 
the range was a problem.

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


#31997 — Re: displays for nested functions (was Ada vs C)

FromAnonymous <no_email@invalid.invalid>
Date2015-12-19 17:19 +0000
SubjectRe: displays for nested functions (was Ada vs C)
Message-ID<ddlhttFg5ohU1@mid.individual.net>
In reply to#31987
Ivan Godard <ivan@millcomputing.com> wrote:
> On 12/18/2015 10:11 PM, Anonymous wrote:
>> Ivan Godard <ivan@millcomputing.com> wrote:
>>> On 12/18/2015 8:29 PM, Niklas Holsti wrote:
>>> <snip>
>>> 
>>> 
>>>> But it also depends on how the SW uses the HW. As I understand it, the
>>>> most accessible Ada compiler (GNAT) uses a "secondary stack" to hold
>>>> such dynamically sized, locally created objects, with a fixed-size
>>>> pointer from the main stack to the secondary stack. But the same
>>>> referencing problem occurs if the interior subprograms are recursive.
>>>> Probably the interior subprogram must be passed a pointer (not visible
>>>> in the source code) to the stack frame of the lexically exterior
>>>> subprogram.
>>> 
>>> Nesting was also used for thread management in some languages with
>>> nested functions; a function could spawn a contained function several
>>> times, with the containing function acting as thread manager for them.
>>> The greatest useful nesting depth I ever saw in practice was 7, of which
>>> one was the OS, one the RTS (things like errno), one the "main"
>>> application, two were nested threads, and two were worker subroutines.
>>> You called the OS or RTS services like any other down-stack function
>>> call, which made for a nice clean design. The display had 32 entries,
>>> which was at least 2X overkill.
>>> 
>>> 
>>> I think the KDF9 had a similar arrangement - Nick, do you know?
>> 
>> That sounds nothing KDF9.  See:
>> 
>> http://www.findlayw.plus.com/KDF9
> 
> Thanks for the citation. Looks like the KDF9 hardware had no display, 
> but the Whetstone system and WALGOL compiler maintained a display in 
> software. The reference explicitly cites the KDF9 WALGOL as the source 
> of the hardware display in the B6500, although I was surprised to read 
> that it was Ben Dent who put that in; I had though Bob Barton did. One 
> way or the other, it was already in by the time I arrived in Pasadena. 
> Incidentally, Ben Dent was the best boss I have ever had, bar none, and 
> extraordinary for engineering at that time, being black.

I got that story directly from Bill McKeeman.  
He also was impressed by Bill Dent, BTW.

The Whetstone people may have taken the idea of a display from Dijkstra.

--
Bill Findlay


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


#31990 — Re: Ada vs C

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2015-12-19 11:46 +0000
SubjectRe: Ada vs C
Message-ID<n53g3d$u4d$1@dont-email.me>
In reply to#31986
In article <ddkaohF6gc5U1@mid.individual.net>,
Anonymous  <no_email@invalid.invalid> wrote:
>Ivan Godard <ivan@millcomputing.com> wrote:
>> 
>> I think the KDF9 had a similar arrangement - Nick, do you know?
>
>That sounds nothing KDF9.  See:
>
>http://www.findlayw.plus.com/KDF9

Bill's the KDF9 person.  I used it, briefly, but not at any depth.

With regard to variable sized arrays and a secondary stack, this
is trivial, provides significant performance improvements with no
cost to the programmer, and God alone knows why there is so much
prejudice against it.  You need a method of passing the second stack
pointer, but a (hidden) global variable does perfectly well.

With regard to nested procedures, and referring to variables in
enclosing procedures, this was a feature of Algol 68 and will be of
the next Fortran standard.  There are several methods of doing it,
of which the simplest is to maintain a textual procedure stack.
Again, a (hidden) global variable does perfectly well.


Regards,
Nick Maclaren.

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


#31991 — Re: Ada vs C

Fromjacko <jackokring@gmail.com>
Date2015-12-19 05:59 -0800
SubjectRe: Ada vs C
Message-ID<3262ea53-bd85-4a49-b4c4-60cff39350d1@googlegroups.com>
In reply to#31990
> With regard to variable sized arrays and a secondary stack, this
> is trivial, provides significant performance improvements with no
> cost to the programmer, and God alone knows why there is so much
> prejudice against it.  You need a method of passing the second stack
> pointer, but a (hidden) global variable does perfectly well.

Pass by pointer has always made good sense to me. I think the apparent simpler algorithm with implicit cloning is one reason. Another being security services wanting complicated security holes for 'fixing' hack targets ...

> With regard to nested procedures, and referring to variables in
> enclosing procedures, this was a feature of Algol 68 and will be of
> the next Fortran standard.  There are several methods of doing it,
> of which the simplest is to maintain a (con)textual procedure stack.
> Again, a (hidden) global variable does perfectly well.

It's really only var args which prevent direct indexing ...

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


#31992 — Re: Ada vs C

Fromnmm@wheeler.UUCP (Nick Maclaren)
Date2015-12-19 14:11 +0000
SubjectRe: Ada vs C
Message-ID<n53oip$qjv$1@dont-email.me>
In reply to#31991
In article <3262ea53-bd85-4a49-b4c4-60cff39350d1@googlegroups.com>,
jacko  <jackokring@gmail.com> wrote:
>
>> With regard to nested procedures, and referring to variables in
>> enclosing procedures, this was a feature of Algol 68 and will be of
>> the next Fortran standard.  There are several methods of doing it,
>> of which the simplest is to maintain a (con)textual procedure stack.
>> Again, a (hidden) global variable does perfectly well.
>
>It's really only var args which prevent direct indexing ...

Not even them, actually!


Regards,
Nick Maclaren.

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


#31993 — Re: Ada vs C

Fromjacko <jackokring@gmail.com>
Date2015-12-19 06:29 -0800
SubjectRe: Ada vs C
Message-ID<d00336b0-3917-4d48-a9e8-89d342f14d29@googlegroups.com>
In reply to#31992
> >> With regard to nested procedures, and referring to variables in
> >> enclosing procedures, this was a feature of Algol 68 and will be of
> >> the next Fortran standard.  There are several methods of doing it,
> >> of which the simplest is to maintain a (con)textual procedure stack.
> >> Again, a (hidden) global variable does perfectly well.
> >
> >It's really only var args which prevent direct indexing ...
> 
> Not even them, actually!

In the general sense of variable arguments, a variable sized array would be a variable argument, not just a counted number of say integers which can vary. I was more implying that a procedural stack is not required, as the outer contexts can be directly indexed on most architectures. On my latest ISA design, this would not necessarily be true, and yes then a stack of frame base pointers would be needed. (the var arg being the spill from two differing calling contexts).

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


#32057 — Re: Ada vs C

Fromtimcaffrey@aol.com
Date2015-12-21 09:39 -0800
SubjectRe: Ada vs C
Message-ID<6f9179bf-9668-49af-b376-69d31ab753e5@googlegroups.com>
In reply to#31984
On Friday, December 18, 2015 at 11:29:26 PM UTC-5, Niklas Holsti wrote:
> On 15-12-19 01:01 , MitchAlsup wrote:
> > On Thursday, December 17, 2015 at 3:02:09 PM UTC-6, Niklas Holsti wrote:
> >
> >>> I most definitely do not want a visibility of local variables of
> >>> outer function in the inner function (Is what people call closures
> >>> ?). That's the feature of Pascal (inherited by Ada) that in my
> >>> experience is widely misused and very harmful for code readability.
> >>
> >> That visibility is easy to control, at least in Ada: if you don't want
> >> your local subprogram Bar to have visibility over its containing
> >> subprogram's local variable X, write the body of Bar first, and declare
> >> X after.
> >>
> >>> Nested function without such visibility appear harmless and may be
> >>> event a little useful.
> >>
> >> But it seems to me that the main reason for having nested subprograms is
> >> indeed to let those subprograms use the containing subprogram's
> >> parameters and/or local variables, without having to pass them (again)
> >> as parameters. From an object-oriented point of view, the local
> >> variables represent the state of an (anonymous) "singleton object" (in
> >> the context of a given call), and the nested subprograms are operations
> >> on this "singleton object", and therefore do not need to have this
> >> object as an explicit parameter.
> >
> > Once the interior subroutine allocates a variable sized array on the
> > stack, all of that ease of access disappears and you end up better off
> > passing the parameters copy-in.
> 
> This is taking the HW point of view, as is perhaps appropriate for 
> comp.arch. I was talking about the programmer's point of view.
> 
> But it also depends on how the SW uses the HW. As I understand it, the 
> most accessible Ada compiler (GNAT) uses a "secondary stack" to hold 
> such dynamically sized, locally created objects, with a fixed-size 
> pointer from the main stack to the secondary stack. But the same 
> referencing problem occurs if the interior subprograms are recursive. 
> Probably the interior subprogram must be passed a pointer (not visible 
> in the source code) to the stack frame of the lexically exterior subprogram.
> 

Yes, if you examine what the "enter" instruction did (added in the 186, 
removed for the x86-64), you gave it two immediate values.  One was
for how much space to allocate on the stack, the other was for how
many frame pointers to copy.  If you have a nested procedure, 
the outer procedure passed its frame pointer (and any frame pointers
for procedures outer to it) as parameters.  Provided much the same
functionality as the display registers that Ivan mentions, but they
are relative, not absolute (the B6500 required you compile the program
at a starting "lex level" because the display registers were addressed
statically).  Of course, you have to copy them over for every call, so that 
is a disadvantage.

           - Tim

Note the instruction was a convience

[toc] | [prev] | [standalone]


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

Back to top | Article view | comp.arch


csiph-web