dsp.cc (5563:4c4b5dfc9944) dsp.cc (5570:13592d41f290)
1/*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 909 unchanged lines hidden (view full) ---

918 uint32_t ouflag = 0;
919 int32_t result = 0;
920
921 simdUnpack(a, a_values, SIMD_FMT_PH, SIGNED);
922 simdUnpack(b, b_values, SIMD_FMT_PH, SIGNED);
923
924 for (int i = 0; i<2; i++) {
925 r_values[i] =
1/*
2 * Copyright (c) 2007 MIPS Technologies, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 909 unchanged lines hidden (view full) ---

918 uint32_t ouflag = 0;
919 int32_t result = 0;
920
921 simdUnpack(a, a_values, SIMD_FMT_PH, SIGNED);
922 simdUnpack(b, b_values, SIMD_FMT_PH, SIGNED);
923
924 for (int i = 0; i<2; i++) {
925 r_values[i] =
926 dspSaturate((int64_t)b_values[i] >> SIMD_NBITS[SIMD_FMT_QB] - 1,
926 dspSaturate((int64_t)b_values[i] >> (SIMD_NBITS[SIMD_FMT_QB] - 1),
927 SIMD_FMT_QB, UNSIGNED, &ouflag);
928 r_values[i + 2] =
927 SIMD_FMT_QB, UNSIGNED, &ouflag);
928 r_values[i + 2] =
929 dspSaturate((int64_t)a_values[i] >> SIMD_NBITS[SIMD_FMT_QB] - 1,
929 dspSaturate((int64_t)a_values[i] >> (SIMD_NBITS[SIMD_FMT_QB] - 1),
930 SIMD_FMT_QB, UNSIGNED, &ouflag);
931 }
932
933 simdPack(r_values, &result, SIMD_FMT_QB);
934
935 if (ouflag)
936 *dspctl = insertBits(*dspctl, 22, 22, 1);
937

--- 252 unchanged lines hidden ---
930 SIMD_FMT_QB, UNSIGNED, &ouflag);
931 }
932
933 simdPack(r_values, &result, SIMD_FMT_QB);
934
935 if (ouflag)
936 *dspctl = insertBits(*dspctl, 22, 22, 1);
937

--- 252 unchanged lines hidden ---