Lines Matching refs:pos

48 #define DASM_POS2IDX(pos)	((pos)&0x00ffffff)  argument
49 #define DASM_POS2BIAS(pos) ((pos)&0xff000000) argument
51 #define DASM_POS2SEC(pos) ((pos)>>24) argument
52 #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) argument
62 int pos; /* Biased buffer position. */ member
152 D->sections[i].pos = DASM_SEC2POS(i); in dasm_setup()
225 int pos = sec->pos, ofs = sec->ofs; in dasm_put() local
228 if (pos >= sec->epos) { in dasm_put()
231 sec->rbuf = sec->buf - DASM_POS2BIAS(pos); in dasm_put()
232 sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); in dasm_put()
236 b[pos++] = start; in dasm_put()
253 case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break; in dasm_put()
266 b[pos] = -n; in dasm_put()
269 b[pos] = n; /* Else link to rel chain, anchored at label. */ in dasm_put()
270 *pl = pos; in dasm_put()
272 pos++; in dasm_put()
276 b[pos++] = n; in dasm_put()
277 b[pos++] = va_arg(ap, int); in dasm_put()
285 while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; in dasm_put()
287 *pl = -pos; /* Label exists now. */ in dasm_put()
288 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
299 b[pos++] = n; in dasm_put()
303 b[pos++] = n; in dasm_put()
307 b[pos++] = n; in dasm_put()
311 b[pos++] = n; in dasm_put()
316 b[pos++] = n; in dasm_put()
317 b[pos++] = m; in dasm_put()
326 b[pos++] = n; in dasm_put()
331 b[pos++] = n; in dasm_put()
335 b[pos++] = n; in dasm_put()
342 sec->pos = pos; in dasm_put()
377 int pos = DASM_SEC2POS(secnum); in dasm_link() local
378 int lastpos = sec->pos; in dasm_link()
380 while (pos != lastpos) { in dasm_link()
381 dasm_ActList p = D->actionlist + b[pos++]; in dasm_link()
389 case DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break; in dasm_link()
390 case DASM_REL_LG: case DASM_REL_PC: pos++; break; in dasm_link()
391 case DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break; in dasm_link()
393 case DASM_IMML: case DASM_IMMV: case DASM_VREG: pos++; break; in dasm_link()
394 case DASM_IMM13X: case DASM_REL_A: pos += 2; break; in dasm_link()
435 int *endb = sec->rbuf + sec->pos; in dasm_encode()
545 int pos = D->pclabels[pc]; in dasm_getpclabel() local
546 if (pos < 0) return *DASM_POS2PTR(D, -pos); in dasm_getpclabel()
547 if (pos > 0) return -1; /* Undefined. */ in dasm_getpclabel()