In article 
<CAAJSdjjjH6CZfpbbKdJCZbKnj0A9bjypHoOPqfAcfTyJ4_=u...@mail.gmail.com> you wrote:
> On Tue, Jun 19, 2018 at 3:18 PM Farley, Peter x23353 <
> peter.far...@broadridge.com> wrote:
> > The recent discussion about the ability (or not) of setting R14 values in
> > dbx at a break point while debugging brought me back to an old and (for me)
> > somewhat sore subject.
> >
> > The z/Architecture hardware designers graced us with TRAP and TRAP4 and
> > then with compare-and-trap instructions in the hardware.
> >
> > z/OS has yet to provide ordinary application-mode programmers (or for that
> > matter compiler and debugger writers) with the tools to use these hardware
> > features.  Because updates to the DUCT are needed to properly utilize the
> > TRAP features, only supervisor-state code (and therefore only
> > APF-authorized code) can use these facilities in current z/OS versions,
> > leaving ordinary application programmers with no way to use any of these
> > hardware features..
> >
> > When will z/OS provide application programmers (and others) the tools to
> > utilize TRAP and friends?
> >
> > Inquiring minds would love to know.
> >
> ???I totally agree. This would make it easy to "trap" a C language style
> "null pointer" dereferencing. A simple " CIT Rn,0,0" after doing a load of
> the pointer. Or, after looking, a LAT or LGAT, which does an automatic
> compare against 0, would make the C language much safer! All at "no cost"
> to the compiler writers. However, this is assuming that the use of the TRAP
> facility is relatively "cost free". I know that in the past, the SLIP IF
> function was strongly discouraged because it use PER (Program Event
> Recording?) which caused _significant_ CPU overhead. But that was back in
> the 3090 days. I don't know as much about the z13+ internals. In fact,
> perhaps CPU/performance impact is the reason that IBM doesn't make this
> GUPI. Because GUPI implies "yes, feel free to use this anywhere you think
> it makes sense" and if you get a 20% CPU hit, people will respond by
> hitting back.
> >
> > Peter
> >
> -- 
> There is no such thing as the Cloud. It is just somebody else???s computer.
> Maranatha! <><
> John McKown

You'd also want to have some language feature that _wouldn't_ trap if
you _intend_ to do a "null pointer" dereference. After all, the first
page of memory is where lots of good stuff lives. :) 

Also, I'm not sure how widely this is used, but we've gotten a lot of use
out of it. "SLIP zero address detection (ZAD)"

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieag100/zaduse.htm

-- 
Don Poitras - SAS Development  -  SAS Institute Inc. - SAS Campus Drive
sas...@sas.com           (919) 531-5637                Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to