// // access // Operand stack and package variable access bytecodes // F.J. Alberti // 26/04/2001 // case kGetlocal: m->top[--m->pp] = m->top[fp-fetch(pc)]; pc += ALIGNMENT(1); checkOverflow(m, 0) break; case kGetlocal0: m->top[--m->pp] = m->top[fp]; checkOverflow(m, 0) break; case kGetlocal1: m->top[--m->pp] = m->top[fp-1]; checkOverflow(m, 0) break; case kGetlocal2: m->top[--m->pp] = m->top[fp-2]; checkOverflow(m, 0) break; case kGetlocal3: m->top[--m->pp] = m->top[fp-3]; checkOverflow(m, 0) break; case kGetlocal4: m->top[--m->pp] = m->top[fp-4]; checkOverflow(m, 0) break; case kGetlocal5: m->top[--m->pp] = m->top[fp-5]; checkOverflow(m, 0) break; case kGetlocal6: m->top[--m->pp] = m->top[fp-6]; checkOverflow(m, 0) break; case kGetlocal7: m->top[--m->pp] = m->top[fp-7]; checkOverflow(m, 0) break; case kSetlocal: m->top[fp-fetch(pc)] = m->top[m->pp]; pc += ALIGNMENT(1); break; case kSetlocal0: m->top[fp] = m->top[m->pp]; break; case kSetlocal1: m->top[fp-1] = m->top[m->pp]; break; case kSetlocal2: m->top[fp-2] = m->top[m->pp]; break; case kSetlocal3: m->top[fp-3] = m->top[m->pp]; break; case kSetlocal4: m->top[fp-4] = m->top[m->pp]; break; case kSetlocal5: m->top[fp-5] = m->top[m->pp]; break; case kSetlocal6: m->top[fp-6] = m->top[m->pp]; break; case kSetlocal7: m->top[fp-7] = m->top[m->pp]; break; case kGetglobal: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+(*(uint16*)&fetch(pc))]; pc += ALIGNMENT(2); m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal0: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal1: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+1]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal2: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+2]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal3: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+3]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal4: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+4]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal5: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+5]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal6: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+6]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kGetglobal7: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+7]; m->top[--m->pp] = m->tape[(p>>1)+SizeHeader+1]; checkOverflow(m, 0) break; } case kSetglobal: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+(*(uint16*)&fetch(pc))]; pc += ALIGNMENT(2); m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal0: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal1: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+1]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal2: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+2]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal3: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+3]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal4: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+4]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal5: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+5]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal6: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+6]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; } case kSetglobal7: { int p = m->tape[(m->top[bp+OFFHGLOBAL]>>1)+SizeHeader+7]; m->tape[(p>>1)+SizeHeader+1] = m->top[m->pp]; break; }