/bionic/tools/relocation_packer/test_data/ |
D | elf_file_unittest_relocs.cc | 11 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/ |
D | k_rem_pio2.c | 296 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 …]
|
D | e_jnf.c | 37 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 …]
|
D | e_jn.c | 58 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 …]
|
D | s_rint.c | 41 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()
|
D | s_trunc.c | 36 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/tests/ |
D | qsort_test.cpp | 54 long i; in TEST() local 57 for (i=0; i<BUFFER_SIZE; i++) in TEST() 58 buf[i] = i; in TEST() 61 for (i=0; i<BUFFER_SIZE/4; i++) { in TEST() 76 for (i=0; i<BUFFER_SIZE; i++) in TEST() 77 EXPECT_EQ(i, buf[i]); in TEST() 82 int i; in TEST() local 85 for (i=0; i<BUFFER_SIZE; i++) in TEST() 86 buf[i] = i; in TEST() 89 for (i=0; i<BUFFER_SIZE/4; i++) { in TEST() [all …]
|
D | sched_test.cpp | 33 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 …]
|
D | malloc_test.cpp | 49 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() 116 for (size_t i = 0; i < 100; i++) { in TEST() local 117 ASSERT_EQ(0x23, ptr[i]); in TEST() 124 for (size_t i = 0; i < 200; i++) { in TEST() local 125 ASSERT_EQ(0x45, ptr[i]); in TEST() 132 for (size_t i = 0; i < 250; i++) { in TEST() local [all …]
|
D | stdatomic_test.cpp | 93 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 …]
|
D | math_data_test.h | 171 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 …]
|
D | buffer_tests.cpp | 209 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 …]
|
D | sys_ttydefaults_test.cpp | 23 int i; in TEST() local 24 i = TTYDEF_IFLAG; in TEST() 25 i = TTYDEF_OFLAG; in TEST() 26 i = TTYDEF_LFLAG; in TEST() 27 i = TTYDEF_CFLAG; in TEST() 28 i = TTYDEF_SPEED; in TEST()
|
D | sys_socket_test.cpp | 127 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 …]
|
D | link_test.cpp | 42 static int Callback(dl_phdr_info* i, size_t s, void* data) { in TEST() 43 reinterpret_cast<Functor*>(data)->DoChecks(i, s); in TEST() 52 for (ElfW(Half) i = 0; i < info->dlpi_phnum; ++i) { in TEST() 53 const ElfW(Phdr)* phdr = reinterpret_cast<const ElfW(Phdr)*>(&info->dlpi_phdr[i]); in TEST() 97 for (int i = 0; i < count; ++i) { in TEST() local 99 ASSERT_TRUE((entries[i].one & (1<<31)) == 0); in TEST() 101 uintptr_t exidx_func = read_exidx_func(&entries[i].one); in TEST() 108 if (i > 0) { in TEST() 109 EXPECT_GE(exidx_func, read_exidx_func(&entries[i - 1].one)) << i; in TEST()
|
/bionic/benchmarks/ |
D | property_benchmark.cpp | 67 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/libc/tools/ |
D | generate-NOTICE.py | 52 def extract_copyright_at(lines, i): argument 53 hash = lines[i].startswith("#") 56 start = i 65 while i < len(lines): 66 if "*/" in lines[i]: 68 if hash and len(lines[i]) == 0: 70 …if "\t@(#)" in lines[i] or "\tfrom: @(#)" in lines[i] or "From: @(#)" in lines[i] or "from OpenBSD… 72 if "\tcitrus Id: " in lines[i]: 74 …if "\t$Citrus: " in lines[i] or "\t$OpenBSD: " in lines[i] or " $FreeBSD: " in lines[i] or "\t$Net… 76 if "$FreeBSD$" in lines[i] or "$Citrus$" in lines[i]: [all …]
|
/bionic/libc/upstream-openbsd/lib/libc/gdtoa/ |
D | hexnan.c | 36 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 …]
|
/bionic/libc/upstream-openbsd/lib/libc/net/ |
D | inet_lnaof.c | 42 in_addr_t i = ntohl(in.s_addr); in inet_lnaof() local 44 if (IN_CLASSA(i)) in inet_lnaof() 45 return ((i)&IN_CLASSA_HOST); in inet_lnaof() 46 else if (IN_CLASSB(i)) in inet_lnaof() 47 return ((i)&IN_CLASSB_HOST); in inet_lnaof() 49 return ((i)&IN_CLASSC_HOST); in inet_lnaof()
|
D | inet_netof.c | 41 in_addr_t i = ntohl(in.s_addr); in inet_netof() local 43 if (IN_CLASSA(i)) in inet_netof() 44 return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); in inet_netof() 45 else if (IN_CLASSB(i)) in inet_netof() 46 return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT); in inet_netof() 48 return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT); in inet_netof()
|
D | inet_ntop.c | 107 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/ |
D | wchar.cpp | 71 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 …]
|
D | vdso.cpp | 66 for (size_t i = 0; i < vdso_ehdr->e_shnum; ++i) { in __libc_init_vdso() local 67 if (vdso_shdr[i].sh_type == SHT_DYNSYM) { in __libc_init_vdso() 68 symbol_count = vdso_shdr[i].sh_size / sizeof(ElfW(Sym)); in __libc_init_vdso() 79 for (size_t i = 0; i < vdso_ehdr->e_phnum; ++i) { in __libc_init_vdso() local 80 if (vdso_phdr[i].p_type == PT_DYNAMIC) { in __libc_init_vdso() 81 vdso_dyn = reinterpret_cast<ElfW(Dyn)*>(vdso_ehdr_addr + vdso_phdr[i].p_offset); in __libc_init_vdso() 82 } else if (vdso_phdr[i].p_type == PT_LOAD) { in __libc_init_vdso() 83 vdso_addr = vdso_ehdr_addr + vdso_phdr[i].p_offset - vdso_phdr[i].p_vaddr; in __libc_init_vdso() 105 for (size_t i = 0; i < symbol_count; ++i) { in __libc_init_vdso() local 107 if (strcmp(vdso[j].name, strtab + symtab[i].st_name) == 0) { in __libc_init_vdso() [all …]
|
D | arpa_inet.cpp | 39 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()
|
/bionic/libc/dns/nameser/ |
D | ns_samedomain.c | 56 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()
|