Skip to content

Commit 3cd97f1

Browse files
authored
Merge pull request #2301 from martin-frbg/ppc8be
Disable IDAMIN/MAX and IZAMIN/MAX optimizations on big-endian POWER8
2 parents 9955f09 + 6859700 commit 3cd97f1

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

kernel/power/idamax.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,15 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) {
324324

325325
if (inc_x == 1) {
326326

327+
#if defined(_CALL_ELF) && (_CALL_ELF == 2)
327328
BLASLONG n1 = n & -32;
328329
if (n1 > 0) {
329330

330331
max = diamax_kernel_32(n1, x, &maxf);
331332

332333
i = n1;
333334
}
334-
335+
#endif
335336
while (i < n) {
336337
if (ABS(x[i]) > maxf) {
337338
max = i;

kernel/power/idamin.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,15 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) {
326326
minf = ABS(x[0]); //index's not incremented
327327
if (inc_x == 1) {
328328

329+
#if defined(_CALL_ELF) && (_CALL_ELF == 2)
329330
BLASLONG n1 = n & -32;
330331
if (n1 > 0) {
331332

332333
min = diamin_kernel_32(n1, x, &minf);
333334
i = n1;
334335
}
335-
336+
#endif
337+
336338
while (i < n) {
337339
if (ABS(x[i]) < minf) {
338340
min = i;

kernel/power/izamax.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,15 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
316316

317317
if (inc_x == 1) {
318318

319+
#if defined(_CALL_ELF) && (_CALL_ELF == 2)
319320
BLASLONG n1 = n & -16;
320321
if (n1 > 0) {
321322

322323
max = ziamax_kernel_16(n1, x, &maxf);
323324
i = n1;
324325
ix = n1 << 1;
325326
}
327+
#endif
326328

327329
while(i < n)
328330
{

kernel/power/izamin.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,16 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
314314

315315
if (inc_x == 1) {
316316
minf = CABS1(x,0); //index will not be incremented
317+
318+
#if defined(_CALL_ELF) && (_CALL_ELF == 2)
317319
BLASLONG n1 = n & -16;
318320
if (n1 > 0) {
319321

320322
min = ziamin_kernel_16_TUNED(n1, x, &minf);
321323
i = n1;
322324
ix = n1 << 1;
323325
}
324-
326+
#endif
325327

326328
while(i < n)
327329
{

0 commit comments

Comments
 (0)