Home
last modified time | relevance | path

Searched refs:alignment (Results 1 – 25 of 116) sorted by relevance

12345

/illumos-gate/usr/src/tools/smatch/src/
H A Dsymbol.c101 if (sym->ctype.alignment > info->max_align) in lay_out_union()
102 info->max_align = sym->ctype.alignment; in lay_out_union()
132 if (sym->ctype.alignment > info->max_align) in lay_out_struct()
133 info->max_align = sym->ctype.alignment; in lay_out_struct()
148 align_bit_mask = bytes_to_bits(sym->ctype.alignment) - 1; in lay_out_struct()
198 if (!sym->ctype.alignment) in examine_struct_union_type()
199 sym->ctype.alignment = info.max_align; in examine_struct_union_type()
202 bit_align = bytes_to_bits(sym->ctype.alignment)-1; in examine_struct_union_type()
231 unsigned long bit_size = -1, alignment; in examine_array_type() local
246 alignment = base_type->ctype.alignment; in examine_array_type()
[all …]
H A Dallocate.c76 unsigned long alignment = desc->alignment; in allocate() local
100 size = (size + alignment - 1) & ~(alignment-1); in allocate()
113 offset = (offset + alignment - 1) & ~(alignment-1); in allocate()
H A Dallocate.h15 unsigned int alignment; member
48 .alignment = objalign, \
H A Dcheck_rosenberg.c67 if (type->ctype.alignment == 1) in check_struct()
78 if (!tmp->ctype.alignment) { in check_struct()
80 } else if (align % tmp->ctype.alignment) { in check_struct()
98 if (align % type->ctype.alignment) { in check_struct()
H A Dparse.c1087 if (!ctx->ctype.alignment) in attribute_packed()
1088 ctx->ctype.alignment = 1; in attribute_packed()
1094 int alignment = max_alignment; in attribute_aligned() local
1100 alignment = const_expression_value(expr); in attribute_aligned()
1102 if (alignment & (alignment-1)) { in attribute_aligned()
1105 } else if (alignment > ctx->ctype.alignment) in attribute_aligned()
1106 ctx->ctype.alignment = alignment; in attribute_aligned()
1453 int alignment = 0; in alignas_specifier() local
1463 alignment = sym->ctype.alignment; in alignas_specifier()
1470 alignment = const_expression_value(expr); in alignas_specifier()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dposix_memalign.c50 posix_memalign(void **memptr, size_t alignment, size_t size) in posix_memalign() argument
54 if ((alignment == 0) || !ISP2(alignment) || in posix_memalign()
55 (alignment & (sizeof (void *) - 1)) != 0) { in posix_memalign()
61 if ((ptr = memalign(alignment, size)) == NULL) { in posix_memalign()
/illumos-gate/usr/src/cmd/bhyve/amd64/
H A De820.c342 const uint64_t alignment, const enum e820_memory_type type) in e820_alloc_highest() argument
350 base = roundup2(element->base, alignment); in e820_alloc_highest()
362 address = rounddown2(end - length, alignment); in e820_alloc_highest()
376 const uint64_t alignment, const enum e820_memory_type type) in e820_alloc_lowest() argument
384 base = MAX(min_address, roundup2(element->base, alignment)); in e820_alloc_lowest()
408 const uint64_t alignment, const enum e820_memory_type type, in e820_alloc() argument
411 assert(powerof2(alignment)); in e820_alloc()
412 assert((address & (alignment - 1)) == 0); in e820_alloc()
420 return (e820_alloc_lowest(0, length, alignment, type)); in e820_alloc()
422 return (e820_alloc_lowest(address, length, alignment, type)); in e820_alloc()
[all …]
H A De820.h41 const uint64_t alignment, const enum e820_memory_type type,
/illumos-gate/usr/src/boot/libsa/
H A Dzalloc_malloc.c61 Memalign(size_t alignment, size_t bytes, const char *file __unused, in Memalign() argument
64 if (alignment == 0) in Memalign()
65 alignment = 1; in Memalign()
67 return (Malloc_align(bytes, alignment)); in Memalign()
71 Malloc_align(size_t bytes, size_t alignment) in Malloc_align() argument
81 while ((res = znalloc(&MallocPool, bytes, alignment)) == NULL) { in Malloc_align()
/illumos-gate/usr/src/lib/libmalloc/common/
H A Dmalloc.c198 memalign(size_t alignment, size_t size) in memalign() argument
206 if (size == 0 || alignment == 0 || in memalign()
207 (alignment & (alignment - 1)) != 0) { in memalign()
210 if (alignment <= ALIGNSZ) in memalign()
213 alloc_size = size + alignment; in memalign()
226 fr = (fr + alignment - 1) / alignment * alignment; in memalign()
239 alloc_size = size + alignment*2; in memalign()
252 fr = (fr + alignment - 1) / alignment * alignment; in memalign()
256 fr = fr + alignment; in memalign()
/illumos-gate/usr/src/tools/ndrgen/
H A Dndr_anal.c133 tdti->alignment, in show_typeinfo_list()
140 ti->alignment, in show_typeinfo_list()
376 while (offset & ti->alignment) in analyze_typeinfo_typedef()
423 while (offset & ti->alignment) in analyze_typeinfo_struct()
477 while (size & ti->alignment) in analyze_typeinfo_union()
496 ti->alignment |= mem->type->alignment; in analyze_typeinfo_aggregate_finish()
612 while (*offsetp & type_down->alignment) in analyze_member()
776 ti->alignment = ti->size_fixed_part - 1; in seed_basic_types()
900 ti->alignment = 3; in bind_typeinfo()
908 ti->alignment = tdti->alignment; in bind_typeinfo()
[all …]
/illumos-gate/usr/src/lib/libc/i386_hwcap1/gen/
H A Dmemset.S52 cmpl $256, %ecx / smaller areas don't benefit from alignment
63 pushl %esi / for alignment work
75 jz .sse_aligned / skip alignment if not needed
77 movl %esi, %ecx / alignment bytes
102 jmp .sse_nt_loop / branch across alignment nops
152 andl $7, %edi / check alignment
/illumos-gate/usr/src/cmd/bhyve/common/
H A Dbasl.c57 uint32_t alignment; member
154 table->off = roundup2(*off, table->alignment); in basl_finish_install_guest_tables()
172 table->alignment, QEMU_LOADER_ALLOC_HIGH)); in basl_finish_install_guest_tables()
573 const uint8_t *fwcfg_name, const uint32_t alignment, const uint8_t size) argument
579 BASL_EXEC(qemu_loader_alloc(basl_loader, fwcfg_name, alignment,
679 const uint8_t *const name, const uint32_t alignment) argument
701 new_table->alignment = alignment;
H A Dbasl.h117 const uint8_t *fwcfg_name, uint32_t alignment,
130 const uint8_t *name, uint32_t alignment);
/illumos-gate/usr/src/uts/common/io/i40e/
H A Di40e_osdep.c45 enum i40e_memory_type type, u64 size, u32 alignment) in i40e_allocate_dma_mem() argument
61 attr.dma_attr_align = alignment; in i40e_allocate_dma_mem()
62 mem->idm_alignment = alignment; in i40e_allocate_dma_mem()
/illumos-gate/usr/src/uts/sun4/vm/
H A Dsfmmu.c526 ndata_extra_base(struct memlist *ndata, size_t alignment, caddr_t endaddr) in ndata_extra_base() argument
540 ASSERT((alignment % ecache_alignsize) == 0); in ndata_extra_base()
547 base = roundup(ndata->ml_address, alignment); in ndata_extra_base()
580 ndata_select_chunk(struct memlist *ndata, size_t wanted, size_t alignment) in ndata_select_chunk() argument
609 base = roundup(frlist->ml_address, alignment); in ndata_select_chunk()
658 ndata_alloc(struct memlist *ndata, size_t wanted, size_t alignment) in ndata_alloc() argument
670 if ((found = ndata_select_chunk(ndata, wanted, alignment)) == NULL) in ndata_alloc()
676 base = roundup(found->ml_address, alignment); in ndata_alloc()
/illumos-gate/usr/src/lib/libc/i386/gen/
H A Dstrchr.S42 cmp $3, %ecx / check alignment
49 cmp $2, %ecx / check alignment
/illumos-gate/usr/src/uts/sun4u/cpu/
H A Dcheetah_copy.S743 bz,pt %ncc, .kcopy_8 ! check for longword alignment
759 bz,pt %ncc, .kcopy_4 ! check for word alignment
918 bz,pt %ncc, .bcopy_8 ! check for longword alignment
934 bz,pt %ncc, .bcopy_4 ! check for word alignment
983 or %o0, %o1, %o3 ! prepare alignment check
984 andcc %o3, 0x3, %g0 ! test for alignment
1021 nop ! instruction alignment
1082 xor %o0, %o1, %o3 ! setup alignment check
1094 bz,pt %ncc, .bc_med_long1 ! word alignment
1153 bz,pt %ncc, .bc_med_word1 ! word alignment
[all …]
H A Dopl_olympus_copy.S700 bz,pt %ncc, .kcopy_8 ! check for longword alignment
716 bz,pt %ncc, .kcopy_4 ! check for word alignment
875 bz,pt %ncc, .bcopy_8 ! check for longword alignment
891 bz,pt %ncc, .bcopy_4 ! check for word alignment
940 or %o0, %o1, %o3 ! prepare alignment check
941 andcc %o3, 0x3, %g0 ! test for alignment
974 nop ! instruction alignment
1035 xor %o0, %o1, %o3 ! setup alignment check
1047 bz,pt %ncc, .bc_med_long1 ! word alignment
1106 bz,pt %ncc, .bc_med_word1 ! word alignment
[all …]
/illumos-gate/usr/src/common/mapfiles/common/
H A Dmap.bssalign24 # the segment at 4Mb. This effectively provides an appropriate alignment for
26 # executables. See ppgsz(1). Users are cautioned that an alignment
/illumos-gate/usr/src/lib/libc/capabilities/sun4v/common/
H A Dmemcpy.S244 .cpy_dbwdbc: ! alignment of src is needed
262 srl %g1, 3, %o0 ! retsote %o0 value for alignment
263 add %o5, %o0, %o5 ! restore src alignment
269 .dbcopybc: ! alignment of src is not needed
330 .mv_large_align8_copy: ! Src and dst share 8 byte alignment
354 ! Determine source alignment
778 or %o0, %o1, %o4 ! prepare alignment check
779 andcc %o4, 0x3, %o5 ! test for alignment
1745 ! Move bytes according to source alignment
1747 bnz %ncc, .unalignbyte ! check for byte alignment
[all …]
/illumos-gate/usr/src/lib/libmtmalloc/common/
H A Dmtmalloc.c460 memalign(size_t alignment, size_t size) in memalign() argument
467 if (size == 0 || alignment == 0 || misaligned(alignment) || in memalign()
468 (alignment & (alignment - 1)) != 0) { in memalign()
474 if (alignment <= MTMALLOC_MIN_ALIGN) in memalign()
477 alloc_size = size + alignment - MTMALLOC_MIN_ALIGN; in memalign()
500 if ((offset = (uintptr_t)alloc_buf & (alignment - 1)) == 0) { in memalign()
534 shift = alignment - offset; in memalign()
/illumos-gate/usr/src/tools/smatch/src/validation/
H A Dalloc-align.c33 void *aligned_alloc(size_t alignment, size_t size) __alloc_align(1);
/illumos-gate/usr/src/uts/sun4/conf/
H A Dgenalign.S32 ! the booter what alignment we want
/illumos-gate/usr/src/uts/common/io/i40e/core/
H A Di40e_alloc.h57 u64 size, u32 alignment);

12345