Here's a single DC instruction I've posted May 2003 [search for what's your
most difficult assembler concept]
BYTE_FLIP DS 0CL256
TDC 256AL1*-T)/001)-((*-T)/002)*2)*X'80'
(((*-T)/002)-((*-T)/004)*2)*X'40'
[mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of John Gilmore
Sent: Wednesday, July 24, 2013 10:29 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
The construction of arbitrary translation tables can be error-prone, and
when it is it is better done
In
CAE1XxDGgBNuZr4gv30WtG27jj4jqVLjBM0-qmCXOf=rz8x6...@mail.gmail.com,
on 07/23/2013
at 07:11 PM, John Gilmore jwgli...@gmail.com said:
Look at the Rotate instructions in the PrOp. RLL will do come
close to doing what you want to do.
FSVO close. Rotate has noting to do with reversing the
In 000b01ce87ee$711f3580$535da080$@mcn.org, on 07/23/2013
at 05:49 PM, Charles Mills charl...@mcn.org said:
I guess you could do it with TR (to reverse the bits) and then LRVG
(to reverse the bytes) but that is overly complex and probably slow
(IMHO).
It's faster than move inverse, translate
In 1482096876342980.wa.paulgboulderaim@listserv.ua.edu, on
07/24/2013
at 09:25 AM, Paul Gilmartin paulgboul...@aim.com said:
One TR to reverse the bytes,
Why, Isn't LRVG a lor faster and more concise?
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
Atid/2
In 51ef18aa.2060...@gmail.com, on 07/24/2013
at 07:58 AM, David Crayford dcrayf...@gmail.com said:
There's a RLLG instruction to rotate the bits in a 64-bit integer.
It doesn't *reverse* the bits, which is what the OP needs.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
Atid/2
In 023901ce8876$0099c900$01cd5b00$@mcn.org, on 07/24/2013
at 09:59 AM, Charles Mills charl...@mcn.org said:
Agreed in principle. I would probably use Rexx to create it.
I would create the TR table in a macro, or the inline equivalent.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
In
CAE1XxDHWvp88UB4cB69Z0JbDaFE4mtv4eB+ViH=s3xxcttf...@mail.gmail.com,
on 07/24/2013
at 11:29 AM, John Gilmore jwgli...@gmail.com said:
Here, however, we have for a TROO
Why TROO rather than TR?
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
Atid/2http://patriot.net/~shmuel
In
cae1xxdhosowjbjwsbdfaqjtt2namcqjsbg2y78y7heomz3a...@mail.gmail.com,
on 07/23/2013
at 08:07 PM, John Gilmore jwgli...@gmail.com said:
I am happy to have David join in my recommendation, and I can imagine
a circumstance in which RLLG would be more useful than RLL, but RLL
itself does 64-bit
So, no need for any macro at all to generate the byte bit reversal TRT
table! I must have skipped over or forgotten the 2003 posting.
This is just totally awesome, especially the redundant unary +'s to
force decent alignment for readability. Had to actually run it with
PRINT DATA to convince
On 13Jul24:1022+0800, David Crayford wrote:
It's easy to do on X86 or ARM architectures which have instructions
for scanning, counting and reversing bits
https://github.com/facebook/hiphop-php/blob/master/hphp/util/bitops.h.
Now I'm interested in what is the most efficient way to do this on
How fast does this code need to be? David's ffs64 looked pretty good to
my inexpert eye, I think you would have to be running it very frequently
for something to be measurably faster.
There are some similar discussions here, including some branchless
techniques that probably would be faster
@LISTSERV.UA.EDU] On
Behalf Of Andrew Rowley
Sent: Wednesday, July 24, 2013 8:17 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
How fast does this code need to be? David's ffs64 looked pretty good to my
inexpert eye, I think you would have to be running it very
to programming.
Charles
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Andrew Rowley
Sent: Wednesday, July 24, 2013 8:17 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
How fast does this code need
save me hours
debugging later.
Kenneth
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Charles Mills
Sent: Wednesday, July 24, 2013 7:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
Thanks
: Is there a reverse bits hardware instruction?
I can't imagine any instruction sequence in any language performing a Load
Reversed with Mirrored Bytes more efficiently in the Z/Architecture than a
STG, TR for eight bytes and LRVG. Even though, the TR is probably
micro-coded (I don't know about the LRVG), I
@LISTSERV.UA.EDU
:: Subject: Is there a reverse bits hardware instruction?
snip
:: Why? Those of you following another thread I started know I am looking
:: to
:: implement a 64-bit version of the UNIX library function ffs(), which
:: returns
:: the bit number of the least significant one bit
[mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Andrew Rowley
Sent: Wednesday, July 24, 2013 8:17 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
How fast does this code need to be? David's ffs64 looked pretty good to my
inexpert eye, I think you would
On Wed, 24 Jul 2013 04:27:16 -0400, David L. Craig wrote:
A TR instruction that uses a 256-byte table of the reversed
byte values will handle up to 256 bytes, IIRC.
One TR to reverse the bytes, then a second TR to reverse
the bits, plus various MVC for setup.
-- gil
On Wed, 24 Jul 2013 08:42:55 -0500, Kenneth Wilkerson wrote:
However, in your initial post you talked about the above sequence involving
the TR being complex. I assume you're talking about the translate table
itself. When I need translate tables that are not simple and particularly
error prone, I
MVCIN will reverse the bytes.
On Wed, Jul 24, 2013 at 9:25 AM, Paul Gilmartin paulgboul...@aim.comwrote:
On Wed, 24 Jul 2013 04:27:16 -0400, David L. Craig wrote:
A TR instruction that uses a 256-byte table of the reversed
byte values will handle up to 256 bytes, IIRC.
One TR to reverse
The construction of arbitrary translation tables can be error-prone,
and when it is it is better done procedurally. I use the HLASM macro
language, which is entirely adequate to such tasks; mais à chacun son
goût.
Here, however, we have for a TROO only the 256 permutations taken two
at a time of
counterintuitive.
Charles
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of retired mainframer
Sent: Wednesday, July 24, 2013 10:09 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
Could you please
Of course there is. XI (EXCLUSIVE OR IMMEDIATE) and XC (EXCLUSIVE OR
CHARACTER).
Where's Steve Comstock when you need him?
Gene Lynd
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to
He's reading the op?
Charles
Composed on a mobile: please excuse my brevity
Lynd, Eugene C. eugene.c.l...@saic.com wrote:
Of course there is. XI (EXCLUSIVE OR IMMEDIATE) and XC (EXCLUSIVE OR
CHARACTER).
Where's Steve Comstock when you need him?
Gene Lynd
On 7/24/2013 11:59 AM, Charles Mills wrote:
He's reading the op?
Charles
Composed on a mobile: please excuse my brevity
Lynd, Eugene C. eugene.c.l...@saic.com wrote:
Of course there is. XI (EXCLUSIVE OR IMMEDIATE) and XC (EXCLUSIVE OR
CHARACTER).
Where's Steve Comstock when you need him?
On Wed, 24 Jul 2013 12:54:06 -0500, Kenneth Wilkerson wrote:
The macro at the end of my reply will generate a reverse translate table.
(snip)
MACRO
LABEL REVTABLE ,
* Construct reverse bits translate table
(snip)
That's a beauty.
Bill
Is there a quick way to reverse MSB to LSB the bits of a 64-bit register? If
I have a register that contains 01234567_89ABCDEF to convert it to
F7B3D591_E6A2C480? (I think I got that at least mostly right.) A bit-wise
Load Reversed?
Yes, I am familiar with the Pops. Hard to find an instruction
Look at the Rotate instructions in the PrOp. RLL will do come close
to doing what you want to do.
John Gilmore, Ashland, MA 01721 - USA
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to
On Tue, 23 Jul 2013 17:49:00 -0400, Charles Mills wrote:
Why? Those of you following another thread I started know I am looking to
implement a 64-bit version of the UNIX library function ffs(), which returns
the bit number of the least significant one bit of a word. z architecture
provides the
: Is there a reverse bits hardware instruction?
On Tue, 23 Jul 2013 17:49:00 -0400, Charles Mills wrote:
Why? Those of you following another thread I started know I am looking
to implement a 64-bit version of the UNIX library function ffs(), which
returns the bit number of the least significant one
On Tue, 23 Jul 2013 19:22:49 -0400, John P. Baker wrote:
The maximum negative value must also be treated as a special case.
I concluded that in a mental simulation after I pressed SEND. This
is why boundary conditions should be tested.
I also should have said Subtract Logical rather than
There's a RLLG instruction to rotate the bits in a 64-bit integer. I
know that you want to call such a routine from C/C++. If you need to
write ffs64() in assembler
you may find the linkage overhead of calling the routine is far greater
than a slower implementation that has been inlined. It's
I am happy to have David join in my recommendation, and I can imagine
a circumstance in which RLLG would be more useful than RLL, but RLL
itself does 64-bit rotations.
John Gilmore, Ashland, MA 01721 - USA
--
For IBM-MAIN
Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of David Crayford
Sent: Tuesday, July 23, 2013 7:59 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
There's a RLLG instruction to rotate the bits in a 64-bit integer. I know
that you want to call
Hmmm. Have to think that one through. Thanks.
Charles
-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of Paul Gilmartin
Sent: Tuesday, July 23, 2013 7:13 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware
On 24/07/2013 8:07 AM, John Gilmore wrote:
I am happy to have David join in my recommendation, and I can imagine
a circumstance in which RLLG would be more useful than RLL, but RLL
itself does 64-bit rotations.
Sorry John, I didn't see your recommendation. Of course you are right
RLL can
@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
There's a RLLG instruction to rotate the bits in a 64-bit integer. I know
that you want to call such a routine from C/C++. If you need to write
ffs64() in assembler you may find the linkage overhead of calling the
routine is far
-MAIN@LISTSERV.UA.EDU] On
Behalf Of John Gilmore
Sent: Tuesday, July 23, 2013 7:11 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Is there a reverse bits hardware instruction?
Look at the Rotate instructions in the PrOp. RLL will do come close to
doing what you want to do.
John Gilmore, Ashland, MA
It's easy to do on X86 or ARM architectures which have instructions for
scanning, counting and reversing bits
https://github.com/facebook/hiphop-php/blob/master/hphp/util/bitops.h.
Now I'm interested in what is the most efficient way to do this on
zArch. I thought zArch was king of the CISC.
40 matches
Mail list logo