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()
203 case DASM_IMM_D: ofs += 4; break; in dasm_put()
205 case DASM_IMM_B: CK((n&-256) == 0, RANGE_I); ob: ofs++; break; in dasm_put()
207 case DASM_IMM_W: CK((n&-65536) == 0, RANGE_I); ofs += 2; break; in dasm_put()
208 case DASM_SPACE: p++; ofs += n; break; in dasm_put()
212 if (*p < 0x20 && (n&7) == 4) ofs++; in dasm_put()
216 case 1: if (n <= 7) { b[pos-1] |= 0x10; ofs--; } in dasm_put()
244 ofs += 4; /* Maximum offset needed. */ in dasm_put()
246 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
248 ofs += 4; in dasm_put()
257 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
260 ofs += *p++; /* Maximum alignment needed (arg is 2**n-1). */ in dasm_put()
261 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
263 case DASM_EXTERN: p += 2; ofs += 4; break; in dasm_put()
264 case DASM_ESC: p++; ofs++; break; in dasm_put()
275 sec->ofs = ofs; in dasm_put()
284 int ofs = 0; in dasm_link() local
329 lofs += D->sections[i].ofs; in dasm_link()
331 lofs -= ofs; /* Bkwd label: unfix offset. */ in dasm_link()
334 if (lofs >= -128-shrink && lofs <= 127) ofs -= shrink; /* Yes. */ in dasm_link()
348 case DASM_LABEL_PC: b[pos++] += ofs; break; /* Fix label offset. */ in dasm_link()
349 case DASM_ALIGN: ofs -= (b[pos++]+ofs)&*p++; break; /* Adjust ofs. */ in dasm_link()
359 ofs += sec->ofs; /* Next section starts right after current section. */ in dasm_link()
362 D->codesize = ofs; /* Total size of all code sections */ in dasm_link()
363 *szp = ofs; in dasm_link()