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
145 D->sections[i].pos = DASM_SEC2POS(i); in dasm_setup()
146 D->sections[i].rbuf = DASM_PTR_SUB(D->sections[i].buf, D->sections[i].pos); in dasm_setup()
171 int pos = sec->pos, ofs = sec->ofs, mrm = -1; in dasm_put() local
174 if (pos >= sec->epos) { in dasm_put()
177 sec->rbuf = sec->buf - DASM_POS2BIAS(pos); in dasm_put()
178 sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); in dasm_put()
182 b[pos++] = start; in dasm_put()
193 b[pos++] = n; in dasm_put()
206 case DASM_SETLABEL: b[pos-2] = -0x40000000; break; /* Neg. label ofs. */ in dasm_put()
211 case 3: n |= b[pos-3]; /* fallthrough */ in dasm_put()
212 case 2: n |= b[pos-2]; /* fallthrough */ in dasm_put()
213 case 1: if (n <= 7) { b[pos-1] |= 0x10; ofs--; } in dasm_put()
234 b[pos] = -n; in dasm_put()
237 b[pos] = n; /* Else link to rel chain, anchored at label. */ in dasm_put()
238 *pl = pos; in dasm_put()
240 pos++; in dasm_put()
243 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
252 while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } in dasm_put()
253 *pl = -pos; /* Label exists now. */ in dasm_put()
254 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
258 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
271 sec->pos = pos; in dasm_put()
306 int pos = DASM_SEC2POS(secnum); in dasm_link() local
307 int lastpos = sec->pos; in dasm_link()
309 while (pos != lastpos) { in dasm_link()
310 dasm_ActList p = D->actionlist + b[pos++]; in dasm_link()
324 int lofs, lpos = b[pos]; in dasm_link()
327 if (lpos > pos) { /* Fwd label: add cumulative section offsets. */ in dasm_link()
334 lofs -= b[pos+1]; /* Short branch ok? */ in dasm_link()
338 b[pos+1] = shrink; in dasm_link()
339 pos += 2; in dasm_link()
347 case DASM_SETLABEL: case DASM_REL_A: case DASM_IMM_PC: pos++; break; in dasm_link()
350 case DASM_LABEL_PC: b[pos++] += ofs; break; /* Fix label offset. */ in dasm_link()
351 case DASM_ALIGN: ofs -= (b[pos++]+ofs)&*p++; break; /* Adjust ofs. */ in dasm_link()
406 int *endb = DASM_PTR_ADD(sec->rbuf, sec->pos); in dasm_encode()
517 int pos = D->pclabels[pc]; in dasm_getpclabel() local
518 if (pos < 0) return *DASM_POS2PTR(D, -pos); in dasm_getpclabel()
519 if (pos > 0) return -1; /* Undefined. */ in dasm_getpclabel()