This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][BZ 6411] Dynamic selection of mtfsf insn based on 64-bitFPSCR availability with test-case


Ulrich, et al.

I would like the following patch from bugzilla bug 6411 considered for
checkin:

http://sourceware.org/bugzilla/attachment.cgi?id=3061&action=view

The patch dynamically selects the correct mtfsf (Move To FPSCR Fields)
assembler instruction for PowerPC based upon the size of the FPSCR as
indicated by the hwcap PPC_FEATURE_HAS_DFP.  You can find the bugzilla
entry here:

http://sourceware.org/bugzilla/show_bug.cgi?id=6411

The test case verifies the proper behavior of [set|get|swap]context in
the following scenarios:

power5 -m32 --enable-kernel=2.4.21 [32-bit FPSCR]
power5 -m64 --enable-kernel=2.4.21 [32-bit FPSCR]
power5 -m32 --enable-kernel=2.6.16 [32-bit FPSCR]
power5 -m64 --enable-kernel=2.6.16 [32-bit FPSCR]

power6 -m32 --enable-kernel=2.4.21 [64-bit FPSCR]
power6 -m64 --enable-kernel=2.4.21 [64-bit FPSCR]
power6 -m32 --enable-kernel=2.6.16 [64-bit FPSCR]
power6 -m64 --enable-kernel=2.6.16 [64-bit FPSCR]

power6 -mcpu=power6 -m32 --enable-kernel=2.4.21 [64-bit FPSCR]
power6 -mcpu=power6 -m64 --enable-kernel=2.4.21 [64-bit FPSCR]
power6 -mcpu=power6 -m32 --enable-kernel=2.6.16 [64-bit FPSCR]
power6 -mcpu=power6 -m64 --enable-kernel=2.6.16 [64-bit FPSCR]

This represents all of the relevant permutations that I can think of.

2.4.21 is prior to the swapcontext syscall so it tests the
[get|set|swap]context-common code path.

2.6.16 contains the swapcontext syscall so it tests the syscall path for
said function invocations.

The -mcpu=power6 switch indicates that this GLIBC is built for ISA 2.05
compliance at a minimum, whereby a dynamic check for the 64-bit FPSCR
doesn't need to be made since ISA 2.05 and later have a 64-bit FPSCR by
default.

This patch also fixes a latent bug in PowerPC assembler files (mostly in
the context routines) where the hwcap is being read improperly due to a
change in the size of the _dl_hwcap element of the rtld_global_ro struct
from unsigned long to uint64_t 3 years, 7 months ago.

This patch series is a year old.  I'd like some closure on this issue
soon if possible.  I think I've satisfied all of your concerns at this
point.

Regards,

Ryan S. Arnold
IBM Linux Technology Center



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]