os/kernelhwsrv/kerneltest/e32test/math/t_vfp.cia
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/math/t_vfp.cia	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1148 @@
     1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32test\math\t_vfp.cia
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#include "t_vfp.h"
    1.22 +#include <u32std.h>
    1.23 +
    1.24 +#define __TEST_VFPV3
    1.25 +
    1.26 +#define _DIE(x)	asm(".word %a0" : : "i" ((TInt)( 0xe7f000f0|((x)&0x0f)|(((x)&0xfff0)<<4) )));
    1.27 +#define DIE		_DIE(__LINE__);
    1.28 +
    1.29 +/******************************************************************************
    1.30 + * Control registers
    1.31 + ******************************************************************************/
    1.32 +__NAKED__ TUint32 Vfp::Fpscr()
    1.33 +	{
    1.34 +	VFP_FMRX(,0,VFP_XREG_FPSCR);
    1.35 +	__JUMP(,lr);
    1.36 +	}
    1.37 +
    1.38 +__NAKED__ void Vfp::SetFpscr(TUint32 /*aVal*/)
    1.39 +	{
    1.40 +	VFP_FMXR(,VFP_XREG_FPSCR,0);
    1.41 +	__JUMP(,lr);
    1.42 +	}
    1.43 +
    1.44 +/******************************************************************************
    1.45 + * Single precision operations
    1.46 + ******************************************************************************/
    1.47 +__NAKED__ TInt32 Vfp::SRegInt(TInt /*aReg*/)
    1.48 +	{
    1.49 +	// fall through
    1.50 +	}
    1.51 +
    1.52 +__NAKED__ TReal32 Vfp::SReg(TInt /*aReg*/)
    1.53 +	{
    1.54 +	asm("cmp r0, #31 ");
    1.55 +	asm("addls pc, pc, r0, lsl #3 ");
    1.56 +	DIE;
    1.57 +	VFP_FMRS(CC_AL,0,0);
    1.58 +	__JUMP(,lr);
    1.59 +	VFP_FMRS(CC_AL,0,1);
    1.60 +	__JUMP(,lr);
    1.61 +	VFP_FMRS(CC_AL,0,2);
    1.62 +	__JUMP(,lr);
    1.63 +	VFP_FMRS(CC_AL,0,3);
    1.64 +	__JUMP(,lr);
    1.65 +	VFP_FMRS(CC_AL,0,4);
    1.66 +	__JUMP(,lr);
    1.67 +	VFP_FMRS(CC_AL,0,5);
    1.68 +	__JUMP(,lr);
    1.69 +	VFP_FMRS(CC_AL,0,6);
    1.70 +	__JUMP(,lr);
    1.71 +	VFP_FMRS(CC_AL,0,7);
    1.72 +	__JUMP(,lr);
    1.73 +	VFP_FMRS(CC_AL,0,8);
    1.74 +	__JUMP(,lr);
    1.75 +	VFP_FMRS(CC_AL,0,9);
    1.76 +	__JUMP(,lr);
    1.77 +	VFP_FMRS(CC_AL,0,10);
    1.78 +	__JUMP(,lr);
    1.79 +	VFP_FMRS(CC_AL,0,11);
    1.80 +	__JUMP(,lr);
    1.81 +	VFP_FMRS(CC_AL,0,12);
    1.82 +	__JUMP(,lr);
    1.83 +	VFP_FMRS(CC_AL,0,13);
    1.84 +	__JUMP(,lr);
    1.85 +	VFP_FMRS(CC_AL,0,14);
    1.86 +	__JUMP(,lr);
    1.87 +	VFP_FMRS(CC_AL,0,15);
    1.88 +	__JUMP(,lr);
    1.89 +	VFP_FMRS(CC_AL,0,16);
    1.90 +	__JUMP(,lr);
    1.91 +	VFP_FMRS(CC_AL,0,17);
    1.92 +	__JUMP(,lr);
    1.93 +	VFP_FMRS(CC_AL,0,18);
    1.94 +	__JUMP(,lr);
    1.95 +	VFP_FMRS(CC_AL,0,19);
    1.96 +	__JUMP(,lr);
    1.97 +	VFP_FMRS(CC_AL,0,20);
    1.98 +	__JUMP(,lr);
    1.99 +	VFP_FMRS(CC_AL,0,21);
   1.100 +	__JUMP(,lr);
   1.101 +	VFP_FMRS(CC_AL,0,22);
   1.102 +	__JUMP(,lr);
   1.103 +	VFP_FMRS(CC_AL,0,23);
   1.104 +	__JUMP(,lr);
   1.105 +	VFP_FMRS(CC_AL,0,24);
   1.106 +	__JUMP(,lr);
   1.107 +	VFP_FMRS(CC_AL,0,25);
   1.108 +	__JUMP(,lr);
   1.109 +	VFP_FMRS(CC_AL,0,26);
   1.110 +	__JUMP(,lr);
   1.111 +	VFP_FMRS(CC_AL,0,27);
   1.112 +	__JUMP(,lr);
   1.113 +	VFP_FMRS(CC_AL,0,28);
   1.114 +	__JUMP(,lr);
   1.115 +	VFP_FMRS(CC_AL,0,29);
   1.116 +	__JUMP(,lr);
   1.117 +	VFP_FMRS(CC_AL,0,30);
   1.118 +	__JUMP(,lr);
   1.119 +	VFP_FMRS(CC_AL,0,31);
   1.120 +	__JUMP(,lr);
   1.121 +	}
   1.122 +
   1.123 +__NAKED__ void Vfp::SetSReg(TInt32 /*aVal*/, TInt /*aReg*/)
   1.124 +	{
   1.125 +	// fall through
   1.126 +	}
   1.127 +
   1.128 +__NAKED__ void Vfp::SetSReg(TReal32 /*aVal*/, TInt /*aReg*/)
   1.129 +	{
   1.130 +	asm("cmp r1, #31 ");
   1.131 +	asm("addls pc, pc, r1, lsl #3 ");
   1.132 +	DIE;
   1.133 +	VFP_FMSR(CC_AL,0,0);
   1.134 +	__JUMP(,lr);
   1.135 +	VFP_FMSR(CC_AL,1,0);
   1.136 +	__JUMP(,lr);
   1.137 +	VFP_FMSR(CC_AL,2,0);
   1.138 +	__JUMP(,lr);
   1.139 +	VFP_FMSR(CC_AL,3,0);
   1.140 +	__JUMP(,lr);
   1.141 +	VFP_FMSR(CC_AL,4,0);
   1.142 +	__JUMP(,lr);
   1.143 +	VFP_FMSR(CC_AL,5,0);
   1.144 +	__JUMP(,lr);
   1.145 +	VFP_FMSR(CC_AL,6,0);
   1.146 +	__JUMP(,lr);
   1.147 +	VFP_FMSR(CC_AL,7,0);
   1.148 +	__JUMP(,lr);
   1.149 +	VFP_FMSR(CC_AL,8,0);
   1.150 +	__JUMP(,lr);
   1.151 +	VFP_FMSR(CC_AL,9,0);
   1.152 +	__JUMP(,lr);
   1.153 +	VFP_FMSR(CC_AL,10,0);
   1.154 +	__JUMP(,lr);
   1.155 +	VFP_FMSR(CC_AL,11,0);
   1.156 +	__JUMP(,lr);
   1.157 +	VFP_FMSR(CC_AL,12,0);
   1.158 +	__JUMP(,lr);
   1.159 +	VFP_FMSR(CC_AL,13,0);
   1.160 +	__JUMP(,lr);
   1.161 +	VFP_FMSR(CC_AL,14,0);
   1.162 +	__JUMP(,lr);
   1.163 +	VFP_FMSR(CC_AL,15,0);
   1.164 +	__JUMP(,lr);
   1.165 +	VFP_FMSR(CC_AL,16,0);
   1.166 +	__JUMP(,lr);
   1.167 +	VFP_FMSR(CC_AL,17,0);
   1.168 +	__JUMP(,lr);
   1.169 +	VFP_FMSR(CC_AL,18,0);
   1.170 +	__JUMP(,lr);
   1.171 +	VFP_FMSR(CC_AL,19,0);
   1.172 +	__JUMP(,lr);
   1.173 +	VFP_FMSR(CC_AL,20,0);
   1.174 +	__JUMP(,lr);
   1.175 +	VFP_FMSR(CC_AL,21,0);
   1.176 +	__JUMP(,lr);
   1.177 +	VFP_FMSR(CC_AL,22,0);
   1.178 +	__JUMP(,lr);
   1.179 +	VFP_FMSR(CC_AL,23,0);
   1.180 +	__JUMP(,lr);
   1.181 +	VFP_FMSR(CC_AL,24,0);
   1.182 +	__JUMP(,lr);
   1.183 +	VFP_FMSR(CC_AL,25,0);
   1.184 +	__JUMP(,lr);
   1.185 +	VFP_FMSR(CC_AL,26,0);
   1.186 +	__JUMP(,lr);
   1.187 +	VFP_FMSR(CC_AL,27,0);
   1.188 +	__JUMP(,lr);
   1.189 +	VFP_FMSR(CC_AL,28,0);
   1.190 +	__JUMP(,lr);
   1.191 +	VFP_FMSR(CC_AL,29,0);
   1.192 +	__JUMP(,lr);
   1.193 +	VFP_FMSR(CC_AL,30,0);
   1.194 +	__JUMP(,lr);
   1.195 +	VFP_FMSR(CC_AL,31,0);
   1.196 +	__JUMP(,lr);
   1.197 +	}
   1.198 +
   1.199 +__NAKED__ void Vfp::AbsS()
   1.200 +	{
   1.201 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.202 +	VFP_FABSS(CC_AL,0,1);
   1.203 +	__JUMP(,lr);
   1.204 +	}
   1.205 +
   1.206 +__NAKED__ void Vfp::AddS()
   1.207 +	{
   1.208 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.209 +	VFP_FADDS(CC_AL,0,1,2);
   1.210 +	__JUMP(,lr);
   1.211 +	}
   1.212 +
   1.213 +__NAKED__ void Vfp::CmpS()
   1.214 +	{
   1.215 +	VFP_FCMPS(CC_AL,0,1);
   1.216 +	__JUMP(,lr);
   1.217 +	}
   1.218 +
   1.219 +__NAKED__ void Vfp::CmpES()
   1.220 +	{
   1.221 +	VFP_FCMPES(CC_AL,0,1);
   1.222 +	__JUMP(,lr);
   1.223 +	}
   1.224 +
   1.225 +__NAKED__ void Vfp::CmpEZS()
   1.226 +	{
   1.227 +	VFP_FCMPEZS(CC_AL,0);
   1.228 +	__JUMP(,lr);
   1.229 +	}
   1.230 +
   1.231 +__NAKED__ void Vfp::CmpZS()
   1.232 +	{
   1.233 +	VFP_FCMPZS(CC_AL,0);
   1.234 +	__JUMP(,lr);
   1.235 +	}
   1.236 +
   1.237 +__NAKED__ void Vfp::Cpy0S(TInt /*aReg*/)
   1.238 +	{
   1.239 +	asm("cmp r0, #31 ");
   1.240 +	asm("addls pc, pc, r0, lsl #3 ");
   1.241 +	DIE;
   1.242 +	VFP_FCPYS(CC_AL,0,0);
   1.243 +	__JUMP(,lr);
   1.244 +	VFP_FCPYS(CC_AL,0,1);
   1.245 +	__JUMP(,lr);
   1.246 +	VFP_FCPYS(CC_AL,0,2);
   1.247 +	__JUMP(,lr);
   1.248 +	VFP_FCPYS(CC_AL,0,3);
   1.249 +	__JUMP(,lr);
   1.250 +	VFP_FCPYS(CC_AL,0,4);
   1.251 +	__JUMP(,lr);
   1.252 +	VFP_FCPYS(CC_AL,0,5);
   1.253 +	__JUMP(,lr);
   1.254 +	VFP_FCPYS(CC_AL,0,6);
   1.255 +	__JUMP(,lr);
   1.256 +	VFP_FCPYS(CC_AL,0,7);
   1.257 +	__JUMP(,lr);
   1.258 +	VFP_FCPYS(CC_AL,0,8);
   1.259 +	__JUMP(,lr);
   1.260 +	VFP_FCPYS(CC_AL,0,9);
   1.261 +	__JUMP(,lr);
   1.262 +	VFP_FCPYS(CC_AL,0,10);
   1.263 +	__JUMP(,lr);
   1.264 +	VFP_FCPYS(CC_AL,0,11);
   1.265 +	__JUMP(,lr);
   1.266 +	VFP_FCPYS(CC_AL,0,12);
   1.267 +	__JUMP(,lr);
   1.268 +	VFP_FCPYS(CC_AL,0,13);
   1.269 +	__JUMP(,lr);
   1.270 +	VFP_FCPYS(CC_AL,0,14);
   1.271 +	__JUMP(,lr);
   1.272 +	VFP_FCPYS(CC_AL,0,15);
   1.273 +	__JUMP(,lr);
   1.274 +	VFP_FCPYS(CC_AL,0,16);
   1.275 +	__JUMP(,lr);
   1.276 +	VFP_FCPYS(CC_AL,0,17);
   1.277 +	__JUMP(,lr);
   1.278 +	VFP_FCPYS(CC_AL,0,18);
   1.279 +	__JUMP(,lr);
   1.280 +	VFP_FCPYS(CC_AL,0,19);
   1.281 +	__JUMP(,lr);
   1.282 +	VFP_FCPYS(CC_AL,0,20);
   1.283 +	__JUMP(,lr);
   1.284 +	VFP_FCPYS(CC_AL,0,21);
   1.285 +	__JUMP(,lr);
   1.286 +	VFP_FCPYS(CC_AL,0,22);
   1.287 +	__JUMP(,lr);
   1.288 +	VFP_FCPYS(CC_AL,0,23);
   1.289 +	__JUMP(,lr);
   1.290 +	VFP_FCPYS(CC_AL,0,24);
   1.291 +	__JUMP(,lr);
   1.292 +	VFP_FCPYS(CC_AL,0,25);
   1.293 +	__JUMP(,lr);
   1.294 +	VFP_FCPYS(CC_AL,0,26);
   1.295 +	__JUMP(,lr);
   1.296 +	VFP_FCPYS(CC_AL,0,27);
   1.297 +	__JUMP(,lr);
   1.298 +	VFP_FCPYS(CC_AL,0,28);
   1.299 +	__JUMP(,lr);
   1.300 +	VFP_FCPYS(CC_AL,0,29);
   1.301 +	__JUMP(,lr);
   1.302 +	VFP_FCPYS(CC_AL,0,30);
   1.303 +	__JUMP(,lr);
   1.304 +	VFP_FCPYS(CC_AL,0,31);
   1.305 +	__JUMP(,lr);
   1.306 +	}
   1.307 +
   1.308 +__NAKED__ void Vfp::CpyS0(TInt /*aReg*/)
   1.309 +	{
   1.310 +	asm("cmp r0, #31 ");
   1.311 +	asm("addls pc, pc, r0, lsl #3 ");
   1.312 +	DIE;
   1.313 +	VFP_FCPYS(CC_AL,0,0);
   1.314 +	__JUMP(,lr);
   1.315 +	VFP_FCPYS(CC_AL,1,0);
   1.316 +	__JUMP(,lr);
   1.317 +	VFP_FCPYS(CC_AL,2,0);
   1.318 +	__JUMP(,lr);
   1.319 +	VFP_FCPYS(CC_AL,3,0);
   1.320 +	__JUMP(,lr);
   1.321 +	VFP_FCPYS(CC_AL,4,0);
   1.322 +	__JUMP(,lr);
   1.323 +	VFP_FCPYS(CC_AL,5,0);
   1.324 +	__JUMP(,lr);
   1.325 +	VFP_FCPYS(CC_AL,6,0);
   1.326 +	__JUMP(,lr);
   1.327 +	VFP_FCPYS(CC_AL,7,0);
   1.328 +	__JUMP(,lr);
   1.329 +	VFP_FCPYS(CC_AL,8,0);
   1.330 +	__JUMP(,lr);
   1.331 +	VFP_FCPYS(CC_AL,9,0);
   1.332 +	__JUMP(,lr);
   1.333 +	VFP_FCPYS(CC_AL,10,0);
   1.334 +	__JUMP(,lr);
   1.335 +	VFP_FCPYS(CC_AL,11,0);
   1.336 +	__JUMP(,lr);
   1.337 +	VFP_FCPYS(CC_AL,12,0);
   1.338 +	__JUMP(,lr);
   1.339 +	VFP_FCPYS(CC_AL,13,0);
   1.340 +	__JUMP(,lr);
   1.341 +	VFP_FCPYS(CC_AL,14,0);
   1.342 +	__JUMP(,lr);
   1.343 +	VFP_FCPYS(CC_AL,15,0);
   1.344 +	__JUMP(,lr);
   1.345 +	VFP_FCPYS(CC_AL,16,0);
   1.346 +	__JUMP(,lr);
   1.347 +	VFP_FCPYS(CC_AL,17,0);
   1.348 +	__JUMP(,lr);
   1.349 +	VFP_FCPYS(CC_AL,18,0);
   1.350 +	__JUMP(,lr);
   1.351 +	VFP_FCPYS(CC_AL,19,0);
   1.352 +	__JUMP(,lr);
   1.353 +	VFP_FCPYS(CC_AL,20,0);
   1.354 +	__JUMP(,lr);
   1.355 +	VFP_FCPYS(CC_AL,21,0);
   1.356 +	__JUMP(,lr);
   1.357 +	VFP_FCPYS(CC_AL,22,0);
   1.358 +	__JUMP(,lr);
   1.359 +	VFP_FCPYS(CC_AL,23,0);
   1.360 +	__JUMP(,lr);
   1.361 +	VFP_FCPYS(CC_AL,24,0);
   1.362 +	__JUMP(,lr);
   1.363 +	VFP_FCPYS(CC_AL,25,0);
   1.364 +	__JUMP(,lr);
   1.365 +	VFP_FCPYS(CC_AL,26,0);
   1.366 +	__JUMP(,lr);
   1.367 +	VFP_FCPYS(CC_AL,27,0);
   1.368 +	__JUMP(,lr);
   1.369 +	VFP_FCPYS(CC_AL,28,0);
   1.370 +	__JUMP(,lr);
   1.371 +	VFP_FCPYS(CC_AL,29,0);
   1.372 +	__JUMP(,lr);
   1.373 +	VFP_FCPYS(CC_AL,30,0);
   1.374 +	__JUMP(,lr);
   1.375 +	VFP_FCPYS(CC_AL,31,0);
   1.376 +	__JUMP(,lr);
   1.377 +	}
   1.378 +
   1.379 +__NAKED__ void Vfp::DivS()
   1.380 +	{
   1.381 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.382 +	VFP_FDIVS(CC_AL,0,1,2);
   1.383 +	__JUMP(,lr);
   1.384 +	}
   1.385 +
   1.386 +__NAKED__ void Vfp::MacS()
   1.387 +	{
   1.388 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.389 +	VFP_FMACS(CC_AL,0,1,2);
   1.390 +	__JUMP(,lr);
   1.391 +	}
   1.392 +
   1.393 +__NAKED__ void Vfp::MscS()
   1.394 +	{
   1.395 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.396 +	VFP_FMSCS(CC_AL,0,1,2);
   1.397 +	__JUMP(,lr);
   1.398 +	}
   1.399 +
   1.400 +__NAKED__ void Vfp::MulS()
   1.401 +	{
   1.402 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.403 +	VFP_FMULS(CC_AL,0,1,2);
   1.404 +	__JUMP(,lr);
   1.405 +	}
   1.406 +
   1.407 +__NAKED__ void Vfp::NegS()
   1.408 +	{
   1.409 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.410 +	VFP_FNEGS(CC_AL,0,1);
   1.411 +	__JUMP(,lr);
   1.412 +	}
   1.413 +
   1.414 +__NAKED__ void Vfp::NMacS()
   1.415 +	{
   1.416 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.417 +	VFP_FNMACS(CC_AL,0,1,2);
   1.418 +	__JUMP(,lr);
   1.419 +	}
   1.420 +
   1.421 +__NAKED__ void Vfp::NMscS()
   1.422 +	{
   1.423 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.424 +	VFP_FNMSCS(CC_AL,0,1,2);
   1.425 +	__JUMP(,lr);
   1.426 +	}
   1.427 +
   1.428 +__NAKED__ void Vfp::NMulS()
   1.429 +	{
   1.430 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.431 +	VFP_FNMULS(CC_AL,0,1,2);
   1.432 +	__JUMP(,lr);
   1.433 +	}
   1.434 +
   1.435 +__NAKED__ void Vfp::SqrtS()
   1.436 +	{
   1.437 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.438 +	VFP_FSQRTS(CC_AL,0,1);
   1.439 +	__JUMP(,lr);
   1.440 +	}
   1.441 +
   1.442 +__NAKED__ void Vfp::SubS()
   1.443 +	{
   1.444 +	asm("nop ");			// so that RVCT doesn't complain about branches to non-code symbols
   1.445 +	VFP_FSUBS(CC_AL,0,1,2);
   1.446 +	__JUMP(,lr);
   1.447 +	}
   1.448 +
   1.449 +
   1.450 +
   1.451 +
   1.452 +/******************************************************************************
   1.453 + * Double precision operations
   1.454 + ******************************************************************************/
   1.455 +__NAKED__ TInt64 Vfp::DRegInt(TInt /*aReg*/)
   1.456 +	{
   1.457 +	// fall through
   1.458 +	}
   1.459 +
   1.460 +__NAKED__ TReal64 Vfp::DReg(TInt /*aReg*/)
   1.461 +	{
   1.462 +#ifdef __TEST_VFPV3
   1.463 +	asm("cmp r0, #31 ");
   1.464 +#else 
   1.465 +	asm("cmp r0, #15 ");
   1.466 +#endif 
   1.467 +	asm("addls r0, r0, r0, lsl #1 ");
   1.468 +	asm("addls pc, pc, r0, lsl #2 ");
   1.469 +	DIE;
   1.470 +
   1.471 +	// test 
   1.472 +	// VFP_FLDD(CC_AL,4,5,0); 
   1.473 +
   1.474 +	VFP_FMRDL(CC_AL,0,0);
   1.475 +	VFP_FMRDH(CC_AL,1,0);
   1.476 +	asm("b 0f ");
   1.477 +	VFP_FMRDL(CC_AL,0,1);
   1.478 +	VFP_FMRDH(CC_AL,1,1);
   1.479 +	asm("b 0f ");
   1.480 +	VFP_FMRDL(CC_AL,0,2);
   1.481 +	VFP_FMRDH(CC_AL,1,2);
   1.482 +	asm("b 0f ");
   1.483 +	VFP_FMRDL(CC_AL,0,3);
   1.484 +	VFP_FMRDH(CC_AL,1,3);
   1.485 +	asm("b 0f ");
   1.486 +	VFP_FMRDL(CC_AL,0,4);
   1.487 +	VFP_FMRDH(CC_AL,1,4);
   1.488 +	asm("b 0f ");
   1.489 +	VFP_FMRDL(CC_AL,0,5);
   1.490 +	VFP_FMRDH(CC_AL,1,5);
   1.491 +	asm("b 0f ");
   1.492 +	VFP_FMRDL(CC_AL,0,6);
   1.493 +	VFP_FMRDH(CC_AL,1,6);
   1.494 +	asm("b 0f ");
   1.495 +	VFP_FMRDL(CC_AL,0,7);
   1.496 +	VFP_FMRDH(CC_AL,1,7);
   1.497 +	asm("b 0f ");
   1.498 +	VFP_FMRDL(CC_AL,0,8);
   1.499 +	VFP_FMRDH(CC_AL,1,8);
   1.500 +	asm("b 0f ");
   1.501 +	VFP_FMRDL(CC_AL,0,9);
   1.502 +	VFP_FMRDH(CC_AL,1,9);
   1.503 +	asm("b 0f ");
   1.504 +	VFP_FMRDL(CC_AL,0,10);
   1.505 +	VFP_FMRDH(CC_AL,1,10);
   1.506 +	asm("b 0f ");
   1.507 +	VFP_FMRDL(CC_AL,0,11);
   1.508 +	VFP_FMRDH(CC_AL,1,11);
   1.509 +	asm("b 0f ");
   1.510 +	VFP_FMRDL(CC_AL,0,12);
   1.511 +	VFP_FMRDH(CC_AL,1,12);
   1.512 +	asm("b 0f ");
   1.513 +	VFP_FMRDL(CC_AL,0,13);
   1.514 +	VFP_FMRDH(CC_AL,1,13);
   1.515 +	asm("b 0f ");
   1.516 +	VFP_FMRDL(CC_AL,0,14);
   1.517 +	VFP_FMRDH(CC_AL,1,14);
   1.518 +	asm("b 0f ");
   1.519 +	VFP_FMRDL(CC_AL,0,15);
   1.520 +	VFP_FMRDH(CC_AL,1,15);
   1.521 +	asm("b 0f ");
   1.522 +
   1.523 +#ifdef __TEST_VFPV3
   1.524 +	VFP_FMRDL(CC_AL,0,16);
   1.525 +	VFP_FMRDH(CC_AL,1,16);
   1.526 +	asm("b 0f ");
   1.527 +	VFP_FMRDL(CC_AL,0,17);
   1.528 +	VFP_FMRDH(CC_AL,1,17);
   1.529 +	asm("b 0f ");
   1.530 +	VFP_FMRDL(CC_AL,0,18);
   1.531 +	VFP_FMRDH(CC_AL,1,18);
   1.532 +	asm("b 0f ");
   1.533 +	VFP_FMRDL(CC_AL,0,19);
   1.534 +	VFP_FMRDH(CC_AL,1,19);
   1.535 +	asm("b 0f ");
   1.536 +	VFP_FMRDL(CC_AL,0,20);
   1.537 +	VFP_FMRDH(CC_AL,1,20);
   1.538 +	asm("b 0f ");
   1.539 +	VFP_FMRDL(CC_AL,0,21);
   1.540 +	VFP_FMRDH(CC_AL,1,21);
   1.541 +	asm("b 0f ");
   1.542 +	VFP_FMRDL(CC_AL,0,22);
   1.543 +	VFP_FMRDH(CC_AL,1,22);
   1.544 +	asm("b 0f ");
   1.545 +	VFP_FMRDL(CC_AL,0,23);
   1.546 +	VFP_FMRDH(CC_AL,1,23);
   1.547 +	asm("b 0f ");
   1.548 +	VFP_FMRDL(CC_AL,0,24);
   1.549 +	VFP_FMRDH(CC_AL,1,24);
   1.550 +	asm("b 0f ");
   1.551 +	VFP_FMRDL(CC_AL,0,25);
   1.552 +	VFP_FMRDH(CC_AL,1,25);
   1.553 +	asm("b 0f ");
   1.554 +	VFP_FMRDL(CC_AL,0,26);
   1.555 +	VFP_FMRDH(CC_AL,1,26);
   1.556 +	asm("b 0f ");
   1.557 +	VFP_FMRDL(CC_AL,0,27);
   1.558 +	VFP_FMRDH(CC_AL,1,27);
   1.559 +	asm("b 0f ");
   1.560 +	VFP_FMRDL(CC_AL,0,28);
   1.561 +	VFP_FMRDH(CC_AL,1,28);
   1.562 +	asm("b 0f ");
   1.563 +	VFP_FMRDL(CC_AL,0,29);
   1.564 +	VFP_FMRDH(CC_AL,1,29);
   1.565 +	asm("b 0f ");
   1.566 +	VFP_FMRDL(CC_AL,0,30);
   1.567 +	VFP_FMRDH(CC_AL,1,30);
   1.568 +	asm("b 0f ");
   1.569 +	VFP_FMRDL(CC_AL,0,31);
   1.570 +	VFP_FMRDH(CC_AL,1,31);
   1.571 +#endif // __TEST_VFPV3
   1.572 +
   1.573 +	asm("0: ");
   1.574 +#ifdef __DOUBLE_WORDS_SWAPPED__
   1.575 +	asm("mov r2, r0 ");
   1.576 +	asm("mov r0, r1 ");
   1.577 +	asm("mov r1, r2 ");
   1.578 +#endif
   1.579 +	__JUMP(,lr);
   1.580 +	}
   1.581 +
   1.582 +__NAKED__ void Vfp::SetDReg(TInt64 /*aVal*/, TInt /*aReg*/)
   1.583 +	{
   1.584 +	// fall through
   1.585 +	}
   1.586 +
   1.587 +__NAKED__ void Vfp::SetDReg(TReal64 /*aVal*/, TInt /*aReg*/)
   1.588 +	{
   1.589 +#ifdef __DOUBLE_WORDS_SWAPPED__
   1.590 +	asm("mov r3, r0 ");
   1.591 +	asm("mov r0, r1 ");
   1.592 +	asm("mov r1, r3 ");
   1.593 +#endif
   1.594 +#ifdef __TEST_VFPV3
   1.595 +	asm("cmp r2, #31 ");
   1.596 +#else 
   1.597 +	asm("cmp r2, #15 ");
   1.598 +#endif 
   1.599 +	asm("addls r2, r2, r2, lsl #1 ");
   1.600 +	asm("addls pc, pc, r2, lsl #2 ");
   1.601 +	DIE;
   1.602 +	VFP_FMDLR(CC_AL,0,0);
   1.603 +	VFP_FMDHR(CC_AL,0,1);
   1.604 +	__JUMP(,lr);
   1.605 +	VFP_FMDLR(CC_AL,1,0);
   1.606 +	VFP_FMDHR(CC_AL,1,1);
   1.607 +	__JUMP(,lr);
   1.608 +	VFP_FMDLR(CC_AL,2,0);
   1.609 +	VFP_FMDHR(CC_AL,2,1);
   1.610 +	__JUMP(,lr);
   1.611 +	VFP_FMDLR(CC_AL,3,0);
   1.612 +	VFP_FMDHR(CC_AL,3,1);
   1.613 +	__JUMP(,lr);
   1.614 +	VFP_FMDLR(CC_AL,4,0);
   1.615 +	VFP_FMDHR(CC_AL,4,1);
   1.616 +	__JUMP(,lr);
   1.617 +	VFP_FMDLR(CC_AL,5,0);
   1.618 +	VFP_FMDHR(CC_AL,5,1);
   1.619 +	__JUMP(,lr);
   1.620 +	VFP_FMDLR(CC_AL,6,0);
   1.621 +	VFP_FMDHR(CC_AL,6,1);
   1.622 +	__JUMP(,lr);
   1.623 +	VFP_FMDLR(CC_AL,7,0);
   1.624 +	VFP_FMDHR(CC_AL,7,1);
   1.625 +	__JUMP(,lr);
   1.626 +	VFP_FMDLR(CC_AL,8,0);
   1.627 +	VFP_FMDHR(CC_AL,8,1);
   1.628 +	__JUMP(,lr);
   1.629 +	VFP_FMDLR(CC_AL,9,0);
   1.630 +	VFP_FMDHR(CC_AL,9,1);
   1.631 +	__JUMP(,lr);
   1.632 +	VFP_FMDLR(CC_AL,10,0);
   1.633 +	VFP_FMDHR(CC_AL,10,1);
   1.634 +	__JUMP(,lr);
   1.635 +	VFP_FMDLR(CC_AL,11,0);
   1.636 +	VFP_FMDHR(CC_AL,11,1);
   1.637 +	__JUMP(,lr);
   1.638 +	VFP_FMDLR(CC_AL,12,0);
   1.639 +	VFP_FMDHR(CC_AL,12,1);
   1.640 +	__JUMP(,lr);
   1.641 +	VFP_FMDLR(CC_AL,13,0);
   1.642 +	VFP_FMDHR(CC_AL,13,1);
   1.643 +	__JUMP(,lr);
   1.644 +	VFP_FMDLR(CC_AL,14,0);
   1.645 +	VFP_FMDHR(CC_AL,14,1);
   1.646 +	__JUMP(,lr);
   1.647 +	VFP_FMDLR(CC_AL,15,0);
   1.648 +	VFP_FMDHR(CC_AL,15,1);
   1.649 +	__JUMP(,lr);
   1.650 +#ifdef __TEST_VFPV3
   1.651 +	VFP_FMDLR(CC_AL,16,0);
   1.652 +	VFP_FMDHR(CC_AL,16,1);
   1.653 +	__JUMP(,lr);
   1.654 +	VFP_FMDLR(CC_AL,17,0);
   1.655 +	VFP_FMDHR(CC_AL,17,1);
   1.656 +	__JUMP(,lr);
   1.657 +	VFP_FMDLR(CC_AL,18,0);
   1.658 +	VFP_FMDHR(CC_AL,18,1);
   1.659 +	__JUMP(,lr);
   1.660 +	VFP_FMDLR(CC_AL,19,0);
   1.661 +	VFP_FMDHR(CC_AL,19,1);
   1.662 +	__JUMP(,lr);
   1.663 +	VFP_FMDLR(CC_AL,20,0);
   1.664 +	VFP_FMDHR(CC_AL,20,1);
   1.665 +	__JUMP(,lr);
   1.666 +	VFP_FMDLR(CC_AL,21,0);
   1.667 +	VFP_FMDHR(CC_AL,21,1);
   1.668 +	__JUMP(,lr);
   1.669 +	VFP_FMDLR(CC_AL,22,0);
   1.670 +	VFP_FMDHR(CC_AL,22,1);
   1.671 +	__JUMP(,lr);
   1.672 +	VFP_FMDLR(CC_AL,23,0);
   1.673 +	VFP_FMDHR(CC_AL,23,1);
   1.674 +	__JUMP(,lr);
   1.675 +	VFP_FMDLR(CC_AL,24,0);
   1.676 +	VFP_FMDHR(CC_AL,24,1);
   1.677 +	__JUMP(,lr);
   1.678 +	VFP_FMDLR(CC_AL,25,0);
   1.679 +	VFP_FMDHR(CC_AL,25,1);
   1.680 +	__JUMP(,lr);
   1.681 +	VFP_FMDLR(CC_AL,26,0);
   1.682 +	VFP_FMDHR(CC_AL,26,1);
   1.683 +	__JUMP(,lr);
   1.684 +	VFP_FMDLR(CC_AL,27,0);
   1.685 +	VFP_FMDHR(CC_AL,27,1);
   1.686 +	__JUMP(,lr);
   1.687 +	VFP_FMDLR(CC_AL,28,0);
   1.688 +	VFP_FMDHR(CC_AL,28,1);
   1.689 +	__JUMP(,lr);
   1.690 +	VFP_FMDLR(CC_AL,29,0);
   1.691 +	VFP_FMDHR(CC_AL,29,1);
   1.692 +	__JUMP(,lr);
   1.693 +	VFP_FMDLR(CC_AL,30,0);
   1.694 +	VFP_FMDHR(CC_AL,30,1);
   1.695 +	__JUMP(,lr);
   1.696 +	VFP_FMDLR(CC_AL,31,0);
   1.697 +	VFP_FMDHR(CC_AL,31,1);
   1.698 +	__JUMP(,lr);
   1.699 +#endif // __TEST_VFPV3
   1.700 +	}
   1.701 +
   1.702 +__NAKED__ void Vfp::AbsD()
   1.703 +	{
   1.704 +	VFP_FABSD(,0,1);
   1.705 +	__JUMP(,lr);
   1.706 +	}
   1.707 +
   1.708 +__NAKED__ void Vfp::AddD()
   1.709 +	{
   1.710 +	VFP_FADDD(,0,1,2);
   1.711 +	__JUMP(,lr);
   1.712 +	}
   1.713 +
   1.714 +__NAKED__ void Vfp::CmpD()
   1.715 +	{
   1.716 +	VFP_FCMPD(,0,1);
   1.717 +	__JUMP(,lr);
   1.718 +	}
   1.719 +
   1.720 +__NAKED__ void Vfp::CmpED()
   1.721 +	{
   1.722 +	VFP_FCMPED(,0,1);
   1.723 +	__JUMP(,lr);
   1.724 +	}
   1.725 +
   1.726 +__NAKED__ void Vfp::CmpEZD()
   1.727 +	{
   1.728 +	VFP_FCMPEZD(,0);
   1.729 +	__JUMP(,lr);
   1.730 +	}
   1.731 +
   1.732 +__NAKED__ void Vfp::CmpZD()
   1.733 +	{
   1.734 +	VFP_FCMPZD(,0);
   1.735 +	__JUMP(,lr);
   1.736 +	}
   1.737 +
   1.738 +__NAKED__ void Vfp::Cpy0D(TInt /*aReg*/)
   1.739 +	{
   1.740 +	asm("cmp r0, #15 ");
   1.741 +	asm("addls pc, pc, r0, lsl #3 ");
   1.742 +	DIE;
   1.743 +	VFP_FCPYD(,0,0);
   1.744 +	__JUMP(,lr);
   1.745 +	VFP_FCPYD(,0,1);
   1.746 +	__JUMP(,lr);
   1.747 +	VFP_FCPYD(,0,2);
   1.748 +	__JUMP(,lr);
   1.749 +	VFP_FCPYD(,0,3);
   1.750 +	__JUMP(,lr);
   1.751 +	VFP_FCPYD(,0,4);
   1.752 +	__JUMP(,lr);
   1.753 +	VFP_FCPYD(,0,5);
   1.754 +	__JUMP(,lr);
   1.755 +	VFP_FCPYD(,0,6);
   1.756 +	__JUMP(,lr);
   1.757 +	VFP_FCPYD(,0,7);
   1.758 +	__JUMP(,lr);
   1.759 +	VFP_FCPYD(,0,8);
   1.760 +	__JUMP(,lr);
   1.761 +	VFP_FCPYD(,0,9);
   1.762 +	__JUMP(,lr);
   1.763 +	VFP_FCPYD(,0,10);
   1.764 +	__JUMP(,lr);
   1.765 +	VFP_FCPYD(,0,11);
   1.766 +	__JUMP(,lr);
   1.767 +	VFP_FCPYD(,0,12);
   1.768 +	__JUMP(,lr);
   1.769 +	VFP_FCPYD(,0,13);
   1.770 +	__JUMP(,lr);
   1.771 +	VFP_FCPYD(,0,14);
   1.772 +	__JUMP(,lr);
   1.773 +	VFP_FCPYD(,0,15);
   1.774 +	__JUMP(,lr);
   1.775 +	}
   1.776 +
   1.777 +__NAKED__ void Vfp::CpyD0(TInt /*aReg*/)
   1.778 +	{
   1.779 +	asm("cmp r0, #15 ");
   1.780 +	asm("addls pc, pc, r0, lsl #3 ");
   1.781 +	DIE;
   1.782 +	VFP_FCPYD(,0,0);
   1.783 +	__JUMP(,lr);
   1.784 +	VFP_FCPYD(,1,0);
   1.785 +	__JUMP(,lr);
   1.786 +	VFP_FCPYD(,2,0);
   1.787 +	__JUMP(,lr);
   1.788 +	VFP_FCPYD(,3,0);
   1.789 +	__JUMP(,lr);
   1.790 +	VFP_FCPYD(,4,0);
   1.791 +	__JUMP(,lr);
   1.792 +	VFP_FCPYD(,5,0);
   1.793 +	__JUMP(,lr);
   1.794 +	VFP_FCPYD(,6,0);
   1.795 +	__JUMP(,lr);
   1.796 +	VFP_FCPYD(,7,0);
   1.797 +	__JUMP(,lr);
   1.798 +	VFP_FCPYD(,8,0);
   1.799 +	__JUMP(,lr);
   1.800 +	VFP_FCPYD(,9,0);
   1.801 +	__JUMP(,lr);
   1.802 +	VFP_FCPYD(,10,0);
   1.803 +	__JUMP(,lr);
   1.804 +	VFP_FCPYD(,11,0);
   1.805 +	__JUMP(,lr);
   1.806 +	VFP_FCPYD(,12,0);
   1.807 +	__JUMP(,lr);
   1.808 +	VFP_FCPYD(,13,0);
   1.809 +	__JUMP(,lr);
   1.810 +	VFP_FCPYD(,14,0);
   1.811 +	__JUMP(,lr);
   1.812 +	VFP_FCPYD(,15,0);
   1.813 +	__JUMP(,lr);
   1.814 +	}
   1.815 +
   1.816 +__NAKED__ void Vfp::DivD()
   1.817 +	{
   1.818 +	VFP_FDIVD(,0,1,2);
   1.819 +	__JUMP(,lr);
   1.820 +	}
   1.821 +
   1.822 +__NAKED__ void Vfp::MacD()
   1.823 +	{
   1.824 +	VFP_FMACD(,0,1,2);
   1.825 +	__JUMP(,lr);
   1.826 +	}
   1.827 +
   1.828 +__NAKED__ void Vfp::MscD()
   1.829 +	{
   1.830 +	VFP_FMSCD(,0,1,2);
   1.831 +	__JUMP(,lr);
   1.832 +	}
   1.833 +
   1.834 +__NAKED__ void Vfp::MulD()
   1.835 +	{
   1.836 +	VFP_FMULD(,0,1,2);
   1.837 +	__JUMP(,lr);
   1.838 +	}
   1.839 +
   1.840 +__NAKED__ void Vfp::NegD()
   1.841 +	{
   1.842 +	VFP_FNEGD(,0,1);
   1.843 +	__JUMP(,lr);
   1.844 +	}
   1.845 +
   1.846 +__NAKED__ void Vfp::NMacD()
   1.847 +	{
   1.848 +	VFP_FNMACD(,0,1,2);
   1.849 +	__JUMP(,lr);
   1.850 +	}
   1.851 +
   1.852 +__NAKED__ void Vfp::NMscD()
   1.853 +	{
   1.854 +	VFP_FNMSCD(,0,1,2);
   1.855 +	__JUMP(,lr);
   1.856 +	}
   1.857 +
   1.858 +__NAKED__ void Vfp::NMulD()
   1.859 +	{
   1.860 +	VFP_FNMULD(,0,1,2);
   1.861 +	__JUMP(,lr);
   1.862 +	}
   1.863 +
   1.864 +__NAKED__ void Vfp::SqrtD()
   1.865 +	{
   1.866 +	VFP_FSQRTD(,0,1);
   1.867 +	__JUMP(,lr);
   1.868 +	}
   1.869 +
   1.870 +__NAKED__ void Vfp::SubD()
   1.871 +	{
   1.872 +	VFP_FSUBD(,0,1,2);
   1.873 +	__JUMP(,lr);
   1.874 +	}
   1.875 +
   1.876 +
   1.877 +/******************************************************************************
   1.878 + * Conversion operations
   1.879 + ******************************************************************************/
   1.880 +__NAKED__ void Vfp::CvtDS()
   1.881 +	{
   1.882 +	VFP_FCVTDS(CC_AL,0,2);
   1.883 +	__JUMP(,lr);
   1.884 +	}
   1.885 +
   1.886 +__NAKED__ void Vfp::CvtSD()
   1.887 +	{
   1.888 +	VFP_FCVTSD(CC_AL,0,1);
   1.889 +	__JUMP(,lr);
   1.890 +	}
   1.891 +
   1.892 +__NAKED__ void Vfp::SitoD()
   1.893 +	{
   1.894 +	VFP_FSITOD(CC_AL,0,2);
   1.895 +	__JUMP(,lr);
   1.896 +	}
   1.897 +
   1.898 +__NAKED__ void Vfp::SitoS()
   1.899 +	{
   1.900 +	VFP_FSITOS(CC_AL,0,2);
   1.901 +	__JUMP(,lr);
   1.902 +	}
   1.903 +
   1.904 +__NAKED__ void Vfp::TosiD()
   1.905 +	{
   1.906 +	VFP_FTOSID(CC_AL,0,1);
   1.907 +	__JUMP(,lr);
   1.908 +	}
   1.909 +
   1.910 +__NAKED__ void Vfp::TosiZD()
   1.911 +	{
   1.912 +	VFP_FTOSIZD(CC_AL,0,1);
   1.913 +	__JUMP(,lr);
   1.914 +	}
   1.915 +
   1.916 +__NAKED__ void Vfp::TosiS()
   1.917 +	{
   1.918 +	VFP_FTOSIS(CC_AL,0,2);
   1.919 +	__JUMP(,lr);
   1.920 +	}
   1.921 +
   1.922 +__NAKED__ void Vfp::TosiZS()
   1.923 +	{
   1.924 +	VFP_FTOSIZS(CC_AL,0,2);
   1.925 +	__JUMP(,lr);
   1.926 +	}
   1.927 +
   1.928 +__NAKED__ void Vfp::UitoD()
   1.929 +	{
   1.930 +	VFP_FUITOD(CC_AL,0,2);
   1.931 +	__JUMP(,lr);
   1.932 +	}
   1.933 +
   1.934 +__NAKED__ void Vfp::UitoS()
   1.935 +	{
   1.936 +	VFP_FUITOS(CC_AL,0,2);
   1.937 +	__JUMP(,lr);
   1.938 +	}
   1.939 +
   1.940 +__NAKED__ void Vfp::TouiD()
   1.941 +	{
   1.942 +	VFP_FTOUID(CC_AL,0,1);
   1.943 +	__JUMP(,lr);
   1.944 +	}
   1.945 +
   1.946 +__NAKED__ void Vfp::TouiZD()
   1.947 +	{
   1.948 +	VFP_FTOUIZD(CC_AL,0,1);
   1.949 +	__JUMP(,lr);
   1.950 +	}
   1.951 +
   1.952 +__NAKED__ void Vfp::TouiS()
   1.953 +	{
   1.954 +	VFP_FTOUIS(CC_AL,0,2);
   1.955 +	__JUMP(,lr);
   1.956 +	}
   1.957 +
   1.958 +__NAKED__ void Vfp::TouiZS()
   1.959 +	{
   1.960 +	VFP_FTOUIZS(CC_AL,0,2);
   1.961 +	__JUMP(,lr);
   1.962 +	}
   1.963 +
   1.964 +#ifdef __TEST_VFPV3
   1.965 +__NAKED__ void Vfp::ToFixedS(TInt /*aBits*/)
   1.966 +	{
   1.967 +	asm("cmp r0, #15 ");
   1.968 +	asm("addls pc, pc, r0, lsl #3 ");
   1.969 +	DIE;
   1.970 +	VFP_VCT_S32_F32(CC_AL,0,0);
   1.971 +	__JUMP(,lr);
   1.972 +	VFP_VCT_S32_F32(CC_AL,0,1);
   1.973 +	__JUMP(,lr);
   1.974 +	VFP_VCT_S32_F32(CC_AL,0,2);
   1.975 +	__JUMP(,lr);
   1.976 +	VFP_VCT_S32_F32(CC_AL,0,3);
   1.977 +	__JUMP(,lr);
   1.978 +	VFP_VCT_S32_F32(CC_AL,0,4);
   1.979 +	__JUMP(,lr);
   1.980 +	VFP_VCT_S32_F32(CC_AL,0,5);
   1.981 +	__JUMP(,lr);
   1.982 +	VFP_VCT_S32_F32(CC_AL,0,6);
   1.983 +	__JUMP(,lr);
   1.984 +	VFP_VCT_S32_F32(CC_AL,0,7);
   1.985 +	__JUMP(,lr);
   1.986 +	VFP_VCT_S32_F32(CC_AL,0,8);
   1.987 +	__JUMP(,lr);
   1.988 +	VFP_VCT_S32_F32(CC_AL,0,9);
   1.989 +	__JUMP(,lr);
   1.990 +	VFP_VCT_S32_F32(CC_AL,0,10);
   1.991 +	__JUMP(,lr);
   1.992 +	VFP_VCT_S32_F32(CC_AL,0,11);
   1.993 +	__JUMP(,lr);
   1.994 +	VFP_VCT_S32_F32(CC_AL,0,12);
   1.995 +	__JUMP(,lr);
   1.996 +	VFP_VCT_S32_F32(CC_AL,0,13);
   1.997 +	__JUMP(,lr);
   1.998 +	VFP_VCT_S32_F32(CC_AL,0,14);
   1.999 +	__JUMP(,lr);
  1.1000 +	VFP_VCT_S32_F32(CC_AL,0,15);
  1.1001 +	__JUMP(,lr);
  1.1002 +	}
  1.1003 +
  1.1004 +__NAKED__ void Vfp::FromFixedS(TInt /*aBits*/)
  1.1005 +	{
  1.1006 +	asm("cmp r0, #15 ");
  1.1007 +	asm("addls pc, pc, r0, lsl #3 ");
  1.1008 +	DIE;
  1.1009 +	VFP_VCT_F32_S32(CC_AL,0,0);
  1.1010 +	__JUMP(,lr);
  1.1011 +	VFP_VCT_F32_S32(CC_AL,0,1);
  1.1012 +	__JUMP(,lr);
  1.1013 +	VFP_VCT_F32_S32(CC_AL,0,2);
  1.1014 +	__JUMP(,lr);
  1.1015 +	VFP_VCT_F32_S32(CC_AL,0,3);
  1.1016 +	__JUMP(,lr);
  1.1017 +	VFP_VCT_F32_S32(CC_AL,0,4);
  1.1018 +	__JUMP(,lr);
  1.1019 +	VFP_VCT_F32_S32(CC_AL,0,5);
  1.1020 +	__JUMP(,lr);
  1.1021 +	VFP_VCT_F32_S32(CC_AL,0,6);
  1.1022 +	__JUMP(,lr);
  1.1023 +	VFP_VCT_F32_S32(CC_AL,0,7);
  1.1024 +	__JUMP(,lr);
  1.1025 +	VFP_VCT_F32_S32(CC_AL,0,8);
  1.1026 +	__JUMP(,lr);
  1.1027 +	VFP_VCT_F32_S32(CC_AL,0,9);
  1.1028 +	__JUMP(,lr);
  1.1029 +	VFP_VCT_F32_S32(CC_AL,0,10);
  1.1030 +	__JUMP(,lr);
  1.1031 +	VFP_VCT_F32_S32(CC_AL,0,11);
  1.1032 +	__JUMP(,lr);
  1.1033 +	VFP_VCT_F32_S32(CC_AL,0,12);
  1.1034 +	__JUMP(,lr);
  1.1035 +	VFP_VCT_F32_S32(CC_AL,0,13);
  1.1036 +	__JUMP(,lr);
  1.1037 +	VFP_VCT_F32_S32(CC_AL,0,14);
  1.1038 +	__JUMP(,lr);
  1.1039 +	VFP_VCT_F32_S32(CC_AL,0,15);
  1.1040 +	__JUMP(,lr);
  1.1041 +	}
  1.1042 +
  1.1043 +
  1.1044 +// S0=2
  1.1045 +__NAKED__ void Vfp::TconstS2()
  1.1046 +	{
  1.1047 +	asm("nop "); 
  1.1048 +	VFP_VMOV_IMM(CC_AL,0,0,0);
  1.1049 +	__JUMP(,lr);
  1.1050 +	} 
  1.1051 +
  1.1052 +// D0=2
  1.1053 +__NAKED__ void Vfp::TconstD2()
  1.1054 +	{ 
  1.1055 +	asm("nop ");
  1.1056 +	VFP_VMOV_IMM(CC_AL,1,0,0);
  1.1057 +	__JUMP(,lr);
  1.1058 +	} 
  1.1059 +
  1.1060 +// S0=2.875
  1.1061 +__NAKED__ void Vfp::TconstS2_8()
  1.1062 +	{ 
  1.1063 +	asm("nop ");
  1.1064 +	VFP_VMOV_IMM(CC_AL,0,0,0x7);
  1.1065 +	__JUMP(,lr);
  1.1066 +	} 
  1.1067 +
  1.1068 +// D0=2.875
  1.1069 +__NAKED__ void Vfp::TconstD2_8()
  1.1070 +	{ 
  1.1071 +	asm("nop ");
  1.1072 +	VFP_VMOV_IMM(CC_AL,1,0,0x7);
  1.1073 +	__JUMP(,lr);
  1.1074 +	} 
  1.1075 +
  1.1076 +
  1.1077 +
  1.1078 +// Neon test instructions
  1.1079 +
  1.1080 +__NAKED__ TInt NeonWithF2(TAny*)
  1.1081 +	{
  1.1082 +	asm("nop ");
  1.1083 +	// VEXT.8 D0, D1, D2, #3
  1.1084 +	asm(".word 0xF2B10302 ");
  1.1085 +	asm("mov r0, #0 ");
  1.1086 +	__JUMP(,lr);
  1.1087 +	}
  1.1088 +
  1.1089 +__NAKED__ TInt NeonWithF3(TAny*)
  1.1090 +	{
  1.1091 +	asm("nop ");
  1.1092 +	// VDUP.8 D0, D1[2]
  1.1093 +	asm(".word 0xF3B50C01 ");
  1.1094 +	asm("mov r0, #0 ");
  1.1095 +	__JUMP(,lr);
  1.1096 +	}
  1.1097 +
  1.1098 +__NAKED__ TInt NeonWithF4x(TAny*)
  1.1099 +	{
  1.1100 +	asm("adr r2, 1f ");
  1.1101 +	// VLD1.8 {D0[1]}, r2
  1.1102 +	asm(".word 0xF4E2002F ");
  1.1103 +	asm("mov r0, #0 ");
  1.1104 +	__JUMP(,lr);
  1.1105 +	asm("1: ");
  1.1106 +	asm(".word 0x12345678" );
  1.1107 +	}
  1.1108 +
  1.1109 +__NAKED__ TInt ThumbMode(TAny*)
  1.1110 +	{
  1.1111 +#if defined(__SUPPORT_THUMB_INTERWORKING)
  1.1112 +	asm("adr r2, 1f "); // Store a test value address
  1.1113 +
  1.1114 +	asm("mov r1, #1 "); // r1 = 1
  1.1115 +	asm("add r1, r0, lsl #3 "); // Add the arg * 8 to r1
  1.1116 +
  1.1117 +	asm("mov r0, #0 "); // Store a return value of KErrNone
  1.1118 +
  1.1119 +	asm("add r1, pc, r1 "); // Add pc to get jump destination
  1.1120 +	asm("bx r1 "); // Switch to thumb mode
  1.1121 +
  1.1122 +	asm(".code 16 ");
  1.1123 +	// Thumb mode so halfwords reversed
  1.1124 +	asm(".word 0x0A10EC41 "); // VMOV S0, S1, r0, r1
  1.1125 +	asm("bx lr ");
  1.1126 +	asm("nop ");
  1.1127 +	asm(".word 0x0B00ED12 "); // VLDR D0, [r2]
  1.1128 +	asm("bx lr ");
  1.1129 +	asm("nop ");
  1.1130 +	asm(".word 0x8A00EE30 "); // VADD.32 S0, S0, S0
  1.1131 +	asm("bx lr ");
  1.1132 +	asm("nop ");
  1.1133 +	asm(".word 0x0302EFB1 "); // VEXT.8 D0, D1, D2, #3
  1.1134 +	asm("bx lr ");
  1.1135 +	asm("nop ");
  1.1136 +	asm(".word 0x002FF9E2 "); // VLD1.8 {D0[1]}, r2
  1.1137 +	asm("bx lr ");
  1.1138 +	asm("nop ");
  1.1139 +	asm(".word 0x0C01FFB5 "); // VDUP.8 D0, D1[2]
  1.1140 +	asm("bx lr ");
  1.1141 +	asm("nop ");
  1.1142 +#endif
  1.1143 +	asm("mov r0, #1 "); // Change ret to "done"
  1.1144 +	__JUMP(,lr);
  1.1145 +
  1.1146 +	asm(".code 32 ");
  1.1147 +	asm("1: ");
  1.1148 +	asm(".word 0x12345678" );
  1.1149 +	}
  1.1150 +
  1.1151 +#endif // __TEST_VFPV3