Lines Matching refs:ofs

60   int ofs;		/* Byte offset into section. */  member
152 D->sections[i].ofs = 0; in dasm_setup()
176 int pos = sec->pos, ofs = sec->ofs, mrm = -1; in dasm_put() local
193 ofs++; in dasm_put()
202 case DASM_IMM_D: ofs += 4; break; in dasm_put()
204 case DASM_IMM_B: CK((n&-256) == 0, RANGE_I); ob: ofs++; break; in dasm_put()
206 case DASM_IMM_W: CK((n&-65536) == 0, RANGE_I); ofs += 2; break; in dasm_put()
207 case DASM_SPACE: p++; ofs += n; break; in dasm_put()
211 if (*p < 0x20 && (n&7) == 4) ofs++; in dasm_put()
215 case 1: if (n <= 7) { b[pos-1] |= 0x10; ofs--; } in dasm_put()
223 case DASM_IMM_LG64: ofs += 4; in dasm_put()
232 case DASM_IMM_PC64: ofs += 4; in dasm_put()
245 ofs += 4; /* Maximum offset needed. */ in dasm_put()
247 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
255 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
258 ofs += *p++; /* Maximum alignment needed (arg is 2**n-1). */ in dasm_put()
259 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
261 case DASM_EXTERN: p += 2; ofs += 4; break; in dasm_put()
262 case DASM_ESC: p++; ofs++; break; in dasm_put()
273 sec->ofs = ofs; in dasm_put()
282 int ofs = 0; in dasm_link() local
325 lofs += D->sections[i].ofs; in dasm_link()
327 lofs -= ofs; /* Bkwd label: unfix offset. */ in dasm_link()
330 if (lofs >= -128-shrink && lofs <= 127) ofs -= shrink; /* Yes. */ in dasm_link()
343 case DASM_LABEL_PC: b[pos++] += ofs; break; /* Fix label offset. */ in dasm_link()
344 case DASM_ALIGN: ofs -= (b[pos++]+ofs)&*p++; break; /* Adjust ofs. */ in dasm_link()
353 ofs += sec->ofs; /* Next section starts right after current section. */ in dasm_link()
356 D->codesize = ofs; /* Total size of all code sections */ in dasm_link()
357 *szp = ofs; in dasm_link()