Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 209) sorted by relevance

123456789

/bionic/tools/relocation_packer/test_data/
Delf_file_unittest_relocs.cc11 const int i = 0; variable
15 const void* pointer_0 = &i;
16 const void* pointer_1 = &i;
17 const void* pointer_2 = &i;
18 const void* pointer_3 = &i;
19 const void* pointer_4 = &i;
20 const void* pointer_5 = &i;
21 const void* pointer_6 = &i;
22 const void* pointer_7 = &i;
23 const void* pointer_8 = &i;
[all …]
/bionic/libm/upstream-freebsd/lib/msun/src/
Dk_rem_pio2.c296 int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih; in __kernel_rem_pio2() local
310 for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j]; in __kernel_rem_pio2()
313 for (i=0;i<=jk;i++) { in __kernel_rem_pio2()
314 for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw; in __kernel_rem_pio2()
320 for(i=0,j=jz,z=q[jz];j>0;i++,j--) { in __kernel_rem_pio2()
322 iq[i] = (int32_t)(z-two24*fw); in __kernel_rem_pio2()
333 i = (iq[jz-1]>>(24-q0)); n += i; in __kernel_rem_pio2()
334 iq[jz-1] -= i<<(24-q0); in __kernel_rem_pio2()
342 for(i=0;i<jz ;i++) { /* compute 1-q */ in __kernel_rem_pio2()
343 j = iq[i]; in __kernel_rem_pio2()
[all …]
De_jnf.c37 int32_t i,hx,ix, sgn; in __ieee754_jnf() local
63 for(i=1;i<n;i++){ in __ieee754_jnf()
65 b = b*((float)(i+i)/x) - a; /* avoid underflow */ in __ieee754_jnf()
77 for (a=one,i=2;i<=n;i++) { in __ieee754_jnf()
78 a *= (float)i; /* a = n! */ in __ieee754_jnf()
124 for(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t); in __ieee754_jnf()
139 for(i=n-1,di=(float)(i+i);i>0;i--){ in __ieee754_jnf()
147 for(i=n-1,di=(float)(i+i);i>0;i--){ in __ieee754_jnf()
175 int32_t i,hx,ix,ib; in __ieee754_ynf() local
197 for(i=1;i<n&&ib!=0xff800000;i++){ in __ieee754_ynf()
[all …]
De_jn.c58 int32_t i,hx,ix,lx, sgn; in __ieee754_jn() local
106 for(i=1;i<n;i++){ in __ieee754_jn()
108 b = b*((double)(i+i)/x) - a; /* avoid underflow */ in __ieee754_jn()
121 for (a=one,i=2;i<=n;i++) { in __ieee754_jn()
122 a *= (double)i; /* a = n! */ in __ieee754_jn()
168 for(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t); in __ieee754_jn()
183 for(i=n-1,di=(double)(i+i);i>0;i--){ in __ieee754_jn()
191 for(i=n-1,di=(double)(i+i);i>0;i--){ in __ieee754_jn()
219 int32_t i,hx,ix,lx; in __ieee754_yn() local
266 for(i=1;i<n&&high!=0xfff00000;i++){ in __ieee754_yn()
[all …]
Ds_rint.c41 u_int32_t i,i1; in rint() local
59 i = (0x000fffff)>>j0; in rint()
60 if(((i0&i)|i1)==0) return x; /* x is integral */ in rint()
61 i>>=1; in rint()
62 if(((i0&i)|i1)!=0) { in rint()
73 i0 = (i0&(~i))|((0x20000)>>j0); in rint()
80 i = ((u_int32_t)(0xffffffff))>>(j0-20); in rint()
81 if((i1&i)==0) return x; /* x is integral */ in rint()
82 i>>=1; in rint()
83 if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20)); in rint()
Ds_trunc.c36 u_int32_t i; in trunc() local
46 i = (0x000fffff)>>j0; in trunc()
47 if(((i0&i)|i1)==0) return x; /* x is integral */ in trunc()
49 i0 &= (~i); i1=0; in trunc()
56 i = ((u_int32_t)(0xffffffff))>>(j0-20); in trunc()
57 if((i1&i)==0) return x; /* x is integral */ in trunc()
59 i1 &= (~i); in trunc()
/bionic/benchmarks/
Dproperty_benchmark.cpp67 for (int i = 0; i < nprops; i++) { in LocalPropertyTestState() local
70 name_lens[i] = (random() % (PROP_NAME_MAX - 10)) + 10; in LocalPropertyTestState()
71 names[i] = new char[PROP_NAME_MAX + 1]; in LocalPropertyTestState()
73 for (int j = 0; j < name_lens[i]; j++) { in LocalPropertyTestState()
74 if (j == 0 || names[i][j-1] == '.' || j == name_lens[i] - 1) { in LocalPropertyTestState()
84 names[i][j] = prop_name_chars[random() % prop_name_len]; in LocalPropertyTestState()
86 names[i][name_lens[i]] = 0; in LocalPropertyTestState()
89 value_lens[i] = (random() % (PROP_VALUE_MAX - 1)) + 1; in LocalPropertyTestState()
90 values[i] = new char[PROP_VALUE_MAX]; in LocalPropertyTestState()
91 for (int j = 0; j < value_lens[i]; j++) { in LocalPropertyTestState()
[all …]
/bionic/tests/
Dsched_test.cpp33 int i = 0; in TEST() local
34 pid_t tid = clone(child_fn, &child_stack[1024], CLONE_VM, &i); in TEST()
39 ASSERT_EQ(42, i); in TEST()
64 int i = 0; in TEST() local
66 ASSERT_EQ(-1, clone(child_fn, nullptr, CLONE_VM, &i)); in TEST()
76 for (int i = 0; i < CPU_SETSIZE; i++) { in TEST() local
77 ASSERT_EQ(i == 0 || i == 17, CPU_ISSET(i, &set)); in TEST()
102 for (int i = 0; i < CPU_SETSIZE; i++) { in TEST() local
103 ASSERT_FALSE(CPU_ISSET(i, &set)); in TEST()
113 for (int i = 0; i < CPU_SETSIZE; i++) { in TEST() local
[all …]
Dmalloc_test.cpp49 for (size_t i = 0; i < alloc_len; i++) { in TEST() local
50 ASSERT_EQ(0, ptr[i]); in TEST()
78 for (size_t i = 0; i <= 12; i++) { in TEST() local
79 for (size_t alignment = 1 << i; alignment < (1U << (i+1)); alignment++) { in TEST()
83 ASSERT_EQ(0U, reinterpret_cast<uintptr_t>(ptr) % ((1U << i))) in TEST()
126 for (size_t i = 0; i < 100; i++) { in TEST() local
127 ASSERT_EQ(0x23, ptr[i]); in TEST()
134 for (size_t i = 0; i < 200; i++) { in TEST() local
135 ASSERT_EQ(0x45, ptr[i]); in TEST()
142 for (size_t i = 0; i < 250; i++) { in TEST() local
[all …]
Dstdatomic_test.cpp93 atomic_int i; in TEST() local
94 atomic_store(&i, 123); in TEST()
95 ASSERT_EQ(123, atomic_load(&i)); in TEST()
96 atomic_store_explicit(&i, 123, memory_order_relaxed); in TEST()
97 ASSERT_EQ(123, atomic_load_explicit(&i, memory_order_relaxed)); in TEST()
101 atomic_int i; in TEST() local
102 atomic_store(&i, 123); in TEST()
103 ASSERT_EQ(123, atomic_exchange(&i, 456)); in TEST()
104 ASSERT_EQ(456, atomic_exchange_explicit(&i, 123, memory_order_relaxed)); in TEST()
108 atomic_int i; in TEST() local
[all …]
Dmath_data_test.h171 for (size_t i = 0; i < N; ++i) {
173 data[i].expected, f(data[i].input)) << "Failed on element " << i;
183 for (size_t i = 0; i < N; ++i) {
184 EXPECT_EQ(data[i].expected, f(data[i].input)) << "Failed on element " << i;
194 for (size_t i = 0; i < N; ++i) {
195 EXPECT_EQ(data[i].expected, f(data[i].input)) << "Failed on element " << i;
205 for (size_t i = 0; i < N; ++i) {
206 EXPECT_EQ(data[i].expected, f(data[i].input)) << "Failed on element " << i;
217 for (size_t i = 0; i < N; ++i) {
219 … data[i].expected, f(data[i].input1, data[i].input2)) << "Failed on element " << i;
[all …]
Dbuffer_tests.cpp209 for (int i = 0; i < FENCEPOST_LENGTH; i += 2) { in SetFencepost() local
210 buffer[i] = 0xde; in SetFencepost()
211 buffer[i+1] = 0xad; in SetFencepost()
216 for (int i = 0; i < FENCEPOST_LENGTH; i += 2) { in VerifyFencepost() local
217 if (buffer[i] != 0xde || buffer[i+1] != 0xad) { in VerifyFencepost()
219 if (buffer[i] == 0xde) { in VerifyFencepost()
220 i++; in VerifyFencepost()
225 ASSERT_EQ(expected_value, buffer[i]); in VerifyFencepost()
242 for (size_t i = 0; i < g_single_aligns_len; i++) { in RunSingleBufferAlignTest() local
248 buf+FENCEPOST_LENGTH, g_single_aligns[i][0], g_single_aligns[i][1])); in RunSingleBufferAlignTest()
[all …]
Dsys_socket_test.cpp127 for (size_t i = 0; i < NUM_RECV_MSGS; i++) { in SendMultiple() local
128 if (send(fd, g_RecvMsgs[i], strlen(g_RecvMsgs[i]) + 1, 0) < 0) { in SendMultiple()
147 for (size_t i = 0; i < NUM_RECV_MSGS; i++) { in TestRecvMMsg() local
148 io[i].iov_base = reinterpret_cast<void*>(bufs[i]); in TestRecvMMsg()
149 io[i].iov_len = strlen(g_RecvMsgs[i]) + 1; in TestRecvMMsg()
151 msgs[i].msg_hdr.msg_iov = &io[i]; in TestRecvMMsg()
152 msgs[i].msg_hdr.msg_iovlen = 1; in TestRecvMMsg()
153 msgs[i].msg_len = sizeof(struct msghdr); in TestRecvMMsg()
163 for (size_t i = 0; i < NUM_RECV_MSGS; i++) { in TestRecvMMsg() local
164 ASSERT_STREQ(g_RecvMsgs[i], bufs[i]); in TestRecvMMsg()
[all …]
Dsearch_test.cpp118 explicit pod_node(int i) : i(i) {} in pod_node()
119 int i; member
123 return reinterpret_cast<const pod_node*>(rhs)->i - reinterpret_cast<const pod_node*>(lhs)->i; in pod_node_cmp()
139 explicit q_node(int i) : i(i) {} in q_node()
144 int i; member
160 ASSERT_EQ(expected, q->i); in TEST()
167 ASSERT_EQ(expected, q->i); in TEST()
174 ASSERT_EQ(0, head->i); in TEST()
175 ASSERT_EQ(2, head->next->i); in TEST()
179 ASSERT_EQ(0, head->i); in TEST()
[all …]
/bionic/libc/tools/
Dgenerate-NOTICE.py36 def ExtractCopyrightAt(lines, i): argument
37 hash = lines[i].startswith("#")
40 start = i
49 while i < len(lines):
50 if "*/" in lines[i]:
52 if hash and len(lines[i]) == 0:
54 …if "\t@(#)" in lines[i] or "\tfrom: @(#)" in lines[i] or "From: @(#)" in lines[i] or "from OpenBSD…
56 if "\tcitrus Id: " in lines[i]:
58 …if "\t$Citrus: " in lines[i] or "\t$OpenBSD: " in lines[i] or " $FreeBSD: " in lines[i] or "\t$Net…
60 if "$FreeBSD$" in lines[i] or "$Citrus$" in lines[i]:
[all …]
/bionic/libc/upstream-openbsd/lib/libc/gdtoa/
Dhexnan.c36 L_shift(x, x1, i) ULong *x; ULong *x1; int i; in L_shift() argument
38 L_shift(ULong *x, ULong *x1, int i)
43 i = 8 - i;
44 i <<= 2;
45 j = ULbits - i;
48 x[1] >>= i;
62 int havedig, hd0, i, nbits; local
72 havedig = hd0 = i = 0;
84 if (x < x1 && i < 8)
85 L_shift(x, x1, i);
[all …]
Ddtoa.c118 int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, local
204 i = (int)(word0(&d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
206 if (( i = (int)(word0(&d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)) )!=0) {
238 i -= Bias;
240 i <<= 2;
241 i += j;
249 i = bbits + be + (Bias + (P-1) - 1);
250 x = i > 32 ? word0(&d) << (64 - i) | word1(&d) >> (i - 32)
251 : word1(&d) << (32 - i);
254 i -= (Bias + (P-1) - 1) + 1;
[all …]
/bionic/libc/upstream-openbsd/lib/libc/net/
Dinet_lnaof.c43 in_addr_t i = ntohl(in.s_addr); in inet_lnaof() local
45 if (IN_CLASSA(i)) in inet_lnaof()
46 return ((i)&IN_CLASSA_HOST); in inet_lnaof()
47 else if (IN_CLASSB(i)) in inet_lnaof()
48 return ((i)&IN_CLASSB_HOST); in inet_lnaof()
50 return ((i)&IN_CLASSC_HOST); in inet_lnaof()
Dinet_netof.c42 in_addr_t i = ntohl(in.s_addr); in inet_netof() local
44 if (IN_CLASSA(i)) in inet_netof()
45 return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); in inet_netof()
46 else if (IN_CLASSB(i)) in inet_netof()
47 return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT); in inet_netof()
49 return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT); in inet_netof()
Dinet_ntop.c107 int i; in inet_ntop6() local
116 for (i = 0; i < IN6ADDRSZ; i++) in inet_ntop6()
117 words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); in inet_ntop6()
120 for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { in inet_ntop6()
121 if (words[i] == 0) { in inet_ntop6()
123 cur.base = i, cur.len = 1; in inet_ntop6()
146 for (i = 0; i < (IN6ADDRSZ / INT16SZ) && tp < ep; i++) { in inet_ntop6()
148 if (best.base != -1 && i >= best.base && in inet_ntop6()
149 i < (best.base + best.len)) { in inet_ntop6()
150 if (i == best.base) { in inet_ntop6()
[all …]
/bionic/libc/bionic/
Dwchar.cpp71 size_t i, o, r; in mbsnrtowcs() local
82 for (i = o = 0; i < nmc; i += r, o++) { in mbsnrtowcs()
83 if (static_cast<uint8_t>((*src)[i]) < 0x80) { in mbsnrtowcs()
85 if ((*src)[i] == '\0') { in mbsnrtowcs()
90 r = mbrtowc(NULL, *src + i, nmc - i, state); in mbsnrtowcs()
106 for (i = o = 0; i < nmc && o < len; i += r, o++) { in mbsnrtowcs()
107 if (static_cast<uint8_t>((*src)[i]) < 0x80) { in mbsnrtowcs()
109 dst[o] = (*src)[i]; in mbsnrtowcs()
111 if ((*src)[i] == '\0') { in mbsnrtowcs()
116 r = mbrtowc(dst + o, *src + i, nmc - i, state); in mbsnrtowcs()
[all …]
Dvdso.cpp68 for (size_t i = 0; i < vdso_ehdr->e_shnum; ++i) { in __libc_init_vdso() local
69 if (vdso_shdr[i].sh_type == SHT_DYNSYM) { in __libc_init_vdso()
70 symbol_count = vdso_shdr[i].sh_size / sizeof(ElfW(Sym)); in __libc_init_vdso()
81 for (size_t i = 0; i < vdso_ehdr->e_phnum; ++i) { in __libc_init_vdso() local
82 if (vdso_phdr[i].p_type == PT_DYNAMIC) { in __libc_init_vdso()
83 vdso_dyn = reinterpret_cast<ElfW(Dyn)*>(vdso_ehdr_addr + vdso_phdr[i].p_offset); in __libc_init_vdso()
84 } else if (vdso_phdr[i].p_type == PT_LOAD) { in __libc_init_vdso()
85 vdso_addr = vdso_ehdr_addr + vdso_phdr[i].p_offset - vdso_phdr[i].p_vaddr; in __libc_init_vdso()
107 for (size_t i = 0; i < symbol_count; ++i) { in __libc_init_vdso() local
109 if (strcmp(vdso[j].name, strtab + symtab[i].st_name) == 0) { in __libc_init_vdso()
[all …]
Darpa_inet.cpp39 size_t i; in inet_aton() local
40 for (i = 0; i < 4; ++i) { in inet_aton()
43 parts[i] = strtoul(cp, &end, 0); in inet_aton()
50 if (i == 0) { in inet_aton()
54 } else if (i == 1) { in inet_aton()
58 } else if (i == 2) { in inet_aton()
62 } else if (i == 3) { in inet_aton()
Dpthread_key.cpp79 for (size_t i = 0; i < BIONIC_PTHREAD_KEY_COUNT; ++i) { in pthread_key_clean_all() local
80 uintptr_t seq = atomic_load_explicit(&key_map[i].seq, memory_order_relaxed); in pthread_key_clean_all()
81 if (SeqOfKeyInUse(seq) && seq == key_data[i].seq && key_data[i].data != NULL) { in pthread_key_clean_all()
90 atomic_load_explicit(&key_map[i].key_destructor, memory_order_relaxed)); in pthread_key_clean_all()
95 if (atomic_load_explicit(&key_map[i].seq, memory_order_relaxed) != seq) { in pthread_key_clean_all()
103 void* data = key_data[i].data; in pthread_key_clean_all()
104 key_data[i].data = NULL; in pthread_key_clean_all()
119 for (size_t i = 0; i < BIONIC_PTHREAD_KEY_COUNT; ++i) { in pthread_key_create() local
120 uintptr_t seq = atomic_load_explicit(&key_map[i].seq, memory_order_relaxed); in pthread_key_create()
122 if (atomic_compare_exchange_weak(&key_map[i].seq, &seq, seq + SEQ_INCREMENT_STEP)) { in pthread_key_create()
[all …]
/bionic/libc/dns/nameser/
Dns_samedomain.c56 size_t la, lb, i; in ns_samedomain() local
67 for (i = la - 1; i > 0; i--) in ns_samedomain()
68 if (a[i - 1] == '\\') { in ns_samedomain()
83 for (i = lb - 1; i > 0; i--) in ns_samedomain()
84 if (b[i - 1] == '\\') { in ns_samedomain()
132 for (i = diff - 1; i > 0; i--) in ns_samedomain()
133 if (a[i - 1] == '\\') { in ns_samedomain()

123456789