Lines Matching refs:asmscn
27 asm_align (asmscn, value) in asm_align() argument
28 AsmScn_t *asmscn; in asm_align()
31 if (asmscn == NULL)
42 rwlock_wrlock (asmscn->ctx->lock);
47 if ((asmscn->offset & (value - 1)) != 0)
53 cnt = value - (asmscn->offset & (value - 1));
56 result = __libasm_ensure_section_space (asmscn, cnt);
62 byteptr = asmscn->offset % asmscn->pattern->len;
65 asmscn->offset += cnt;
69 asmscn->content->data[asmscn->content->len++]
70 = asmscn->pattern->bytes[byteptr++];
72 if (byteptr == asmscn->pattern->len)
79 if (asmscn->max_align < value)
81 asmscn->max_align = value;
84 if (asmscn->subsection_id != 0)
86 rwlock_wrlock (asmscn->data.up->ctx->lock);
88 if (asmscn->data.up->max_align < value)
89 asmscn->data.up->max_align = value;
91 rwlock_unlock (asmscn->data.up->ctx->lock);
96 rwlock_unlock (asmscn->ctx->lock);
105 __libasm_ensure_section_space (asmscn, len) in __libasm_ensure_section_space() argument
106 AsmScn_t *asmscn; in __libasm_ensure_section_space()
113 if (asmscn->content == NULL)
118 asmscn->content = (struct AsmData *) malloc (sizeof (struct AsmData)
120 if (asmscn->content == NULL)
123 asmscn->content->next = asmscn->content;
129 if (asmscn->content->maxlen - asmscn->content->len >= len)
133 size = MAX (2 *len, MIN (32768, 2 * asmscn->offset));
139 newp->next = asmscn->content->next;
140 asmscn->content = asmscn->content->next = newp;
143 asmscn->content->len = 0;
144 asmscn->content->maxlen = size;