I am familiar with the existence of the instructions.

I agree with @Peter Farley. We need support at the OS level. Then LE could 
leverage that.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Tony Harminc
Sent: Wednesday, September 9, 2020 2:49 PM
To: [email protected]
Subject: Re: Deep Cuts

On Wed, 9 Sep 2020 at 17:30, Charles Mills <[email protected]> wrote:

I think faulting on dereferencing 0 is a hardware function and yes, most
> hardware does so. Not so Z, where traditionally much of the "API" is
> chained off of the PSA.e unable to reference the PSA via a pointer variable.
>

Newish zArch has  a number of instructions of the form xxx AND TRAP, where
xxx is COMPARE or LOAD with various modifiers. These fault upon a zero
result, but lead to a "compare-and-trap-instruction data exception" rather
than, say, an addressing or protection exception. I don't know if the C
compiler can be convinced to emit them, and if there is z/OS infrastructure
to capture the resulting exceptions.

Tony H.

Reply via email to