[PowerPC64] restrict memcpy/bcopy optimization to POWER ISA >=V2.07
VSX instructions were added in POWER ISA V2.06 (POWER7), but it requires data to be word-aligned. Such requirement was removed in ISA V2.07B (POWER8). Since current memcpy/bcopy optimization relies on VSX instructions handling misalignment transparently, and kernel doesn't currently implement an alignment error handler, this optimzation should be restrict to ISA V2.07 onwards. SIGBUS on stxvd2x instruction was reproduced in POWER7+ CPU. Reviewed by: luporl, jhibbits, bdragon Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D23958
This commit is contained in:
parent
5554f4cc45
commit
2b37373c48
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358672
@ -61,7 +61,12 @@ FN_RET FN_NAME_VSX FN_PARAMS;
|
||||
|
||||
DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS)
|
||||
{
|
||||
if (cpu_features & PPC_FEATURE_HAS_VSX)
|
||||
/* VSX instructions were added in POWER ISA 2.06,
|
||||
* however it requires data to be word-aligned.
|
||||
* Since POWER ISA 2.07B this is solved transparently
|
||||
* by the hardware
|
||||
*/
|
||||
if (cpu_features2 & PPC_FEATURE2_ARCH_2_07)
|
||||
return (FN_NAME_VSX);
|
||||
else
|
||||
return (FN_NAME_NOVSX);
|
||||
|
Loading…
Reference in New Issue
Block a user