I would allow it as long as the comments were clear. Just as I would allow the 
BXH/BXLE hack for bit testing with adequate comment.

-- 
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר




________________________________________
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> on behalf 
of Charles Mills <charl...@mcn.org>
Sent: Saturday, August 2, 2025 9:54 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Subject: Re: Execute-Type Instructions


External Message: Use Caution


I think I recall code back in the day that did clever "computed branch" logic 
by making a BC or BCR instruction the target of EX.

I would defenestrate any programmer that did that sort of thing today.

Charles

-----Original Message-----
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> On Behalf 
Of Dan Greiner
Sent: Friday, August 1, 2025 8:39 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Execute-Type Instructions

As is well known to subscribers of the Assembler List, the EXECUTE instruction 
(EX) – and the (relatively) new variant of EXECUTE RELATIVE LONG (EXRL) – 
provide an extremely powerful means of altering the behavior of a target 
instruction by ORing the contents of a the rightmost bits of the first operand 
of the execute-type instruction into bits 8-15 of the target instruction. 
Common uses include modifying the length(s) of an SS-format instruction, the 
register(s), mask, or immediate field of RR, RX, SI, and many other formats of 
instructions (it is also sufficiently complex that it drives CPU designers 
slightly nuts).

One reason an execute-type instruction is particularly tricky is that certain 
instruction formats contain part of the operation code in bits 8-15, thus the 
actual target instruction executed may not be that which appears in the memory. 
This can occur when the target instruction format is IE, RI, RIL, RRD, RRE, 
RRF, S, SIL, SSE, and SSF.

My question is (aside from IBM diagnostics) does anybody actually exploit this 
sort of chicanery/guile/subterfuge in their code?


Reply via email to