diff options
author | Damir Tatalovic <dtatalovic@mips.com> | 2012-03-02 17:43:52 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-22 18:59:45 +0100 |
commit | fa8e18c3860d8c43795152da1d4c38dc1471f320 (patch) | |
tree | c2faf1b7d72c5e6b612e1985ff4611a48a2937ec /src/gui/painting/qdrawhelper_mips_dspr2_asm.S | |
parent | 3b2ccf1277e1d673a0a4bcfd81565fc7cf5cc5a6 (diff) |
MIPS DSP configure detection and initial blend optimizations.
Adds new MIPS configure test and -no-mips_dsp and -no-mips_dspr2
configure options.
List of optimized implementations:
- comp_func_SourceOver
- comp_func_Source
- qt_memfill32
- qt_destFetchARGB32
- qt_destStoreARGB32
- blend [RGB32][RGB32]
- blend [ARGB32_Pre][RGB32]
- blend [RGB32][ARGB32_Pre]
- blend [ARGB32_Pre][ARGB32_Pre]
Change-Id: I35411858295b7b3f4895eb56e3b93397528903cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qdrawhelper_mips_dspr2_asm.S')
-rw-r--r-- | src/gui/painting/qdrawhelper_mips_dspr2_asm.S | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper_mips_dspr2_asm.S b/src/gui/painting/qdrawhelper_mips_dspr2_asm.S new file mode 100644 index 0000000000..688d16b552 --- /dev/null +++ b/src/gui/painting/qdrawhelper_mips_dspr2_asm.S @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2012 MIPS Technologies, www.mips.com, author Damir Tatalovic <dtatalovic@mips.com> +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qt_mips_asm_dsp.h" + +LEAF_MIPS_DSPR2(INTERPOLATE_PIXEL_255_asm_mips_dspr2) +/* + * a0 - uint x (First value to multiply) + * a1 - uint a (Multiplicator byte for first value) + * a2 - uint y (Second value to multiply) + * a3 - uint b (Multiplicator byte for second value) + */ + + .set reorder + replv.ph a1, a1 + replv.ph a3, a3 + li t8, 8388736 + muleu_s.ph.qbl t0, a0, a1 + muleu_s.ph.qbl t1, a2, a3 + muleu_s.ph.qbr t2, a0, a1 + muleu_s.ph.qbr t3, a2, a3 + addu.ph t4, t0, t1 + addu.ph t5, t2, t3 + preceu.ph.qbla t0, t4 + addu t1, t0, t8 + addu t1, t4, t1 + preceu.ph.qbla t6, t5 + addu t7, t6, t8 + addu t7, t5, t7 + precrq.qb.ph t2, t1, t7 + move v0, t2 + j ra + +END(INTERPOLATE_PIXEL_255_asm_mips_dspr2) + +LEAF_MIPS_DSPR2(BYTE_MUL_asm_mips_dspr2) +/* + * a0 - uint x (Value to multiply) + * a1 - uint a (Multiplicator byte) + */ + + .set reorder + replv.ph a1, a1 /* a1 = 0x00a00a */ + li t4, 8388736 /* t4 = 0x800080 */ + muleu_s.ph.qbl t0, a0, a1 + muleu_s.ph.qbr t2, a0, a1 + preceu.ph.qbla t1, t0 + addu t0, t0, t1 + addu t0, t0, t4 + preceu.ph.qbla t3, t2 + addu t2, t2, t3 + addu t2, t2, t4 + precrq.qb.ph t4, t0, t2 + move v0, t4 + j ra + +END(BYTE_MUL_asm_mips_dspr2) |