Lines Matching refs:pos

44 #define DASM_POS2IDX(pos)	((pos)&0x00ffffff)  argument
45 #define DASM_POS2BIAS(pos) ((pos)&0xff000000) argument
47 #define DASM_POS2SEC(pos) ((pos)>>24) argument
48 #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) argument
58 int pos; /* Biased buffer position. */ member
151 D->sections[i].pos = DASM_SEC2POS(i); in dasm_setup()
176 int pos = sec->pos, ofs = sec->ofs, mrm = -1; in dasm_put() local
179 if (pos >= sec->epos) { in dasm_put()
182 sec->rbuf = sec->buf - DASM_POS2BIAS(pos); in dasm_put()
183 sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); in dasm_put()
187 b[pos++] = start; in dasm_put()
196 b[pos++] = n; in dasm_put()
208 case DASM_SETLABEL: b[pos-2] = -0x40000000; break; /* Neg. label ofs. */ in dasm_put()
213 case 3: n |= b[pos-3]; in dasm_put()
214 case 2: n |= b[pos-2]; in dasm_put()
215 case 1: if (n <= 7) { b[pos-1] |= 0x10; ofs--; } in dasm_put()
238 b[pos] = -n; in dasm_put()
241 b[pos] = n; /* Else link to rel chain, anchored at label. */ in dasm_put()
242 *pl = pos; in dasm_put()
244 pos++; in dasm_put()
247 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
253 while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } in dasm_put()
254 *pl = -pos; /* Label exists now. */ in dasm_put()
255 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
259 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
272 sec->pos = pos; in dasm_put()
307 int pos = DASM_SEC2POS(secnum); in dasm_link() local
308 int lastpos = sec->pos; in dasm_link()
310 while (pos != lastpos) { in dasm_link()
311 dasm_ActList p = D->actionlist + b[pos++]; in dasm_link()
319 int lofs, lpos = b[pos]; in dasm_link()
322 if (lpos > pos) { /* Fwd label: add cumulative section offsets. */ in dasm_link()
329 lofs -= b[pos+1]; /* Short branch ok? */ in dasm_link()
333 b[pos+1] = shrink; in dasm_link()
334 pos += 2; in dasm_link()
341 pos++; break; 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()
389 int *endb = DASM_PTR_ADD(sec->rbuf, sec->pos); in dasm_encode()
494 int pos = D->pclabels[pc]; in dasm_getpclabel() local
495 if (pos < 0) return *DASM_POS2PTR(D, -pos); in dasm_getpclabel()
496 if (pos > 0) return -1; /* Undefined. */ in dasm_getpclabel()