/optee_os-3.20.0/lib/libutils/isoc/arch/arm/softfloat/source/ |
A D | f128M_sqrt.c | 125 qs[1] = q; in f128M_sqrt() 142 x64 = sig64Z + (q>>26); in f128M_sqrt() 145 term[indexWord( 4, 0 )] = q<<6; in f128M_sqrt() 151 --q; in f128M_sqrt() 153 qs[0] = q; in f128M_sqrt() 158 x64 = (uint64_t) q<<27; in f128M_sqrt() 169 if ( (q & 0xF) <= 2 ) { in f128M_sqrt() 170 q &= ~3; in f128M_sqrt() 171 y[indexWordLo( 5 )] = q<<27; in f128M_sqrt() 175 term[indexWord( 5, 1 )] = q>>6; in f128M_sqrt() [all …]
|
A D | extF80M_sqrt.c | 64 uint32_t rem[4], sig32A, recipSqrt32, sig32Z, q; in extF80M_sqrt() local 118 sig64Z = ((uint64_t) sig32Z<<32) + ((uint64_t) q<<3); in extF80M_sqrt() 127 q, in extF80M_sqrt() 134 x64 = (uint64_t) q<<7; in extF80M_sqrt() 141 if ( (q & 0xFFFFFF) <= 2 ) { in extF80M_sqrt() 142 q &= ~(uint32_t) 0xFFFF; in extF80M_sqrt() 143 extSigZ[indexWordLo( 3 )] = q<<7; in extF80M_sqrt() 144 x64 = sig64Z + (q>>27); in extF80M_sqrt() 148 term[indexWord( 4, 0 )] = q<<5; in extF80M_sqrt() 151 q = rem[indexWordHi( 4 )]; in extF80M_sqrt() [all …]
|
A D | f128_sqrt.c | 57 uint_fast32_t q; in f128_sqrt() local 119 qs[1] = q; in f128_sqrt() 121 sig64Z = x64 + ((uint_fast64_t) q<<3); in f128_sqrt() 124 term = softfloat_mul64ByShifted32To128( x64, q ); in f128_sqrt() 140 --q; in f128_sqrt() 142 qs[0] = q; in f128_sqrt() 146 sigZExtra = (uint64_t) ((uint_fast64_t) q<<59); in f128_sqrt() 155 if ( (q & 0xF) <= 2 ) { in f128_sqrt() 156 q &= ~3; in f128_sqrt() 157 sigZExtra = (uint64_t) ((uint_fast64_t) q<<59); in f128_sqrt() [all …]
|
A D | extF80_sqrt.c | 60 uint_fast64_t q, sigZ, x64; in extF80_sqrt() local 119 q = ((uint_fast64_t) (uint32_t) (rem.v64>>2) * recipSqrt32)>>32; in extF80_sqrt() 120 sigZ = ((uint_fast64_t) sig32Z<<32) + (q<<3); in extF80_sqrt() 122 term = softfloat_mul64ByShifted32To128( x64, q ); in extF80_sqrt() 129 sigZ = (sigZ<<1) + (q>>25); in extF80_sqrt() 130 sigZExtra = (uint64_t) (q<<39); in extF80_sqrt() 133 if ( (q & 0xFFFFFF) <= 2 ) { in extF80_sqrt() 134 q &= ~(uint_fast64_t) 0xFFFF; in extF80_sqrt() 135 sigZExtra = (uint64_t) (q<<39); in extF80_sqrt() 136 term = softfloat_mul64ByShifted32To128( x64 + (q>>27), q ); in extF80_sqrt() [all …]
|
A D | f32_rem.c | 59 uint32_t q, recip32, altRem, meanRem; in f32_rem() local 109 q = 0; in f32_rem() 112 q = (sigB <= rem); in f32_rem() 113 if ( q ) rem -= sigB; in f32_rem() 130 q = (rem * (uint_fast64_t) recip32)>>32; in f32_rem() 132 rem = -(q * (uint32_t) sigB); in f32_rem() 138 q >>= ~expDiff & 31; in f32_rem() 139 rem = (rem<<(expDiff + 30)) - q * (uint32_t) sigB; in f32_rem() 145 ++q; in f32_rem() 149 if ( (meanRem & 0x80000000) || (! meanRem && (q & 1)) ) rem = altRem; in f32_rem()
|
A D | extF80M_div.c | 74 uint32_t q, qs[2]; in extF80M_div() local 135 q = (x64 + 0x80000000)>>32; in extF80M_div() 138 softfloat_remStep96MBy32( y, 29, sigB, q, y ); in extF80M_div() 140 --q; in extF80M_div() 143 qs[ix] = q; in extF80M_div() 147 if ( ((q + 1) & 0x3FFFFF) < 2 ) { in extF80M_div() 148 softfloat_remStep96MBy32( y, 29, sigB, q, y ); in extF80M_div() 150 --q; in extF80M_div() 153 ++q; in extF80M_div() 159 q |= 1; in extF80M_div() [all …]
|
A D | f128M_div.c | 73 uint32_t q, qs[3], uiZ96; in f128M_div() local 126 q = (q64 + 0x80000000)>>32; in f128M_div() 129 softfloat_remStep128MBy32( y, 29, sigB, q, y ); in f128M_div() 131 --q; in f128M_div() 134 qs[ix] = q; in f128M_div() 138 if ( ((q + 1) & 7) < 2 ) { in f128M_div() 139 softfloat_remStep128MBy32( y, 29, sigB, q, y ); in f128M_div() 141 --q; in f128M_div() 144 ++q; in f128M_div() 151 q |= 1; in f128M_div() [all …]
|
A D | f64_rem.c | 59 uint32_t q, recip32; in f64_rem() local 114 q = 0; in f64_rem() 117 q = (sigB <= rem); in f64_rem() 118 if ( q ) rem -= sigB; in f64_rem() 137 q = (q64 + 0x80000000)>>32; in f64_rem() 143 rem -= q * (uint64_t) sigB; in f64_rem() 150 q = (uint32_t) (q64>>32)>>(~expDiff & 31); in f64_rem() 151 rem = (rem<<(expDiff + 30)) - q * (uint64_t) sigB; in f64_rem() 161 ++q; in f64_rem() 167 (meanRem & UINT64_C( 0x8000000000000000 )) || (! meanRem && (q & 1)) in f64_rem()
|
A D | f128M_rem.c | 66 uint32_t q, recip32; in f128M_rem() local 106 q = 0; in f128M_rem() 108 q = (softfloat_compare128M( x, remPtr ) <= 0); in f128M_rem() 109 if ( q ) softfloat_sub128M( remPtr, x, remPtr ); in f128M_rem() 121 q = (q64 + 0x80000000)>>32; in f128M_rem() 122 softfloat_remStep128MBy32( remPtr, 29, x, q, remPtr ); in f128M_rem() 131 q = (uint32_t) (q64>>32)>>(~expDiff & 31); in f128M_rem() 132 softfloat_remStep128MBy32( remPtr, expDiff + 30, x, q, remPtr ); in f128M_rem() 143 ++q; in f128M_rem() 154 || (! wordMeanRem && (q & 1) && ! x[indexWord( 4, 0 )] in f128M_rem()
|
A D | extF80_div.c | 67 uint_fast32_t q; in extF80_div() local 138 q = (q64 + 0x80000000)>>32; in extF80_div() 142 term = softfloat_mul64ByShifted32To128( sigB, q ); in extF80_div() 145 --q; in extF80_div() 148 sigZ = (sigZ<<29) + q; in extF80_div() 152 if ( ((q + 1) & 0x3FFFFF) < 2 ) { in extF80_div() 158 --q; in extF80_div() 161 ++q; in extF80_div() 164 if ( rem.v64 | rem.v0 ) q |= 1; in extF80_div() 168 sigZ = (sigZ<<6) + (q>>23); in extF80_div() [all …]
|
A D | extF80M_rem.c | 70 uint32_t rem[3], x[3], sig32B, q, recip32, rem2[3], *remPtr, *altRemPtr; in extF80M_rem() local 130 q = 0; in extF80M_rem() 132 q = (softfloat_compare96M( x, rem ) <= 0); in extF80M_rem() 133 if ( q ) softfloat_sub96M( rem, x, rem ); in extF80M_rem() 141 q = (x64 + 0x80000000)>>32; in extF80M_rem() 142 softfloat_remStep96MBy32( rem, 29, x, q, rem ); in extF80M_rem() 151 q = (uint32_t) (x64>>32)>>(~expDiff & 31); in extF80M_rem() 152 softfloat_remStep96MBy32( rem, expDiff + 30, x, q, rem ); in extF80M_rem() 165 ++q; in extF80M_rem() 176 || (! wordMeanRem && (q & 1) && ! x[indexWord( 3, 0 )] in extF80M_rem()
|
A D | f128_div.c | 64 uint_fast32_t q; in f128_div() local 134 q = (q64 + 0x80000000)>>32; in f128_div() 138 term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); in f128_div() 141 --q; in f128_div() 144 qs[ix] = q; in f128_div() 148 if ( ((q + 1) & 7) < 2 ) { in f128_div() 150 term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); in f128_div() 153 --q; in f128_div() 156 ++q; in f128_div() 159 if ( rem.v64 | rem.v0 ) q |= 1; in f128_div() [all …]
|
A D | extF80_rem.c | 62 uint_fast32_t q, recip32; in extF80_rem() local 134 q = 0; in extF80_rem() 136 q = (sigB <= sigA); in extF80_rem() 137 if ( q ) { in extF80_rem() 149 q = (q64 + 0x80000000)>>32; in extF80_rem() 151 term = softfloat_mul64ByShifted32To128( sigB, q ); in extF80_rem() 163 q = (uint32_t) (q64>>32)>>(~expDiff & 31); in extF80_rem() 165 term = softfloat_mul64ByShifted32To128( sigB, q ); in extF80_rem() 178 ++q; in extF80_rem() 187 || (! (meanRem.v64 | meanRem.v0) && (q & 1)) in extF80_rem()
|
A D | f128_rem.c | 60 uint_fast32_t q, recip32; in f128_rem() local 122 q = 0; in f128_rem() 124 q = softfloat_le128( sigB.v64, sigB.v0, rem.v64, rem.v0 ); in f128_rem() 125 if ( q ) { in f128_rem() 135 q = (q64 + 0x80000000)>>32; in f128_rem() 137 term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); in f128_rem() 147 q = (uint32_t) (q64>>32)>>(~expDiff & 31); in f128_rem() 149 term = softfloat_mul128By32( sigB.v64, sigB.v0, q ); in f128_rem() 160 ++q; in f128_rem() 167 || (! (meanRem.v64 | meanRem.v0) && (q & 1)) in f128_rem()
|
/optee_os-3.20.0/lib/libutils/isoc/arch/arm/ |
A D | arm32_aeabi_divmod.c | 22 unsigned q; /* computed quotient */ member 60 unsigned i = 1, q = 0; in division_qr() local 72 q = q << 1; /* write bit in q at index (size-1) */ in division_qr() 76 q++; in division_qr() 82 qr->q = q; in division_qr() 92 qr->q = -qr->q; in uint_div_qr() 103 return qr.q; in __aeabi_uidiv() 112 return ret_uidivmod_values(qr.q, qr.r); in __aeabi_uidivmod() 131 return qr.q; in __aeabi_idiv() 150 return ret_idivmod_values(qr.q, qr.r); in __aeabi_idivmod()
|
A D | arm32_aeabi_ldivmod.c | 8 unsigned long long q; /* computed quotient */ member 21 unsigned long long i = 1, q = 0; in division_lqr() local 33 q = q << 1; /* write bit in q at index (size-1) */ in division_lqr() 36 q++; in division_lqr() 42 qr->q = q; in division_lqr() 53 qr->q = -qr->q; in ul_div_qr() 73 asm_ulqr->v0 = qr.q; in __ul_divmod() 102 asm_lqr->v0 = qr.q; in __l_divmod()
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | dsa.c | 25 if (!bn_alloc_max(&s->q)) in crypto_acipher_alloc_dsa_keypair() 35 crypto_bignum_free(s->q); in crypto_acipher_alloc_dsa_keypair() 49 if (!bn_alloc_max(&s->q)) in crypto_acipher_alloc_dsa_public_key() 57 crypto_bignum_free(s->q); in crypto_acipher_alloc_dsa_public_key() 77 mp_copy(key->q, ltc_tmp_key.q); in crypto_acipher_gen_dsa_key() 105 .qord = mp_unsigned_bin_size(key->q), in crypto_acipher_dsa_sign() 108 .q = key->q, in crypto_acipher_dsa_sign() 124 if (mp_unsigned_bin_size(ltc_key.q) < hash_size) in crypto_acipher_dsa_sign() 125 hash_size = mp_unsigned_bin_size(ltc_key.q); in crypto_acipher_dsa_sign() 173 .qord = mp_unsigned_bin_size(key->q), in crypto_acipher_dsa_verify() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dh/ |
A D | dh_make_key.c | 49 int dh_make_key(prng_state *prng, int wprng, void *q, int xbits, dh_key *key) in dh_make_key() argument 76 if (q) in dh_make_key() 77 key_size_q = mp_unsigned_bin_size(q); in dh_make_key() 81 LTC_ARGCHK((q == NULL) || (key_size <= key_size_q)); in dh_make_key() 83 if (q) in dh_make_key() 90 if ((q != NULL) && (key_size_q < key_size_p)) in dh_make_key() 91 arg_mod = q; in dh_make_key()
|
/optee_os-3.20.0/ |
A D | Makefile | 57 q := @ macro 61 q := macro 106 ${q}dirs="$(call cleandirs-for-rmdir)"; if [ "$$dirs" ]; then $(RMDIR) $$dirs; fi 108 ${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi 113 ${q}rm -f cscope.* 114 ${q}find $(PWD) -name "*.[chSs]" | grep -v export-ta_ | \ 116 ${q}cscope -b -q -k 122 ${q}./scripts/checkpatch.sh 125 ${q}./scripts/checkpatch.sh --cached
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_set.c | 20 const unsigned char *q, unsigned long qlen, in dsa_set_pqg() argument 27 LTC_ARGCHK(q != NULL); in dsa_set_pqg() 33 err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, LTC_NULL); in dsa_set_pqg() 38 … if ((err = mp_read_unsigned_bin(key->q, (unsigned char *)q , qlen)) != CRYPT_OK) { goto LBL_ERR; } in dsa_set_pqg() 40 key->qord = mp_unsigned_bin_size(key->q); in dsa_set_pqg() 76 LTC_ARGCHK(key->q != NULL); in dsa_set_key()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/rsa/ |
A D | rsa_make_key.c | 14 void *p, *q, *tmp1, *tmp2; in s_rsa_make_key() local 25 if ((err = mp_init_multi(&p, &q, &tmp1, &tmp2, LTC_NULL)) != CRYPT_OK) { in s_rsa_make_key() 40 if ((err = rand_prime( q, size/2, prng, wprng)) != CRYPT_OK) { goto cleanup; } in s_rsa_make_key() 41 … if ((err = mp_sub_d( q, 1, tmp1)) != CRYPT_OK) { goto cleanup; } /* tmp1 = q-1 */ in s_rsa_make_key() 57 …if ((err = mp_mul( p, q, key->N)) != CRYPT_OK) { goto errkey; } /* key->N = p… in s_rsa_make_key() 62 …if ((err = mp_sub_d( q, 1, tmp2)) != CRYPT_OK) { goto errkey; } /* tmp2 = q-1… in s_rsa_make_key() 65 …if ((err = mp_invmod( q, p, key->qP)) != CRYPT_OK) { goto errkey; } /* qP = 1/q m… in s_rsa_make_key() 68 if ((err = mp_copy( q, key->q)) != CRYPT_OK) { goto errkey; } in s_rsa_make_key() 79 mp_clear_multi(tmp2, tmp1, q, p, LTC_NULL); in s_rsa_make_key()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ec25519/ |
A D | tweetnacl.c | 63 t= c&(p[i]^q[i]); in sel25519() 65 q[i]^=t; in sel25519() 247 Z(t, q[1], q[0]); in add() 250 A(t, q[0], q[1]); in add() 293 cswap(p,q,b); in scalarmult() 294 add(q,p); in scalarmult() 296 cswap(p,q,b); in scalarmult() 302 gf q[4]; in scalarbase() local 306 M(q[3],X,Y); in scalarbase() 455 gf p[4],q[4]; in tweetnacl_crypto_sign_open() local [all …]
|
/optee_os-3.20.0/core/drivers/crypto/caam/acipher/ |
A D | caam_dsa.c | 54 caam_free_buf(&key->q); in do_keypair_free() 105 prime.q = &outkey->q; in get_keypair_domain_params() 114 crypto_bignum_bin2bn(outkey->q.data, outkey->q.length, key->q); in get_keypair_domain_params() 124 outkey->q.length); in get_keypair_domain_params() 185 crypto_bignum_bn2bin(inkey->q, outkey->q.data + n_bytes - field_size); in do_keypriv_conv() 198 cache_operation(TEE_CACHECLEAN, outkey->q.data, outkey->q.length); in do_keypriv_conv() 247 crypto_bignum_bn2bin(inkey->q, outkey->q.data + n_bytes - field_size); in do_keypub_conv() 260 cache_operation(TEE_CACHECLEAN, outkey->q.data, outkey->q.length); in do_keypub_conv() 294 if (!key->q) in do_allocate_keypair() 314 crypto_bignum_free(key->q); in do_allocate_keypair() [all …]
|
/optee_os-3.20.0/ta/arch/arm/ |
A D | link.mk | 42 $(q)mkdir -p $(dir $@) 43 $(q)echo "{" >$@ 44 $(q)echo "__elf_phdr_info;" >>$@ 46 $(q)echo "__ftrace_info;" >>$@ 48 $(q)echo "trace_ext_prefix;" >>$@ 49 $(q)echo "trace_level;" >>$@ 50 $(q)echo "};" >>$@ 82 $(q)mkdir -p $$(dir $$@) 92 $(q)$(LD$(sm)) $(ldargs-$(user-ta-uuid).elf) -o $$@ 97 $(q)$(OBJDUMP$(sm)) -l -x -d $$< > $$@ [all …]
|
/optee_os-3.20.0/core/arch/arm/crypto/ |
A D | sha256_armv8a_ce_a32.S | 35 vadd.u32 ta\ev, q\s0, k\ev 40 sha256su0.32 q\s0, q\s1 42 sha256su1.32 q\s0, q\s2, q\s3
|