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()
209 case DASM_SETLABEL: b[pos-2] = -0x40000000; break; /* Neg. label ofs. */ in dasm_put()
214 case 3: n |= b[pos-3]; /* fallthrough */ in dasm_put()
215 case 2: n |= b[pos-2]; /* fallthrough */ in dasm_put()
216 case 1: if (n <= 7) { b[pos-1] |= 0x10; ofs--; } in dasm_put()
237 b[pos] = -n; in dasm_put()
240 b[pos] = n; /* Else link to rel chain, anchored at label. */ in dasm_put()
241 *pl = pos; in dasm_put()
243 pos++; in dasm_put()
246 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
255 while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; } in dasm_put()
256 *pl = -pos; /* Label exists now. */ in dasm_put()
257 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
261 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
274 sec->pos = pos; in dasm_put()
309 int pos = DASM_SEC2POS(secnum); in dasm_link() local
310 int lastpos = sec->pos; in dasm_link()
312 while (pos != lastpos) { in dasm_link()
313 dasm_ActList p = D->actionlist + b[pos++]; in dasm_link()
323 int lofs, lpos = b[pos]; in dasm_link()
326 if (lpos > pos) { /* Fwd label: add cumulative section offsets. */ in dasm_link()
333 lofs -= b[pos+1]; /* Short branch ok? */ in dasm_link()
337 b[pos+1] = shrink; in dasm_link()
338 pos += 2; in dasm_link()
345 case DASM_SETLABEL: case DASM_REL_A: case DASM_IMM_PC: pos++; break; 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()
405 int *endb = DASM_PTR_ADD(sec->rbuf, sec->pos); in dasm_encode()
508 int pos = D->pclabels[pc]; in dasm_getpclabel() local
509 if (pos < 0) return *DASM_POS2PTR(D, -pos); in dasm_getpclabel()
510 if (pos > 0) return -1; /* Undefined. */ in dasm_getpclabel()