if (RA.isvec) while (!(ps & 1<<i)) i++;
if (RAupdate.isvec) while (!(ps & 1<<u)) u++;
if (RT.isvec) while (!(pd & 1<<j)) j++;
- if svctx.ldstmode == elementstride:
+ if postinc:
+ offs = 0; # added afterwards
+ if RA.isvec: srcbase = ireg[RA+i]
+ else srcbase = ireg[RA]
+ elif svctx.ldstmode == elementstride:
# element stride mode
srcbase = ireg[RA]
offs = i * immed # j*immed for a ST
# compute EA
EA = srcbase + offs
- # update RA?
- if RAupdate: ireg[RAupdate+u] = EA;
# load from memory
ireg[RT+j] <= MEM[EA];
+ # check post-increment of EA
+ if postinc: EA = srcbase + immed;
+ # update RA?
+ if RAupdate: ireg[RAupdate+u] = EA;
if (!RT.isvec)
break # destination scalar, end now
if (RA.isvec) i++;