• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1    /*
2     * Check to see if a cast from one class to another is allowed.
3     */
4    /* check-cast vAA, class@BBBB */
5    EXPORT_PC()
6    FETCH(a0, 1)                           #  a0 <- BBBB
7    GET_OPA(a1)                            #  a1 <- AA
8    EAS2(a1, rFP, a1)                      #  a1 <- &object
9    lw     a2, OFF_FP_METHOD(rFP)          #  a2 <- method
10    move   a3, rSELF                       #  a3 <- self
11    JAL(MterpCheckCast)                    #  v0 <- CheckCast(index, &obj, method, self)
12    PREFETCH_INST(2)
13    bnez   v0, MterpPossibleException
14    ADVANCE(2)
15    GET_INST_OPCODE(t0)                    #  extract opcode from rINST
16    GOTO_OPCODE(t0)                        #  jump to next instruction
17