Lines Matching refs:pos
45 #define DASM_POS2IDX(pos) ((pos)&0x00ffffff) argument
46 #define DASM_POS2BIAS(pos) ((pos)&0xff000000) argument
48 #define DASM_POS2SEC(pos) ((pos)>>24) argument
49 #define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) argument
59 int pos; /* Biased buffer position. */ member
143 D->sections[i].pos = DASM_SEC2POS(i); in dasm_setup()
144 D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; in dasm_setup()
169 int pos = sec->pos, ofs = sec->ofs; in dasm_put() local
172 if (pos >= sec->epos) { in dasm_put()
175 sec->rbuf = sec->buf - DASM_POS2BIAS(pos); in dasm_put()
176 sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); in dasm_put()
180 b[pos++] = start; in dasm_put()
197 case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break; in dasm_put()
210 b[pos] = -n; in dasm_put()
213 b[pos] = n; /* Else link to rel chain, anchored at label. */ in dasm_put()
214 *pl = pos; in dasm_put()
216 pos++; in dasm_put()
224 while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; in dasm_put()
226 *pl = -pos; /* Label exists now. */ in dasm_put()
227 b[pos++] = ofs; /* Store pass1 offset estimate. */ in dasm_put()
240 b[pos++] = n; in dasm_put()
244 b[pos++] = n; in dasm_put()
251 sec->pos = pos; in dasm_put()
286 int pos = DASM_SEC2POS(secnum); in dasm_link() local
287 int lastpos = sec->pos; in dasm_link()
289 while (pos != lastpos) { in dasm_link()
290 dasm_ActList p = D->actionlist + b[pos++]; in dasm_link()
298 case DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break; in dasm_link()
299 case DASM_REL_LG: case DASM_REL_PC: pos++; break; in dasm_link()
300 case DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break; in dasm_link()
301 case DASM_IMM: case DASM_IMMSH: pos++; break; in dasm_link()
333 int *endb = sec->rbuf + sec->pos; in dasm_encode()
393 int pos = D->pclabels[pc]; in dasm_getpclabel() local
394 if (pos < 0) return *DASM_POS2PTR(D, -pos); in dasm_getpclabel()
395 if (pos > 0) return -1; /* Undefined. */ in dasm_getpclabel()