#op OP_XOR_INT c
#op OP_XOR_LONG_2ADDR c
#op OP_XOR_LONG c
--
+# TODO: provide native implementations
- op OP_BREAKPOINT c
- op OP_EXECUTE_INLINE_RANGE c
+op OP_IGET_VOLATILE c
+op OP_IPUT_VOLATILE c
+op OP_SGET_VOLATILE c
+op OP_SPUT_VOLATILE c
+op OP_IGET_OBJECT_VOLATILE c
+op OP_IPUT_OBJECT_VOLATILE c
+op OP_SGET_OBJECT_VOLATILE c
+op OP_SPUT_OBJECT_VOLATILE c
+op OP_IGET_WIDE_VOLATILE c
+op OP_IPUT_WIDE_VOLATILE c
+op OP_SGET_WIDE_VOLATILE c
+op OP_SPUT_WIDE_VOLATILE c
-
op-end
# arch-specific entry point to interpreter
*/
/*
- * File: OP_UNUSED_E7.S
+ * File: stub.S
*/
-/* File: x86-atom/unused.S */
- /* Copyright (C) 2008 The Android Open Source Project
+ SAVE_PC_FP_TO_GLUE %edx # save program counter and frame pointer
+ pushl rGLUE # push parameter glue
+ call dvmMterp_OP_SPUT_WIDE_VOLATILE # call c-based implementation
+ lea 4(%esp), %esp
+ LOAD_PC_FP_FROM_GLUE # restore program counter and frame pointer
+ FINISH_A # jump to next instruction
+/* ------------------------------ */
+ .balign 64
+.L_OP_BREAKPOINT: /* 0xec */
- /* Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
++/* File: x86-atom/OP_BREAKPOINT.S */
++/* File: x86/unused.S */
++ jmp common_abort
+
- /*
- * File: stub.S
- */
+
- SAVE_PC_FP_TO_GLUE %edx # save program counter and frame pointer
- pushl rGLUE # push parameter glue
- call dvmMterp_OP_BREAKPOINT # call c-based implementation
- lea 4(%esp), %esp
- LOAD_PC_FP_FROM_GLUE # restore program counter and frame pointer
- FINISH_A # jump to next instruction
+/* ------------------------------ */
+ .balign 64
+.L_OP_THROW_VERIFICATION_ERROR: /* 0xed */
+/* File: x86-atom/OP_THROW_VERIFICATION_ERROR.S */
+ /* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
/*
- * File: OP_UNUSED_E8.S
+ * File: OP_EXECUTE_INLINE.S
+ *
+ * Code: Executes a "native inline" instruction. Uses no substitutions.
+ *
+ * For: execute-inline
+ *
+ * Description: Executes a "native inline" instruction. This instruction
+ * is generated by the optimizer.
+ *
+ * Format:
+ *
- * Syntax: vAA, {vC, vD, vE, vF}, inline@BBBB
++ * Syntax: A, {vC, vD, vE, vF}, inline@BBBB
*/
-/* File: x86-atom/unused.S */
- /* Copyright (C) 2008 The Android Open Source Project
+ FETCH 1, %ecx # %ecx<- BBBB
+ movl rGLUE, %eax # %eax<- MterpGlue pointer
+ addl $offGlue_retval, %eax # %eax<- &glue->retval
+ EXPORT_PC
- shr $4, rINST # rINST<- B
++ shr $4, rINST # rINST<- A
+ movl %eax, -8(%esp) # push parameter glue->retval
+ lea -24(%esp), %esp
+ jmp .LOP_EXECUTE_INLINE_continue
+
+/* ------------------------------ */
+ .balign 64
+.L_OP_EXECUTE_INLINE_RANGE: /* 0xef */
- /* Copyright (C) 2008 The Android Open Source Project
++/* File: x86-atom/OP_EXECUTE_INLINE_RANGE.S */
++ /* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
/*
- * File: stub.S
- * File: unused.S
++ * File: OP_EXECUTE_INLINE_RANGE.S
+ *
- * Code: Common code for unused bytecodes. Uses no subtitutions.
++ * Code: Executes a "native inline" instruction. Uses no substitutions.
+ *
- * For: all unused bytecodes
++ * For: execute-inline
+ *
- * Description: aborts if executed.
++ * Description: Executes a "native inline" instruction. This instruction
++ * is generated by the optimizer.
+ *
- * Format: ØØ|op (10x)
++ * Format:
+ *
- * Syntax: op
++ * Syntax: AA, {vCCCC..v(CCCC+AA-1)}, inline@BBBB
*/
- SAVE_PC_FP_TO_GLUE %edx # save program counter and frame pointer
- pushl rGLUE # push parameter glue
- call dvmMterp_OP_EXECUTE_INLINE_RANGE # call c-based implementation
- lea 4(%esp), %esp
- LOAD_PC_FP_FROM_GLUE # restore program counter and frame pointer
- FINISH_A # jump to next instruction
- call common_abort
-
-
++ FETCH 1, %ecx # %ecx<- BBBB
++ movl rGLUE, %eax # %eax<- MterpGlue pointer
++ addl $offGlue_retval, %eax # %eax<- &glue->retval
++ EXPORT_PC
++ movl %eax, -8(%esp) # push parameter glue->retval
++ lea -24(%esp), %esp
++ jmp .LOP_EXECUTE_INLINE_RANGE_continue
+
/* ------------------------------ */
.balign 64
-.L_OP_UNUSED_E9: /* 0xe9 */
-/* File: x86-atom/OP_UNUSED_E9.S */
+.L_OP_INVOKE_DIRECT_EMPTY: /* 0xf0 */
+/* File: x86-atom/OP_INVOKE_DIRECT_EMPTY.S */
/* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
} \
FINISH(2);
- /* File: c/OP_BREAKPOINT.c */
- HANDLE_OPCODE(OP_BREAKPOINT)
- #if (INTERP_TYPE == INTERP_DBG)
- {
- /*
- * Restart this instruction with the original opcode. We do
- * this by simply jumping to the handler.
- *
- * It's probably not necessary to update "inst", but we do it
- * for the sake of anything that needs to do disambiguation in a
- * common handler with INST_INST.
- *
- * The breakpoint itself is handled over in updateDebugger(),
- * because we need to detect other events (method entry, single
- * step) and report them in the same event packet, and we're not
- * yet handling those through breakpoint instructions. By the
- * time we get here, the breakpoint has already been handled and
- * the thread resumed.
- */
- u1 originalOpCode = dvmGetOriginalOpCode(pc);
- LOGV("+++ break 0x%02x (0x%04x -> 0x%04x)\n", originalOpCode, inst,
- INST_REPLACE_OP(inst, originalOpCode));
- inst = INST_REPLACE_OP(inst, originalOpCode);
- FINISH_BKPT(originalOpCode);
- }
- #else
- LOGE("Breakpoint hit in non-debug interpreter\n");
- dvmAbort();
- #endif
- OP_END
-
- /* File: c/OP_EXECUTE_INLINE_RANGE.c */
- HANDLE_OPCODE(OP_EXECUTE_INLINE_RANGE /*{vCCCC..v(CCCC+AA-1)}, inline@BBBB*/)
- {
- u4 arg0, arg1, arg2, arg3;
- arg0 = arg1 = arg2 = arg3 = 0; /* placate gcc */
-
- EXPORT_PC();
-
- vsrc1 = INST_AA(inst); /* #of args */
- ref = FETCH(1); /* inline call "ref" */
- vdst = FETCH(2); /* range base */
- ILOGV("|execute-inline-range args=%d @%d {regs=v%d-v%d}",
- vsrc1, ref, vdst, vdst+vsrc1-1);
-
- assert((vdst >> 16) == 0); // 16-bit type -or- high 16 bits clear
- assert(vsrc1 <= 4);
-
- switch (vsrc1) {
- case 4:
- arg3 = GET_REGISTER(vdst+3);
- /* fall through */
- case 3:
- arg2 = GET_REGISTER(vdst+2);
- /* fall through */
- case 2:
- arg1 = GET_REGISTER(vdst+1);
- /* fall through */
- case 1:
- arg0 = GET_REGISTER(vdst+0);
- /* fall through */
- default: // case 0
- ;
- }
-
- #if INTERP_TYPE == INTERP_DBG
- if (!dvmPerformInlineOp4Dbg(arg0, arg1, arg2, arg3, &retval, ref))
- GOTO_exceptionThrown();
- #else
- if (!dvmPerformInlineOp4Std(arg0, arg1, arg2, arg3, &retval, ref))
- GOTO_exceptionThrown();
- #endif
- }
- FINISH(3);
- OP_END
-
+/* File: c/OP_IGET_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_VOLATILE, "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_IPUT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_VOLATILE, "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_SGET_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_VOLATILE, "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_SPUT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_VOLATILE, "-volatile", IntVolatile, )
+OP_END
+
+/* File: c/OP_IGET_OBJECT_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_OBJECT_VOLATILE, "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_IGET_WIDE_VOLATILE.c */
+HANDLE_IGET_X(OP_IGET_WIDE_VOLATILE, "-wide-volatile", LongVolatile, _WIDE)
+OP_END
+
+/* File: c/OP_IPUT_WIDE_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_WIDE_VOLATILE, "-wide-volatile", LongVolatile, _WIDE)
+OP_END
+
+/* File: c/OP_SGET_WIDE_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_WIDE_VOLATILE, "-wide-volatile", LongVolatile, _WIDE)
+OP_END
+
+/* File: c/OP_SPUT_WIDE_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_WIDE_VOLATILE, "-wide-volatile", LongVolatile, _WIDE)
+OP_END
+
+/* File: c/OP_IPUT_OBJECT_VOLATILE.c */
+HANDLE_IPUT_X(OP_IPUT_OBJECT_VOLATILE, "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_SGET_OBJECT_VOLATILE.c */
+HANDLE_SGET_X(OP_SGET_OBJECT_VOLATILE, "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
+
+/* File: c/OP_SPUT_OBJECT_VOLATILE.c */
+HANDLE_SPUT_X(OP_SPUT_OBJECT_VOLATILE, "-object-volatile", ObjectVolatile, _AS_OBJECT)
+OP_END
/* File: c/gotoTargets.c */
/*