Re: Bounds checking, Optimization techniques and undefined behavior

George Neuner <gneuner2@comcast.net>
Sun, 05 May 2019 17:10:04 -0400

          From comp.compilers

Related articles
[8 earlier articles]
Re: Optimization techniques and undefined behavior anw@cuboid.co.uk (Andy Walker) (2019-05-02)
Re: Optimization techniques and undefined behavior bc@freeuk.com (Bart) (2019-05-03)
Re: Optimization techniques and undefined behavior martin@gkc.org.uk (Martin Ward) (2019-05-03)
Re: Optimization techniques and undefined behavior gneuner2@comcast.net (George Neuner) (2019-05-04)
Re: Bounds checking, Optimization techniques and undefined behavior bc@freeuk.com (Bart) (2019-05-05)
Re: Bounds checking, Optimization techniques and undefined behavior DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-05-05)
Re: Bounds checking, Optimization techniques and undefined behavior gneuner2@comcast.net (George Neuner) (2019-05-05)
Re: Bounds checking, Optimization techniques and undefined behavior gneuner2@comcast.net (George Neuner) (2019-05-05)
Re: Bounds checking, Optimization techniques and undefined behavior anw@cuboid.co.uk (Andy Walker) (2019-05-06)
Re: Bounds checking, Optimization techniques and undefined behavior DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-05-06)
Re: Bounds checking, Optimization techniques and undefined behavior christopher.f.clark@compiler-resources.com (Christopher F Clark) (2019-05-06)
Re: Bounds checking, Optimization techniques and undefined behavior bc@freeuk.com (Bart) (2019-05-06)
Re: Bounds checking, Optimization techniques and undefined behavior 0xe2.0x9a.0x9b@gmail.com (Jan Ziak) (2019-05-06)
[19 later articles]
| List of all articles for this month |

From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Sun, 05 May 2019 17:10:04 -0400
Organization: A noiseless patient Spider
References: 19-04-021 19-04-023 19-04-037 19-04-039 19-04-042 19-04-044 19-04-047 19-05-004 19-05-006 19-05-016 19-05-017 19-05-026
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="18150"; mail-complaints-to="abuse@iecc.com"
Keywords: hardware, debug, comment
Posted-Date: 05 May 2019 21:39:41 EDT

>[Are you referring to the old BOUND instruction or the newer MPX feature. -John]


Mostly I was referring to the new(ish, Skylake and later) MPX stuff.


The larger point is that the architecture had at least some ability to
check bounds in hardware for a very long time: BOUND existed at least
from i286 onward (if not before). 64-bit mode dropped it, but the
need for *something* to do the same job was deemed great enough that
the MPX extensions were introduced.


The MPX approach is more flexible and faster than BOUND was ... but it
still is far too slow for heavy use. IMO it just rehashes many of the
old problems that existed with segments: programmer visible registers,
too few of them, too complicated setup of data structures in memory,
etc.


YMMV,
George
[Bounds checking in the x86 is pretty old. It wasn't in the 8086/88 but
it was in the 286. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.