Red Hat Bugzilla – Bug 486223
[LTC 6.0 FEAT] 201837: Exploit byte swap instructions lrv, lrvg
Last modified: 2013-03-07 21:05:11 EST
Hans-Georg Markgraf <email@example.com> -
1. Feature Overview:
Feature Id: 
a. Name of Feature: Exploit byte swap instructions lrv, lrvg
b. Feature Description
Provides exploitation for the hardware instructions in System z architecture for performing byte
swap operations on memory and register operands. In order to make use of it the instructions have to
be integrated in the GCC back end machine description file. The instruction then is used for
implementing the GCC specific bswap family of builtins. That way programmers can directly trigger
usage of the instruction. Although this is useful for programmers aware of these builtins a better
way is to enable GCC to be able to recognized "manual" byte swapping implementations as well. In
order to do so GCC has to deal with combinations of shift and or operations which appear when
someone implements byte swapping "by hand". The item also covers the GCC enhancement which are
necessary to recognized these patterns and map it to a hardware byte swapping implementation.
2. Feature Details:
Arch Specificity: Purely Arch Specific Code
Affects Toolchain: Yes
Delivery Mechanism: Backport
Request Type: Toolchain - Enhancement from IBM
Documentation work: yes
d. Upstream Acceptance: Submitted
Sponsor Priority 1
f. Severity: High
IBM Confidential: no
Code Contribution: IBM code
g. Component Version Target: gcc 4.5
3. Business Case
This feature provides improved performance by using a HW instruction for commonly used task, not
only manually triggered by the programmed, but also automatically when the compiler sense the pattern.
4. Primary contact at Red Hat:
5. Primary contacts at Partner:
Project Management Contact:
Hans-Georg Markgraf, firstname.lastname@example.org, Boeblingen 49-7031-16-3978
Gonzalo Muelas Serrano, email@example.com
Thomas Schwarz, firstname.lastname@example.org
Hello Red Hat,
the GCC System z developer has updated that for this item there was a Middle-end Part that is should be backported for GCC 4.4, but it has been rejected upstream and apparently it is not anymore important for System z.
The Back-end part is already in GCC 4.4, so if RHEL 6 takes GCC 4.4 this feature will be included automatically.
RHEL 6 will include at least gcc-4.4, so marking as MODIFIED.
The feature requested has already been accepted into the upstream code base
planned for the next major release of Red Hat Enterprise Linux.
When the next milestone release of Red Hat Enterprise Linux 6 is available,
please verify that the feature requested is present and functioning as
comes via upstream gcc 4.4
therefore no code attach to feature BZ
Fixed in 'gcc-4.4.1-22.el6', included in compose 'RHEL6.0-20091028.0'.
Moving to ON_QA.
IBM is signed up to test and provide feedback.
------- Comment From email@example.com 2010-06-23 08:10 EDT-------
This feature is verified on R6 snapshots
Set feature to "verified" Thx
Setting Verified flag based on IBM's feedback
------- Comment From firstname.lastname@example.org 2010-06-23 11:12 EDT-------
The bswap recognition pass does not seem to be part of the RHEL6 GCC. However the lrv and lrvg instructions are supported.
------- Comment From email@example.com 2010-06-23 11:21 EDT-------
Re-reading comment #4 we obviously already decided that the bswap recognizer part is not important enough to be backported to 4.4 and I agree with that. So the feature is already complete with just supporting the hardware instructions as part of the back-end. I'll close the bz again.
Sorry for the confusion.
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.