Revision 50f67e95
b/target-arm/neon_helper.c | ||
---|---|---|
392 | 392 |
#define NEON_FN(dest, src1, src2) do { \ |
393 | 393 |
int8_t tmp; \ |
394 | 394 |
tmp = (int8_t)src2; \ |
395 |
if (tmp >= sizeof(src1) * 8 || tmp <= -sizeof(src1) * 8) { \ |
|
395 |
if (tmp >= (ssize_t)sizeof(src1) * 8 || \ |
|
396 |
tmp <= -(ssize_t)sizeof(src1) * 8) { \ |
|
396 | 397 |
dest = 0; \ |
397 | 398 |
} else if (tmp < 0) { \ |
398 | 399 |
dest = src1 >> -tmp; \ |
... | ... | |
420 | 421 |
#define NEON_FN(dest, src1, src2) do { \ |
421 | 422 |
int8_t tmp; \ |
422 | 423 |
tmp = (int8_t)src2; \ |
423 |
if (tmp >= sizeof(src1) * 8) { \ |
|
424 |
if (tmp >= (ssize_t)sizeof(src1) * 8) { \
|
|
424 | 425 |
dest = 0; \ |
425 |
} else if (tmp <= -sizeof(src1) * 8) { \ |
|
426 |
} else if (tmp <= -(ssize_t)sizeof(src1) * 8) { \
|
|
426 | 427 |
dest = src1 >> (sizeof(src1) * 8 - 1); \ |
427 | 428 |
} else if (tmp < 0) { \ |
428 | 429 |
dest = src1 >> -tmp; \ |
... | ... | |
453 | 454 |
#define NEON_FN(dest, src1, src2) do { \ |
454 | 455 |
int8_t tmp; \ |
455 | 456 |
tmp = (int8_t)src2; \ |
456 |
if (tmp >= sizeof(src1) * 8) { \ |
|
457 |
if (tmp >= (ssize_t)sizeof(src1) * 8) { \
|
|
457 | 458 |
dest = 0; \ |
458 |
} else if (tmp < -sizeof(src1) * 8) { \ |
|
459 |
} else if (tmp < -(ssize_t)sizeof(src1) * 8) { \
|
|
459 | 460 |
dest = src1 >> (sizeof(src1) * 8 - 1); \ |
460 |
} else if (tmp == -sizeof(src1) * 8) { \ |
|
461 |
} else if (tmp == -(ssize_t)sizeof(src1) * 8) { \
|
|
461 | 462 |
dest = src1 >> (tmp - 1); \ |
462 | 463 |
dest++; \ |
463 | 464 |
dest >>= 1; \ |
... | ... | |
494 | 495 |
#define NEON_FN(dest, src1, src2) do { \ |
495 | 496 |
int8_t tmp; \ |
496 | 497 |
tmp = (int8_t)src2; \ |
497 |
if (tmp >= sizeof(src1) * 8 || tmp < -sizeof(src1) * 8) { \ |
|
498 |
if (tmp >= (ssize_t)sizeof(src1) * 8 || \ |
|
499 |
tmp < -(ssize_t)sizeof(src1) * 8) { \ |
|
498 | 500 |
dest = 0; \ |
499 |
} else if (tmp == -sizeof(src1) * 8) { \ |
|
501 |
} else if (tmp == -(ssize_t)sizeof(src1) * 8) { \
|
|
500 | 502 |
dest = src1 >> (tmp - 1); \ |
501 | 503 |
} else if (tmp < 0) { \ |
502 | 504 |
dest = (src1 + (1 << (-1 - tmp))) >> -tmp; \ |
... | ... | |
528 | 530 |
#define NEON_FN(dest, src1, src2) do { \ |
529 | 531 |
int8_t tmp; \ |
530 | 532 |
tmp = (int8_t)src2; \ |
531 |
if (tmp >= sizeof(src1) * 8) { \ |
|
533 |
if (tmp >= (ssize_t)sizeof(src1) * 8) { \
|
|
532 | 534 |
if (src1) { \ |
533 | 535 |
SET_QC(); \ |
534 | 536 |
dest = ~0; \ |
535 | 537 |
} else { \ |
536 | 538 |
dest = 0; \ |
537 | 539 |
} \ |
538 |
} else if (tmp <= -sizeof(src1) * 8) { \ |
|
540 |
} else if (tmp <= -(ssize_t)sizeof(src1) * 8) { \
|
|
539 | 541 |
dest = 0; \ |
540 | 542 |
} else if (tmp < 0) { \ |
541 | 543 |
dest = src1 >> -tmp; \ |
... | ... | |
579 | 581 |
#define NEON_FN(dest, src1, src2) do { \ |
580 | 582 |
int8_t tmp; \ |
581 | 583 |
tmp = (int8_t)src2; \ |
582 |
if (tmp >= sizeof(src1) * 8) { \ |
|
584 |
if (tmp >= (ssize_t)sizeof(src1) * 8) { \
|
|
583 | 585 |
if (src1) \ |
584 | 586 |
SET_QC(); \ |
585 | 587 |
dest = src1 >> 31; \ |
586 |
} else if (tmp <= -sizeof(src1) * 8) { \ |
|
588 |
} else if (tmp <= -(ssize_t)sizeof(src1) * 8) { \
|
|
587 | 589 |
dest = src1 >> 31; \ |
588 | 590 |
} else if (tmp < 0) { \ |
589 | 591 |
dest = src1 >> -tmp; \ |
Also available in: Unified diff