Home | History | Annotate | Download | only in x86
      1 %default { "reg":"%ecx", "store":"movl", "shift":"4" }
      2 %verify "executed"
      3     /*
      4      * Array put, 32 bits or less.  vBB[vCC] <- vAA
      5      *
      6      * for: aput, aput-object, aput-boolean, aput-byte, aput-char, aput-short
      7      */
      8     /* op vAA, vBB, vCC */
      9     movzbl    2(rPC),%eax               # eax<- BB
     10     movzbl    3(rPC),%ecx               # ecx<- CC
     11     movzbl    rINST_HI,rINST_FULL       # rINST_FULL<- AA
     12     GET_VREG(%eax,%eax)                 # eax<- vBB (array object)
     13     GET_VREG(%ecx,%ecx)                 # ecs<- vCC (requested index)
     14     testl     %eax,%eax                 # null array object?
     15     je        common_errNullObject      # bail if so
     16     cmpl      offArrayObject_length(%eax),%ecx
     17     jae       common_errArrayIndex      # index >= length, bail
     18     leal      offArrayObject_contents(%eax,%ecx,$shift),%eax
     19     GET_VREG(%ecx,rINST_FULL)
     20     FETCH_INST_WORD(2)
     21     $store     $reg,(%eax)
     22     ADVANCE_PC(2)
     23     GOTO_NEXT
     24