122d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch /* Copyright (C) 2008 The Android Open Source Project 222d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 322d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * Licensed under the Apache License, Version 2.0 (the "License"); 422d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * you may not use this file except in compliance with the License. 522d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * You may obtain a copy of the License at 622d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 722d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * http://www.apache.org/licenses/LICENSE-2.0 822d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 922d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * Unless required by applicable law or agreed to in writing, software 1022d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * distributed under the License is distributed on an "AS IS" BASIS, 1122d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1222d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * See the License for the specific language governing permissions and 1322d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * limitations under the License. 1422d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch */ 1522d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch 1622d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch /* 1722d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * File: OP_AGET_WIDE.S 1822d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 1922d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * Code: 64-bit array get operation. 2022d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 2122d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * For: aget-wide 2222d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 2322d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * Description: Perform an array get operation at the identified index 2422d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * of a given array; load the array value into the destination 2522d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * register. vAA <- vBB[vCC]. 2622d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 2722d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * Format: AA|op CC|BB (23x) 2822d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * 2922d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch * Syntax: op vAA, vBB, vCC 3022d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch */ 3122d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch 3222d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch FETCH_BB 1, %ecx # %ecx<- BB 3322d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch FETCH_CC 1, %edx # %edx<- CC 3422d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch GET_VREG %ecx # %ecx<- vBB 3522d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch GET_VREG %edx # %edx<- vCC 3622d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch cmp $$0, %ecx # check for null array object 3722d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch je common_errNullObject # handle null array object 3822d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch cmp offArrayObject_length(%ecx), %edx # compare index to arrayObj->length 3922d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch jnc common_errArrayIndex # handle index >= length, bail 4022d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch FFETCH_ADV 2, %eax # %eax<- next instruction hi; fetch, advance 4122d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch movq offArrayObject_contents(%ecx, %edx, 8), %xmm0 # %xmm0<- vBB[vCC] 4222d404a75a00cda0b0ebed1034c2808ba060b05fJohnnie Birch movq %xmm0, (rFP, rINST, 4) # vAA<- %xmm0; value 43f8f23d402dc1eef107995b29ad4d91ee5b4e1c34Johnnie Birch FGETOP_JMP 2, %eax # jump to next instruction; getop, jmp 44