blob: d676fdab96126a6b71929e1c58e3f6f6c08c3b96 [file] [log] [blame]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001/*
2 * This file was generated automatically by gen-mterp.py for 'x86'.
3 *
4 * --> DO NOT EDIT <--
5 */
6
7/* File: x86/header.S */
8/*
9 * Copyright (C) 2016 The Android Open Source Project
10 *
11 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
14 *
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
22 */
23
24/*
25 Art assembly interpreter notes:
26
27 First validate assembly code by implementing ExecuteXXXImpl() style body (doesn't
28 handle invoke, allows higher-level code to create frame & shadow frame.
29
30 Once that's working, support direct entry code & eliminate shadow frame (and
31 excess locals allocation.
32
33 Some (hopefully) temporary ugliness. We'll treat rFP as pointing to the
34 base of the vreg array within the shadow frame. Access the other fields,
35 dex_pc_, method_ and number_of_vregs_ via negative offsets. For now, we'll continue
36 the shadow frame mechanism of double-storing object references - via rFP &
37 number_of_vregs_.
38
39 */
40
41/*
42x86 ABI general notes:
43
44Caller save set:
45 eax, edx, ecx, st(0)-st(7)
46Callee save set:
47 ebx, esi, edi, ebp
48Return regs:
49 32-bit in eax
50 64-bit in edx:eax (low-order 32 in eax)
51 fp on top of fp stack st(0)
52
53Parameters passed on stack, pushed right-to-left. On entry to target, first
54parm is at 4(%esp). Traditional entry code is:
55
56functEntry:
57 push %ebp # save old frame pointer
58 mov %ebp,%esp # establish new frame pointer
59 sub FrameSize,%esp # Allocate storage for spill, locals & outs
60
61Once past the prologue, arguments are referenced at ((argno + 2)*4)(%ebp)
62
63Stack must be 16-byte aligned to support SSE in native code.
64
65If we're not doing variable stack allocation (alloca), the frame pointer can be
66eliminated and all arg references adjusted to be esp relative.
67*/
68
69/*
70Mterp and x86 notes:
71
72Some key interpreter variables will be assigned to registers.
73
74 nick reg purpose
75 rPC esi interpreted program counter, used for fetching instructions
76 rFP edi interpreted frame pointer, used for accessing locals and args
77 rINSTw bx first 16-bit code of current instruction
78 rINSTbl bl opcode portion of instruction word
79 rINSTbh bh high byte of inst word, usually contains src/tgt reg names
80 rIBASE edx base of instruction handler table
81 rREFS ebp base of object references in shadow frame.
82
83Notes:
84 o High order 16 bits of ebx must be zero on entry to handler
85 o rPC, rFP, rINSTw/rINSTbl valid on handler entry and exit
86 o eax and ecx are scratch, rINSTw/ebx sometimes scratch
87
88Macros are provided for common operations. Each macro MUST emit only
89one instruction to make instruction-counting easier. They MUST NOT alter
90unspecified registers or condition codes.
91*/
92
93/*
94 * This is a #include, not a %include, because we want the C pre-processor
95 * to expand the macros into assembler assignment statements.
96 */
97#include "asm_support.h"
98
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060099/*
100 * Handle mac compiler specific
101 */
102#if defined(__APPLE__)
103 #define MACRO_LITERAL(value) $(value)
104 #define FUNCTION_TYPE(name)
105 #define SIZE(start,end)
106 // Mac OS' symbols have an _ prefix.
107 #define SYMBOL(name) _ ## name
108#else
109 #define MACRO_LITERAL(value) $value
110 #define FUNCTION_TYPE(name) .type name, @function
111 #define SIZE(start,end) .size start, .-end
112 #define SYMBOL(name) name
113#endif
114
Serguei Katkov897338d2016-03-01 15:53:22 +0600115.macro PUSH _reg
116 pushl \_reg
117 .cfi_adjust_cfa_offset 4
118 .cfi_rel_offset \_reg, 0
119.endm
120
121.macro POP _reg
122 popl \_reg
123 .cfi_adjust_cfa_offset -4
124 .cfi_restore \_reg
125.endm
126
Bill Buzbeed6342082016-04-04 16:59:10 +0000127/*
128 * Instead of holding a pointer to the shadow frame, we keep rFP at the base of the vregs. So,
129 * to access other shadow frame fields, we need to use a backwards offset. Define those here.
130 */
131#define OFF_FP(a) (a - SHADOWFRAME_VREGS_OFFSET)
132#define OFF_FP_NUMBER_OF_VREGS OFF_FP(SHADOWFRAME_NUMBER_OF_VREGS_OFFSET)
133#define OFF_FP_DEX_PC OFF_FP(SHADOWFRAME_DEX_PC_OFFSET)
134#define OFF_FP_LINK OFF_FP(SHADOWFRAME_LINK_OFFSET)
135#define OFF_FP_METHOD OFF_FP(SHADOWFRAME_METHOD_OFFSET)
136#define OFF_FP_RESULT_REGISTER OFF_FP(SHADOWFRAME_RESULT_REGISTER_OFFSET)
137#define OFF_FP_DEX_PC_PTR OFF_FP(SHADOWFRAME_DEX_PC_PTR_OFFSET)
138#define OFF_FP_CODE_ITEM OFF_FP(SHADOWFRAME_CODE_ITEM_OFFSET)
139#define OFF_FP_COUNTDOWN_OFFSET OFF_FP(SHADOWFRAME_HOTNESS_COUNTDOWN_OFFSET)
140#define OFF_FP_SHADOWFRAME OFF_FP(0)
141
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000142/* Frame size must be 16-byte aligned.
Serguei Katkov897338d2016-03-01 15:53:22 +0600143 * Remember about 4 bytes for return address + 4 * 4 for spills
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000144 */
Serguei Katkov897338d2016-03-01 15:53:22 +0600145#define FRAME_SIZE 28
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000146
147/* Frame diagram while executing ExecuteMterpImpl, high to low addresses */
Serguei Katkov897338d2016-03-01 15:53:22 +0600148#define IN_ARG3 (FRAME_SIZE + 16 + 16)
149#define IN_ARG2 (FRAME_SIZE + 16 + 12)
150#define IN_ARG1 (FRAME_SIZE + 16 + 8)
151#define IN_ARG0 (FRAME_SIZE + 16 + 4)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000152/* Spill offsets relative to %esp */
Serguei Katkov897338d2016-03-01 15:53:22 +0600153#define LOCAL0 (FRAME_SIZE - 4)
154#define LOCAL1 (FRAME_SIZE - 8)
155#define LOCAL2 (FRAME_SIZE - 12)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000156/* Out Arg offsets, relative to %esp */
157#define OUT_ARG3 ( 12)
158#define OUT_ARG2 ( 8)
159#define OUT_ARG1 ( 4)
160#define OUT_ARG0 ( 0) /* <- ExecuteMterpImpl esp + 0 */
161
162/* During bringup, we'll use the shadow frame model instead of rFP */
163/* single-purpose registers, given names for clarity */
164#define rSELF IN_ARG0(%esp)
165#define rPC %esi
166#define rFP %edi
167#define rINST %ebx
168#define rINSTw %bx
169#define rINSTbh %bh
170#define rINSTbl %bl
171#define rIBASE %edx
172#define rREFS %ebp
Bill Buzbeed6342082016-04-04 16:59:10 +0000173#define rPROFILE OFF_FP_COUNTDOWN_OFFSET(rFP)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000174
buzbee2de973d2016-02-23 13:25:00 -0800175#define MTERP_LOGGING 0
176
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000177/*
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000178 * "export" the PC to dex_pc field in the shadow frame, f/b/o future exception objects. Must
179 * be done *before* something throws.
180 *
181 * It's okay to do this more than once.
182 *
183 * NOTE: the fast interpreter keeps track of dex pc as a direct pointer to the mapped
184 * dex byte codes. However, the rest of the runtime expects dex pc to be an instruction
185 * offset into the code_items_[] array. For effiency, we will "export" the
186 * current dex pc as a direct pointer using the EXPORT_PC macro, and rely on GetDexPC
187 * to convert to a dex pc when needed.
188 */
189.macro EXPORT_PC
190 movl rPC, OFF_FP_DEX_PC_PTR(rFP)
191.endm
192
193/*
194 * Refresh handler table.
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000195 */
196.macro REFRESH_IBASE
197 movl rSELF, rIBASE
198 movl THREAD_CURRENT_IBASE_OFFSET(rIBASE), rIBASE
199.endm
200
201/*
Serguei Katkovff8579e2016-02-17 11:30:23 +0600202 * Refresh handler table.
203 * IBase handles uses the caller save register so we must restore it after each call.
204 * Also it is used as a result of some 64-bit operations (like imul) and we should
205 * restore it in such cases also.
206 *
207 * TODO: Consider spilling the IBase instead of restoring it from Thread structure.
208 */
209.macro RESTORE_IBASE
210 movl rSELF, rIBASE
211 movl THREAD_CURRENT_IBASE_OFFSET(rIBASE), rIBASE
212.endm
213
214/*
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000215 * If rSELF is already loaded then we can use it from known reg.
216 */
Serguei Katkovff8579e2016-02-17 11:30:23 +0600217.macro RESTORE_IBASE_FROM_SELF _reg
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000218 movl THREAD_CURRENT_IBASE_OFFSET(\_reg), rIBASE
219.endm
220
221/*
222 * Refresh rINST.
223 * At enter to handler rINST does not contain the opcode number.
224 * However some utilities require the full value, so this macro
225 * restores the opcode number.
226 */
227.macro REFRESH_INST _opnum
228 movb rINSTbl, rINSTbh
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600229 movb MACRO_LITERAL(\_opnum), rINSTbl
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000230.endm
231
232/*
233 * Fetch the next instruction from rPC into rINSTw. Does not advance rPC.
234 */
235.macro FETCH_INST
236 movzwl (rPC), rINST
237.endm
238
239/*
240 * Remove opcode from rINST, compute the address of handler and jump to it.
241 */
242.macro GOTO_NEXT
243 movzx rINSTbl,%eax
244 movzbl rINSTbh,rINST
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600245 shll MACRO_LITERAL(7), %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000246 addl rIBASE, %eax
247 jmp *%eax
248.endm
249
250/*
251 * Advance rPC by instruction count.
252 */
253.macro ADVANCE_PC _count
254 leal 2*\_count(rPC), rPC
255.endm
256
257/*
258 * Advance rPC by instruction count, fetch instruction and jump to handler.
259 */
260.macro ADVANCE_PC_FETCH_AND_GOTO_NEXT _count
261 ADVANCE_PC \_count
262 FETCH_INST
263 GOTO_NEXT
264.endm
265
266/*
267 * Get/set the 32-bit value from a Dalvik register.
268 */
269#define VREG_ADDRESS(_vreg) (rFP,_vreg,4)
270#define VREG_HIGH_ADDRESS(_vreg) 4(rFP,_vreg,4)
271#define VREG_REF_ADDRESS(_vreg) (rREFS,_vreg,4)
272#define VREG_REF_HIGH_ADDRESS(_vreg) 4(rREFS,_vreg,4)
273
274.macro GET_VREG _reg _vreg
275 movl (rFP,\_vreg,4), \_reg
276.endm
277
278/* Read wide value to xmm. */
279.macro GET_WIDE_FP_VREG _reg _vreg
280 movq (rFP,\_vreg,4), \_reg
281.endm
282
283.macro SET_VREG _reg _vreg
284 movl \_reg, (rFP,\_vreg,4)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600285 movl MACRO_LITERAL(0), (rREFS,\_vreg,4)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000286.endm
287
288/* Write wide value from xmm. xmm is clobbered. */
289.macro SET_WIDE_FP_VREG _reg _vreg
290 movq \_reg, (rFP,\_vreg,4)
291 pxor \_reg, \_reg
292 movq \_reg, (rREFS,\_vreg,4)
293.endm
294
295.macro SET_VREG_OBJECT _reg _vreg
296 movl \_reg, (rFP,\_vreg,4)
297 movl \_reg, (rREFS,\_vreg,4)
298.endm
299
300.macro GET_VREG_HIGH _reg _vreg
301 movl 4(rFP,\_vreg,4), \_reg
302.endm
303
304.macro SET_VREG_HIGH _reg _vreg
305 movl \_reg, 4(rFP,\_vreg,4)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600306 movl MACRO_LITERAL(0), 4(rREFS,\_vreg,4)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000307.endm
308
309.macro CLEAR_REF _vreg
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600310 movl MACRO_LITERAL(0), (rREFS,\_vreg,4)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000311.endm
312
313.macro CLEAR_WIDE_REF _vreg
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600314 movl MACRO_LITERAL(0), (rREFS,\_vreg,4)
315 movl MACRO_LITERAL(0), 4(rREFS,\_vreg,4)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000316.endm
317
318/* File: x86/entry.S */
319/*
320 * Copyright (C) 2016 The Android Open Source Project
321 *
322 * Licensed under the Apache License, Version 2.0 (the "License");
323 * you may not use this file except in compliance with the License.
324 * You may obtain a copy of the License at
325 *
326 * http://www.apache.org/licenses/LICENSE-2.0
327 *
328 * Unless required by applicable law or agreed to in writing, software
329 * distributed under the License is distributed on an "AS IS" BASIS,
330 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
331 * See the License for the specific language governing permissions and
332 * limitations under the License.
333 */
334/*
335 * Interpreter entry point.
336 */
337
338 .text
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600339 .global SYMBOL(ExecuteMterpImpl)
340 FUNCTION_TYPE(ExecuteMterpImpl)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000341
342/*
343 * On entry:
344 * 0 Thread* self
345 * 1 code_item
346 * 2 ShadowFrame
347 * 3 JValue* result_register
348 *
349 */
350
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600351SYMBOL(ExecuteMterpImpl):
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000352 .cfi_startproc
Serguei Katkov897338d2016-03-01 15:53:22 +0600353 .cfi_def_cfa esp, 4
354
355 /* Spill callee save regs */
356 PUSH %ebp
357 PUSH %edi
358 PUSH %esi
359 PUSH %ebx
360
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000361 /* Allocate frame */
362 subl $FRAME_SIZE, %esp
363 .cfi_adjust_cfa_offset FRAME_SIZE
364
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000365 /* Load ShadowFrame pointer */
366 movl IN_ARG2(%esp), %edx
367
368 /* Remember the return register */
369 movl IN_ARG3(%esp), %eax
370 movl %eax, SHADOWFRAME_RESULT_REGISTER_OFFSET(%edx)
371
372 /* Remember the code_item */
373 movl IN_ARG1(%esp), %ecx
374 movl %ecx, SHADOWFRAME_CODE_ITEM_OFFSET(%edx)
375
376 /* set up "named" registers */
377 movl SHADOWFRAME_NUMBER_OF_VREGS_OFFSET(%edx), %eax
378 leal SHADOWFRAME_VREGS_OFFSET(%edx), rFP
379 leal (rFP, %eax, 4), rREFS
380 movl SHADOWFRAME_DEX_PC_OFFSET(%edx), %eax
381 lea CODEITEM_INSNS_OFFSET(%ecx), rPC
382 lea (rPC, %eax, 2), rPC
383 EXPORT_PC
384
Bill Buzbeed6342082016-04-04 16:59:10 +0000385 /* Set up for backwards branches & osr profiling */
386 movl OFF_FP_METHOD(rFP), %eax
387 movl %eax, OUT_ARG0(%esp)
388 leal OFF_FP_SHADOWFRAME(rFP), %ecx
389 movl %ecx, OUT_ARG1(%esp)
390 call SYMBOL(MterpSetUpHotnessCountdown)
391
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000392 /* Starting ibase */
393 REFRESH_IBASE
394
395 /* start executing the instruction at rPC */
396 FETCH_INST
397 GOTO_NEXT
398 /* NOTE: no fallthrough */
399
400
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600401 .global SYMBOL(artMterpAsmInstructionStart)
402 FUNCTION_TYPE(SYMBOL(artMterpAsmInstructionStart))
403SYMBOL(artMterpAsmInstructionStart) = .L_op_nop
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000404 .text
405
406/* ------------------------------ */
407 .balign 128
408.L_op_nop: /* 0x00 */
409/* File: x86/op_nop.S */
410 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
411
412/* ------------------------------ */
413 .balign 128
414.L_op_move: /* 0x01 */
415/* File: x86/op_move.S */
416 /* for move, move-object, long-to-int */
417 /* op vA, vB */
418 movzbl rINSTbl, %eax # eax <- BA
419 andb $0xf, %al # eax <- A
420 shrl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600421 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000422 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600423 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000424 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600425 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000426 .endif
427 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
428
429/* ------------------------------ */
430 .balign 128
431.L_op_move_from16: /* 0x02 */
432/* File: x86/op_move_from16.S */
433 /* for: move/from16, move-object/from16 */
434 /* op vAA, vBBBB */
435 movzx rINSTbl, %eax # eax <- AA
436 movw 2(rPC), rINSTw # rINSTw <- BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600437 GET_VREG rINST, rINST # rINST <- fp[BBBB]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000438 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600439 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000440 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600441 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000442 .endif
443 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
444
445/* ------------------------------ */
446 .balign 128
447.L_op_move_16: /* 0x03 */
448/* File: x86/op_move_16.S */
449 /* for: move/16, move-object/16 */
450 /* op vAAAA, vBBBB */
451 movzwl 4(rPC), %ecx # ecx <- BBBB
452 movzwl 2(rPC), %eax # eax <- AAAA
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600453 GET_VREG rINST, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000454 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600455 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000456 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600457 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000458 .endif
459 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
460
461/* ------------------------------ */
462 .balign 128
463.L_op_move_wide: /* 0x04 */
464/* File: x86/op_move_wide.S */
465 /* move-wide vA, vB */
466 /* NOTE: regs can overlap, e.g. "move v6,v7" or "move v7,v6" */
467 movzbl rINSTbl, %ecx # ecx <- BA
468 sarl $4, rINST # rINST <- B
469 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600470 GET_WIDE_FP_VREG %xmm0, rINST # xmm0 <- v[B]
471 SET_WIDE_FP_VREG %xmm0, %ecx # v[A] <- xmm0
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000472 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
473
474/* ------------------------------ */
475 .balign 128
476.L_op_move_wide_from16: /* 0x05 */
477/* File: x86/op_move_wide_from16.S */
478 /* move-wide/from16 vAA, vBBBB */
479 /* NOTE: regs can overlap, e.g. "move v6,v7" or "move v7,v6" */
480 movzwl 2(rPC), %ecx # ecx <- BBBB
481 movzbl rINSTbl, %eax # eax <- AAAA
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600482 GET_WIDE_FP_VREG %xmm0, %ecx # xmm0 <- v[B]
483 SET_WIDE_FP_VREG %xmm0, %eax # v[A] <- xmm0
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000484 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
485
486/* ------------------------------ */
487 .balign 128
488.L_op_move_wide_16: /* 0x06 */
489/* File: x86/op_move_wide_16.S */
490 /* move-wide/16 vAAAA, vBBBB */
491 /* NOTE: regs can overlap, e.g. "move v6,v7" or "move v7,v6" */
492 movzwl 4(rPC), %ecx # ecx<- BBBB
493 movzwl 2(rPC), %eax # eax<- AAAA
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600494 GET_WIDE_FP_VREG %xmm0, %ecx # xmm0 <- v[B]
495 SET_WIDE_FP_VREG %xmm0, %eax # v[A] <- xmm0
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000496 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
497
498/* ------------------------------ */
499 .balign 128
500.L_op_move_object: /* 0x07 */
501/* File: x86/op_move_object.S */
502/* File: x86/op_move.S */
503 /* for move, move-object, long-to-int */
504 /* op vA, vB */
505 movzbl rINSTbl, %eax # eax <- BA
506 andb $0xf, %al # eax <- A
507 shrl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600508 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000509 .if 1
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600510 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000511 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600512 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000513 .endif
514 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
515
516
517/* ------------------------------ */
518 .balign 128
519.L_op_move_object_from16: /* 0x08 */
520/* File: x86/op_move_object_from16.S */
521/* File: x86/op_move_from16.S */
522 /* for: move/from16, move-object/from16 */
523 /* op vAA, vBBBB */
524 movzx rINSTbl, %eax # eax <- AA
525 movw 2(rPC), rINSTw # rINSTw <- BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600526 GET_VREG rINST, rINST # rINST <- fp[BBBB]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000527 .if 1
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600528 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000529 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600530 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000531 .endif
532 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
533
534
535/* ------------------------------ */
536 .balign 128
537.L_op_move_object_16: /* 0x09 */
538/* File: x86/op_move_object_16.S */
539/* File: x86/op_move_16.S */
540 /* for: move/16, move-object/16 */
541 /* op vAAAA, vBBBB */
542 movzwl 4(rPC), %ecx # ecx <- BBBB
543 movzwl 2(rPC), %eax # eax <- AAAA
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600544 GET_VREG rINST, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000545 .if 1
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600546 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000547 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600548 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000549 .endif
550 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
551
552
553/* ------------------------------ */
554 .balign 128
555.L_op_move_result: /* 0x0a */
556/* File: x86/op_move_result.S */
557 /* for: move-result, move-result-object */
558 /* op vAA */
559 movl OFF_FP_RESULT_REGISTER(rFP), %eax # get pointer to result JType.
560 movl (%eax), %eax # r0 <- result.i.
561 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600562 SET_VREG_OBJECT %eax, rINST # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000563 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600564 SET_VREG %eax, rINST # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000565 .endif
566 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
567
568/* ------------------------------ */
569 .balign 128
570.L_op_move_result_wide: /* 0x0b */
571/* File: x86/op_move_result_wide.S */
572 /* move-result-wide vAA */
573 movl OFF_FP_RESULT_REGISTER(rFP), %eax # get pointer to result JType.
574 movl 4(%eax), %ecx # Get high
575 movl (%eax), %eax # Get low
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600576 SET_VREG %eax, rINST # v[AA+0] <- eax
577 SET_VREG_HIGH %ecx, rINST # v[AA+1] <- ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000578 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
579
580/* ------------------------------ */
581 .balign 128
582.L_op_move_result_object: /* 0x0c */
583/* File: x86/op_move_result_object.S */
584/* File: x86/op_move_result.S */
585 /* for: move-result, move-result-object */
586 /* op vAA */
587 movl OFF_FP_RESULT_REGISTER(rFP), %eax # get pointer to result JType.
588 movl (%eax), %eax # r0 <- result.i.
589 .if 1
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600590 SET_VREG_OBJECT %eax, rINST # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000591 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600592 SET_VREG %eax, rINST # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000593 .endif
594 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
595
596
597/* ------------------------------ */
598 .balign 128
599.L_op_move_exception: /* 0x0d */
600/* File: x86/op_move_exception.S */
601 /* move-exception vAA */
602 movl rSELF, %ecx
603 movl THREAD_EXCEPTION_OFFSET(%ecx), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600604 SET_VREG_OBJECT %eax, rINST # fp[AA] <- exception object
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000605 movl $0, THREAD_EXCEPTION_OFFSET(%ecx)
606 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
607
608/* ------------------------------ */
609 .balign 128
610.L_op_return_void: /* 0x0e */
611/* File: x86/op_return_void.S */
612 .extern MterpThreadFenceForConstructor
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600613 call SYMBOL(MterpThreadFenceForConstructor)
buzbeea2c97a92016-01-25 15:41:24 -0800614 movl rSELF, %eax
615 testl $(THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST), THREAD_FLAGS_OFFSET(%eax)
616 jz 1f
617 movl %eax, OUT_ARG0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600618 call SYMBOL(MterpSuspendCheck)
buzbeea2c97a92016-01-25 15:41:24 -08006191:
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000620 xorl %eax, %eax
621 xorl %ecx, %ecx
622 jmp MterpReturn
623
624/* ------------------------------ */
625 .balign 128
626.L_op_return: /* 0x0f */
627/* File: x86/op_return.S */
628/*
629 * Return a 32-bit value.
630 *
631 * for: return, return-object
632 */
633 /* op vAA */
634 .extern MterpThreadFenceForConstructor
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600635 call SYMBOL(MterpThreadFenceForConstructor)
buzbeea2c97a92016-01-25 15:41:24 -0800636 movl rSELF, %eax
637 testl $(THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST), THREAD_FLAGS_OFFSET(%eax)
638 jz 1f
639 movl %eax, OUT_ARG0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600640 call SYMBOL(MterpSuspendCheck)
buzbeea2c97a92016-01-25 15:41:24 -08006411:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600642 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000643 xorl %ecx, %ecx
644 jmp MterpReturn
645
646/* ------------------------------ */
647 .balign 128
648.L_op_return_wide: /* 0x10 */
649/* File: x86/op_return_wide.S */
650/*
651 * Return a 64-bit value.
652 */
653 /* return-wide vAA */
654 .extern MterpThreadFenceForConstructor
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600655 call SYMBOL(MterpThreadFenceForConstructor)
buzbeea2c97a92016-01-25 15:41:24 -0800656 movl rSELF, %eax
657 testl $(THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST), THREAD_FLAGS_OFFSET(%eax)
658 jz 1f
659 movl %eax, OUT_ARG0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600660 call SYMBOL(MterpSuspendCheck)
buzbeea2c97a92016-01-25 15:41:24 -08006611:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600662 GET_VREG %eax, rINST # eax <- v[AA+0]
663 GET_VREG_HIGH %ecx, rINST # ecx <- v[AA+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000664 jmp MterpReturn
665
666/* ------------------------------ */
667 .balign 128
668.L_op_return_object: /* 0x11 */
669/* File: x86/op_return_object.S */
670/* File: x86/op_return.S */
671/*
672 * Return a 32-bit value.
673 *
674 * for: return, return-object
675 */
676 /* op vAA */
677 .extern MterpThreadFenceForConstructor
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600678 call SYMBOL(MterpThreadFenceForConstructor)
buzbeea2c97a92016-01-25 15:41:24 -0800679 movl rSELF, %eax
680 testl $(THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST), THREAD_FLAGS_OFFSET(%eax)
681 jz 1f
682 movl %eax, OUT_ARG0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600683 call SYMBOL(MterpSuspendCheck)
buzbeea2c97a92016-01-25 15:41:24 -08006841:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600685 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000686 xorl %ecx, %ecx
687 jmp MterpReturn
688
689
690/* ------------------------------ */
691 .balign 128
692.L_op_const_4: /* 0x12 */
693/* File: x86/op_const_4.S */
694 /* const/4 vA, #+B */
695 movsx rINSTbl, %eax # eax <-ssssssBx
696 movl $0xf, rINST
697 andl %eax, rINST # rINST <- A
698 sarl $4, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600699 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000700 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
701
702/* ------------------------------ */
703 .balign 128
704.L_op_const_16: /* 0x13 */
705/* File: x86/op_const_16.S */
706 /* const/16 vAA, #+BBBB */
707 movswl 2(rPC), %ecx # ecx <- ssssBBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600708 SET_VREG %ecx, rINST # vAA <- ssssBBBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000709 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
710
711/* ------------------------------ */
712 .balign 128
713.L_op_const: /* 0x14 */
714/* File: x86/op_const.S */
715 /* const vAA, #+BBBBbbbb */
716 movl 2(rPC), %eax # grab all 32 bits at once
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600717 SET_VREG %eax, rINST # vAA<- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000718 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
719
720/* ------------------------------ */
721 .balign 128
722.L_op_const_high16: /* 0x15 */
723/* File: x86/op_const_high16.S */
724 /* const/high16 vAA, #+BBBB0000 */
725 movzwl 2(rPC), %eax # eax <- 0000BBBB
726 sall $16, %eax # eax <- BBBB0000
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600727 SET_VREG %eax, rINST # vAA <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000728 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
729
730/* ------------------------------ */
731 .balign 128
732.L_op_const_wide_16: /* 0x16 */
733/* File: x86/op_const_wide_16.S */
734 /* const-wide/16 vAA, #+BBBB */
735 movswl 2(rPC), %eax # eax <- ssssBBBB
736 movl rIBASE, %ecx # preserve rIBASE (cltd trashes it)
737 cltd # rIBASE:eax <- ssssssssssssBBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600738 SET_VREG_HIGH rIBASE, rINST # store msw
739 SET_VREG %eax, rINST # store lsw
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000740 movl %ecx, rIBASE # restore rIBASE
741 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
742
743/* ------------------------------ */
744 .balign 128
745.L_op_const_wide_32: /* 0x17 */
746/* File: x86/op_const_wide_32.S */
747 /* const-wide/32 vAA, #+BBBBbbbb */
748 movl 2(rPC), %eax # eax <- BBBBbbbb
749 movl rIBASE, %ecx # preserve rIBASE (cltd trashes it)
750 cltd # rIBASE:eax <- ssssssssssssBBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600751 SET_VREG_HIGH rIBASE, rINST # store msw
752 SET_VREG %eax, rINST # store lsw
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000753 movl %ecx, rIBASE # restore rIBASE
754 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
755
756/* ------------------------------ */
757 .balign 128
758.L_op_const_wide: /* 0x18 */
759/* File: x86/op_const_wide.S */
760 /* const-wide vAA, #+HHHHhhhhBBBBbbbb */
761 movl 2(rPC), %eax # eax <- lsw
762 movzbl rINSTbl, %ecx # ecx <- AA
763 movl 6(rPC), rINST # rINST <- msw
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600764 SET_VREG %eax, %ecx
765 SET_VREG_HIGH rINST, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000766 ADVANCE_PC_FETCH_AND_GOTO_NEXT 5
767
768/* ------------------------------ */
769 .balign 128
770.L_op_const_wide_high16: /* 0x19 */
771/* File: x86/op_const_wide_high16.S */
772 /* const-wide/high16 vAA, #+BBBB000000000000 */
773 movzwl 2(rPC), %eax # eax <- 0000BBBB
774 sall $16, %eax # eax <- BBBB0000
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600775 SET_VREG_HIGH %eax, rINST # v[AA+1] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000776 xorl %eax, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600777 SET_VREG %eax, rINST # v[AA+0] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000778 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
779
780/* ------------------------------ */
781 .balign 128
782.L_op_const_string: /* 0x1a */
783/* File: x86/op_const_string.S */
784 /* const/string vAA, String@BBBB */
785 EXPORT_PC
786 movzwl 2(rPC), %eax # eax <- BBBB
787 movl %eax, OUT_ARG0(%esp)
788 movl rINST, OUT_ARG1(%esp)
789 leal OFF_FP_SHADOWFRAME(rFP), %eax
790 movl %eax, OUT_ARG2(%esp)
791 movl rSELF, %eax
792 movl %eax, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600793 call SYMBOL(MterpConstString) # (index, tgt_reg, shadow_frame, self)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600794 RESTORE_IBASE
795 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000796 jnz MterpPossibleException
797 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
798
799/* ------------------------------ */
800 .balign 128
801.L_op_const_string_jumbo: /* 0x1b */
802/* File: x86/op_const_string_jumbo.S */
803 /* const/string vAA, String@BBBBBBBB */
804 EXPORT_PC
805 movl 2(rPC), %eax # eax <- BBBB
806 movl %eax, OUT_ARG0(%esp)
807 movl rINST, OUT_ARG1(%esp)
808 leal OFF_FP_SHADOWFRAME(rFP), %eax
809 movl %eax, OUT_ARG2(%esp)
810 movl rSELF, %eax
811 movl %eax, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600812 call SYMBOL(MterpConstString) # (index, tgt_reg, shadow_frame, self)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600813 RESTORE_IBASE
814 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000815 jnz MterpPossibleException
816 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
817
818/* ------------------------------ */
819 .balign 128
820.L_op_const_class: /* 0x1c */
821/* File: x86/op_const_class.S */
822 /* const/class vAA, Class@BBBB */
823 EXPORT_PC
824 movzwl 2(rPC), %eax # eax<- BBBB
825 movl %eax, OUT_ARG0(%esp)
826 movl rINST, OUT_ARG1(%esp)
827 leal OFF_FP_SHADOWFRAME(rFP), %eax
828 movl %eax, OUT_ARG2(%esp)
829 movl rSELF, %eax
830 movl %eax, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600831 call SYMBOL(MterpConstClass) # (index, tgt_reg, shadow_frame, self)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600832 RESTORE_IBASE
833 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000834 jnz MterpPossibleException
835 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
836
837/* ------------------------------ */
838 .balign 128
839.L_op_monitor_enter: /* 0x1d */
840/* File: x86/op_monitor_enter.S */
841/*
842 * Synchronize on an object.
843 */
844 /* monitor-enter vAA */
845 EXPORT_PC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600846 GET_VREG %ecx, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000847 movl %ecx, OUT_ARG0(%esp)
848 movl rSELF, %eax
849 movl %eax, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600850 call SYMBOL(artLockObjectFromCode) # (object, self)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600851 RESTORE_IBASE
852 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000853 jnz MterpException
854 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
855
856/* ------------------------------ */
857 .balign 128
858.L_op_monitor_exit: /* 0x1e */
859/* File: x86/op_monitor_exit.S */
860/*
861 * Unlock an object.
862 *
863 * Exceptions that occur when unlocking a monitor need to appear as
864 * if they happened at the following instruction. See the Dalvik
865 * instruction spec.
866 */
867 /* monitor-exit vAA */
868 EXPORT_PC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600869 GET_VREG %ecx, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000870 movl %ecx, OUT_ARG0(%esp)
871 movl rSELF, %eax
872 movl %eax, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600873 call SYMBOL(artUnlockObjectFromCode) # (object, self)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600874 RESTORE_IBASE
875 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000876 jnz MterpException
877 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
878
879/* ------------------------------ */
880 .balign 128
881.L_op_check_cast: /* 0x1f */
882/* File: x86/op_check_cast.S */
883/*
884 * Check to see if a cast from one class to another is allowed.
885 */
886 /* check-cast vAA, class@BBBB */
887 EXPORT_PC
888 movzwl 2(rPC), %eax # eax <- BBBB
889 movl %eax, OUT_ARG0(%esp)
buzbeea2c97a92016-01-25 15:41:24 -0800890 leal VREG_ADDRESS(rINST), %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000891 movl %ecx, OUT_ARG1(%esp)
892 movl OFF_FP_METHOD(rFP),%eax
893 movl %eax, OUT_ARG2(%esp)
894 movl rSELF, %ecx
895 movl %ecx, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600896 call SYMBOL(MterpCheckCast) # (index, &obj, method, self)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600897 RESTORE_IBASE
898 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000899 jnz MterpPossibleException
900 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
901
902/* ------------------------------ */
903 .balign 128
904.L_op_instance_of: /* 0x20 */
905/* File: x86/op_instance_of.S */
906/*
907 * Check to see if an object reference is an instance of a class.
908 *
909 * Most common situation is a non-null object, being compared against
910 * an already-resolved class.
911 */
912 /* instance-of vA, vB, class@CCCC */
913 EXPORT_PC
914 movzwl 2(rPC), %eax # eax <- BBBB
915 movl %eax, OUT_ARG0(%esp)
916 movl rINST, %eax # eax <- BA
917 sarl $4, %eax # eax <- B
buzbeea2c97a92016-01-25 15:41:24 -0800918 leal VREG_ADDRESS(%eax), %ecx # Get object address
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000919 movl %ecx, OUT_ARG1(%esp)
920 movl OFF_FP_METHOD(rFP),%eax
921 movl %eax, OUT_ARG2(%esp)
922 movl rSELF, %ecx
923 movl %ecx, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600924 call SYMBOL(MterpInstanceOf) # (index, &obj, method, self)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000925 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +0600926 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000927 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
928 jnz MterpException
929 andb $0xf, rINSTbl # rINSTbl <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600930 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000931 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
932
933/* ------------------------------ */
934 .balign 128
935.L_op_array_length: /* 0x21 */
936/* File: x86/op_array_length.S */
937/*
938 * Return the length of an array.
939 */
940 mov rINST, %eax # eax <- BA
941 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600942 GET_VREG %ecx, rINST # ecx <- vB (object ref)
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000943 testl %ecx, %ecx # is null?
944 je common_errNullObject
945 andb $0xf, %al # eax <- A
946 movl MIRROR_ARRAY_LENGTH_OFFSET(%ecx), rINST
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600947 SET_VREG rINST, %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000948 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
949
950/* ------------------------------ */
951 .balign 128
952.L_op_new_instance: /* 0x22 */
953/* File: x86/op_new_instance.S */
954/*
955 * Create a new instance of a class.
956 */
957 /* new-instance vAA, class@BBBB */
958 EXPORT_PC
959 leal OFF_FP_SHADOWFRAME(rFP), %eax
960 movl %eax, OUT_ARG0(%esp)
961 movl rSELF, %ecx
962 movl %ecx, OUT_ARG1(%esp)
963 REFRESH_INST 34
964 movl rINST, OUT_ARG2(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600965 call SYMBOL(MterpNewInstance)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600966 RESTORE_IBASE
967 testb %al, %al # 0 means an exception is thrown
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000968 jz MterpPossibleException
969 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
970
971/* ------------------------------ */
972 .balign 128
973.L_op_new_array: /* 0x23 */
974/* File: x86/op_new_array.S */
975/*
976 * Allocate an array of objects, specified with the array class
977 * and a count.
978 *
979 * The verifier guarantees that this is an array class, so we don't
980 * check for it here.
981 */
982 /* new-array vA, vB, class@CCCC */
983 EXPORT_PC
984 leal OFF_FP_SHADOWFRAME(rFP), %eax
985 movl %eax, OUT_ARG0(%esp)
986 movl rPC, OUT_ARG1(%esp)
987 REFRESH_INST 35
988 movl rINST, OUT_ARG2(%esp)
989 movl rSELF, %ecx
990 movl %ecx, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +0600991 call SYMBOL(MterpNewArray)
Serguei Katkovff8579e2016-02-17 11:30:23 +0600992 RESTORE_IBASE
993 testb %al, %al # 0 means an exception is thrown
Bill Buzbee7c58bd42016-01-20 20:46:01 +0000994 jz MterpPossibleException
995 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
996
997/* ------------------------------ */
998 .balign 128
999.L_op_filled_new_array: /* 0x24 */
1000/* File: x86/op_filled_new_array.S */
1001/*
1002 * Create a new array with elements filled from registers.
1003 *
1004 * for: filled-new-array, filled-new-array/range
1005 */
1006 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
1007 /* op {vCCCC..v(CCCC+AA-1)}, type@BBBB */
1008 .extern MterpFilledNewArray
1009 EXPORT_PC
1010 leal OFF_FP_SHADOWFRAME(rFP), %eax
1011 movl %eax, OUT_ARG0(%esp)
1012 movl rPC, OUT_ARG1(%esp)
1013 movl rSELF, %ecx
1014 movl %ecx, OUT_ARG2(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001015 call SYMBOL(MterpFilledNewArray)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001016 REFRESH_IBASE
Serguei Katkovff8579e2016-02-17 11:30:23 +06001017 testb %al, %al # 0 means an exception is thrown
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001018 jz MterpPossibleException
1019 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
1020
1021/* ------------------------------ */
1022 .balign 128
1023.L_op_filled_new_array_range: /* 0x25 */
1024/* File: x86/op_filled_new_array_range.S */
1025/* File: x86/op_filled_new_array.S */
1026/*
1027 * Create a new array with elements filled from registers.
1028 *
1029 * for: filled-new-array, filled-new-array/range
1030 */
1031 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
1032 /* op {vCCCC..v(CCCC+AA-1)}, type@BBBB */
1033 .extern MterpFilledNewArrayRange
1034 EXPORT_PC
1035 leal OFF_FP_SHADOWFRAME(rFP), %eax
1036 movl %eax, OUT_ARG0(%esp)
1037 movl rPC, OUT_ARG1(%esp)
1038 movl rSELF, %ecx
1039 movl %ecx, OUT_ARG2(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001040 call SYMBOL(MterpFilledNewArrayRange)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001041 REFRESH_IBASE
Serguei Katkovff8579e2016-02-17 11:30:23 +06001042 testb %al, %al # 0 means an exception is thrown
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001043 jz MterpPossibleException
1044 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
1045
1046
1047/* ------------------------------ */
1048 .balign 128
1049.L_op_fill_array_data: /* 0x26 */
1050/* File: x86/op_fill_array_data.S */
1051 /* fill-array-data vAA, +BBBBBBBB */
1052 EXPORT_PC
1053 movl 2(rPC), %ecx # ecx <- BBBBbbbb
1054 leal (rPC,%ecx,2), %ecx # ecx <- PC + BBBBbbbb*2
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001055 GET_VREG %eax, rINST # eax <- vAA (array object)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001056 movl %eax, OUT_ARG0(%esp)
1057 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001058 call SYMBOL(MterpFillArrayData) # (obj, payload)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001059 REFRESH_IBASE
Serguei Katkovff8579e2016-02-17 11:30:23 +06001060 testb %al, %al # 0 means an exception is thrown
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001061 jz MterpPossibleException
1062 ADVANCE_PC_FETCH_AND_GOTO_NEXT 3
1063
1064/* ------------------------------ */
1065 .balign 128
1066.L_op_throw: /* 0x27 */
1067/* File: x86/op_throw.S */
1068/*
1069 * Throw an exception object in the current thread.
1070 */
1071 /* throw vAA */
1072 EXPORT_PC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001073 GET_VREG %eax, rINST # eax<- vAA (exception object)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001074 testl %eax, %eax
1075 jz common_errNullObject
1076 movl rSELF,%ecx
1077 movl %eax, THREAD_EXCEPTION_OFFSET(%ecx)
1078 jmp MterpException
1079
1080/* ------------------------------ */
1081 .balign 128
1082.L_op_goto: /* 0x28 */
1083/* File: x86/op_goto.S */
1084/*
1085 * Unconditional branch, 8-bit offset.
1086 *
1087 * The branch distance is a signed code-unit offset, which we need to
1088 * double to get a byte offset.
1089 */
1090 /* goto +AA */
buzbee2de973d2016-02-23 13:25:00 -08001091 movsbl rINSTbl, rINST # rINST <- ssssssAA
Bill Buzbeed6342082016-04-04 16:59:10 +00001092 testl rINST, rINST
1093 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001094
1095/* ------------------------------ */
1096 .balign 128
1097.L_op_goto_16: /* 0x29 */
1098/* File: x86/op_goto_16.S */
1099/*
1100 * Unconditional branch, 16-bit offset.
1101 *
1102 * The branch distance is a signed code-unit offset, which we need to
1103 * double to get a byte offset.
1104 */
1105 /* goto/16 +AAAA */
buzbee2de973d2016-02-23 13:25:00 -08001106 movswl 2(rPC), rINST # rINST <- ssssAAAA
Bill Buzbeed6342082016-04-04 16:59:10 +00001107 testl rINST, rINST
1108 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001109
1110/* ------------------------------ */
1111 .balign 128
1112.L_op_goto_32: /* 0x2a */
1113/* File: x86/op_goto_32.S */
1114/*
1115 * Unconditional branch, 32-bit offset.
1116 *
1117 * The branch distance is a signed code-unit offset, which we need to
1118 * double to get a byte offset.
1119 *
1120 * Unlike most opcodes, this one is allowed to branch to itself, so
1121 * our "backward branch" test must be "<=0" instead of "<0". Because
1122 * we need the V bit set, we'll use an adds to convert from Dalvik
1123 * offset to byte offset.
1124 */
1125 /* goto/32 +AAAAAAAA */
buzbee2de973d2016-02-23 13:25:00 -08001126 movl 2(rPC), rINST # rINST <- AAAAAAAA
Bill Buzbeed6342082016-04-04 16:59:10 +00001127 testl rINST, rINST
1128 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001129
1130/* ------------------------------ */
1131 .balign 128
1132.L_op_packed_switch: /* 0x2b */
1133/* File: x86/op_packed_switch.S */
1134/*
1135 * Handle a packed-switch or sparse-switch instruction. In both cases
1136 * we decode it and hand it off to a helper function.
1137 *
1138 * We don't really expect backward branches in a switch statement, but
1139 * they're perfectly legal, so we check for them here.
1140 *
1141 * for: packed-switch, sparse-switch
1142 */
1143 /* op vAA, +BBBB */
1144 movl 2(rPC), %ecx # ecx <- BBBBbbbb
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001145 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001146 leal (rPC,%ecx,2), %ecx # ecx <- PC + BBBBbbbb*2
1147 movl %eax, OUT_ARG1(%esp) # ARG1 <- vAA
1148 movl %ecx, OUT_ARG0(%esp) # ARG0 <- switchData
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001149 call SYMBOL(MterpDoPackedSwitch)
Hiroshi Yamauchi6b7d2c02016-04-01 12:01:48 -07001150 REFRESH_IBASE
Bill Buzbeed6342082016-04-04 16:59:10 +00001151 testl %eax, %eax
1152 movl %eax, rINST
1153 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001154
1155/* ------------------------------ */
1156 .balign 128
1157.L_op_sparse_switch: /* 0x2c */
1158/* File: x86/op_sparse_switch.S */
1159/* File: x86/op_packed_switch.S */
1160/*
1161 * Handle a packed-switch or sparse-switch instruction. In both cases
1162 * we decode it and hand it off to a helper function.
1163 *
1164 * We don't really expect backward branches in a switch statement, but
1165 * they're perfectly legal, so we check for them here.
1166 *
1167 * for: packed-switch, sparse-switch
1168 */
1169 /* op vAA, +BBBB */
1170 movl 2(rPC), %ecx # ecx <- BBBBbbbb
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001171 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001172 leal (rPC,%ecx,2), %ecx # ecx <- PC + BBBBbbbb*2
1173 movl %eax, OUT_ARG1(%esp) # ARG1 <- vAA
1174 movl %ecx, OUT_ARG0(%esp) # ARG0 <- switchData
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001175 call SYMBOL(MterpDoSparseSwitch)
Hiroshi Yamauchi6b7d2c02016-04-01 12:01:48 -07001176 REFRESH_IBASE
Bill Buzbeed6342082016-04-04 16:59:10 +00001177 testl %eax, %eax
1178 movl %eax, rINST
1179 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001180
1181
1182/* ------------------------------ */
1183 .balign 128
1184.L_op_cmpl_float: /* 0x2d */
1185/* File: x86/op_cmpl_float.S */
1186/* File: x86/fpcmp.S */
1187/*
1188 * Compare two floating-point values. Puts 0, 1, or -1 into the
1189 * destination register based on the results of the comparison.
1190 *
1191 * int compare(x, y) {
1192 * if (x == y) {
1193 * return 0;
1194 * } else if (x < y) {
1195 * return -1;
1196 * } else if (x > y) {
1197 * return 1;
1198 * } else {
1199 * return nanval ? 1 : -1;
1200 * }
1201 * }
1202 */
1203 /* op vAA, vBB, vCC */
1204 movzbl 3(rPC), %ecx # ecx<- CC
1205 movzbl 2(rPC), %eax # eax<- BB
1206 movss VREG_ADDRESS(%eax), %xmm0
1207 xor %eax, %eax
1208 ucomiss VREG_ADDRESS(%ecx), %xmm0
1209 jp .Lop_cmpl_float_nan_is_neg
1210 je .Lop_cmpl_float_finish
1211 jb .Lop_cmpl_float_less
1212.Lop_cmpl_float_nan_is_pos:
1213 incl %eax
1214 jmp .Lop_cmpl_float_finish
1215.Lop_cmpl_float_nan_is_neg:
1216.Lop_cmpl_float_less:
1217 decl %eax
1218.Lop_cmpl_float_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001219 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001220 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1221
1222
1223/* ------------------------------ */
1224 .balign 128
1225.L_op_cmpg_float: /* 0x2e */
1226/* File: x86/op_cmpg_float.S */
1227/* File: x86/fpcmp.S */
1228/*
1229 * Compare two floating-point values. Puts 0, 1, or -1 into the
1230 * destination register based on the results of the comparison.
1231 *
1232 * int compare(x, y) {
1233 * if (x == y) {
1234 * return 0;
1235 * } else if (x < y) {
1236 * return -1;
1237 * } else if (x > y) {
1238 * return 1;
1239 * } else {
1240 * return nanval ? 1 : -1;
1241 * }
1242 * }
1243 */
1244 /* op vAA, vBB, vCC */
1245 movzbl 3(rPC), %ecx # ecx<- CC
1246 movzbl 2(rPC), %eax # eax<- BB
1247 movss VREG_ADDRESS(%eax), %xmm0
1248 xor %eax, %eax
1249 ucomiss VREG_ADDRESS(%ecx), %xmm0
1250 jp .Lop_cmpg_float_nan_is_pos
1251 je .Lop_cmpg_float_finish
1252 jb .Lop_cmpg_float_less
1253.Lop_cmpg_float_nan_is_pos:
1254 incl %eax
1255 jmp .Lop_cmpg_float_finish
1256.Lop_cmpg_float_nan_is_neg:
1257.Lop_cmpg_float_less:
1258 decl %eax
1259.Lop_cmpg_float_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001260 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001261 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1262
1263
1264/* ------------------------------ */
1265 .balign 128
1266.L_op_cmpl_double: /* 0x2f */
1267/* File: x86/op_cmpl_double.S */
1268/* File: x86/fpcmp.S */
1269/*
1270 * Compare two floating-point values. Puts 0, 1, or -1 into the
1271 * destination register based on the results of the comparison.
1272 *
1273 * int compare(x, y) {
1274 * if (x == y) {
1275 * return 0;
1276 * } else if (x < y) {
1277 * return -1;
1278 * } else if (x > y) {
1279 * return 1;
1280 * } else {
1281 * return nanval ? 1 : -1;
1282 * }
1283 * }
1284 */
1285 /* op vAA, vBB, vCC */
1286 movzbl 3(rPC), %ecx # ecx<- CC
1287 movzbl 2(rPC), %eax # eax<- BB
1288 movsd VREG_ADDRESS(%eax), %xmm0
1289 xor %eax, %eax
1290 ucomisd VREG_ADDRESS(%ecx), %xmm0
1291 jp .Lop_cmpl_double_nan_is_neg
1292 je .Lop_cmpl_double_finish
1293 jb .Lop_cmpl_double_less
1294.Lop_cmpl_double_nan_is_pos:
1295 incl %eax
1296 jmp .Lop_cmpl_double_finish
1297.Lop_cmpl_double_nan_is_neg:
1298.Lop_cmpl_double_less:
1299 decl %eax
1300.Lop_cmpl_double_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001301 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001302 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1303
1304
1305/* ------------------------------ */
1306 .balign 128
1307.L_op_cmpg_double: /* 0x30 */
1308/* File: x86/op_cmpg_double.S */
1309/* File: x86/fpcmp.S */
1310/*
1311 * Compare two floating-point values. Puts 0, 1, or -1 into the
1312 * destination register based on the results of the comparison.
1313 *
1314 * int compare(x, y) {
1315 * if (x == y) {
1316 * return 0;
1317 * } else if (x < y) {
1318 * return -1;
1319 * } else if (x > y) {
1320 * return 1;
1321 * } else {
1322 * return nanval ? 1 : -1;
1323 * }
1324 * }
1325 */
1326 /* op vAA, vBB, vCC */
1327 movzbl 3(rPC), %ecx # ecx<- CC
1328 movzbl 2(rPC), %eax # eax<- BB
1329 movsd VREG_ADDRESS(%eax), %xmm0
1330 xor %eax, %eax
1331 ucomisd VREG_ADDRESS(%ecx), %xmm0
1332 jp .Lop_cmpg_double_nan_is_pos
1333 je .Lop_cmpg_double_finish
1334 jb .Lop_cmpg_double_less
1335.Lop_cmpg_double_nan_is_pos:
1336 incl %eax
1337 jmp .Lop_cmpg_double_finish
1338.Lop_cmpg_double_nan_is_neg:
1339.Lop_cmpg_double_less:
1340 decl %eax
1341.Lop_cmpg_double_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001342 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001343 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1344
1345
1346/* ------------------------------ */
1347 .balign 128
1348.L_op_cmp_long: /* 0x31 */
1349/* File: x86/op_cmp_long.S */
1350/*
1351 * Compare two 64-bit values. Puts 0, 1, or -1 into the destination
1352 * register based on the results of the comparison.
1353 */
1354 /* cmp-long vAA, vBB, vCC */
1355 movzbl 2(rPC), %eax # eax <- BB
1356 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001357 GET_VREG_HIGH %eax, %eax # eax <- v[BB+1], BB is clobbered
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001358 cmpl VREG_HIGH_ADDRESS(%ecx), %eax
1359 jl .Lop_cmp_long_smaller
1360 jg .Lop_cmp_long_bigger
1361 movzbl 2(rPC), %eax # eax <- BB, restore BB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001362 GET_VREG %eax, %eax # eax <- v[BB]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001363 sub VREG_ADDRESS(%ecx), %eax
1364 ja .Lop_cmp_long_bigger
1365 jb .Lop_cmp_long_smaller
1366.Lop_cmp_long_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001367 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001368 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1369
1370.Lop_cmp_long_bigger:
1371 movl $1, %eax
1372 jmp .Lop_cmp_long_finish
1373
1374.Lop_cmp_long_smaller:
1375 movl $-1, %eax
1376 jmp .Lop_cmp_long_finish
1377
1378/* ------------------------------ */
1379 .balign 128
1380.L_op_if_eq: /* 0x32 */
1381/* File: x86/op_if_eq.S */
1382/* File: x86/bincmp.S */
1383/*
1384 * Generic two-operand compare-and-branch operation. Provide a "revcmp"
1385 * fragment that specifies the *reverse* comparison to perform, e.g.
1386 * for "if-le" you would use "gt".
1387 *
1388 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1389 */
1390 /* if-cmp vA, vB, +CCCC */
1391 movzx rINSTbl, %ecx # ecx <- A+
1392 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001393 GET_VREG %eax, %ecx # eax <- vA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001394 sarl $4, rINST # rINST <- B
1395 cmpl VREG_ADDRESS(rINST), %eax # compare (vA, vB)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001396 jne 1f
buzbee2de973d2016-02-23 13:25:00 -08001397 movswl 2(rPC), rINST # Get signed branch offset
Bill Buzbeed6342082016-04-04 16:59:10 +00001398 testl rINST, rINST
1399 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000014001:
Bill Buzbeed6342082016-04-04 16:59:10 +00001401 cmpw $JIT_CHECK_OSR, rPROFILE
1402 je .L_check_not_taken_osr
1403 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001404
1405
1406/* ------------------------------ */
1407 .balign 128
1408.L_op_if_ne: /* 0x33 */
1409/* File: x86/op_if_ne.S */
1410/* File: x86/bincmp.S */
1411/*
1412 * Generic two-operand compare-and-branch operation. Provide a "revcmp"
1413 * fragment that specifies the *reverse* comparison to perform, e.g.
1414 * for "if-le" you would use "gt".
1415 *
1416 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1417 */
1418 /* if-cmp vA, vB, +CCCC */
1419 movzx rINSTbl, %ecx # ecx <- A+
1420 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001421 GET_VREG %eax, %ecx # eax <- vA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001422 sarl $4, rINST # rINST <- B
1423 cmpl VREG_ADDRESS(rINST), %eax # compare (vA, vB)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001424 je 1f
buzbee2de973d2016-02-23 13:25:00 -08001425 movswl 2(rPC), rINST # Get signed branch offset
Bill Buzbeed6342082016-04-04 16:59:10 +00001426 testl rINST, rINST
1427 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000014281:
Bill Buzbeed6342082016-04-04 16:59:10 +00001429 cmpw $JIT_CHECK_OSR, rPROFILE
1430 je .L_check_not_taken_osr
1431 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001432
1433
1434/* ------------------------------ */
1435 .balign 128
1436.L_op_if_lt: /* 0x34 */
1437/* File: x86/op_if_lt.S */
1438/* File: x86/bincmp.S */
1439/*
1440 * Generic two-operand compare-and-branch operation. Provide a "revcmp"
1441 * fragment that specifies the *reverse* comparison to perform, e.g.
1442 * for "if-le" you would use "gt".
1443 *
1444 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1445 */
1446 /* if-cmp vA, vB, +CCCC */
1447 movzx rINSTbl, %ecx # ecx <- A+
1448 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001449 GET_VREG %eax, %ecx # eax <- vA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001450 sarl $4, rINST # rINST <- B
1451 cmpl VREG_ADDRESS(rINST), %eax # compare (vA, vB)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001452 jge 1f
buzbee2de973d2016-02-23 13:25:00 -08001453 movswl 2(rPC), rINST # Get signed branch offset
Bill Buzbeed6342082016-04-04 16:59:10 +00001454 testl rINST, rINST
1455 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000014561:
Bill Buzbeed6342082016-04-04 16:59:10 +00001457 cmpw $JIT_CHECK_OSR, rPROFILE
1458 je .L_check_not_taken_osr
1459 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001460
1461
1462/* ------------------------------ */
1463 .balign 128
1464.L_op_if_ge: /* 0x35 */
1465/* File: x86/op_if_ge.S */
1466/* File: x86/bincmp.S */
1467/*
1468 * Generic two-operand compare-and-branch operation. Provide a "revcmp"
1469 * fragment that specifies the *reverse* comparison to perform, e.g.
1470 * for "if-le" you would use "gt".
1471 *
1472 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1473 */
1474 /* if-cmp vA, vB, +CCCC */
1475 movzx rINSTbl, %ecx # ecx <- A+
1476 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001477 GET_VREG %eax, %ecx # eax <- vA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001478 sarl $4, rINST # rINST <- B
1479 cmpl VREG_ADDRESS(rINST), %eax # compare (vA, vB)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001480 jl 1f
buzbee2de973d2016-02-23 13:25:00 -08001481 movswl 2(rPC), rINST # Get signed branch offset
Bill Buzbeed6342082016-04-04 16:59:10 +00001482 testl rINST, rINST
1483 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000014841:
Bill Buzbeed6342082016-04-04 16:59:10 +00001485 cmpw $JIT_CHECK_OSR, rPROFILE
1486 je .L_check_not_taken_osr
1487 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001488
1489
1490/* ------------------------------ */
1491 .balign 128
1492.L_op_if_gt: /* 0x36 */
1493/* File: x86/op_if_gt.S */
1494/* File: x86/bincmp.S */
1495/*
1496 * Generic two-operand compare-and-branch operation. Provide a "revcmp"
1497 * fragment that specifies the *reverse* comparison to perform, e.g.
1498 * for "if-le" you would use "gt".
1499 *
1500 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1501 */
1502 /* if-cmp vA, vB, +CCCC */
1503 movzx rINSTbl, %ecx # ecx <- A+
1504 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001505 GET_VREG %eax, %ecx # eax <- vA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001506 sarl $4, rINST # rINST <- B
1507 cmpl VREG_ADDRESS(rINST), %eax # compare (vA, vB)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001508 jle 1f
buzbee2de973d2016-02-23 13:25:00 -08001509 movswl 2(rPC), rINST # Get signed branch offset
Bill Buzbeed6342082016-04-04 16:59:10 +00001510 testl rINST, rINST
1511 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000015121:
Bill Buzbeed6342082016-04-04 16:59:10 +00001513 cmpw $JIT_CHECK_OSR, rPROFILE
1514 je .L_check_not_taken_osr
1515 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001516
1517
1518/* ------------------------------ */
1519 .balign 128
1520.L_op_if_le: /* 0x37 */
1521/* File: x86/op_if_le.S */
1522/* File: x86/bincmp.S */
1523/*
1524 * Generic two-operand compare-and-branch operation. Provide a "revcmp"
1525 * fragment that specifies the *reverse* comparison to perform, e.g.
1526 * for "if-le" you would use "gt".
1527 *
1528 * For: if-eq, if-ne, if-lt, if-ge, if-gt, if-le
1529 */
1530 /* if-cmp vA, vB, +CCCC */
1531 movzx rINSTbl, %ecx # ecx <- A+
1532 andb $0xf, %cl # ecx <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001533 GET_VREG %eax, %ecx # eax <- vA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001534 sarl $4, rINST # rINST <- B
1535 cmpl VREG_ADDRESS(rINST), %eax # compare (vA, vB)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001536 jg 1f
buzbee2de973d2016-02-23 13:25:00 -08001537 movswl 2(rPC), rINST # Get signed branch offset
Bill Buzbeed6342082016-04-04 16:59:10 +00001538 testl rINST, rINST
1539 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000015401:
Bill Buzbeed6342082016-04-04 16:59:10 +00001541 cmpw $JIT_CHECK_OSR, rPROFILE
1542 je .L_check_not_taken_osr
1543 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001544
1545
1546/* ------------------------------ */
1547 .balign 128
1548.L_op_if_eqz: /* 0x38 */
1549/* File: x86/op_if_eqz.S */
1550/* File: x86/zcmp.S */
1551/*
1552 * Generic one-operand compare-and-branch operation. Provide a "revcmp"
1553 * fragment that specifies the *reverse* comparison to perform, e.g.
1554 * for "if-le" you would use "gt".
1555 *
1556 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1557 */
1558 /* if-cmp vAA, +BBBB */
1559 cmpl $0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001560 jne 1f
buzbee2de973d2016-02-23 13:25:00 -08001561 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +00001562 testl rINST, rINST
1563 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000015641:
Bill Buzbeed6342082016-04-04 16:59:10 +00001565 cmpw $JIT_CHECK_OSR, rPROFILE
1566 je .L_check_not_taken_osr
1567 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001568
1569
1570/* ------------------------------ */
1571 .balign 128
1572.L_op_if_nez: /* 0x39 */
1573/* File: x86/op_if_nez.S */
1574/* File: x86/zcmp.S */
1575/*
1576 * Generic one-operand compare-and-branch operation. Provide a "revcmp"
1577 * fragment that specifies the *reverse* comparison to perform, e.g.
1578 * for "if-le" you would use "gt".
1579 *
1580 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1581 */
1582 /* if-cmp vAA, +BBBB */
1583 cmpl $0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001584 je 1f
buzbee2de973d2016-02-23 13:25:00 -08001585 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +00001586 testl rINST, rINST
1587 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000015881:
Bill Buzbeed6342082016-04-04 16:59:10 +00001589 cmpw $JIT_CHECK_OSR, rPROFILE
1590 je .L_check_not_taken_osr
1591 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001592
1593
1594/* ------------------------------ */
1595 .balign 128
1596.L_op_if_ltz: /* 0x3a */
1597/* File: x86/op_if_ltz.S */
1598/* File: x86/zcmp.S */
1599/*
1600 * Generic one-operand compare-and-branch operation. Provide a "revcmp"
1601 * fragment that specifies the *reverse* comparison to perform, e.g.
1602 * for "if-le" you would use "gt".
1603 *
1604 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1605 */
1606 /* if-cmp vAA, +BBBB */
1607 cmpl $0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001608 jge 1f
buzbee2de973d2016-02-23 13:25:00 -08001609 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +00001610 testl rINST, rINST
1611 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000016121:
Bill Buzbeed6342082016-04-04 16:59:10 +00001613 cmpw $JIT_CHECK_OSR, rPROFILE
1614 je .L_check_not_taken_osr
1615 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001616
1617
1618/* ------------------------------ */
1619 .balign 128
1620.L_op_if_gez: /* 0x3b */
1621/* File: x86/op_if_gez.S */
1622/* File: x86/zcmp.S */
1623/*
1624 * Generic one-operand compare-and-branch operation. Provide a "revcmp"
1625 * fragment that specifies the *reverse* comparison to perform, e.g.
1626 * for "if-le" you would use "gt".
1627 *
1628 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1629 */
1630 /* if-cmp vAA, +BBBB */
1631 cmpl $0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001632 jl 1f
buzbee2de973d2016-02-23 13:25:00 -08001633 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +00001634 testl rINST, rINST
1635 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000016361:
Bill Buzbeed6342082016-04-04 16:59:10 +00001637 cmpw $JIT_CHECK_OSR, rPROFILE
1638 je .L_check_not_taken_osr
1639 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001640
1641
1642/* ------------------------------ */
1643 .balign 128
1644.L_op_if_gtz: /* 0x3c */
1645/* File: x86/op_if_gtz.S */
1646/* File: x86/zcmp.S */
1647/*
1648 * Generic one-operand compare-and-branch operation. Provide a "revcmp"
1649 * fragment that specifies the *reverse* comparison to perform, e.g.
1650 * for "if-le" you would use "gt".
1651 *
1652 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1653 */
1654 /* if-cmp vAA, +BBBB */
1655 cmpl $0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001656 jle 1f
buzbee2de973d2016-02-23 13:25:00 -08001657 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +00001658 testl rINST, rINST
1659 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000016601:
Bill Buzbeed6342082016-04-04 16:59:10 +00001661 cmpw $JIT_CHECK_OSR, rPROFILE
1662 je .L_check_not_taken_osr
1663 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001664
1665
1666/* ------------------------------ */
1667 .balign 128
1668.L_op_if_lez: /* 0x3d */
1669/* File: x86/op_if_lez.S */
1670/* File: x86/zcmp.S */
1671/*
1672 * Generic one-operand compare-and-branch operation. Provide a "revcmp"
1673 * fragment that specifies the *reverse* comparison to perform, e.g.
1674 * for "if-le" you would use "gt".
1675 *
1676 * for: if-eqz, if-nez, if-ltz, if-gez, if-gtz, if-lez
1677 */
1678 /* if-cmp vAA, +BBBB */
1679 cmpl $0, VREG_ADDRESS(rINST) # compare (vA, 0)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001680 jg 1f
buzbee2de973d2016-02-23 13:25:00 -08001681 movswl 2(rPC), rINST # fetch signed displacement
Bill Buzbeed6342082016-04-04 16:59:10 +00001682 testl rINST, rINST
1683 jmp MterpCommonTakenBranch
Bill Buzbee7c58bd42016-01-20 20:46:01 +000016841:
Bill Buzbeed6342082016-04-04 16:59:10 +00001685 cmpw $JIT_CHECK_OSR, rPROFILE
1686 je .L_check_not_taken_osr
1687 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001688
1689
1690/* ------------------------------ */
1691 .balign 128
1692.L_op_unused_3e: /* 0x3e */
1693/* File: x86/op_unused_3e.S */
1694/* File: x86/unused.S */
1695/*
1696 * Bail to reference interpreter to throw.
1697 */
1698 jmp MterpFallback
1699
1700
1701/* ------------------------------ */
1702 .balign 128
1703.L_op_unused_3f: /* 0x3f */
1704/* File: x86/op_unused_3f.S */
1705/* File: x86/unused.S */
1706/*
1707 * Bail to reference interpreter to throw.
1708 */
1709 jmp MterpFallback
1710
1711
1712/* ------------------------------ */
1713 .balign 128
1714.L_op_unused_40: /* 0x40 */
1715/* File: x86/op_unused_40.S */
1716/* File: x86/unused.S */
1717/*
1718 * Bail to reference interpreter to throw.
1719 */
1720 jmp MterpFallback
1721
1722
1723/* ------------------------------ */
1724 .balign 128
1725.L_op_unused_41: /* 0x41 */
1726/* File: x86/op_unused_41.S */
1727/* File: x86/unused.S */
1728/*
1729 * Bail to reference interpreter to throw.
1730 */
1731 jmp MterpFallback
1732
1733
1734/* ------------------------------ */
1735 .balign 128
1736.L_op_unused_42: /* 0x42 */
1737/* File: x86/op_unused_42.S */
1738/* File: x86/unused.S */
1739/*
1740 * Bail to reference interpreter to throw.
1741 */
1742 jmp MterpFallback
1743
1744
1745/* ------------------------------ */
1746 .balign 128
1747.L_op_unused_43: /* 0x43 */
1748/* File: x86/op_unused_43.S */
1749/* File: x86/unused.S */
1750/*
1751 * Bail to reference interpreter to throw.
1752 */
1753 jmp MterpFallback
1754
1755
1756/* ------------------------------ */
1757 .balign 128
1758.L_op_aget: /* 0x44 */
1759/* File: x86/op_aget.S */
1760/*
1761 * Array get, 32 bits or less. vAA <- vBB[vCC].
1762 *
1763 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
1764 *
1765 */
1766 /* op vAA, vBB, vCC */
1767 movzbl 2(rPC), %eax # eax <- BB
1768 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001769 GET_VREG %eax, %eax # eax <- vBB (array object)
1770 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001771 testl %eax, %eax # null array object?
1772 je common_errNullObject # bail if so
1773 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1774 jae common_errArrayIndex # index >= length, bail.
1775 movl MIRROR_INT_ARRAY_DATA_OFFSET(%eax,%ecx,4), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001776 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001777 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1778
1779/* ------------------------------ */
1780 .balign 128
1781.L_op_aget_wide: /* 0x45 */
1782/* File: x86/op_aget_wide.S */
1783/*
1784 * Array get, 64 bits. vAA <- vBB[vCC].
1785 */
1786 /* aget-wide vAA, vBB, vCC */
1787 movzbl 2(rPC), %eax # eax <- BB
1788 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001789 GET_VREG %eax, %eax # eax <- vBB (array object)
1790 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001791 testl %eax, %eax # null array object?
1792 je common_errNullObject # bail if so
1793 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1794 jae common_errArrayIndex # index >= length, bail.
1795 leal MIRROR_WIDE_ARRAY_DATA_OFFSET(%eax,%ecx,8), %eax
1796 movq (%eax), %xmm0 # xmm0 <- vBB[vCC]
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001797 SET_WIDE_FP_VREG %xmm0, rINST # vAA <- xmm0
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001798 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1799
1800/* ------------------------------ */
1801 .balign 128
1802.L_op_aget_object: /* 0x46 */
1803/* File: x86/op_aget_object.S */
1804/*
1805 * Array object get. vAA <- vBB[vCC].
1806 *
1807 * for: aget-object
1808 */
1809 /* op vAA, vBB, vCC */
1810 movzbl 2(rPC), %eax # eax <- BB
1811 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001812 GET_VREG %eax, %eax # eax <- vBB (array object)
1813 GET_VREG %ecx, %ecx # ecs <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001814 EXPORT_PC
1815 movl %eax, OUT_ARG0(%esp)
1816 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001817 call SYMBOL(artAGetObjectFromMterp) # (array, index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001818 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06001819 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001820 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
1821 jnz MterpException
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001822 SET_VREG_OBJECT %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001823 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1824
1825/* ------------------------------ */
1826 .balign 128
1827.L_op_aget_boolean: /* 0x47 */
1828/* File: x86/op_aget_boolean.S */
1829/* File: x86/op_aget.S */
1830/*
1831 * Array get, 32 bits or less. vAA <- vBB[vCC].
1832 *
1833 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
1834 *
1835 */
1836 /* op vAA, vBB, vCC */
1837 movzbl 2(rPC), %eax # eax <- BB
1838 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001839 GET_VREG %eax, %eax # eax <- vBB (array object)
1840 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001841 testl %eax, %eax # null array object?
1842 je common_errNullObject # bail if so
1843 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1844 jae common_errArrayIndex # index >= length, bail.
1845 movzbl MIRROR_BOOLEAN_ARRAY_DATA_OFFSET(%eax,%ecx,1), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001846 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001847 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1848
1849
1850/* ------------------------------ */
1851 .balign 128
1852.L_op_aget_byte: /* 0x48 */
1853/* File: x86/op_aget_byte.S */
1854/* File: x86/op_aget.S */
1855/*
1856 * Array get, 32 bits or less. vAA <- vBB[vCC].
1857 *
1858 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
1859 *
1860 */
1861 /* op vAA, vBB, vCC */
1862 movzbl 2(rPC), %eax # eax <- BB
1863 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001864 GET_VREG %eax, %eax # eax <- vBB (array object)
1865 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001866 testl %eax, %eax # null array object?
1867 je common_errNullObject # bail if so
1868 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1869 jae common_errArrayIndex # index >= length, bail.
1870 movsbl MIRROR_BYTE_ARRAY_DATA_OFFSET(%eax,%ecx,1), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001871 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001872 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1873
1874
1875/* ------------------------------ */
1876 .balign 128
1877.L_op_aget_char: /* 0x49 */
1878/* File: x86/op_aget_char.S */
1879/* File: x86/op_aget.S */
1880/*
1881 * Array get, 32 bits or less. vAA <- vBB[vCC].
1882 *
1883 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
1884 *
1885 */
1886 /* op vAA, vBB, vCC */
1887 movzbl 2(rPC), %eax # eax <- BB
1888 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001889 GET_VREG %eax, %eax # eax <- vBB (array object)
1890 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001891 testl %eax, %eax # null array object?
1892 je common_errNullObject # bail if so
1893 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1894 jae common_errArrayIndex # index >= length, bail.
1895 movzwl MIRROR_CHAR_ARRAY_DATA_OFFSET(%eax,%ecx,2), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001896 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001897 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1898
1899
1900/* ------------------------------ */
1901 .balign 128
1902.L_op_aget_short: /* 0x4a */
1903/* File: x86/op_aget_short.S */
1904/* File: x86/op_aget.S */
1905/*
1906 * Array get, 32 bits or less. vAA <- vBB[vCC].
1907 *
1908 * for: aget, aget-boolean, aget-byte, aget-char, aget-short
1909 *
1910 */
1911 /* op vAA, vBB, vCC */
1912 movzbl 2(rPC), %eax # eax <- BB
1913 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001914 GET_VREG %eax, %eax # eax <- vBB (array object)
1915 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001916 testl %eax, %eax # null array object?
1917 je common_errNullObject # bail if so
1918 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1919 jae common_errArrayIndex # index >= length, bail.
1920 movswl MIRROR_SHORT_ARRAY_DATA_OFFSET(%eax,%ecx,2), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001921 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001922 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1923
1924
1925/* ------------------------------ */
1926 .balign 128
1927.L_op_aput: /* 0x4b */
1928/* File: x86/op_aput.S */
1929/*
1930 * Array put, 32 bits or less. vBB[vCC] <- vAA.
1931 *
1932 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
1933 *
1934 */
1935 /* op vAA, vBB, vCC */
1936 movzbl 2(rPC), %eax # eax <- BB
1937 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001938 GET_VREG %eax, %eax # eax <- vBB (array object)
1939 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001940 testl %eax, %eax # null array object?
1941 je common_errNullObject # bail if so
1942 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1943 jae common_errArrayIndex # index >= length, bail.
1944 leal MIRROR_INT_ARRAY_DATA_OFFSET(%eax,%ecx,4), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001945 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001946 movl rINST, (%eax)
1947 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1948
1949/* ------------------------------ */
1950 .balign 128
1951.L_op_aput_wide: /* 0x4c */
1952/* File: x86/op_aput_wide.S */
1953/*
1954 * Array put, 64 bits. vBB[vCC] <- vAA.
1955 *
1956 */
1957 /* aput-wide vAA, vBB, vCC */
1958 movzbl 2(rPC), %eax # eax <- BB
1959 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001960 GET_VREG %eax, %eax # eax <- vBB (array object)
1961 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001962 testl %eax, %eax # null array object?
1963 je common_errNullObject # bail if so
1964 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
1965 jae common_errArrayIndex # index >= length, bail.
1966 leal MIRROR_WIDE_ARRAY_DATA_OFFSET(%eax,%ecx,8), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001967 GET_WIDE_FP_VREG %xmm0, rINST # xmm0 <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001968 movq %xmm0, (%eax) # vBB[vCC] <- xmm0
1969 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1970
1971/* ------------------------------ */
1972 .balign 128
1973.L_op_aput_object: /* 0x4d */
1974/* File: x86/op_aput_object.S */
1975/*
1976 * Store an object into an array. vBB[vCC] <- vAA.
1977 */
1978 /* op vAA, vBB, vCC */
1979 EXPORT_PC
1980 leal OFF_FP_SHADOWFRAME(rFP), %eax
1981 movl %eax, OUT_ARG0(%esp)
1982 movl rPC, OUT_ARG1(%esp)
1983 REFRESH_INST 77
1984 movl rINST, OUT_ARG2(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06001985 call SYMBOL(MterpAputObject) # (array, index)
Serguei Katkovff8579e2016-02-17 11:30:23 +06001986 RESTORE_IBASE
1987 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00001988 jz MterpPossibleException
1989 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
1990
1991/* ------------------------------ */
1992 .balign 128
1993.L_op_aput_boolean: /* 0x4e */
1994/* File: x86/op_aput_boolean.S */
1995/* File: x86/op_aput.S */
1996/*
1997 * Array put, 32 bits or less. vBB[vCC] <- vAA.
1998 *
1999 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2000 *
2001 */
2002 /* op vAA, vBB, vCC */
2003 movzbl 2(rPC), %eax # eax <- BB
2004 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002005 GET_VREG %eax, %eax # eax <- vBB (array object)
2006 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002007 testl %eax, %eax # null array object?
2008 je common_errNullObject # bail if so
2009 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
2010 jae common_errArrayIndex # index >= length, bail.
2011 leal MIRROR_BOOLEAN_ARRAY_DATA_OFFSET(%eax,%ecx,1), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002012 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002013 movb rINSTbl, (%eax)
2014 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2015
2016
2017/* ------------------------------ */
2018 .balign 128
2019.L_op_aput_byte: /* 0x4f */
2020/* File: x86/op_aput_byte.S */
2021/* File: x86/op_aput.S */
2022/*
2023 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2024 *
2025 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2026 *
2027 */
2028 /* op vAA, vBB, vCC */
2029 movzbl 2(rPC), %eax # eax <- BB
2030 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002031 GET_VREG %eax, %eax # eax <- vBB (array object)
2032 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002033 testl %eax, %eax # null array object?
2034 je common_errNullObject # bail if so
2035 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
2036 jae common_errArrayIndex # index >= length, bail.
2037 leal MIRROR_BYTE_ARRAY_DATA_OFFSET(%eax,%ecx,1), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002038 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002039 movb rINSTbl, (%eax)
2040 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2041
2042
2043/* ------------------------------ */
2044 .balign 128
2045.L_op_aput_char: /* 0x50 */
2046/* File: x86/op_aput_char.S */
2047/* File: x86/op_aput.S */
2048/*
2049 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2050 *
2051 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2052 *
2053 */
2054 /* op vAA, vBB, vCC */
2055 movzbl 2(rPC), %eax # eax <- BB
2056 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002057 GET_VREG %eax, %eax # eax <- vBB (array object)
2058 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002059 testl %eax, %eax # null array object?
2060 je common_errNullObject # bail if so
2061 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
2062 jae common_errArrayIndex # index >= length, bail.
2063 leal MIRROR_CHAR_ARRAY_DATA_OFFSET(%eax,%ecx,2), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002064 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002065 movw rINSTw, (%eax)
2066 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2067
2068
2069/* ------------------------------ */
2070 .balign 128
2071.L_op_aput_short: /* 0x51 */
2072/* File: x86/op_aput_short.S */
2073/* File: x86/op_aput.S */
2074/*
2075 * Array put, 32 bits or less. vBB[vCC] <- vAA.
2076 *
2077 * for: aput, aput-boolean, aput-byte, aput-char, aput-short
2078 *
2079 */
2080 /* op vAA, vBB, vCC */
2081 movzbl 2(rPC), %eax # eax <- BB
2082 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002083 GET_VREG %eax, %eax # eax <- vBB (array object)
2084 GET_VREG %ecx, %ecx # ecx <- vCC (requested index)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002085 testl %eax, %eax # null array object?
2086 je common_errNullObject # bail if so
2087 cmpl MIRROR_ARRAY_LENGTH_OFFSET(%eax), %ecx
2088 jae common_errArrayIndex # index >= length, bail.
2089 leal MIRROR_SHORT_ARRAY_DATA_OFFSET(%eax,%ecx,2), %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002090 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002091 movw rINSTw, (%eax)
2092 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2093
2094
2095/* ------------------------------ */
2096 .balign 128
2097.L_op_iget: /* 0x52 */
2098/* File: x86/op_iget.S */
2099/*
2100 * General instance field get.
2101 *
2102 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2103 */
2104 EXPORT_PC
2105 movzwl 2(rPC), %eax # eax <- 0000CCCC
2106 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2107 movzbl rINSTbl, %ecx # ecx <- BA
2108 sarl $4, %ecx # ecx <- B
2109 GET_VREG %ecx, %ecx
2110 movl %ecx, OUT_ARG1(%esp) # the object pointer
2111 movl OFF_FP_METHOD(rFP), %eax
2112 movl %eax, OUT_ARG2(%esp) # referrer
2113 mov rSELF, %ecx
2114 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002115 call SYMBOL(artGet32InstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002116 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002117 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002118 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2119 jnz MterpException # bail out
2120 andb $0xf, rINSTbl # rINST <- A
2121 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002122 SET_VREG_OBJECT %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002123 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002124 SET_VREG %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002125 .endif
2126 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2127
2128/* ------------------------------ */
2129 .balign 128
2130.L_op_iget_wide: /* 0x53 */
2131/* File: x86/op_iget_wide.S */
2132/*
2133 * 64-bit instance field get.
2134 *
2135 * for: iget-wide
2136 */
2137 EXPORT_PC
2138 movzwl 2(rPC), %eax # eax <- 0000CCCC
2139 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2140 movzbl rINSTbl, %ecx # ecx <- BA
2141 sarl $4, %ecx # ecx <- B
2142 GET_VREG %ecx, %ecx
2143 movl %ecx, OUT_ARG1(%esp) # the object pointer
2144 movl OFF_FP_METHOD(rFP), %eax
2145 movl %eax, OUT_ARG2(%esp) # referrer
2146 mov rSELF, %ecx
2147 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002148 call SYMBOL(artGet64InstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002149 mov rSELF, %ecx
2150 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2151 jnz MterpException # bail out
2152 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002153 SET_VREG %eax, rINST
2154 SET_VREG_HIGH %edx, rINST
Serguei Katkovff8579e2016-02-17 11:30:23 +06002155 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002156 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2157
2158/* ------------------------------ */
2159 .balign 128
2160.L_op_iget_object: /* 0x54 */
2161/* File: x86/op_iget_object.S */
2162/* File: x86/op_iget.S */
2163/*
2164 * General instance field get.
2165 *
2166 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2167 */
2168 EXPORT_PC
2169 movzwl 2(rPC), %eax # eax <- 0000CCCC
2170 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2171 movzbl rINSTbl, %ecx # ecx <- BA
2172 sarl $4, %ecx # ecx <- B
2173 GET_VREG %ecx, %ecx
2174 movl %ecx, OUT_ARG1(%esp) # the object pointer
2175 movl OFF_FP_METHOD(rFP), %eax
2176 movl %eax, OUT_ARG2(%esp) # referrer
2177 mov rSELF, %ecx
2178 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002179 call SYMBOL(artGetObjInstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002180 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002181 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002182 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2183 jnz MterpException # bail out
2184 andb $0xf, rINSTbl # rINST <- A
2185 .if 1
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002186 SET_VREG_OBJECT %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002187 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002188 SET_VREG %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002189 .endif
2190 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2191
2192
2193/* ------------------------------ */
2194 .balign 128
2195.L_op_iget_boolean: /* 0x55 */
2196/* File: x86/op_iget_boolean.S */
2197/* File: x86/op_iget.S */
2198/*
2199 * General instance field get.
2200 *
2201 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2202 */
2203 EXPORT_PC
2204 movzwl 2(rPC), %eax # eax <- 0000CCCC
2205 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2206 movzbl rINSTbl, %ecx # ecx <- BA
2207 sarl $4, %ecx # ecx <- B
2208 GET_VREG %ecx, %ecx
2209 movl %ecx, OUT_ARG1(%esp) # the object pointer
2210 movl OFF_FP_METHOD(rFP), %eax
2211 movl %eax, OUT_ARG2(%esp) # referrer
2212 mov rSELF, %ecx
2213 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002214 call SYMBOL(artGetBooleanInstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002215 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002216 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002217 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2218 jnz MterpException # bail out
2219 andb $0xf, rINSTbl # rINST <- A
2220 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002221 SET_VREG_OBJECT %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002222 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002223 SET_VREG %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002224 .endif
2225 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2226
2227
2228/* ------------------------------ */
2229 .balign 128
2230.L_op_iget_byte: /* 0x56 */
2231/* File: x86/op_iget_byte.S */
2232/* File: x86/op_iget.S */
2233/*
2234 * General instance field get.
2235 *
2236 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2237 */
2238 EXPORT_PC
2239 movzwl 2(rPC), %eax # eax <- 0000CCCC
2240 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2241 movzbl rINSTbl, %ecx # ecx <- BA
2242 sarl $4, %ecx # ecx <- B
2243 GET_VREG %ecx, %ecx
2244 movl %ecx, OUT_ARG1(%esp) # the object pointer
2245 movl OFF_FP_METHOD(rFP), %eax
2246 movl %eax, OUT_ARG2(%esp) # referrer
2247 mov rSELF, %ecx
2248 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002249 call SYMBOL(artGetByteInstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002250 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002251 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002252 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2253 jnz MterpException # bail out
2254 andb $0xf, rINSTbl # rINST <- A
2255 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002256 SET_VREG_OBJECT %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002257 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002258 SET_VREG %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002259 .endif
2260 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2261
2262
2263/* ------------------------------ */
2264 .balign 128
2265.L_op_iget_char: /* 0x57 */
2266/* File: x86/op_iget_char.S */
2267/* File: x86/op_iget.S */
2268/*
2269 * General instance field get.
2270 *
2271 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2272 */
2273 EXPORT_PC
2274 movzwl 2(rPC), %eax # eax <- 0000CCCC
2275 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2276 movzbl rINSTbl, %ecx # ecx <- BA
2277 sarl $4, %ecx # ecx <- B
2278 GET_VREG %ecx, %ecx
2279 movl %ecx, OUT_ARG1(%esp) # the object pointer
2280 movl OFF_FP_METHOD(rFP), %eax
2281 movl %eax, OUT_ARG2(%esp) # referrer
2282 mov rSELF, %ecx
2283 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002284 call SYMBOL(artGetCharInstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002285 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002286 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002287 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2288 jnz MterpException # bail out
2289 andb $0xf, rINSTbl # rINST <- A
2290 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002291 SET_VREG_OBJECT %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002292 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002293 SET_VREG %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002294 .endif
2295 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2296
2297
2298/* ------------------------------ */
2299 .balign 128
2300.L_op_iget_short: /* 0x58 */
2301/* File: x86/op_iget_short.S */
2302/* File: x86/op_iget.S */
2303/*
2304 * General instance field get.
2305 *
2306 * for: iget, iget-object, iget-boolean, iget-byte, iget-char, iget-short
2307 */
2308 EXPORT_PC
2309 movzwl 2(rPC), %eax # eax <- 0000CCCC
2310 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2311 movzbl rINSTbl, %ecx # ecx <- BA
2312 sarl $4, %ecx # ecx <- B
2313 GET_VREG %ecx, %ecx
2314 movl %ecx, OUT_ARG1(%esp) # the object pointer
2315 movl OFF_FP_METHOD(rFP), %eax
2316 movl %eax, OUT_ARG2(%esp) # referrer
2317 mov rSELF, %ecx
2318 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002319 call SYMBOL(artGetShortInstanceFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002320 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002321 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002322 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2323 jnz MterpException # bail out
2324 andb $0xf, rINSTbl # rINST <- A
2325 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002326 SET_VREG_OBJECT %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002327 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002328 SET_VREG %eax, rINST # fp[A] <-value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002329 .endif
2330 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2331
2332
2333/* ------------------------------ */
2334 .balign 128
2335.L_op_iput: /* 0x59 */
2336/* File: x86/op_iput.S */
2337/*
2338 * General 32-bit instance field put.
2339 *
2340 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
2341 */
2342 /* op vA, vB, field@CCCC */
2343 .extern artSet32InstanceFromMterp
2344 EXPORT_PC
2345 movzwl 2(rPC), %eax # eax<- 0000CCCC
2346 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2347 movzbl rINSTbl, %ecx # ecx<- BA
2348 sarl $4, %ecx # ecx<- B
2349 GET_VREG %ecx, %ecx
2350 movl %ecx, OUT_ARG1(%esp) # the object pointer
2351 andb $0xf, rINSTbl # rINST<- A
2352 GET_VREG %eax, rINST
2353 movl %eax, OUT_ARG2(%esp) # fp[A]
2354 movl OFF_FP_METHOD(rFP), %eax
2355 movl %eax, OUT_ARG3(%esp) # referrer
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002356 call SYMBOL(artSet32InstanceFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002357 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002358 jnz MterpPossibleException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002359 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002360 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2361
2362/* ------------------------------ */
2363 .balign 128
2364.L_op_iput_wide: /* 0x5a */
2365/* File: x86/op_iput_wide.S */
2366 /* iput-wide vA, vB, field@CCCC */
2367 .extern artSet64InstanceFromMterp
2368 EXPORT_PC
2369 movzwl 2(rPC), %eax # eax <- 0000CCCC
2370 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2371 movzbl rINSTbl,%ecx # ecx <- BA
2372 sarl $4,%ecx # ecx <- B
2373 GET_VREG %ecx, %ecx
2374 movl %ecx, OUT_ARG1(%esp) # the object pointer
2375 andb $0xf,rINSTbl # rINST <- A
2376 leal VREG_ADDRESS(rINST), %eax
2377 movl %eax, OUT_ARG2(%esp) # &fp[A]
2378 movl OFF_FP_METHOD(rFP), %eax
2379 movl %eax, OUT_ARG3(%esp) # referrer
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002380 call SYMBOL(artSet64InstanceFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002381 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002382 jnz MterpPossibleException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002383 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002384 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2385
2386/* ------------------------------ */
2387 .balign 128
2388.L_op_iput_object: /* 0x5b */
2389/* File: x86/op_iput_object.S */
2390 EXPORT_PC
2391 leal OFF_FP_SHADOWFRAME(rFP), %eax
2392 movl %eax, OUT_ARG0(%esp)
2393 movl rPC, OUT_ARG1(%esp)
2394 REFRESH_INST 91
2395 movl rINST, OUT_ARG2(%esp)
2396 movl rSELF, %eax
2397 movl %eax, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002398 call SYMBOL(MterpIputObject)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002399 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002400 jz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002401 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002402 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2403
2404/* ------------------------------ */
2405 .balign 128
2406.L_op_iput_boolean: /* 0x5c */
2407/* File: x86/op_iput_boolean.S */
2408/* File: x86/op_iput.S */
2409/*
2410 * General 32-bit instance field put.
2411 *
2412 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
2413 */
2414 /* op vA, vB, field@CCCC */
2415 .extern artSet8InstanceFromMterp
2416 EXPORT_PC
2417 movzwl 2(rPC), %eax # eax<- 0000CCCC
2418 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2419 movzbl rINSTbl, %ecx # ecx<- BA
2420 sarl $4, %ecx # ecx<- B
2421 GET_VREG %ecx, %ecx
2422 movl %ecx, OUT_ARG1(%esp) # the object pointer
2423 andb $0xf, rINSTbl # rINST<- A
2424 GET_VREG %eax, rINST
2425 movl %eax, OUT_ARG2(%esp) # fp[A]
2426 movl OFF_FP_METHOD(rFP), %eax
2427 movl %eax, OUT_ARG3(%esp) # referrer
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002428 call SYMBOL(artSet8InstanceFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002429 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002430 jnz MterpPossibleException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002431 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002432 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2433
2434
2435/* ------------------------------ */
2436 .balign 128
2437.L_op_iput_byte: /* 0x5d */
2438/* File: x86/op_iput_byte.S */
2439/* File: x86/op_iput.S */
2440/*
2441 * General 32-bit instance field put.
2442 *
2443 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
2444 */
2445 /* op vA, vB, field@CCCC */
2446 .extern artSet8InstanceFromMterp
2447 EXPORT_PC
2448 movzwl 2(rPC), %eax # eax<- 0000CCCC
2449 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2450 movzbl rINSTbl, %ecx # ecx<- BA
2451 sarl $4, %ecx # ecx<- B
2452 GET_VREG %ecx, %ecx
2453 movl %ecx, OUT_ARG1(%esp) # the object pointer
2454 andb $0xf, rINSTbl # rINST<- A
2455 GET_VREG %eax, rINST
2456 movl %eax, OUT_ARG2(%esp) # fp[A]
2457 movl OFF_FP_METHOD(rFP), %eax
2458 movl %eax, OUT_ARG3(%esp) # referrer
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002459 call SYMBOL(artSet8InstanceFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002460 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002461 jnz MterpPossibleException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002462 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002463 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2464
2465
2466/* ------------------------------ */
2467 .balign 128
2468.L_op_iput_char: /* 0x5e */
2469/* File: x86/op_iput_char.S */
2470/* File: x86/op_iput.S */
2471/*
2472 * General 32-bit instance field put.
2473 *
2474 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
2475 */
2476 /* op vA, vB, field@CCCC */
2477 .extern artSet16InstanceFromMterp
2478 EXPORT_PC
2479 movzwl 2(rPC), %eax # eax<- 0000CCCC
2480 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2481 movzbl rINSTbl, %ecx # ecx<- BA
2482 sarl $4, %ecx # ecx<- B
2483 GET_VREG %ecx, %ecx
2484 movl %ecx, OUT_ARG1(%esp) # the object pointer
2485 andb $0xf, rINSTbl # rINST<- A
2486 GET_VREG %eax, rINST
2487 movl %eax, OUT_ARG2(%esp) # fp[A]
2488 movl OFF_FP_METHOD(rFP), %eax
2489 movl %eax, OUT_ARG3(%esp) # referrer
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002490 call SYMBOL(artSet16InstanceFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002491 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002492 jnz MterpPossibleException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002493 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002494 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2495
2496
2497/* ------------------------------ */
2498 .balign 128
2499.L_op_iput_short: /* 0x5f */
2500/* File: x86/op_iput_short.S */
2501/* File: x86/op_iput.S */
2502/*
2503 * General 32-bit instance field put.
2504 *
2505 * for: iput, iput-object, iput-boolean, iput-byte, iput-char, iput-short
2506 */
2507 /* op vA, vB, field@CCCC */
2508 .extern artSet16InstanceFromMterp
2509 EXPORT_PC
2510 movzwl 2(rPC), %eax # eax<- 0000CCCC
2511 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2512 movzbl rINSTbl, %ecx # ecx<- BA
2513 sarl $4, %ecx # ecx<- B
2514 GET_VREG %ecx, %ecx
2515 movl %ecx, OUT_ARG1(%esp) # the object pointer
2516 andb $0xf, rINSTbl # rINST<- A
2517 GET_VREG %eax, rINST
2518 movl %eax, OUT_ARG2(%esp) # fp[A]
2519 movl OFF_FP_METHOD(rFP), %eax
2520 movl %eax, OUT_ARG3(%esp) # referrer
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002521 call SYMBOL(artSet16InstanceFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002522 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002523 jnz MterpPossibleException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002524 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002525 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2526
2527
2528/* ------------------------------ */
2529 .balign 128
2530.L_op_sget: /* 0x60 */
2531/* File: x86/op_sget.S */
2532/*
2533 * General SGET handler wrapper.
2534 *
2535 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2536 */
2537 /* op vAA, field@BBBB */
2538 .extern artGet32StaticFromCode
2539 EXPORT_PC
2540 movzwl 2(rPC), %eax
2541 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2542 movl OFF_FP_METHOD(rFP), %eax
2543 movl %eax, OUT_ARG1(%esp) # referrer
2544 movl rSELF, %ecx
2545 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002546 call SYMBOL(artGet32StaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002547 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002548 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002549 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2550 jnz MterpException
2551 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002552 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002553 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002554 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002555 .endif
2556 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2557
2558/* ------------------------------ */
2559 .balign 128
2560.L_op_sget_wide: /* 0x61 */
2561/* File: x86/op_sget_wide.S */
2562/*
2563 * SGET_WIDE handler wrapper.
2564 *
2565 */
2566 /* sget-wide vAA, field@BBBB */
2567 .extern artGet64StaticFromCode
2568 EXPORT_PC
2569 movzwl 2(rPC), %eax
2570 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2571 movl OFF_FP_METHOD(rFP), %eax
2572 movl %eax, OUT_ARG1(%esp) # referrer
2573 movl rSELF, %ecx
2574 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002575 call SYMBOL(artGet64StaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002576 movl rSELF, %ecx
2577 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2578 jnz MterpException
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002579 SET_VREG %eax, rINST # fp[A]<- low part
2580 SET_VREG_HIGH %edx, rINST # fp[A+1]<- high part
Serguei Katkovff8579e2016-02-17 11:30:23 +06002581 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002582 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2583
2584/* ------------------------------ */
2585 .balign 128
2586.L_op_sget_object: /* 0x62 */
2587/* File: x86/op_sget_object.S */
2588/* File: x86/op_sget.S */
2589/*
2590 * General SGET handler wrapper.
2591 *
2592 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2593 */
2594 /* op vAA, field@BBBB */
2595 .extern artGetObjStaticFromCode
2596 EXPORT_PC
2597 movzwl 2(rPC), %eax
2598 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2599 movl OFF_FP_METHOD(rFP), %eax
2600 movl %eax, OUT_ARG1(%esp) # referrer
2601 movl rSELF, %ecx
2602 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002603 call SYMBOL(artGetObjStaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002604 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002605 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002606 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2607 jnz MterpException
2608 .if 1
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002609 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002610 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002611 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002612 .endif
2613 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2614
2615
2616/* ------------------------------ */
2617 .balign 128
2618.L_op_sget_boolean: /* 0x63 */
2619/* File: x86/op_sget_boolean.S */
2620/* File: x86/op_sget.S */
2621/*
2622 * General SGET handler wrapper.
2623 *
2624 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2625 */
2626 /* op vAA, field@BBBB */
2627 .extern artGetBooleanStaticFromCode
2628 EXPORT_PC
2629 movzwl 2(rPC), %eax
2630 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2631 movl OFF_FP_METHOD(rFP), %eax
2632 movl %eax, OUT_ARG1(%esp) # referrer
2633 movl rSELF, %ecx
2634 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002635 call SYMBOL(artGetBooleanStaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002636 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002637 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002638 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2639 jnz MterpException
2640 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002641 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002642 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002643 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002644 .endif
2645 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2646
2647
2648/* ------------------------------ */
2649 .balign 128
2650.L_op_sget_byte: /* 0x64 */
2651/* File: x86/op_sget_byte.S */
2652/* File: x86/op_sget.S */
2653/*
2654 * General SGET handler wrapper.
2655 *
2656 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2657 */
2658 /* op vAA, field@BBBB */
2659 .extern artGetByteStaticFromCode
2660 EXPORT_PC
2661 movzwl 2(rPC), %eax
2662 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2663 movl OFF_FP_METHOD(rFP), %eax
2664 movl %eax, OUT_ARG1(%esp) # referrer
2665 movl rSELF, %ecx
2666 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002667 call SYMBOL(artGetByteStaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002668 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002669 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002670 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2671 jnz MterpException
2672 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002673 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002674 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002675 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002676 .endif
2677 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2678
2679
2680/* ------------------------------ */
2681 .balign 128
2682.L_op_sget_char: /* 0x65 */
2683/* File: x86/op_sget_char.S */
2684/* File: x86/op_sget.S */
2685/*
2686 * General SGET handler wrapper.
2687 *
2688 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2689 */
2690 /* op vAA, field@BBBB */
2691 .extern artGetCharStaticFromCode
2692 EXPORT_PC
2693 movzwl 2(rPC), %eax
2694 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2695 movl OFF_FP_METHOD(rFP), %eax
2696 movl %eax, OUT_ARG1(%esp) # referrer
2697 movl rSELF, %ecx
2698 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002699 call SYMBOL(artGetCharStaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002700 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002701 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002702 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2703 jnz MterpException
2704 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002705 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002706 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002707 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002708 .endif
2709 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2710
2711
2712/* ------------------------------ */
2713 .balign 128
2714.L_op_sget_short: /* 0x66 */
2715/* File: x86/op_sget_short.S */
2716/* File: x86/op_sget.S */
2717/*
2718 * General SGET handler wrapper.
2719 *
2720 * for: sget, sget-object, sget-boolean, sget-byte, sget-char, sget-short
2721 */
2722 /* op vAA, field@BBBB */
2723 .extern artGetShortStaticFromCode
2724 EXPORT_PC
2725 movzwl 2(rPC), %eax
2726 movl %eax, OUT_ARG0(%esp) # field ref CCCC
2727 movl OFF_FP_METHOD(rFP), %eax
2728 movl %eax, OUT_ARG1(%esp) # referrer
2729 movl rSELF, %ecx
2730 movl %ecx, OUT_ARG2(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002731 call SYMBOL(artGetShortStaticFromCode)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002732 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06002733 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002734 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
2735 jnz MterpException
2736 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002737 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002738 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002739 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002740 .endif
2741 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2742
2743
2744/* ------------------------------ */
2745 .balign 128
2746.L_op_sput: /* 0x67 */
2747/* File: x86/op_sput.S */
2748/*
2749 * General SPUT handler wrapper.
2750 *
2751 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2752 */
2753 /* op vAA, field@BBBB */
2754 .extern artSet32StaticFromCode
2755 EXPORT_PC
2756 movzwl 2(rPC), %eax
2757 movl %eax, OUT_ARG0(%esp) # field ref BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002758 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002759 movl rINST, OUT_ARG1(%esp) # fp[AA]
2760 movl OFF_FP_METHOD(rFP), %eax
2761 movl %eax, OUT_ARG2(%esp) # referrer
2762 movl rSELF, %ecx
2763 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002764 call SYMBOL(artSet32StaticFromCode)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002765 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002766 jnz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002767 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002768 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2769
2770/* ------------------------------ */
2771 .balign 128
2772.L_op_sput_wide: /* 0x68 */
2773/* File: x86/op_sput_wide.S */
2774/*
2775 * SPUT_WIDE handler wrapper.
2776 *
2777 */
2778 /* sput-wide vAA, field@BBBB */
2779 .extern artSet64IndirectStaticFromMterp
2780 EXPORT_PC
2781 movzwl 2(rPC), %eax
2782 movl %eax, OUT_ARG0(%esp) # field ref BBBB
2783 movl OFF_FP_METHOD(rFP), %eax
2784 movl %eax, OUT_ARG1(%esp) # referrer
2785 leal VREG_ADDRESS(rINST), %eax
2786 movl %eax, OUT_ARG2(%esp) # &fp[AA]
2787 movl rSELF, %ecx
2788 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002789 call SYMBOL(artSet64IndirectStaticFromMterp)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002790 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002791 jnz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002792 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002793 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2794
2795/* ------------------------------ */
2796 .balign 128
2797.L_op_sput_object: /* 0x69 */
2798/* File: x86/op_sput_object.S */
2799 EXPORT_PC
2800 leal OFF_FP_SHADOWFRAME(rFP), %eax
2801 movl %eax, OUT_ARG0(%esp)
2802 movl rPC, OUT_ARG1(%esp)
2803 REFRESH_INST 105
2804 movl rINST, OUT_ARG2(%esp)
2805 movl rSELF, %ecx
2806 movl %ecx, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002807 call SYMBOL(MterpSputObject)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002808 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002809 jz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002810 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002811 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2812
2813/* ------------------------------ */
2814 .balign 128
2815.L_op_sput_boolean: /* 0x6a */
2816/* File: x86/op_sput_boolean.S */
2817/* File: x86/op_sput.S */
2818/*
2819 * General SPUT handler wrapper.
2820 *
2821 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2822 */
2823 /* op vAA, field@BBBB */
2824 .extern artSet8StaticFromCode
2825 EXPORT_PC
2826 movzwl 2(rPC), %eax
2827 movl %eax, OUT_ARG0(%esp) # field ref BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002828 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002829 movl rINST, OUT_ARG1(%esp) # fp[AA]
2830 movl OFF_FP_METHOD(rFP), %eax
2831 movl %eax, OUT_ARG2(%esp) # referrer
2832 movl rSELF, %ecx
2833 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002834 call SYMBOL(artSet8StaticFromCode)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002835 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002836 jnz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002837 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002838 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2839
2840
2841/* ------------------------------ */
2842 .balign 128
2843.L_op_sput_byte: /* 0x6b */
2844/* File: x86/op_sput_byte.S */
2845/* File: x86/op_sput.S */
2846/*
2847 * General SPUT handler wrapper.
2848 *
2849 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2850 */
2851 /* op vAA, field@BBBB */
2852 .extern artSet8StaticFromCode
2853 EXPORT_PC
2854 movzwl 2(rPC), %eax
2855 movl %eax, OUT_ARG0(%esp) # field ref BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002856 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002857 movl rINST, OUT_ARG1(%esp) # fp[AA]
2858 movl OFF_FP_METHOD(rFP), %eax
2859 movl %eax, OUT_ARG2(%esp) # referrer
2860 movl rSELF, %ecx
2861 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002862 call SYMBOL(artSet8StaticFromCode)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002863 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002864 jnz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002865 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002866 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2867
2868
2869/* ------------------------------ */
2870 .balign 128
2871.L_op_sput_char: /* 0x6c */
2872/* File: x86/op_sput_char.S */
2873/* File: x86/op_sput.S */
2874/*
2875 * General SPUT handler wrapper.
2876 *
2877 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2878 */
2879 /* op vAA, field@BBBB */
2880 .extern artSet16StaticFromCode
2881 EXPORT_PC
2882 movzwl 2(rPC), %eax
2883 movl %eax, OUT_ARG0(%esp) # field ref BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002884 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002885 movl rINST, OUT_ARG1(%esp) # fp[AA]
2886 movl OFF_FP_METHOD(rFP), %eax
2887 movl %eax, OUT_ARG2(%esp) # referrer
2888 movl rSELF, %ecx
2889 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002890 call SYMBOL(artSet16StaticFromCode)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002891 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002892 jnz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002893 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002894 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2895
2896
2897/* ------------------------------ */
2898 .balign 128
2899.L_op_sput_short: /* 0x6d */
2900/* File: x86/op_sput_short.S */
2901/* File: x86/op_sput.S */
2902/*
2903 * General SPUT handler wrapper.
2904 *
2905 * for: sput, sput-boolean, sput-byte, sput-char, sput-short
2906 */
2907 /* op vAA, field@BBBB */
2908 .extern artSet16StaticFromCode
2909 EXPORT_PC
2910 movzwl 2(rPC), %eax
2911 movl %eax, OUT_ARG0(%esp) # field ref BBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002912 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002913 movl rINST, OUT_ARG1(%esp) # fp[AA]
2914 movl OFF_FP_METHOD(rFP), %eax
2915 movl %eax, OUT_ARG2(%esp) # referrer
2916 movl rSELF, %ecx
2917 movl %ecx, OUT_ARG3(%esp) # self
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002918 call SYMBOL(artSet16StaticFromCode)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002919 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002920 jnz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06002921 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002922 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
2923
2924
2925/* ------------------------------ */
2926 .balign 128
2927.L_op_invoke_virtual: /* 0x6e */
2928/* File: x86/op_invoke_virtual.S */
2929/* File: x86/invoke.S */
2930/*
2931 * Generic invoke handler wrapper.
2932 */
2933 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
2934 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
2935 .extern MterpInvokeVirtual
2936 EXPORT_PC
2937 movl rSELF, %ecx
2938 movl %ecx, OUT_ARG0(%esp)
2939 leal OFF_FP_SHADOWFRAME(rFP), %eax
2940 movl %eax, OUT_ARG1(%esp)
2941 movl rPC, OUT_ARG2(%esp)
2942 REFRESH_INST 110
2943 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002944 call SYMBOL(MterpInvokeVirtual)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002945 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002946 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00002947 ADVANCE_PC 3
2948 call SYMBOL(MterpShouldSwitchInterpreters)
2949 testb %al, %al
2950 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06002951 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00002952 FETCH_INST
2953 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002954
2955/*
2956 * Handle a virtual method call.
2957 *
2958 * for: invoke-virtual, invoke-virtual/range
2959 */
2960 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
2961 /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
2962
2963/* ------------------------------ */
2964 .balign 128
2965.L_op_invoke_super: /* 0x6f */
2966/* File: x86/op_invoke_super.S */
2967/* File: x86/invoke.S */
2968/*
2969 * Generic invoke handler wrapper.
2970 */
2971 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
2972 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
2973 .extern MterpInvokeSuper
2974 EXPORT_PC
2975 movl rSELF, %ecx
2976 movl %ecx, OUT_ARG0(%esp)
2977 leal OFF_FP_SHADOWFRAME(rFP), %eax
2978 movl %eax, OUT_ARG1(%esp)
2979 movl rPC, OUT_ARG2(%esp)
2980 REFRESH_INST 111
2981 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06002982 call SYMBOL(MterpInvokeSuper)
Serguei Katkovff8579e2016-02-17 11:30:23 +06002983 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002984 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00002985 ADVANCE_PC 3
2986 call SYMBOL(MterpShouldSwitchInterpreters)
2987 testb %al, %al
2988 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06002989 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00002990 FETCH_INST
2991 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00002992
2993/*
2994 * Handle a "super" method call.
2995 *
2996 * for: invoke-super, invoke-super/range
2997 */
2998 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
2999 /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3000
3001/* ------------------------------ */
3002 .balign 128
3003.L_op_invoke_direct: /* 0x70 */
3004/* File: x86/op_invoke_direct.S */
3005/* File: x86/invoke.S */
3006/*
3007 * Generic invoke handler wrapper.
3008 */
3009 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3010 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3011 .extern MterpInvokeDirect
3012 EXPORT_PC
3013 movl rSELF, %ecx
3014 movl %ecx, OUT_ARG0(%esp)
3015 leal OFF_FP_SHADOWFRAME(rFP), %eax
3016 movl %eax, OUT_ARG1(%esp)
3017 movl rPC, OUT_ARG2(%esp)
3018 REFRESH_INST 112
3019 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003020 call SYMBOL(MterpInvokeDirect)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003021 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003022 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003023 ADVANCE_PC 3
3024 call SYMBOL(MterpShouldSwitchInterpreters)
3025 testb %al, %al
3026 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003027 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003028 FETCH_INST
3029 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003030
3031
3032/* ------------------------------ */
3033 .balign 128
3034.L_op_invoke_static: /* 0x71 */
3035/* File: x86/op_invoke_static.S */
3036/* File: x86/invoke.S */
3037/*
3038 * Generic invoke handler wrapper.
3039 */
3040 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3041 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3042 .extern MterpInvokeStatic
3043 EXPORT_PC
3044 movl rSELF, %ecx
3045 movl %ecx, OUT_ARG0(%esp)
3046 leal OFF_FP_SHADOWFRAME(rFP), %eax
3047 movl %eax, OUT_ARG1(%esp)
3048 movl rPC, OUT_ARG2(%esp)
3049 REFRESH_INST 113
3050 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003051 call SYMBOL(MterpInvokeStatic)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003052 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003053 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003054 ADVANCE_PC 3
3055 call SYMBOL(MterpShouldSwitchInterpreters)
3056 testb %al, %al
3057 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003058 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003059 FETCH_INST
3060 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003061
3062
3063
3064/* ------------------------------ */
3065 .balign 128
3066.L_op_invoke_interface: /* 0x72 */
3067/* File: x86/op_invoke_interface.S */
3068/* File: x86/invoke.S */
3069/*
3070 * Generic invoke handler wrapper.
3071 */
3072 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3073 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3074 .extern MterpInvokeInterface
3075 EXPORT_PC
3076 movl rSELF, %ecx
3077 movl %ecx, OUT_ARG0(%esp)
3078 leal OFF_FP_SHADOWFRAME(rFP), %eax
3079 movl %eax, OUT_ARG1(%esp)
3080 movl rPC, OUT_ARG2(%esp)
3081 REFRESH_INST 114
3082 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003083 call SYMBOL(MterpInvokeInterface)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003084 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003085 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003086 ADVANCE_PC 3
3087 call SYMBOL(MterpShouldSwitchInterpreters)
3088 testb %al, %al
3089 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003090 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003091 FETCH_INST
3092 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003093
3094/*
3095 * Handle an interface method call.
3096 *
3097 * for: invoke-interface, invoke-interface/range
3098 */
3099 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3100 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3101
3102/* ------------------------------ */
3103 .balign 128
3104.L_op_return_void_no_barrier: /* 0x73 */
3105/* File: x86/op_return_void_no_barrier.S */
buzbeea2c97a92016-01-25 15:41:24 -08003106 movl rSELF, %eax
3107 testl $(THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST), THREAD_FLAGS_OFFSET(%eax)
3108 jz 1f
3109 movl %eax, OUT_ARG0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003110 call SYMBOL(MterpSuspendCheck)
buzbeea2c97a92016-01-25 15:41:24 -080031111:
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003112 xorl %eax, %eax
3113 xorl %ecx, %ecx
3114 jmp MterpReturn
3115
3116/* ------------------------------ */
3117 .balign 128
3118.L_op_invoke_virtual_range: /* 0x74 */
3119/* File: x86/op_invoke_virtual_range.S */
3120/* File: x86/invoke.S */
3121/*
3122 * Generic invoke handler wrapper.
3123 */
3124 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3125 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3126 .extern MterpInvokeVirtualRange
3127 EXPORT_PC
3128 movl rSELF, %ecx
3129 movl %ecx, OUT_ARG0(%esp)
3130 leal OFF_FP_SHADOWFRAME(rFP), %eax
3131 movl %eax, OUT_ARG1(%esp)
3132 movl rPC, OUT_ARG2(%esp)
3133 REFRESH_INST 116
3134 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003135 call SYMBOL(MterpInvokeVirtualRange)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003136 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003137 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003138 ADVANCE_PC 3
3139 call SYMBOL(MterpShouldSwitchInterpreters)
3140 testb %al, %al
3141 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003142 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003143 FETCH_INST
3144 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003145
3146
3147/* ------------------------------ */
3148 .balign 128
3149.L_op_invoke_super_range: /* 0x75 */
3150/* File: x86/op_invoke_super_range.S */
3151/* File: x86/invoke.S */
3152/*
3153 * Generic invoke handler wrapper.
3154 */
3155 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3156 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3157 .extern MterpInvokeSuperRange
3158 EXPORT_PC
3159 movl rSELF, %ecx
3160 movl %ecx, OUT_ARG0(%esp)
3161 leal OFF_FP_SHADOWFRAME(rFP), %eax
3162 movl %eax, OUT_ARG1(%esp)
3163 movl rPC, OUT_ARG2(%esp)
3164 REFRESH_INST 117
3165 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003166 call SYMBOL(MterpInvokeSuperRange)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003167 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003168 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003169 ADVANCE_PC 3
3170 call SYMBOL(MterpShouldSwitchInterpreters)
3171 testb %al, %al
3172 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003173 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003174 FETCH_INST
3175 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003176
3177
3178/* ------------------------------ */
3179 .balign 128
3180.L_op_invoke_direct_range: /* 0x76 */
3181/* File: x86/op_invoke_direct_range.S */
3182/* File: x86/invoke.S */
3183/*
3184 * Generic invoke handler wrapper.
3185 */
3186 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3187 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3188 .extern MterpInvokeDirectRange
3189 EXPORT_PC
3190 movl rSELF, %ecx
3191 movl %ecx, OUT_ARG0(%esp)
3192 leal OFF_FP_SHADOWFRAME(rFP), %eax
3193 movl %eax, OUT_ARG1(%esp)
3194 movl rPC, OUT_ARG2(%esp)
3195 REFRESH_INST 118
3196 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003197 call SYMBOL(MterpInvokeDirectRange)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003198 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003199 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003200 ADVANCE_PC 3
3201 call SYMBOL(MterpShouldSwitchInterpreters)
3202 testb %al, %al
3203 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003204 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003205 FETCH_INST
3206 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003207
3208
3209/* ------------------------------ */
3210 .balign 128
3211.L_op_invoke_static_range: /* 0x77 */
3212/* File: x86/op_invoke_static_range.S */
3213/* File: x86/invoke.S */
3214/*
3215 * Generic invoke handler wrapper.
3216 */
3217 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3218 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3219 .extern MterpInvokeStaticRange
3220 EXPORT_PC
3221 movl rSELF, %ecx
3222 movl %ecx, OUT_ARG0(%esp)
3223 leal OFF_FP_SHADOWFRAME(rFP), %eax
3224 movl %eax, OUT_ARG1(%esp)
3225 movl rPC, OUT_ARG2(%esp)
3226 REFRESH_INST 119
3227 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003228 call SYMBOL(MterpInvokeStaticRange)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003229 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003230 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003231 ADVANCE_PC 3
3232 call SYMBOL(MterpShouldSwitchInterpreters)
3233 testb %al, %al
3234 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003235 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003236 FETCH_INST
3237 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003238
3239
3240/* ------------------------------ */
3241 .balign 128
3242.L_op_invoke_interface_range: /* 0x78 */
3243/* File: x86/op_invoke_interface_range.S */
3244/* File: x86/invoke.S */
3245/*
3246 * Generic invoke handler wrapper.
3247 */
3248 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
3249 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
3250 .extern MterpInvokeInterfaceRange
3251 EXPORT_PC
3252 movl rSELF, %ecx
3253 movl %ecx, OUT_ARG0(%esp)
3254 leal OFF_FP_SHADOWFRAME(rFP), %eax
3255 movl %eax, OUT_ARG1(%esp)
3256 movl rPC, OUT_ARG2(%esp)
3257 REFRESH_INST 120
3258 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003259 call SYMBOL(MterpInvokeInterfaceRange)
Serguei Katkovff8579e2016-02-17 11:30:23 +06003260 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003261 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00003262 ADVANCE_PC 3
3263 call SYMBOL(MterpShouldSwitchInterpreters)
3264 testb %al, %al
3265 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06003266 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00003267 FETCH_INST
3268 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003269
3270
3271/* ------------------------------ */
3272 .balign 128
3273.L_op_unused_79: /* 0x79 */
3274/* File: x86/op_unused_79.S */
3275/* File: x86/unused.S */
3276/*
3277 * Bail to reference interpreter to throw.
3278 */
3279 jmp MterpFallback
3280
3281
3282/* ------------------------------ */
3283 .balign 128
3284.L_op_unused_7a: /* 0x7a */
3285/* File: x86/op_unused_7a.S */
3286/* File: x86/unused.S */
3287/*
3288 * Bail to reference interpreter to throw.
3289 */
3290 jmp MterpFallback
3291
3292
3293/* ------------------------------ */
3294 .balign 128
3295.L_op_neg_int: /* 0x7b */
3296/* File: x86/op_neg_int.S */
3297/* File: x86/unop.S */
3298/*
3299 * Generic 32-bit unary operation. Provide an "instr" line that
3300 * specifies an instruction that performs "result = op eax".
3301 */
3302 /* unop vA, vB */
3303 movzbl rINSTbl,%ecx # ecx <- A+
3304 sarl $4,rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003305 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003306 andb $0xf,%cl # ecx <- A
3307 negl %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003308 SET_VREG %eax, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003309 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3310
3311
3312/* ------------------------------ */
3313 .balign 128
3314.L_op_not_int: /* 0x7c */
3315/* File: x86/op_not_int.S */
3316/* File: x86/unop.S */
3317/*
3318 * Generic 32-bit unary operation. Provide an "instr" line that
3319 * specifies an instruction that performs "result = op eax".
3320 */
3321 /* unop vA, vB */
3322 movzbl rINSTbl,%ecx # ecx <- A+
3323 sarl $4,rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003324 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003325 andb $0xf,%cl # ecx <- A
3326 notl %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003327 SET_VREG %eax, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003328 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3329
3330
3331/* ------------------------------ */
3332 .balign 128
3333.L_op_neg_long: /* 0x7d */
3334/* File: x86/op_neg_long.S */
3335 /* unop vA, vB */
3336 movzbl rINSTbl, %ecx # ecx <- BA
3337 sarl $4, %ecx # ecx <- B
3338 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003339 GET_VREG %eax, %ecx # eax <- v[B+0]
3340 GET_VREG_HIGH %ecx, %ecx # ecx <- v[B+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003341 negl %eax
3342 adcl $0, %ecx
3343 negl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003344 SET_VREG %eax, rINST # v[A+0] <- eax
3345 SET_VREG_HIGH %ecx, rINST # v[A+1] <- ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003346 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3347
3348
3349/* ------------------------------ */
3350 .balign 128
3351.L_op_not_long: /* 0x7e */
3352/* File: x86/op_not_long.S */
3353 /* unop vA, vB */
3354 movzbl rINSTbl, %ecx # ecx <- BA
3355 sarl $4, %ecx # ecx <- B
3356 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003357 GET_VREG %eax, %ecx # eax <- v[B+0]
3358 GET_VREG_HIGH %ecx, %ecx # ecx <- v[B+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003359 notl %eax
3360 notl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003361 SET_VREG %eax, rINST # v[A+0] <- eax
3362 SET_VREG_HIGH %ecx, rINST # v[A+1] <- ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003363 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3364
3365/* ------------------------------ */
3366 .balign 128
3367.L_op_neg_float: /* 0x7f */
3368/* File: x86/op_neg_float.S */
3369/* File: x86/fpcvt.S */
3370/*
3371 * Generic 32-bit FP conversion operation.
3372 */
3373 /* unop vA, vB */
3374 movzbl rINSTbl, %ecx # ecx <- A+
3375 sarl $4, rINST # rINST <- B
3376 flds VREG_ADDRESS(rINST) # %st0 <- vB
3377 andb $0xf, %cl # ecx <- A
3378 fchs
3379 fstps VREG_ADDRESS(%ecx) # vA <- %st0
3380 .if 0
3381 CLEAR_WIDE_REF %ecx
3382 .else
3383 CLEAR_REF %ecx
3384 .endif
3385 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3386
3387
3388/* ------------------------------ */
3389 .balign 128
3390.L_op_neg_double: /* 0x80 */
3391/* File: x86/op_neg_double.S */
3392/* File: x86/fpcvt.S */
3393/*
3394 * Generic 32-bit FP conversion operation.
3395 */
3396 /* unop vA, vB */
3397 movzbl rINSTbl, %ecx # ecx <- A+
3398 sarl $4, rINST # rINST <- B
3399 fldl VREG_ADDRESS(rINST) # %st0 <- vB
3400 andb $0xf, %cl # ecx <- A
3401 fchs
3402 fstpl VREG_ADDRESS(%ecx) # vA <- %st0
3403 .if 1
3404 CLEAR_WIDE_REF %ecx
3405 .else
3406 CLEAR_REF %ecx
3407 .endif
3408 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3409
3410
3411/* ------------------------------ */
3412 .balign 128
3413.L_op_int_to_long: /* 0x81 */
3414/* File: x86/op_int_to_long.S */
3415 /* int to long vA, vB */
3416 movzbl rINSTbl, %eax # eax <- +A
3417 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003418 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003419 andb $0xf, rINSTbl # rINST <- A
3420 movl rIBASE, %ecx # cltd trashes rIBASE/edx
3421 cltd # rINST:eax<- sssssssBBBBBBBB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003422 SET_VREG_HIGH rIBASE, rINST # v[A+1] <- rIBASE
3423 SET_VREG %eax, rINST # v[A+0] <- %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003424 movl %ecx, rIBASE
3425 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3426
3427
3428/* ------------------------------ */
3429 .balign 128
3430.L_op_int_to_float: /* 0x82 */
3431/* File: x86/op_int_to_float.S */
3432/* File: x86/fpcvt.S */
3433/*
3434 * Generic 32-bit FP conversion operation.
3435 */
3436 /* unop vA, vB */
3437 movzbl rINSTbl, %ecx # ecx <- A+
3438 sarl $4, rINST # rINST <- B
3439 fildl VREG_ADDRESS(rINST) # %st0 <- vB
3440 andb $0xf, %cl # ecx <- A
3441
3442 fstps VREG_ADDRESS(%ecx) # vA <- %st0
3443 .if 0
3444 CLEAR_WIDE_REF %ecx
3445 .else
3446 CLEAR_REF %ecx
3447 .endif
3448 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3449
3450
3451/* ------------------------------ */
3452 .balign 128
3453.L_op_int_to_double: /* 0x83 */
3454/* File: x86/op_int_to_double.S */
3455/* File: x86/fpcvt.S */
3456/*
3457 * Generic 32-bit FP conversion operation.
3458 */
3459 /* unop vA, vB */
3460 movzbl rINSTbl, %ecx # ecx <- A+
3461 sarl $4, rINST # rINST <- B
3462 fildl VREG_ADDRESS(rINST) # %st0 <- vB
3463 andb $0xf, %cl # ecx <- A
3464
3465 fstpl VREG_ADDRESS(%ecx) # vA <- %st0
3466 .if 1
3467 CLEAR_WIDE_REF %ecx
3468 .else
3469 CLEAR_REF %ecx
3470 .endif
3471 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3472
3473
3474/* ------------------------------ */
3475 .balign 128
3476.L_op_long_to_int: /* 0x84 */
3477/* File: x86/op_long_to_int.S */
3478/* we ignore the high word, making this equivalent to a 32-bit reg move */
3479/* File: x86/op_move.S */
3480 /* for move, move-object, long-to-int */
3481 /* op vA, vB */
3482 movzbl rINSTbl, %eax # eax <- BA
3483 andb $0xf, %al # eax <- A
3484 shrl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003485 GET_VREG rINST, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003486 .if 0
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003487 SET_VREG_OBJECT rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003488 .else
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003489 SET_VREG rINST, %eax # fp[A] <- fp[B]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003490 .endif
3491 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3492
3493
3494/* ------------------------------ */
3495 .balign 128
3496.L_op_long_to_float: /* 0x85 */
3497/* File: x86/op_long_to_float.S */
3498/* File: x86/fpcvt.S */
3499/*
3500 * Generic 32-bit FP conversion operation.
3501 */
3502 /* unop vA, vB */
3503 movzbl rINSTbl, %ecx # ecx <- A+
3504 sarl $4, rINST # rINST <- B
3505 fildll VREG_ADDRESS(rINST) # %st0 <- vB
3506 andb $0xf, %cl # ecx <- A
3507
3508 fstps VREG_ADDRESS(%ecx) # vA <- %st0
3509 .if 0
3510 CLEAR_WIDE_REF %ecx
3511 .else
3512 CLEAR_REF %ecx
3513 .endif
3514 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3515
3516
3517/* ------------------------------ */
3518 .balign 128
3519.L_op_long_to_double: /* 0x86 */
3520/* File: x86/op_long_to_double.S */
3521/* File: x86/fpcvt.S */
3522/*
3523 * Generic 32-bit FP conversion operation.
3524 */
3525 /* unop vA, vB */
3526 movzbl rINSTbl, %ecx # ecx <- A+
3527 sarl $4, rINST # rINST <- B
3528 fildll VREG_ADDRESS(rINST) # %st0 <- vB
3529 andb $0xf, %cl # ecx <- A
3530
3531 fstpl VREG_ADDRESS(%ecx) # vA <- %st0
3532 .if 1
3533 CLEAR_WIDE_REF %ecx
3534 .else
3535 CLEAR_REF %ecx
3536 .endif
3537 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3538
3539
3540/* ------------------------------ */
3541 .balign 128
3542.L_op_float_to_int: /* 0x87 */
3543/* File: x86/op_float_to_int.S */
3544/* File: x86/cvtfp_int.S */
3545/* On fp to int conversions, Java requires that
3546 * if the result > maxint, it should be clamped to maxint. If it is less
3547 * than minint, it should be clamped to minint. If it is a nan, the result
3548 * should be zero. Further, the rounding mode is to truncate. This model
3549 * differs from what is delivered normally via the x86 fpu, so we have
3550 * to play some games.
3551 */
3552 /* float/double to int/long vA, vB */
3553 movzbl rINSTbl, %ecx # ecx <- A+
3554 sarl $4, rINST # rINST <- B
3555 .if 0
3556 fldl VREG_ADDRESS(rINST) # %st0 <- vB
3557 .else
3558 flds VREG_ADDRESS(rINST) # %st0 <- vB
3559 .endif
3560 ftst
3561 fnstcw LOCAL0(%esp) # remember original rounding mode
3562 movzwl LOCAL0(%esp), %eax
3563 movb $0xc, %ah
3564 movw %ax, LOCAL0+2(%esp)
3565 fldcw LOCAL0+2(%esp) # set "to zero" rounding mode
3566 andb $0xf, %cl # ecx <- A
3567 .if 0
3568 fistpll VREG_ADDRESS(%ecx) # convert and store
3569 .else
3570 fistpl VREG_ADDRESS(%ecx) # convert and store
3571 .endif
3572 fldcw LOCAL0(%esp) # restore previous rounding mode
3573 .if 0
3574 movl $0x80000000, %eax
3575 xorl VREG_HIGH_ADDRESS(%ecx), %eax
3576 orl VREG_ADDRESS(%ecx), %eax
3577 .else
3578 cmpl $0x80000000, VREG_ADDRESS(%ecx)
3579 .endif
3580 je .Lop_float_to_int_special_case # fix up result
3581
3582.Lop_float_to_int_finish:
3583 xor %eax, %eax
3584 mov %eax, VREG_REF_ADDRESS(%ecx)
3585 .if 0
3586 mov %eax, VREG_REF_HIGH_ADDRESS(%ecx)
3587 .endif
3588 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3589
3590.Lop_float_to_int_special_case:
3591 fnstsw %ax
3592 sahf
3593 jp .Lop_float_to_int_isNaN
3594 adcl $-1, VREG_ADDRESS(%ecx)
3595 .if 0
3596 adcl $-1, VREG_HIGH_ADDRESS(%ecx)
3597 .endif
3598 jmp .Lop_float_to_int_finish
3599.Lop_float_to_int_isNaN:
3600 movl $0, VREG_ADDRESS(%ecx)
3601 .if 0
3602 movl $0, VREG_HIGH_ADDRESS(%ecx)
3603 .endif
3604 jmp .Lop_float_to_int_finish
3605
3606
3607/* ------------------------------ */
3608 .balign 128
3609.L_op_float_to_long: /* 0x88 */
3610/* File: x86/op_float_to_long.S */
3611/* File: x86/cvtfp_int.S */
3612/* On fp to int conversions, Java requires that
3613 * if the result > maxint, it should be clamped to maxint. If it is less
3614 * than minint, it should be clamped to minint. If it is a nan, the result
3615 * should be zero. Further, the rounding mode is to truncate. This model
3616 * differs from what is delivered normally via the x86 fpu, so we have
3617 * to play some games.
3618 */
3619 /* float/double to int/long vA, vB */
3620 movzbl rINSTbl, %ecx # ecx <- A+
3621 sarl $4, rINST # rINST <- B
3622 .if 0
3623 fldl VREG_ADDRESS(rINST) # %st0 <- vB
3624 .else
3625 flds VREG_ADDRESS(rINST) # %st0 <- vB
3626 .endif
3627 ftst
3628 fnstcw LOCAL0(%esp) # remember original rounding mode
3629 movzwl LOCAL0(%esp), %eax
3630 movb $0xc, %ah
3631 movw %ax, LOCAL0+2(%esp)
3632 fldcw LOCAL0+2(%esp) # set "to zero" rounding mode
3633 andb $0xf, %cl # ecx <- A
3634 .if 1
3635 fistpll VREG_ADDRESS(%ecx) # convert and store
3636 .else
3637 fistpl VREG_ADDRESS(%ecx) # convert and store
3638 .endif
3639 fldcw LOCAL0(%esp) # restore previous rounding mode
3640 .if 1
3641 movl $0x80000000, %eax
3642 xorl VREG_HIGH_ADDRESS(%ecx), %eax
3643 orl VREG_ADDRESS(%ecx), %eax
3644 .else
3645 cmpl $0x80000000, VREG_ADDRESS(%ecx)
3646 .endif
3647 je .Lop_float_to_long_special_case # fix up result
3648
3649.Lop_float_to_long_finish:
3650 xor %eax, %eax
3651 mov %eax, VREG_REF_ADDRESS(%ecx)
3652 .if 1
3653 mov %eax, VREG_REF_HIGH_ADDRESS(%ecx)
3654 .endif
3655 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3656
3657.Lop_float_to_long_special_case:
3658 fnstsw %ax
3659 sahf
3660 jp .Lop_float_to_long_isNaN
3661 adcl $-1, VREG_ADDRESS(%ecx)
3662 .if 1
3663 adcl $-1, VREG_HIGH_ADDRESS(%ecx)
3664 .endif
3665 jmp .Lop_float_to_long_finish
3666.Lop_float_to_long_isNaN:
3667 movl $0, VREG_ADDRESS(%ecx)
3668 .if 1
3669 movl $0, VREG_HIGH_ADDRESS(%ecx)
3670 .endif
3671 jmp .Lop_float_to_long_finish
3672
3673
3674/* ------------------------------ */
3675 .balign 128
3676.L_op_float_to_double: /* 0x89 */
3677/* File: x86/op_float_to_double.S */
3678/* File: x86/fpcvt.S */
3679/*
3680 * Generic 32-bit FP conversion operation.
3681 */
3682 /* unop vA, vB */
3683 movzbl rINSTbl, %ecx # ecx <- A+
3684 sarl $4, rINST # rINST <- B
3685 flds VREG_ADDRESS(rINST) # %st0 <- vB
3686 andb $0xf, %cl # ecx <- A
3687
3688 fstpl VREG_ADDRESS(%ecx) # vA <- %st0
3689 .if 1
3690 CLEAR_WIDE_REF %ecx
3691 .else
3692 CLEAR_REF %ecx
3693 .endif
3694 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3695
3696
3697/* ------------------------------ */
3698 .balign 128
3699.L_op_double_to_int: /* 0x8a */
3700/* File: x86/op_double_to_int.S */
3701/* File: x86/cvtfp_int.S */
3702/* On fp to int conversions, Java requires that
3703 * if the result > maxint, it should be clamped to maxint. If it is less
3704 * than minint, it should be clamped to minint. If it is a nan, the result
3705 * should be zero. Further, the rounding mode is to truncate. This model
3706 * differs from what is delivered normally via the x86 fpu, so we have
3707 * to play some games.
3708 */
3709 /* float/double to int/long vA, vB */
3710 movzbl rINSTbl, %ecx # ecx <- A+
3711 sarl $4, rINST # rINST <- B
3712 .if 1
3713 fldl VREG_ADDRESS(rINST) # %st0 <- vB
3714 .else
3715 flds VREG_ADDRESS(rINST) # %st0 <- vB
3716 .endif
3717 ftst
3718 fnstcw LOCAL0(%esp) # remember original rounding mode
3719 movzwl LOCAL0(%esp), %eax
3720 movb $0xc, %ah
3721 movw %ax, LOCAL0+2(%esp)
3722 fldcw LOCAL0+2(%esp) # set "to zero" rounding mode
3723 andb $0xf, %cl # ecx <- A
3724 .if 0
3725 fistpll VREG_ADDRESS(%ecx) # convert and store
3726 .else
3727 fistpl VREG_ADDRESS(%ecx) # convert and store
3728 .endif
3729 fldcw LOCAL0(%esp) # restore previous rounding mode
3730 .if 0
3731 movl $0x80000000, %eax
3732 xorl VREG_HIGH_ADDRESS(%ecx), %eax
3733 orl VREG_ADDRESS(%ecx), %eax
3734 .else
3735 cmpl $0x80000000, VREG_ADDRESS(%ecx)
3736 .endif
3737 je .Lop_double_to_int_special_case # fix up result
3738
3739.Lop_double_to_int_finish:
3740 xor %eax, %eax
3741 mov %eax, VREG_REF_ADDRESS(%ecx)
3742 .if 0
3743 mov %eax, VREG_REF_HIGH_ADDRESS(%ecx)
3744 .endif
3745 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3746
3747.Lop_double_to_int_special_case:
3748 fnstsw %ax
3749 sahf
3750 jp .Lop_double_to_int_isNaN
3751 adcl $-1, VREG_ADDRESS(%ecx)
3752 .if 0
3753 adcl $-1, VREG_HIGH_ADDRESS(%ecx)
3754 .endif
3755 jmp .Lop_double_to_int_finish
3756.Lop_double_to_int_isNaN:
3757 movl $0, VREG_ADDRESS(%ecx)
3758 .if 0
3759 movl $0, VREG_HIGH_ADDRESS(%ecx)
3760 .endif
3761 jmp .Lop_double_to_int_finish
3762
3763
3764/* ------------------------------ */
3765 .balign 128
3766.L_op_double_to_long: /* 0x8b */
3767/* File: x86/op_double_to_long.S */
3768/* File: x86/cvtfp_int.S */
3769/* On fp to int conversions, Java requires that
3770 * if the result > maxint, it should be clamped to maxint. If it is less
3771 * than minint, it should be clamped to minint. If it is a nan, the result
3772 * should be zero. Further, the rounding mode is to truncate. This model
3773 * differs from what is delivered normally via the x86 fpu, so we have
3774 * to play some games.
3775 */
3776 /* float/double to int/long vA, vB */
3777 movzbl rINSTbl, %ecx # ecx <- A+
3778 sarl $4, rINST # rINST <- B
3779 .if 1
3780 fldl VREG_ADDRESS(rINST) # %st0 <- vB
3781 .else
3782 flds VREG_ADDRESS(rINST) # %st0 <- vB
3783 .endif
3784 ftst
3785 fnstcw LOCAL0(%esp) # remember original rounding mode
3786 movzwl LOCAL0(%esp), %eax
3787 movb $0xc, %ah
3788 movw %ax, LOCAL0+2(%esp)
3789 fldcw LOCAL0+2(%esp) # set "to zero" rounding mode
3790 andb $0xf, %cl # ecx <- A
3791 .if 1
3792 fistpll VREG_ADDRESS(%ecx) # convert and store
3793 .else
3794 fistpl VREG_ADDRESS(%ecx) # convert and store
3795 .endif
3796 fldcw LOCAL0(%esp) # restore previous rounding mode
3797 .if 1
3798 movl $0x80000000, %eax
3799 xorl VREG_HIGH_ADDRESS(%ecx), %eax
3800 orl VREG_ADDRESS(%ecx), %eax
3801 .else
3802 cmpl $0x80000000, VREG_ADDRESS(%ecx)
3803 .endif
3804 je .Lop_double_to_long_special_case # fix up result
3805
3806.Lop_double_to_long_finish:
3807 xor %eax, %eax
3808 mov %eax, VREG_REF_ADDRESS(%ecx)
3809 .if 1
3810 mov %eax, VREG_REF_HIGH_ADDRESS(%ecx)
3811 .endif
3812 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3813
3814.Lop_double_to_long_special_case:
3815 fnstsw %ax
3816 sahf
3817 jp .Lop_double_to_long_isNaN
3818 adcl $-1, VREG_ADDRESS(%ecx)
3819 .if 1
3820 adcl $-1, VREG_HIGH_ADDRESS(%ecx)
3821 .endif
3822 jmp .Lop_double_to_long_finish
3823.Lop_double_to_long_isNaN:
3824 movl $0, VREG_ADDRESS(%ecx)
3825 .if 1
3826 movl $0, VREG_HIGH_ADDRESS(%ecx)
3827 .endif
3828 jmp .Lop_double_to_long_finish
3829
3830
3831/* ------------------------------ */
3832 .balign 128
3833.L_op_double_to_float: /* 0x8c */
3834/* File: x86/op_double_to_float.S */
3835/* File: x86/fpcvt.S */
3836/*
3837 * Generic 32-bit FP conversion operation.
3838 */
3839 /* unop vA, vB */
3840 movzbl rINSTbl, %ecx # ecx <- A+
3841 sarl $4, rINST # rINST <- B
3842 fldl VREG_ADDRESS(rINST) # %st0 <- vB
3843 andb $0xf, %cl # ecx <- A
3844
3845 fstps VREG_ADDRESS(%ecx) # vA <- %st0
3846 .if 0
3847 CLEAR_WIDE_REF %ecx
3848 .else
3849 CLEAR_REF %ecx
3850 .endif
3851 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3852
3853
3854/* ------------------------------ */
3855 .balign 128
3856.L_op_int_to_byte: /* 0x8d */
3857/* File: x86/op_int_to_byte.S */
3858/* File: x86/unop.S */
3859/*
3860 * Generic 32-bit unary operation. Provide an "instr" line that
3861 * specifies an instruction that performs "result = op eax".
3862 */
3863 /* unop vA, vB */
3864 movzbl rINSTbl,%ecx # ecx <- A+
3865 sarl $4,rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003866 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003867 andb $0xf,%cl # ecx <- A
3868 movsbl %al, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003869 SET_VREG %eax, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003870 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3871
3872
3873/* ------------------------------ */
3874 .balign 128
3875.L_op_int_to_char: /* 0x8e */
3876/* File: x86/op_int_to_char.S */
3877/* File: x86/unop.S */
3878/*
3879 * Generic 32-bit unary operation. Provide an "instr" line that
3880 * specifies an instruction that performs "result = op eax".
3881 */
3882 /* unop vA, vB */
3883 movzbl rINSTbl,%ecx # ecx <- A+
3884 sarl $4,rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003885 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003886 andb $0xf,%cl # ecx <- A
3887 movzwl %ax,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003888 SET_VREG %eax, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003889 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3890
3891
3892/* ------------------------------ */
3893 .balign 128
3894.L_op_int_to_short: /* 0x8f */
3895/* File: x86/op_int_to_short.S */
3896/* File: x86/unop.S */
3897/*
3898 * Generic 32-bit unary operation. Provide an "instr" line that
3899 * specifies an instruction that performs "result = op eax".
3900 */
3901 /* unop vA, vB */
3902 movzbl rINSTbl,%ecx # ecx <- A+
3903 sarl $4,rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003904 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003905 andb $0xf,%cl # ecx <- A
3906 movswl %ax, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003907 SET_VREG %eax, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003908 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
3909
3910
3911/* ------------------------------ */
3912 .balign 128
3913.L_op_add_int: /* 0x90 */
3914/* File: x86/op_add_int.S */
3915/* File: x86/binop.S */
3916/*
3917 * Generic 32-bit binary operation. Provide an "instr" line that
3918 * specifies an instruction that performs "result = eax op (rFP,%ecx,4)".
3919 * This could be an x86 instruction or a function call. (If the result
3920 * comes back in a register other than eax, you can override "result".)
3921 *
3922 * For: add-int, sub-int, and-int, or-int,
3923 * xor-int, shl-int, shr-int, ushr-int
3924 */
3925 /* binop vAA, vBB, vCC */
3926 movzbl 2(rPC), %eax # eax <- BB
3927 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003928 GET_VREG %eax, %eax # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003929 addl (rFP,%ecx,4), %eax # ex: addl (rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003930 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003931 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
3932
3933
3934/* ------------------------------ */
3935 .balign 128
3936.L_op_sub_int: /* 0x91 */
3937/* File: x86/op_sub_int.S */
3938/* File: x86/binop.S */
3939/*
3940 * Generic 32-bit binary operation. Provide an "instr" line that
3941 * specifies an instruction that performs "result = eax op (rFP,%ecx,4)".
3942 * This could be an x86 instruction or a function call. (If the result
3943 * comes back in a register other than eax, you can override "result".)
3944 *
3945 * For: add-int, sub-int, and-int, or-int,
3946 * xor-int, shl-int, shr-int, ushr-int
3947 */
3948 /* binop vAA, vBB, vCC */
3949 movzbl 2(rPC), %eax # eax <- BB
3950 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003951 GET_VREG %eax, %eax # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003952 subl (rFP,%ecx,4), %eax # ex: addl (rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003953 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003954 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
3955
3956
3957/* ------------------------------ */
3958 .balign 128
3959.L_op_mul_int: /* 0x92 */
3960/* File: x86/op_mul_int.S */
3961 /*
3962 * 32-bit binary multiplication.
3963 */
3964 /* mul vAA, vBB, vCC */
3965 movzbl 2(rPC), %eax # eax <- BB
3966 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003967 GET_VREG %eax, %eax # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003968 mov rIBASE, LOCAL0(%esp)
3969 imull (rFP,%ecx,4), %eax # trashes rIBASE/edx
3970 mov LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003971 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003972 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
3973
3974/* ------------------------------ */
3975 .balign 128
3976.L_op_div_int: /* 0x93 */
3977/* File: x86/op_div_int.S */
3978/* File: x86/bindiv.S */
3979/*
3980 * 32-bit binary div/rem operation. Handles special case of op0=minint and
3981 * op1=-1.
3982 */
3983 /* div/rem vAA, vBB, vCC */
3984 movzbl 2(rPC), %eax # eax <- BB
3985 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06003986 GET_VREG %eax, %eax # eax <- vBB
3987 GET_VREG %ecx, %ecx # ecx <- vCC
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003988 mov rIBASE, LOCAL0(%esp)
3989 testl %ecx, %ecx
3990 je common_errDivideByZero
3991 movl %eax, %edx
3992 orl %ecx, %edx
Serguei Katkovff8579e2016-02-17 11:30:23 +06003993 testl $0xFFFFFF00, %edx # If both arguments are less
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003994 # than 8-bit and +ve
3995 jz .Lop_div_int_8 # Do 8-bit divide
Serguei Katkovff8579e2016-02-17 11:30:23 +06003996 testl $0xFFFF0000, %edx # If both arguments are less
Bill Buzbee7c58bd42016-01-20 20:46:01 +00003997 # than 16-bit and +ve
3998 jz .Lop_div_int_16 # Do 16-bit divide
3999 cmpl $-1, %ecx
4000 jne .Lop_div_int_32
4001 cmpl $0x80000000, %eax
4002 jne .Lop_div_int_32
4003 movl $0x80000000, %eax
4004 jmp .Lop_div_int_finish
4005.Lop_div_int_32:
4006 cltd
4007 idivl %ecx
4008 jmp .Lop_div_int_finish
4009.Lop_div_int_8:
4010 div %cl # 8-bit divide otherwise.
4011 # Remainder in %ah, quotient in %al
4012 .if 0
4013 movl %eax, %edx
4014 shr $8, %edx
4015 .else
4016 andl $0x000000FF, %eax
4017 .endif
4018 jmp .Lop_div_int_finish
4019.Lop_div_int_16:
4020 xorl %edx, %edx # Clear %edx before divide
4021 div %cx
4022.Lop_div_int_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004023 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004024 mov LOCAL0(%esp), rIBASE
4025 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4026
4027
4028/* ------------------------------ */
4029 .balign 128
4030.L_op_rem_int: /* 0x94 */
4031/* File: x86/op_rem_int.S */
4032/* File: x86/bindiv.S */
4033/*
4034 * 32-bit binary div/rem operation. Handles special case of op0=minint and
4035 * op1=-1.
4036 */
4037 /* div/rem vAA, vBB, vCC */
4038 movzbl 2(rPC), %eax # eax <- BB
4039 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004040 GET_VREG %eax, %eax # eax <- vBB
4041 GET_VREG %ecx, %ecx # ecx <- vCC
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004042 mov rIBASE, LOCAL0(%esp)
4043 testl %ecx, %ecx
4044 je common_errDivideByZero
4045 movl %eax, %edx
4046 orl %ecx, %edx
Serguei Katkovff8579e2016-02-17 11:30:23 +06004047 testl $0xFFFFFF00, %edx # If both arguments are less
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004048 # than 8-bit and +ve
4049 jz .Lop_rem_int_8 # Do 8-bit divide
Serguei Katkovff8579e2016-02-17 11:30:23 +06004050 testl $0xFFFF0000, %edx # If both arguments are less
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004051 # than 16-bit and +ve
4052 jz .Lop_rem_int_16 # Do 16-bit divide
4053 cmpl $-1, %ecx
4054 jne .Lop_rem_int_32
4055 cmpl $0x80000000, %eax
4056 jne .Lop_rem_int_32
4057 movl $0, rIBASE
4058 jmp .Lop_rem_int_finish
4059.Lop_rem_int_32:
4060 cltd
4061 idivl %ecx
4062 jmp .Lop_rem_int_finish
4063.Lop_rem_int_8:
4064 div %cl # 8-bit divide otherwise.
4065 # Remainder in %ah, quotient in %al
4066 .if 1
4067 movl %eax, %edx
4068 shr $8, %edx
4069 .else
4070 andl $0x000000FF, %eax
4071 .endif
4072 jmp .Lop_rem_int_finish
4073.Lop_rem_int_16:
4074 xorl %edx, %edx # Clear %edx before divide
4075 div %cx
4076.Lop_rem_int_finish:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004077 SET_VREG rIBASE, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004078 mov LOCAL0(%esp), rIBASE
4079 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4080
4081
4082/* ------------------------------ */
4083 .balign 128
4084.L_op_and_int: /* 0x95 */
4085/* File: x86/op_and_int.S */
4086/* File: x86/binop.S */
4087/*
4088 * Generic 32-bit binary operation. Provide an "instr" line that
4089 * specifies an instruction that performs "result = eax op (rFP,%ecx,4)".
4090 * This could be an x86 instruction or a function call. (If the result
4091 * comes back in a register other than eax, you can override "result".)
4092 *
4093 * For: add-int, sub-int, and-int, or-int,
4094 * xor-int, shl-int, shr-int, ushr-int
4095 */
4096 /* binop vAA, vBB, vCC */
4097 movzbl 2(rPC), %eax # eax <- BB
4098 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004099 GET_VREG %eax, %eax # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004100 andl (rFP,%ecx,4), %eax # ex: addl (rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004101 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004102 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4103
4104
4105/* ------------------------------ */
4106 .balign 128
4107.L_op_or_int: /* 0x96 */
4108/* File: x86/op_or_int.S */
4109/* File: x86/binop.S */
4110/*
4111 * Generic 32-bit binary operation. Provide an "instr" line that
4112 * specifies an instruction that performs "result = eax op (rFP,%ecx,4)".
4113 * This could be an x86 instruction or a function call. (If the result
4114 * comes back in a register other than eax, you can override "result".)
4115 *
4116 * For: add-int, sub-int, and-int, or-int,
4117 * xor-int, shl-int, shr-int, ushr-int
4118 */
4119 /* binop vAA, vBB, vCC */
4120 movzbl 2(rPC), %eax # eax <- BB
4121 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004122 GET_VREG %eax, %eax # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004123 orl (rFP,%ecx,4), %eax # ex: addl (rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004124 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004125 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4126
4127
4128/* ------------------------------ */
4129 .balign 128
4130.L_op_xor_int: /* 0x97 */
4131/* File: x86/op_xor_int.S */
4132/* File: x86/binop.S */
4133/*
4134 * Generic 32-bit binary operation. Provide an "instr" line that
4135 * specifies an instruction that performs "result = eax op (rFP,%ecx,4)".
4136 * This could be an x86 instruction or a function call. (If the result
4137 * comes back in a register other than eax, you can override "result".)
4138 *
4139 * For: add-int, sub-int, and-int, or-int,
4140 * xor-int, shl-int, shr-int, ushr-int
4141 */
4142 /* binop vAA, vBB, vCC */
4143 movzbl 2(rPC), %eax # eax <- BB
4144 movzbl 3(rPC), %ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004145 GET_VREG %eax, %eax # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004146 xorl (rFP,%ecx,4), %eax # ex: addl (rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004147 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004148 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4149
4150
4151/* ------------------------------ */
4152 .balign 128
4153.L_op_shl_int: /* 0x98 */
4154/* File: x86/op_shl_int.S */
4155/* File: x86/binop1.S */
4156/*
4157 * Generic 32-bit binary operation in which both operands loaded to
4158 * registers (op0 in eax, op1 in ecx).
4159 */
4160 /* binop vAA, vBB, vCC */
4161 movzbl 2(rPC),%eax # eax <- BB
4162 movzbl 3(rPC),%ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004163 GET_VREG %eax, %eax # eax <- vBB
4164 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004165 sall %cl, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004166 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004167 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4168
4169
4170/* ------------------------------ */
4171 .balign 128
4172.L_op_shr_int: /* 0x99 */
4173/* File: x86/op_shr_int.S */
4174/* File: x86/binop1.S */
4175/*
4176 * Generic 32-bit binary operation in which both operands loaded to
4177 * registers (op0 in eax, op1 in ecx).
4178 */
4179 /* binop vAA, vBB, vCC */
4180 movzbl 2(rPC),%eax # eax <- BB
4181 movzbl 3(rPC),%ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004182 GET_VREG %eax, %eax # eax <- vBB
4183 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004184 sarl %cl, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004185 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004186 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4187
4188
4189/* ------------------------------ */
4190 .balign 128
4191.L_op_ushr_int: /* 0x9a */
4192/* File: x86/op_ushr_int.S */
4193/* File: x86/binop1.S */
4194/*
4195 * Generic 32-bit binary operation in which both operands loaded to
4196 * registers (op0 in eax, op1 in ecx).
4197 */
4198 /* binop vAA, vBB, vCC */
4199 movzbl 2(rPC),%eax # eax <- BB
4200 movzbl 3(rPC),%ecx # ecx <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004201 GET_VREG %eax, %eax # eax <- vBB
4202 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004203 shrl %cl, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004204 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004205 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4206
4207
4208/* ------------------------------ */
4209 .balign 128
4210.L_op_add_long: /* 0x9b */
4211/* File: x86/op_add_long.S */
4212/* File: x86/binopWide.S */
4213/*
4214 * Generic 64-bit binary operation.
4215 */
4216 /* binop vAA, vBB, vCC */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004217 movzbl 2(rPC), %eax # eax <- BB
4218 movzbl 3(rPC), %ecx # ecx <- CC
4219 movl rIBASE, LOCAL0(%esp) # save rIBASE
4220 GET_VREG rIBASE, %eax # rIBASE <- v[BB+0]
4221 GET_VREG_HIGH %eax, %eax # eax <- v[BB+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004222 addl (rFP,%ecx,4), rIBASE # ex: addl (rFP,%ecx,4),rIBASE
4223 adcl 4(rFP,%ecx,4), %eax # ex: adcl 4(rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004224 SET_VREG rIBASE, rINST # v[AA+0] <- rIBASE
4225 movl LOCAL0(%esp), rIBASE # restore rIBASE
4226 SET_VREG_HIGH %eax, rINST # v[AA+1] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004227 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4228
4229
4230/* ------------------------------ */
4231 .balign 128
4232.L_op_sub_long: /* 0x9c */
4233/* File: x86/op_sub_long.S */
4234/* File: x86/binopWide.S */
4235/*
4236 * Generic 64-bit binary operation.
4237 */
4238 /* binop vAA, vBB, vCC */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004239 movzbl 2(rPC), %eax # eax <- BB
4240 movzbl 3(rPC), %ecx # ecx <- CC
4241 movl rIBASE, LOCAL0(%esp) # save rIBASE
4242 GET_VREG rIBASE, %eax # rIBASE <- v[BB+0]
4243 GET_VREG_HIGH %eax, %eax # eax <- v[BB+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004244 subl (rFP,%ecx,4), rIBASE # ex: addl (rFP,%ecx,4),rIBASE
4245 sbbl 4(rFP,%ecx,4), %eax # ex: adcl 4(rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004246 SET_VREG rIBASE, rINST # v[AA+0] <- rIBASE
4247 movl LOCAL0(%esp), rIBASE # restore rIBASE
4248 SET_VREG_HIGH %eax, rINST # v[AA+1] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004249 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4250
4251
4252/* ------------------------------ */
4253 .balign 128
4254.L_op_mul_long: /* 0x9d */
4255/* File: x86/op_mul_long.S */
4256/*
4257 * Signed 64-bit integer multiply.
4258 *
4259 * We could definately use more free registers for
4260 * this code. We spill rINSTw (ebx),
4261 * giving us eax, ebc, ecx and edx as computational
4262 * temps. On top of that, we'll spill edi (rFP)
4263 * for use as the vB pointer and esi (rPC) for use
4264 * as the vC pointer. Yuck.
4265 *
4266 */
4267 /* mul-long vAA, vBB, vCC */
4268 movzbl 2(rPC), %eax # eax <- B
4269 movzbl 3(rPC), %ecx # ecx <- C
4270 mov rPC, LOCAL0(%esp) # save Interpreter PC
4271 mov rFP, LOCAL1(%esp) # save FP
4272 mov rIBASE, LOCAL2(%esp) # save rIBASE
4273 leal (rFP,%eax,4), %esi # esi <- &v[B]
4274 leal (rFP,%ecx,4), rFP # rFP <- &v[C]
4275 movl 4(%esi), %ecx # ecx <- Bmsw
4276 imull (rFP), %ecx # ecx <- (Bmsw*Clsw)
4277 movl 4(rFP), %eax # eax <- Cmsw
4278 imull (%esi), %eax # eax <- (Cmsw*Blsw)
4279 addl %eax, %ecx # ecx <- (Bmsw*Clsw)+(Cmsw*Blsw)
4280 movl (rFP), %eax # eax <- Clsw
4281 mull (%esi) # eax <- (Clsw*Alsw)
4282 mov LOCAL0(%esp), rPC # restore Interpreter PC
4283 mov LOCAL1(%esp), rFP # restore FP
4284 leal (%ecx,rIBASE), rIBASE # full result now in rIBASE:%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004285 SET_VREG_HIGH rIBASE, rINST # v[B+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004286 mov LOCAL2(%esp), rIBASE # restore IBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004287 SET_VREG %eax, rINST # v[B] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004288 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4289
4290/* ------------------------------ */
4291 .balign 128
4292.L_op_div_long: /* 0x9e */
4293/* File: x86/op_div_long.S */
4294/* art_quick_* methods has quick abi,
4295 * so use eax, ecx, edx, ebx for args
4296 */
4297 /* div vAA, vBB, vCC */
4298 .extern art_quick_ldiv
4299 mov rIBASE, LOCAL0(%esp) # save rIBASE/%edx
4300 mov rINST, LOCAL1(%esp) # save rINST/%ebx
4301 movzbl 3(rPC), %eax # eax <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004302 GET_VREG %ecx, %eax
4303 GET_VREG_HIGH %ebx, %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004304 movl %ecx, %edx
4305 orl %ebx, %ecx
4306 jz common_errDivideByZero
4307 movzbl 2(rPC), %eax # eax <- BB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004308 GET_VREG_HIGH %ecx, %eax
4309 GET_VREG %eax, %eax
4310 call SYMBOL(art_quick_ldiv)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004311 mov LOCAL1(%esp), rINST # restore rINST/%ebx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004312 SET_VREG_HIGH rIBASE, rINST
4313 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004314 mov LOCAL0(%esp), rIBASE # restore rIBASE/%edx
4315 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4316
4317/* ------------------------------ */
4318 .balign 128
4319.L_op_rem_long: /* 0x9f */
4320/* File: x86/op_rem_long.S */
4321/* File: x86/op_div_long.S */
4322/* art_quick_* methods has quick abi,
4323 * so use eax, ecx, edx, ebx for args
4324 */
4325 /* div vAA, vBB, vCC */
4326 .extern art_quick_lmod
4327 mov rIBASE, LOCAL0(%esp) # save rIBASE/%edx
4328 mov rINST, LOCAL1(%esp) # save rINST/%ebx
4329 movzbl 3(rPC), %eax # eax <- CC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004330 GET_VREG %ecx, %eax
4331 GET_VREG_HIGH %ebx, %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004332 movl %ecx, %edx
4333 orl %ebx, %ecx
4334 jz common_errDivideByZero
4335 movzbl 2(rPC), %eax # eax <- BB
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004336 GET_VREG_HIGH %ecx, %eax
4337 GET_VREG %eax, %eax
4338 call SYMBOL(art_quick_lmod)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004339 mov LOCAL1(%esp), rINST # restore rINST/%ebx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004340 SET_VREG_HIGH rIBASE, rINST
4341 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004342 mov LOCAL0(%esp), rIBASE # restore rIBASE/%edx
4343 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4344
4345
4346/* ------------------------------ */
4347 .balign 128
4348.L_op_and_long: /* 0xa0 */
4349/* File: x86/op_and_long.S */
4350/* File: x86/binopWide.S */
4351/*
4352 * Generic 64-bit binary operation.
4353 */
4354 /* binop vAA, vBB, vCC */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004355 movzbl 2(rPC), %eax # eax <- BB
4356 movzbl 3(rPC), %ecx # ecx <- CC
4357 movl rIBASE, LOCAL0(%esp) # save rIBASE
4358 GET_VREG rIBASE, %eax # rIBASE <- v[BB+0]
4359 GET_VREG_HIGH %eax, %eax # eax <- v[BB+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004360 andl (rFP,%ecx,4), rIBASE # ex: addl (rFP,%ecx,4),rIBASE
4361 andl 4(rFP,%ecx,4), %eax # ex: adcl 4(rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004362 SET_VREG rIBASE, rINST # v[AA+0] <- rIBASE
4363 movl LOCAL0(%esp), rIBASE # restore rIBASE
4364 SET_VREG_HIGH %eax, rINST # v[AA+1] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004365 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4366
4367
4368/* ------------------------------ */
4369 .balign 128
4370.L_op_or_long: /* 0xa1 */
4371/* File: x86/op_or_long.S */
4372/* File: x86/binopWide.S */
4373/*
4374 * Generic 64-bit binary operation.
4375 */
4376 /* binop vAA, vBB, vCC */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004377 movzbl 2(rPC), %eax # eax <- BB
4378 movzbl 3(rPC), %ecx # ecx <- CC
4379 movl rIBASE, LOCAL0(%esp) # save rIBASE
4380 GET_VREG rIBASE, %eax # rIBASE <- v[BB+0]
4381 GET_VREG_HIGH %eax, %eax # eax <- v[BB+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004382 orl (rFP,%ecx,4), rIBASE # ex: addl (rFP,%ecx,4),rIBASE
4383 orl 4(rFP,%ecx,4), %eax # ex: adcl 4(rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004384 SET_VREG rIBASE, rINST # v[AA+0] <- rIBASE
4385 movl LOCAL0(%esp), rIBASE # restore rIBASE
4386 SET_VREG_HIGH %eax, rINST # v[AA+1] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004387 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4388
4389
4390/* ------------------------------ */
4391 .balign 128
4392.L_op_xor_long: /* 0xa2 */
4393/* File: x86/op_xor_long.S */
4394/* File: x86/binopWide.S */
4395/*
4396 * Generic 64-bit binary operation.
4397 */
4398 /* binop vAA, vBB, vCC */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004399 movzbl 2(rPC), %eax # eax <- BB
4400 movzbl 3(rPC), %ecx # ecx <- CC
4401 movl rIBASE, LOCAL0(%esp) # save rIBASE
4402 GET_VREG rIBASE, %eax # rIBASE <- v[BB+0]
4403 GET_VREG_HIGH %eax, %eax # eax <- v[BB+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004404 xorl (rFP,%ecx,4), rIBASE # ex: addl (rFP,%ecx,4),rIBASE
4405 xorl 4(rFP,%ecx,4), %eax # ex: adcl 4(rFP,%ecx,4),%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004406 SET_VREG rIBASE, rINST # v[AA+0] <- rIBASE
4407 movl LOCAL0(%esp), rIBASE # restore rIBASE
4408 SET_VREG_HIGH %eax, rINST # v[AA+1] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004409 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4410
4411
4412/* ------------------------------ */
4413 .balign 128
4414.L_op_shl_long: /* 0xa3 */
4415/* File: x86/op_shl_long.S */
4416/*
4417 * Long integer shift. This is different from the generic 32/64-bit
4418 * binary operations because vAA/vBB are 64-bit but vCC (the shift
4419 * distance) is 32-bit. Also, Dalvik requires us to mask off the low
4420 * 6 bits of the shift distance. x86 shifts automatically mask off
4421 * the low 5 bits of %cl, so have to handle the 64 > shiftcount > 31
4422 * case specially.
4423 */
4424 /* shl-long vAA, vBB, vCC */
4425 /* ecx gets shift count */
4426 /* Need to spill rINST */
4427 /* rINSTw gets AA */
4428 movzbl 2(rPC), %eax # eax <- BB
4429 movzbl 3(rPC), %ecx # ecx <- CC
4430 movl rIBASE, LOCAL0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004431 GET_VREG_HIGH rIBASE, %eax # ecx <- v[BB+1]
4432 GET_VREG %ecx, %ecx # ecx <- vCC
4433 GET_VREG %eax, %eax # eax <- v[BB+0]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004434 shldl %eax,rIBASE
4435 sall %cl, %eax
4436 testb $32, %cl
4437 je 2f
4438 movl %eax, rIBASE
4439 xorl %eax, %eax
44402:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004441 SET_VREG_HIGH rIBASE, rINST # v[AA+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004442 movl LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004443 SET_VREG %eax, rINST # v[AA+0] <- %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004444 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4445
4446/* ------------------------------ */
4447 .balign 128
4448.L_op_shr_long: /* 0xa4 */
4449/* File: x86/op_shr_long.S */
4450/*
4451 * Long integer shift. This is different from the generic 32/64-bit
4452 * binary operations because vAA/vBB are 64-bit but vCC (the shift
4453 * distance) is 32-bit. Also, Dalvik requires us to mask off the low
4454 * 6 bits of the shift distance. x86 shifts automatically mask off
4455 * the low 5 bits of %cl, so have to handle the 64 > shiftcount > 31
4456 * case specially.
4457 */
4458 /* shr-long vAA, vBB, vCC */
4459 /* ecx gets shift count */
4460 /* Need to spill rIBASE */
4461 /* rINSTw gets AA */
4462 movzbl 2(rPC), %eax # eax <- BB
4463 movzbl 3(rPC), %ecx # ecx <- CC
4464 movl rIBASE, LOCAL0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004465 GET_VREG_HIGH rIBASE, %eax # rIBASE<- v[BB+1]
4466 GET_VREG %ecx, %ecx # ecx <- vCC
4467 GET_VREG %eax, %eax # eax <- v[BB+0]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004468 shrdl rIBASE, %eax
4469 sarl %cl, rIBASE
4470 testb $32, %cl
4471 je 2f
4472 movl rIBASE, %eax
4473 sarl $31, rIBASE
44742:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004475 SET_VREG_HIGH rIBASE, rINST # v[AA+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004476 movl LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004477 SET_VREG %eax, rINST # v[AA+0] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004478 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4479
4480/* ------------------------------ */
4481 .balign 128
4482.L_op_ushr_long: /* 0xa5 */
4483/* File: x86/op_ushr_long.S */
4484/*
4485 * Long integer shift. This is different from the generic 32/64-bit
4486 * binary operations because vAA/vBB are 64-bit but vCC (the shift
4487 * distance) is 32-bit. Also, Dalvik requires us to mask off the low
4488 * 6 bits of the shift distance. x86 shifts automatically mask off
4489 * the low 5 bits of %cl, so have to handle the 64 > shiftcount > 31
4490 * case specially.
4491 */
4492 /* shr-long vAA, vBB, vCC */
4493 /* ecx gets shift count */
4494 /* Need to spill rIBASE */
4495 /* rINSTw gets AA */
4496 movzbl 2(rPC), %eax # eax <- BB
4497 movzbl 3(rPC), %ecx # ecx <- CC
4498 movl rIBASE, LOCAL0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004499 GET_VREG_HIGH rIBASE, %eax # rIBASE <- v[BB+1]
4500 GET_VREG %ecx, %ecx # ecx <- vCC
4501 GET_VREG %eax, %eax # eax <- v[BB+0]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004502 shrdl rIBASE, %eax
4503 shrl %cl, rIBASE
4504 testb $32, %cl
4505 je 2f
4506 movl rIBASE, %eax
4507 xorl rIBASE, rIBASE
45082:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004509 SET_VREG_HIGH rIBASE, rINST # v[AA+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004510 movl LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004511 SET_VREG %eax, rINST # v[BB+0] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004512 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4513
4514/* ------------------------------ */
4515 .balign 128
4516.L_op_add_float: /* 0xa6 */
4517/* File: x86/op_add_float.S */
4518/* File: x86/sseBinop.S */
4519 movzbl 2(rPC), %ecx # ecx <- BB
4520 movzbl 3(rPC), %eax # eax <- CC
4521 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4522 addss VREG_ADDRESS(%eax), %xmm0
4523 movss %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4524 pxor %xmm0, %xmm0
4525 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4526 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4527
4528
4529/* ------------------------------ */
4530 .balign 128
4531.L_op_sub_float: /* 0xa7 */
4532/* File: x86/op_sub_float.S */
4533/* File: x86/sseBinop.S */
4534 movzbl 2(rPC), %ecx # ecx <- BB
4535 movzbl 3(rPC), %eax # eax <- CC
4536 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4537 subss VREG_ADDRESS(%eax), %xmm0
4538 movss %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4539 pxor %xmm0, %xmm0
4540 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4541 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4542
4543
4544/* ------------------------------ */
4545 .balign 128
4546.L_op_mul_float: /* 0xa8 */
4547/* File: x86/op_mul_float.S */
4548/* File: x86/sseBinop.S */
4549 movzbl 2(rPC), %ecx # ecx <- BB
4550 movzbl 3(rPC), %eax # eax <- CC
4551 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4552 mulss VREG_ADDRESS(%eax), %xmm0
4553 movss %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4554 pxor %xmm0, %xmm0
4555 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4556 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4557
4558
4559/* ------------------------------ */
4560 .balign 128
4561.L_op_div_float: /* 0xa9 */
4562/* File: x86/op_div_float.S */
4563/* File: x86/sseBinop.S */
4564 movzbl 2(rPC), %ecx # ecx <- BB
4565 movzbl 3(rPC), %eax # eax <- CC
4566 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4567 divss VREG_ADDRESS(%eax), %xmm0
4568 movss %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4569 pxor %xmm0, %xmm0
4570 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4571 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4572
4573
4574/* ------------------------------ */
4575 .balign 128
4576.L_op_rem_float: /* 0xaa */
4577/* File: x86/op_rem_float.S */
4578 /* rem_float vAA, vBB, vCC */
4579 movzbl 3(rPC), %ecx # ecx <- BB
4580 movzbl 2(rPC), %eax # eax <- CC
4581 flds VREG_ADDRESS(%ecx) # vBB to fp stack
4582 flds VREG_ADDRESS(%eax) # vCC to fp stack
45831:
4584 fprem
4585 fstsw %ax
4586 sahf
4587 jp 1b
4588 fstp %st(1)
4589 fstps VREG_ADDRESS(rINST) # %st to vAA
4590 CLEAR_REF rINST
4591 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4592
4593/* ------------------------------ */
4594 .balign 128
4595.L_op_add_double: /* 0xab */
4596/* File: x86/op_add_double.S */
4597/* File: x86/sseBinop.S */
4598 movzbl 2(rPC), %ecx # ecx <- BB
4599 movzbl 3(rPC), %eax # eax <- CC
4600 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4601 addsd VREG_ADDRESS(%eax), %xmm0
4602 movsd %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4603 pxor %xmm0, %xmm0
4604 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4605 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4606
4607
4608/* ------------------------------ */
4609 .balign 128
4610.L_op_sub_double: /* 0xac */
4611/* File: x86/op_sub_double.S */
4612/* File: x86/sseBinop.S */
4613 movzbl 2(rPC), %ecx # ecx <- BB
4614 movzbl 3(rPC), %eax # eax <- CC
4615 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4616 subsd VREG_ADDRESS(%eax), %xmm0
4617 movsd %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4618 pxor %xmm0, %xmm0
4619 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4620 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4621
4622
4623/* ------------------------------ */
4624 .balign 128
4625.L_op_mul_double: /* 0xad */
4626/* File: x86/op_mul_double.S */
4627/* File: x86/sseBinop.S */
4628 movzbl 2(rPC), %ecx # ecx <- BB
4629 movzbl 3(rPC), %eax # eax <- CC
4630 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4631 mulsd VREG_ADDRESS(%eax), %xmm0
4632 movsd %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4633 pxor %xmm0, %xmm0
4634 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4635 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4636
4637
4638/* ------------------------------ */
4639 .balign 128
4640.L_op_div_double: /* 0xae */
4641/* File: x86/op_div_double.S */
4642/* File: x86/sseBinop.S */
4643 movzbl 2(rPC), %ecx # ecx <- BB
4644 movzbl 3(rPC), %eax # eax <- CC
4645 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
4646 divsd VREG_ADDRESS(%eax), %xmm0
4647 movsd %xmm0, VREG_ADDRESS(rINST) # vAA <- %xmm0
4648 pxor %xmm0, %xmm0
4649 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
4650 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4651
4652
4653/* ------------------------------ */
4654 .balign 128
4655.L_op_rem_double: /* 0xaf */
4656/* File: x86/op_rem_double.S */
4657 /* rem_double vAA, vBB, vCC */
4658 movzbl 3(rPC), %ecx # ecx <- BB
4659 movzbl 2(rPC), %eax # eax <- CC
4660 fldl VREG_ADDRESS(%ecx) # %st1 <- fp[vBB]
4661 fldl VREG_ADDRESS(%eax) # %st0 <- fp[vCC]
46621:
4663 fprem
4664 fstsw %ax
4665 sahf
4666 jp 1b
4667 fstp %st(1)
4668 fstpl VREG_ADDRESS(rINST) # fp[vAA] <- %st
4669 CLEAR_WIDE_REF rINST
4670 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
4671
4672/* ------------------------------ */
4673 .balign 128
4674.L_op_add_int_2addr: /* 0xb0 */
4675/* File: x86/op_add_int_2addr.S */
4676/* File: x86/binop2addr.S */
4677/*
4678 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
4679 * that specifies an instruction that performs "result = r0 op r1".
4680 * This could be an instruction or a function call.
4681 *
4682 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
4683 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
4684 * shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
4685 * sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
4686 */
4687 /* binop/2addr vA, vB */
4688 movzx rINSTbl, %ecx # ecx <- A+
4689 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004690 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004691 andb $0xf, %cl # ecx <- A
4692 addl %eax, (rFP,%ecx,4) # for ex: addl %eax,(rFP,%ecx,4)
4693 CLEAR_REF %ecx
4694 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4695
4696
4697/* ------------------------------ */
4698 .balign 128
4699.L_op_sub_int_2addr: /* 0xb1 */
4700/* File: x86/op_sub_int_2addr.S */
4701/* File: x86/binop2addr.S */
4702/*
4703 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
4704 * that specifies an instruction that performs "result = r0 op r1".
4705 * This could be an instruction or a function call.
4706 *
4707 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
4708 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
4709 * shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
4710 * sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
4711 */
4712 /* binop/2addr vA, vB */
4713 movzx rINSTbl, %ecx # ecx <- A+
4714 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004715 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004716 andb $0xf, %cl # ecx <- A
4717 subl %eax, (rFP,%ecx,4) # for ex: addl %eax,(rFP,%ecx,4)
4718 CLEAR_REF %ecx
4719 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4720
4721
4722/* ------------------------------ */
4723 .balign 128
4724.L_op_mul_int_2addr: /* 0xb2 */
4725/* File: x86/op_mul_int_2addr.S */
4726 /* mul vA, vB */
4727 movzx rINSTbl, %ecx # ecx <- A+
4728 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004729 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004730 andb $0xf, %cl # ecx <- A
Serguei Katkovff8579e2016-02-17 11:30:23 +06004731 movl rIBASE, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004732 imull (rFP,%ecx,4), %eax # trashes rIBASE/edx
Serguei Katkovff8579e2016-02-17 11:30:23 +06004733 movl rINST, rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004734 SET_VREG %eax, %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004735 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4736
4737/* ------------------------------ */
4738 .balign 128
4739.L_op_div_int_2addr: /* 0xb3 */
4740/* File: x86/op_div_int_2addr.S */
4741/* File: x86/bindiv2addr.S */
4742/*
4743 * 32-bit binary div/rem operation. Handles special case of op0=minint and
4744 * op1=-1.
4745 */
4746 /* div/rem/2addr vA, vB */
4747 movzx rINSTbl, %ecx # eax <- BA
4748 mov rIBASE, LOCAL0(%esp)
4749 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004750 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004751 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004752 GET_VREG %eax, rINST # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004753 testl %ecx, %ecx
4754 je common_errDivideByZero
4755 cmpl $-1, %ecx
4756 jne .Lop_div_int_2addr_continue_div2addr
4757 cmpl $0x80000000, %eax
4758 jne .Lop_div_int_2addr_continue_div2addr
4759 movl $0x80000000, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004760 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004761 mov LOCAL0(%esp), rIBASE
4762 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4763
4764.Lop_div_int_2addr_continue_div2addr:
4765 cltd
4766 idivl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004767 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004768 mov LOCAL0(%esp), rIBASE
4769 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4770
4771
4772/* ------------------------------ */
4773 .balign 128
4774.L_op_rem_int_2addr: /* 0xb4 */
4775/* File: x86/op_rem_int_2addr.S */
4776/* File: x86/bindiv2addr.S */
4777/*
4778 * 32-bit binary div/rem operation. Handles special case of op0=minint and
4779 * op1=-1.
4780 */
4781 /* div/rem/2addr vA, vB */
4782 movzx rINSTbl, %ecx # eax <- BA
4783 mov rIBASE, LOCAL0(%esp)
4784 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004785 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004786 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004787 GET_VREG %eax, rINST # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004788 testl %ecx, %ecx
4789 je common_errDivideByZero
4790 cmpl $-1, %ecx
4791 jne .Lop_rem_int_2addr_continue_div2addr
4792 cmpl $0x80000000, %eax
4793 jne .Lop_rem_int_2addr_continue_div2addr
4794 movl $0, rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004795 SET_VREG rIBASE, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004796 mov LOCAL0(%esp), rIBASE
4797 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4798
4799.Lop_rem_int_2addr_continue_div2addr:
4800 cltd
4801 idivl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004802 SET_VREG rIBASE, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004803 mov LOCAL0(%esp), rIBASE
4804 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4805
4806
4807/* ------------------------------ */
4808 .balign 128
4809.L_op_and_int_2addr: /* 0xb5 */
4810/* File: x86/op_and_int_2addr.S */
4811/* File: x86/binop2addr.S */
4812/*
4813 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
4814 * that specifies an instruction that performs "result = r0 op r1".
4815 * This could be an instruction or a function call.
4816 *
4817 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
4818 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
4819 * shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
4820 * sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
4821 */
4822 /* binop/2addr vA, vB */
4823 movzx rINSTbl, %ecx # ecx <- A+
4824 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004825 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004826 andb $0xf, %cl # ecx <- A
4827 andl %eax, (rFP,%ecx,4) # for ex: addl %eax,(rFP,%ecx,4)
4828 CLEAR_REF %ecx
4829 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4830
4831
4832/* ------------------------------ */
4833 .balign 128
4834.L_op_or_int_2addr: /* 0xb6 */
4835/* File: x86/op_or_int_2addr.S */
4836/* File: x86/binop2addr.S */
4837/*
4838 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
4839 * that specifies an instruction that performs "result = r0 op r1".
4840 * This could be an instruction or a function call.
4841 *
4842 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
4843 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
4844 * shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
4845 * sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
4846 */
4847 /* binop/2addr vA, vB */
4848 movzx rINSTbl, %ecx # ecx <- A+
4849 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004850 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004851 andb $0xf, %cl # ecx <- A
4852 orl %eax, (rFP,%ecx,4) # for ex: addl %eax,(rFP,%ecx,4)
4853 CLEAR_REF %ecx
4854 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4855
4856
4857/* ------------------------------ */
4858 .balign 128
4859.L_op_xor_int_2addr: /* 0xb7 */
4860/* File: x86/op_xor_int_2addr.S */
4861/* File: x86/binop2addr.S */
4862/*
4863 * Generic 32-bit "/2addr" binary operation. Provide an "instr" line
4864 * that specifies an instruction that performs "result = r0 op r1".
4865 * This could be an instruction or a function call.
4866 *
4867 * For: add-int/2addr, sub-int/2addr, mul-int/2addr, div-int/2addr,
4868 * rem-int/2addr, and-int/2addr, or-int/2addr, xor-int/2addr,
4869 * shl-int/2addr, shr-int/2addr, ushr-int/2addr, add-float/2addr,
4870 * sub-float/2addr, mul-float/2addr, div-float/2addr, rem-float/2addr
4871 */
4872 /* binop/2addr vA, vB */
4873 movzx rINSTbl, %ecx # ecx <- A+
4874 sarl $4, rINST # rINST <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004875 GET_VREG %eax, rINST # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004876 andb $0xf, %cl # ecx <- A
4877 xorl %eax, (rFP,%ecx,4) # for ex: addl %eax,(rFP,%ecx,4)
4878 CLEAR_REF %ecx
4879 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4880
4881
4882/* ------------------------------ */
4883 .balign 128
4884.L_op_shl_int_2addr: /* 0xb8 */
4885/* File: x86/op_shl_int_2addr.S */
4886/* File: x86/shop2addr.S */
4887/*
4888 * Generic 32-bit "shift/2addr" operation.
4889 */
4890 /* shift/2addr vA, vB */
4891 movzx rINSTbl, %ecx # eax <- BA
4892 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004893 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004894 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004895 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004896 sall %cl, %eax # ex: sarl %cl, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004897 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004898 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4899
4900
4901/* ------------------------------ */
4902 .balign 128
4903.L_op_shr_int_2addr: /* 0xb9 */
4904/* File: x86/op_shr_int_2addr.S */
4905/* File: x86/shop2addr.S */
4906/*
4907 * Generic 32-bit "shift/2addr" operation.
4908 */
4909 /* shift/2addr vA, vB */
4910 movzx rINSTbl, %ecx # eax <- BA
4911 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004912 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004913 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004914 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004915 sarl %cl, %eax # ex: sarl %cl, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004916 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004917 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4918
4919
4920/* ------------------------------ */
4921 .balign 128
4922.L_op_ushr_int_2addr: /* 0xba */
4923/* File: x86/op_ushr_int_2addr.S */
4924/* File: x86/shop2addr.S */
4925/*
4926 * Generic 32-bit "shift/2addr" operation.
4927 */
4928 /* shift/2addr vA, vB */
4929 movzx rINSTbl, %ecx # eax <- BA
4930 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004931 GET_VREG %ecx, %ecx # eax <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004932 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004933 GET_VREG %eax, rINST # eax <- vAA
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004934 shrl %cl, %eax # ex: sarl %cl, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004935 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004936 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4937
4938
4939/* ------------------------------ */
4940 .balign 128
4941.L_op_add_long_2addr: /* 0xbb */
4942/* File: x86/op_add_long_2addr.S */
4943/* File: x86/binopWide2addr.S */
4944/*
4945 * Generic 64-bit binary operation.
4946 */
4947 /* binop/2addr vA, vB */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004948 movzbl rINSTbl, %ecx # ecx<- BA
4949 sarl $4, %ecx # ecx<- B
4950 GET_VREG %eax, %ecx # eax<- v[B+0]
4951 GET_VREG_HIGH %ecx, %ecx # eax<- v[B+1]
4952 andb $0xF, rINSTbl # rINST<- A
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004953 addl %eax, (rFP,rINST,4) # ex: addl %eax,(rFP,rINST,4)
4954 adcl %ecx, 4(rFP,rINST,4) # ex: adcl %ecx,4(rFP,rINST,4)
4955 CLEAR_WIDE_REF rINST
4956 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4957
4958
4959/* ------------------------------ */
4960 .balign 128
4961.L_op_sub_long_2addr: /* 0xbc */
4962/* File: x86/op_sub_long_2addr.S */
4963/* File: x86/binopWide2addr.S */
4964/*
4965 * Generic 64-bit binary operation.
4966 */
4967 /* binop/2addr vA, vB */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06004968 movzbl rINSTbl, %ecx # ecx<- BA
4969 sarl $4, %ecx # ecx<- B
4970 GET_VREG %eax, %ecx # eax<- v[B+0]
4971 GET_VREG_HIGH %ecx, %ecx # eax<- v[B+1]
4972 andb $0xF, rINSTbl # rINST<- A
Bill Buzbee7c58bd42016-01-20 20:46:01 +00004973 subl %eax, (rFP,rINST,4) # ex: addl %eax,(rFP,rINST,4)
4974 sbbl %ecx, 4(rFP,rINST,4) # ex: adcl %ecx,4(rFP,rINST,4)
4975 CLEAR_WIDE_REF rINST
4976 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
4977
4978
4979/* ------------------------------ */
4980 .balign 128
4981.L_op_mul_long_2addr: /* 0xbd */
4982/* File: x86/op_mul_long_2addr.S */
4983/*
4984 * Signed 64-bit integer multiply, 2-addr version
4985 *
4986 * We could definately use more free registers for
4987 * this code. We must spill %edx (rIBASE) because it
4988 * is used by imul. We'll also spill rINST (ebx),
4989 * giving us eax, ebc, ecx and rIBASE as computational
4990 * temps. On top of that, we'll spill %esi (edi)
4991 * for use as the vA pointer and rFP (esi) for use
4992 * as the vB pointer. Yuck.
4993 */
4994 /* mul-long/2addr vA, vB */
4995 movzbl rINSTbl, %eax # eax <- BA
4996 andb $0xf, %al # eax <- A
4997 CLEAR_WIDE_REF %eax # clear refs in advance
4998 sarl $4, rINST # rINST <- B
4999 mov rPC, LOCAL0(%esp) # save Interpreter PC
5000 mov rFP, LOCAL1(%esp) # save FP
5001 mov rIBASE, LOCAL2(%esp) # save rIBASE
5002 leal (rFP,%eax,4), %esi # esi <- &v[A]
5003 leal (rFP,rINST,4), rFP # rFP <- &v[B]
5004 movl 4(%esi), %ecx # ecx <- Amsw
5005 imull (rFP), %ecx # ecx <- (Amsw*Blsw)
5006 movl 4(rFP), %eax # eax <- Bmsw
5007 imull (%esi), %eax # eax <- (Bmsw*Alsw)
5008 addl %eax, %ecx # ecx <- (Amsw*Blsw)+(Bmsw*Alsw)
5009 movl (rFP), %eax # eax <- Blsw
5010 mull (%esi) # eax <- (Blsw*Alsw)
5011 leal (%ecx,rIBASE), rIBASE # full result now in %edx:%eax
5012 movl rIBASE, 4(%esi) # v[A+1] <- rIBASE
5013 movl %eax, (%esi) # v[A] <- %eax
5014 mov LOCAL0(%esp), rPC # restore Interpreter PC
5015 mov LOCAL2(%esp), rIBASE # restore IBASE
5016 mov LOCAL1(%esp), rFP # restore FP
5017 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5018
5019/* ------------------------------ */
5020 .balign 128
5021.L_op_div_long_2addr: /* 0xbe */
5022/* File: x86/op_div_long_2addr.S */
5023/* art_quick_* methods has quick abi,
5024 * so use eax, ecx, edx, ebx for args
5025 */
5026 /* div/2addr vA, vB */
5027 .extern art_quick_ldiv
5028 mov rIBASE, LOCAL0(%esp) # save rIBASE/%edx
5029 movzbl rINSTbl, %eax
5030 shrl $4, %eax # eax <- B
5031 andb $0xf, rINSTbl # rINST <- A
5032 mov rINST, LOCAL1(%esp) # save rINST/%ebx
5033 movl %ebx, %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005034 GET_VREG %edx, %eax
5035 GET_VREG_HIGH %ebx, %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005036 movl %edx, %eax
5037 orl %ebx, %eax
5038 jz common_errDivideByZero
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005039 GET_VREG %eax, %ecx
5040 GET_VREG_HIGH %ecx, %ecx
5041 call SYMBOL(art_quick_ldiv)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005042 mov LOCAL1(%esp), rINST # restore rINST/%ebx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005043 SET_VREG_HIGH rIBASE, rINST
5044 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005045 mov LOCAL0(%esp), rIBASE # restore rIBASE/%edx
5046 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5047
5048/* ------------------------------ */
5049 .balign 128
5050.L_op_rem_long_2addr: /* 0xbf */
5051/* File: x86/op_rem_long_2addr.S */
5052/* File: x86/op_div_long_2addr.S */
5053/* art_quick_* methods has quick abi,
5054 * so use eax, ecx, edx, ebx for args
5055 */
5056 /* div/2addr vA, vB */
5057 .extern art_quick_lmod
5058 mov rIBASE, LOCAL0(%esp) # save rIBASE/%edx
5059 movzbl rINSTbl, %eax
5060 shrl $4, %eax # eax <- B
5061 andb $0xf, rINSTbl # rINST <- A
5062 mov rINST, LOCAL1(%esp) # save rINST/%ebx
5063 movl %ebx, %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005064 GET_VREG %edx, %eax
5065 GET_VREG_HIGH %ebx, %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005066 movl %edx, %eax
5067 orl %ebx, %eax
5068 jz common_errDivideByZero
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005069 GET_VREG %eax, %ecx
5070 GET_VREG_HIGH %ecx, %ecx
5071 call SYMBOL(art_quick_lmod)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005072 mov LOCAL1(%esp), rINST # restore rINST/%ebx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005073 SET_VREG_HIGH rIBASE, rINST
5074 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005075 mov LOCAL0(%esp), rIBASE # restore rIBASE/%edx
5076 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5077
5078
5079/* ------------------------------ */
5080 .balign 128
5081.L_op_and_long_2addr: /* 0xc0 */
5082/* File: x86/op_and_long_2addr.S */
5083/* File: x86/binopWide2addr.S */
5084/*
5085 * Generic 64-bit binary operation.
5086 */
5087 /* binop/2addr vA, vB */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005088 movzbl rINSTbl, %ecx # ecx<- BA
5089 sarl $4, %ecx # ecx<- B
5090 GET_VREG %eax, %ecx # eax<- v[B+0]
5091 GET_VREG_HIGH %ecx, %ecx # eax<- v[B+1]
5092 andb $0xF, rINSTbl # rINST<- A
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005093 andl %eax, (rFP,rINST,4) # ex: addl %eax,(rFP,rINST,4)
5094 andl %ecx, 4(rFP,rINST,4) # ex: adcl %ecx,4(rFP,rINST,4)
5095 CLEAR_WIDE_REF rINST
5096 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5097
5098
5099/* ------------------------------ */
5100 .balign 128
5101.L_op_or_long_2addr: /* 0xc1 */
5102/* File: x86/op_or_long_2addr.S */
5103/* File: x86/binopWide2addr.S */
5104/*
5105 * Generic 64-bit binary operation.
5106 */
5107 /* binop/2addr vA, vB */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005108 movzbl rINSTbl, %ecx # ecx<- BA
5109 sarl $4, %ecx # ecx<- B
5110 GET_VREG %eax, %ecx # eax<- v[B+0]
5111 GET_VREG_HIGH %ecx, %ecx # eax<- v[B+1]
5112 andb $0xF, rINSTbl # rINST<- A
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005113 orl %eax, (rFP,rINST,4) # ex: addl %eax,(rFP,rINST,4)
5114 orl %ecx, 4(rFP,rINST,4) # ex: adcl %ecx,4(rFP,rINST,4)
5115 CLEAR_WIDE_REF rINST
5116 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5117
5118
5119/* ------------------------------ */
5120 .balign 128
5121.L_op_xor_long_2addr: /* 0xc2 */
5122/* File: x86/op_xor_long_2addr.S */
5123/* File: x86/binopWide2addr.S */
5124/*
5125 * Generic 64-bit binary operation.
5126 */
5127 /* binop/2addr vA, vB */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005128 movzbl rINSTbl, %ecx # ecx<- BA
5129 sarl $4, %ecx # ecx<- B
5130 GET_VREG %eax, %ecx # eax<- v[B+0]
5131 GET_VREG_HIGH %ecx, %ecx # eax<- v[B+1]
5132 andb $0xF, rINSTbl # rINST<- A
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005133 xorl %eax, (rFP,rINST,4) # ex: addl %eax,(rFP,rINST,4)
5134 xorl %ecx, 4(rFP,rINST,4) # ex: adcl %ecx,4(rFP,rINST,4)
5135 CLEAR_WIDE_REF rINST
5136 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5137
5138
5139/* ------------------------------ */
5140 .balign 128
5141.L_op_shl_long_2addr: /* 0xc3 */
5142/* File: x86/op_shl_long_2addr.S */
5143/*
5144 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is
5145 * 32-bit shift distance.
5146 */
5147 /* shl-long/2addr vA, vB */
5148 /* ecx gets shift count */
5149 /* Need to spill rIBASE */
5150 /* rINSTw gets AA */
5151 movzbl rINSTbl, %ecx # ecx <- BA
5152 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005153 GET_VREG %eax, rINST # eax <- v[AA+0]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005154 sarl $4, %ecx # ecx <- B
5155 movl rIBASE, LOCAL0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005156 GET_VREG_HIGH rIBASE, rINST # rIBASE <- v[AA+1]
5157 GET_VREG %ecx, %ecx # ecx <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005158 shldl %eax, rIBASE
5159 sall %cl, %eax
5160 testb $32, %cl
5161 je 2f
5162 movl %eax, rIBASE
5163 xorl %eax, %eax
51642:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005165 SET_VREG_HIGH rIBASE, rINST # v[AA+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005166 movl LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005167 SET_VREG %eax, rINST # v[AA+0] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005168 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5169
5170/* ------------------------------ */
5171 .balign 128
5172.L_op_shr_long_2addr: /* 0xc4 */
5173/* File: x86/op_shr_long_2addr.S */
5174/*
5175 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is
5176 * 32-bit shift distance.
5177 */
5178 /* shl-long/2addr vA, vB */
5179 /* ecx gets shift count */
5180 /* Need to spill rIBASE */
5181 /* rINSTw gets AA */
5182 movzbl rINSTbl, %ecx # ecx <- BA
5183 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005184 GET_VREG %eax, rINST # eax <- v[AA+0]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005185 sarl $4, %ecx # ecx <- B
5186 movl rIBASE, LOCAL0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005187 GET_VREG_HIGH rIBASE, rINST # rIBASE <- v[AA+1]
5188 GET_VREG %ecx, %ecx # ecx <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005189 shrdl rIBASE, %eax
5190 sarl %cl, rIBASE
5191 testb $32, %cl
5192 je 2f
5193 movl rIBASE, %eax
5194 sarl $31, rIBASE
51952:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005196 SET_VREG_HIGH rIBASE, rINST # v[AA+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005197 movl LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005198 SET_VREG %eax, rINST # v[AA+0] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005199 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5200
5201/* ------------------------------ */
5202 .balign 128
5203.L_op_ushr_long_2addr: /* 0xc5 */
5204/* File: x86/op_ushr_long_2addr.S */
5205/*
5206 * Long integer shift, 2addr version. vA is 64-bit value/result, vB is
5207 * 32-bit shift distance.
5208 */
5209 /* shl-long/2addr vA, vB */
5210 /* ecx gets shift count */
5211 /* Need to spill rIBASE */
5212 /* rINSTw gets AA */
5213 movzbl rINSTbl, %ecx # ecx <- BA
5214 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005215 GET_VREG %eax, rINST # eax <- v[AA+0]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005216 sarl $4, %ecx # ecx <- B
5217 movl rIBASE, LOCAL0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005218 GET_VREG_HIGH rIBASE, rINST # rIBASE <- v[AA+1]
5219 GET_VREG %ecx, %ecx # ecx <- vBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005220 shrdl rIBASE, %eax
5221 shrl %cl, rIBASE
5222 testb $32, %cl
5223 je 2f
5224 movl rIBASE, %eax
5225 xorl rIBASE, rIBASE
52262:
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005227 SET_VREG_HIGH rIBASE, rINST # v[AA+1] <- rIBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005228 movl LOCAL0(%esp), rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005229 SET_VREG %eax, rINST # v[AA+0] <- eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005230 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5231
5232/* ------------------------------ */
5233 .balign 128
5234.L_op_add_float_2addr: /* 0xc6 */
5235/* File: x86/op_add_float_2addr.S */
5236/* File: x86/sseBinop2Addr.S */
5237 movzx rINSTbl, %ecx # ecx <- A+
5238 andl $0xf, %ecx # ecx <- A
5239 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5240 sarl $4, rINST # rINST<- B
5241 addss VREG_ADDRESS(rINST), %xmm0
5242 movss %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5243 pxor %xmm0, %xmm0
5244 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5245 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5246
5247
5248/* ------------------------------ */
5249 .balign 128
5250.L_op_sub_float_2addr: /* 0xc7 */
5251/* File: x86/op_sub_float_2addr.S */
5252/* File: x86/sseBinop2Addr.S */
5253 movzx rINSTbl, %ecx # ecx <- A+
5254 andl $0xf, %ecx # ecx <- A
5255 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5256 sarl $4, rINST # rINST<- B
5257 subss VREG_ADDRESS(rINST), %xmm0
5258 movss %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5259 pxor %xmm0, %xmm0
5260 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5261 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5262
5263
5264/* ------------------------------ */
5265 .balign 128
5266.L_op_mul_float_2addr: /* 0xc8 */
5267/* File: x86/op_mul_float_2addr.S */
5268/* File: x86/sseBinop2Addr.S */
5269 movzx rINSTbl, %ecx # ecx <- A+
5270 andl $0xf, %ecx # ecx <- A
5271 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5272 sarl $4, rINST # rINST<- B
5273 mulss VREG_ADDRESS(rINST), %xmm0
5274 movss %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5275 pxor %xmm0, %xmm0
5276 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5277 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5278
5279
5280/* ------------------------------ */
5281 .balign 128
5282.L_op_div_float_2addr: /* 0xc9 */
5283/* File: x86/op_div_float_2addr.S */
5284/* File: x86/sseBinop2Addr.S */
5285 movzx rINSTbl, %ecx # ecx <- A+
5286 andl $0xf, %ecx # ecx <- A
5287 movss VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5288 sarl $4, rINST # rINST<- B
5289 divss VREG_ADDRESS(rINST), %xmm0
5290 movss %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5291 pxor %xmm0, %xmm0
5292 movss %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5293 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5294
5295
5296/* ------------------------------ */
5297 .balign 128
5298.L_op_rem_float_2addr: /* 0xca */
5299/* File: x86/op_rem_float_2addr.S */
5300 /* rem_float/2addr vA, vB */
5301 movzx rINSTbl, %ecx # ecx <- A+
5302 sarl $4, rINST # rINST <- B
5303 flds VREG_ADDRESS(rINST) # vB to fp stack
5304 andb $0xf, %cl # ecx <- A
5305 flds VREG_ADDRESS(%ecx) # vA to fp stack
53061:
5307 fprem
5308 fstsw %ax
5309 sahf
5310 jp 1b
5311 fstp %st(1)
5312 fstps VREG_ADDRESS(%ecx) # %st to vA
5313 CLEAR_REF %ecx
5314 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5315
5316/* ------------------------------ */
5317 .balign 128
5318.L_op_add_double_2addr: /* 0xcb */
5319/* File: x86/op_add_double_2addr.S */
5320/* File: x86/sseBinop2Addr.S */
5321 movzx rINSTbl, %ecx # ecx <- A+
5322 andl $0xf, %ecx # ecx <- A
5323 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5324 sarl $4, rINST # rINST<- B
5325 addsd VREG_ADDRESS(rINST), %xmm0
5326 movsd %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5327 pxor %xmm0, %xmm0
5328 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5329 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5330
5331
5332/* ------------------------------ */
5333 .balign 128
5334.L_op_sub_double_2addr: /* 0xcc */
5335/* File: x86/op_sub_double_2addr.S */
5336/* File: x86/sseBinop2Addr.S */
5337 movzx rINSTbl, %ecx # ecx <- A+
5338 andl $0xf, %ecx # ecx <- A
5339 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5340 sarl $4, rINST # rINST<- B
5341 subsd VREG_ADDRESS(rINST), %xmm0
5342 movsd %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5343 pxor %xmm0, %xmm0
5344 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5345 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5346
5347
5348/* ------------------------------ */
5349 .balign 128
5350.L_op_mul_double_2addr: /* 0xcd */
5351/* File: x86/op_mul_double_2addr.S */
5352/* File: x86/sseBinop2Addr.S */
5353 movzx rINSTbl, %ecx # ecx <- A+
5354 andl $0xf, %ecx # ecx <- A
5355 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5356 sarl $4, rINST # rINST<- B
5357 mulsd VREG_ADDRESS(rINST), %xmm0
5358 movsd %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5359 pxor %xmm0, %xmm0
5360 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5361 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5362
5363
5364/* ------------------------------ */
5365 .balign 128
5366.L_op_div_double_2addr: /* 0xce */
5367/* File: x86/op_div_double_2addr.S */
5368/* File: x86/sseBinop2Addr.S */
5369 movzx rINSTbl, %ecx # ecx <- A+
5370 andl $0xf, %ecx # ecx <- A
5371 movsd VREG_ADDRESS(%ecx), %xmm0 # %xmm0 <- 1st src
5372 sarl $4, rINST # rINST<- B
5373 divsd VREG_ADDRESS(rINST), %xmm0
5374 movsd %xmm0, VREG_ADDRESS(%ecx) # vAA<- %xmm0
5375 pxor %xmm0, %xmm0
5376 movsd %xmm0, VREG_REF_ADDRESS(rINST) # clear ref
5377 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5378
5379
5380/* ------------------------------ */
5381 .balign 128
5382.L_op_rem_double_2addr: /* 0xcf */
5383/* File: x86/op_rem_double_2addr.S */
5384 /* rem_double/2addr vA, vB */
5385 movzx rINSTbl, %ecx # ecx <- A+
5386 sarl $4, rINST # rINST <- B
5387 fldl VREG_ADDRESS(rINST) # vB to fp stack
5388 andb $0xf, %cl # ecx <- A
5389 fldl VREG_ADDRESS(%ecx) # vA to fp stack
53901:
5391 fprem
5392 fstsw %ax
5393 sahf
5394 jp 1b
5395 fstp %st(1)
5396 fstpl VREG_ADDRESS(%ecx) # %st to vA
5397 CLEAR_WIDE_REF %ecx
5398 ADVANCE_PC_FETCH_AND_GOTO_NEXT 1
5399
5400/* ------------------------------ */
5401 .balign 128
5402.L_op_add_int_lit16: /* 0xd0 */
5403/* File: x86/op_add_int_lit16.S */
5404/* File: x86/binopLit16.S */
5405/*
5406 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
5407 * that specifies an instruction that performs "result = eax op ecx".
5408 * This could be an x86 instruction or a function call. (If the result
5409 * comes back in a register other than eax, you can override "result".)
5410 *
5411 * For: add-int/lit16, rsub-int,
5412 * and-int/lit16, or-int/lit16, xor-int/lit16
5413 */
5414 /* binop/lit16 vA, vB, #+CCCC */
5415 movzbl rINSTbl, %eax # eax <- 000000BA
5416 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005417 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005418 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5419 andb $0xf, rINSTbl # rINST <- A
5420 addl %ecx, %eax # for example: addl %ecx, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005421 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005422 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5423
5424
5425/* ------------------------------ */
5426 .balign 128
5427.L_op_rsub_int: /* 0xd1 */
5428/* File: x86/op_rsub_int.S */
5429/* this op is "rsub-int", but can be thought of as "rsub-int/lit16" */
5430/* File: x86/binopLit16.S */
5431/*
5432 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
5433 * that specifies an instruction that performs "result = eax op ecx".
5434 * This could be an x86 instruction or a function call. (If the result
5435 * comes back in a register other than eax, you can override "result".)
5436 *
5437 * For: add-int/lit16, rsub-int,
5438 * and-int/lit16, or-int/lit16, xor-int/lit16
5439 */
5440 /* binop/lit16 vA, vB, #+CCCC */
5441 movzbl rINSTbl, %eax # eax <- 000000BA
5442 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005443 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005444 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5445 andb $0xf, rINSTbl # rINST <- A
5446 subl %eax, %ecx # for example: addl %ecx, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005447 SET_VREG %ecx, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005448 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5449
5450
5451/* ------------------------------ */
5452 .balign 128
5453.L_op_mul_int_lit16: /* 0xd2 */
5454/* File: x86/op_mul_int_lit16.S */
5455 /* mul/lit16 vA, vB, #+CCCC */
5456 /* Need A in rINST, ssssCCCC in ecx, vB in eax */
5457 movzbl rINSTbl, %eax # eax <- 000000BA
5458 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005459 GET_VREG %eax, %eax # eax <- vB
Serguei Katkovff8579e2016-02-17 11:30:23 +06005460 movl rIBASE, %ecx
5461 movswl 2(rPC), rIBASE # rIBASE <- ssssCCCC
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005462 andb $0xf, rINSTbl # rINST <- A
Serguei Katkovff8579e2016-02-17 11:30:23 +06005463 imull rIBASE, %eax # trashes rIBASE/edx
5464 movl %ecx, rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005465 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005466 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5467
5468/* ------------------------------ */
5469 .balign 128
5470.L_op_div_int_lit16: /* 0xd3 */
5471/* File: x86/op_div_int_lit16.S */
5472/* File: x86/bindivLit16.S */
5473/*
5474 * 32-bit binary div/rem operation. Handles special case of op0=minint and
5475 * op1=-1.
5476 */
5477 /* div/rem/lit16 vA, vB, #+CCCC */
5478 /* Need A in rINST, ssssCCCC in ecx, vB in eax */
5479 movzbl rINSTbl, %eax # eax <- 000000BA
5480 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005481 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005482 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5483 andb $0xf, rINSTbl # rINST <- A
5484 testl %ecx, %ecx
5485 je common_errDivideByZero
5486 cmpl $-1, %ecx
5487 jne .Lop_div_int_lit16_continue_div
5488 cmpl $0x80000000, %eax
5489 jne .Lop_div_int_lit16_continue_div
5490 movl $0x80000000, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005491 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005492 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5493
5494.Lop_div_int_lit16_continue_div:
5495 mov rIBASE, LOCAL0(%esp)
5496 cltd
5497 idivl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005498 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005499 mov LOCAL0(%esp), rIBASE
5500 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5501
5502
5503/* ------------------------------ */
5504 .balign 128
5505.L_op_rem_int_lit16: /* 0xd4 */
5506/* File: x86/op_rem_int_lit16.S */
5507/* File: x86/bindivLit16.S */
5508/*
5509 * 32-bit binary div/rem operation. Handles special case of op0=minint and
5510 * op1=-1.
5511 */
5512 /* div/rem/lit16 vA, vB, #+CCCC */
5513 /* Need A in rINST, ssssCCCC in ecx, vB in eax */
5514 movzbl rINSTbl, %eax # eax <- 000000BA
5515 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005516 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005517 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5518 andb $0xf, rINSTbl # rINST <- A
5519 testl %ecx, %ecx
5520 je common_errDivideByZero
5521 cmpl $-1, %ecx
5522 jne .Lop_rem_int_lit16_continue_div
5523 cmpl $0x80000000, %eax
5524 jne .Lop_rem_int_lit16_continue_div
5525 movl $0, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005526 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005527 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5528
5529.Lop_rem_int_lit16_continue_div:
5530 mov rIBASE, LOCAL0(%esp)
5531 cltd
5532 idivl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005533 SET_VREG rIBASE, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005534 mov LOCAL0(%esp), rIBASE
5535 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5536
5537
5538/* ------------------------------ */
5539 .balign 128
5540.L_op_and_int_lit16: /* 0xd5 */
5541/* File: x86/op_and_int_lit16.S */
5542/* File: x86/binopLit16.S */
5543/*
5544 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
5545 * that specifies an instruction that performs "result = eax op ecx".
5546 * This could be an x86 instruction or a function call. (If the result
5547 * comes back in a register other than eax, you can override "result".)
5548 *
5549 * For: add-int/lit16, rsub-int,
5550 * and-int/lit16, or-int/lit16, xor-int/lit16
5551 */
5552 /* binop/lit16 vA, vB, #+CCCC */
5553 movzbl rINSTbl, %eax # eax <- 000000BA
5554 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005555 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005556 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5557 andb $0xf, rINSTbl # rINST <- A
5558 andl %ecx, %eax # for example: addl %ecx, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005559 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005560 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5561
5562
5563/* ------------------------------ */
5564 .balign 128
5565.L_op_or_int_lit16: /* 0xd6 */
5566/* File: x86/op_or_int_lit16.S */
5567/* File: x86/binopLit16.S */
5568/*
5569 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
5570 * that specifies an instruction that performs "result = eax op ecx".
5571 * This could be an x86 instruction or a function call. (If the result
5572 * comes back in a register other than eax, you can override "result".)
5573 *
5574 * For: add-int/lit16, rsub-int,
5575 * and-int/lit16, or-int/lit16, xor-int/lit16
5576 */
5577 /* binop/lit16 vA, vB, #+CCCC */
5578 movzbl rINSTbl, %eax # eax <- 000000BA
5579 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005580 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005581 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5582 andb $0xf, rINSTbl # rINST <- A
5583 orl %ecx, %eax # for example: addl %ecx, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005584 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005585 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5586
5587
5588/* ------------------------------ */
5589 .balign 128
5590.L_op_xor_int_lit16: /* 0xd7 */
5591/* File: x86/op_xor_int_lit16.S */
5592/* File: x86/binopLit16.S */
5593/*
5594 * Generic 32-bit "lit16" binary operation. Provide an "instr" line
5595 * that specifies an instruction that performs "result = eax op ecx".
5596 * This could be an x86 instruction or a function call. (If the result
5597 * comes back in a register other than eax, you can override "result".)
5598 *
5599 * For: add-int/lit16, rsub-int,
5600 * and-int/lit16, or-int/lit16, xor-int/lit16
5601 */
5602 /* binop/lit16 vA, vB, #+CCCC */
5603 movzbl rINSTbl, %eax # eax <- 000000BA
5604 sarl $4, %eax # eax <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005605 GET_VREG %eax, %eax # eax <- vB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005606 movswl 2(rPC), %ecx # ecx <- ssssCCCC
5607 andb $0xf, rINSTbl # rINST <- A
5608 xorl %ecx, %eax # for example: addl %ecx, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005609 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005610 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5611
5612
5613/* ------------------------------ */
5614 .balign 128
5615.L_op_add_int_lit8: /* 0xd8 */
5616/* File: x86/op_add_int_lit8.S */
5617/* File: x86/binopLit8.S */
5618/*
5619 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5620 * that specifies an instruction that performs "result = eax op ecx".
5621 * This could be an x86 instruction or a function call. (If the result
5622 * comes back in a register other than r0, you can override "result".)
5623 *
5624 * For: add-int/lit8, rsub-int/lit8
5625 * and-int/lit8, or-int/lit8, xor-int/lit8,
5626 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5627 */
5628 /* binop/lit8 vAA, vBB, #+CC */
5629 movzbl 2(rPC), %eax # eax <- BB
5630 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005631 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005632 addl %ecx, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005633 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005634 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5635
5636
5637/* ------------------------------ */
5638 .balign 128
5639.L_op_rsub_int_lit8: /* 0xd9 */
5640/* File: x86/op_rsub_int_lit8.S */
5641/* File: x86/binopLit8.S */
5642/*
5643 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5644 * that specifies an instruction that performs "result = eax op ecx".
5645 * This could be an x86 instruction or a function call. (If the result
5646 * comes back in a register other than r0, you can override "result".)
5647 *
5648 * For: add-int/lit8, rsub-int/lit8
5649 * and-int/lit8, or-int/lit8, xor-int/lit8,
5650 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5651 */
5652 /* binop/lit8 vAA, vBB, #+CC */
5653 movzbl 2(rPC), %eax # eax <- BB
5654 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005655 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005656 subl %eax, %ecx # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005657 SET_VREG %ecx, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005658 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5659
5660
5661/* ------------------------------ */
5662 .balign 128
5663.L_op_mul_int_lit8: /* 0xda */
5664/* File: x86/op_mul_int_lit8.S */
5665 /* mul/lit8 vAA, vBB, #+CC */
5666 movzbl 2(rPC), %eax # eax <- BB
Serguei Katkovff8579e2016-02-17 11:30:23 +06005667 movl rIBASE, %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005668 GET_VREG %eax, %eax # eax <- rBB
Serguei Katkovff8579e2016-02-17 11:30:23 +06005669 movsbl 3(rPC), rIBASE # rIBASE <- ssssssCC
5670 imull rIBASE, %eax # trashes rIBASE/edx
5671 movl %ecx, rIBASE
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005672 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005673 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5674
5675/* ------------------------------ */
5676 .balign 128
5677.L_op_div_int_lit8: /* 0xdb */
5678/* File: x86/op_div_int_lit8.S */
5679/* File: x86/bindivLit8.S */
5680/*
5681 * 32-bit div/rem "lit8" binary operation. Handles special case of
5682 * op0=minint & op1=-1
5683 */
5684 /* div/rem/lit8 vAA, vBB, #+CC */
5685 movzbl 2(rPC), %eax # eax <- BB
5686 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005687 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005688 testl %ecx, %ecx
5689 je common_errDivideByZero
5690 cmpl $0x80000000, %eax
5691 jne .Lop_div_int_lit8_continue_div
5692 cmpl $-1, %ecx
5693 jne .Lop_div_int_lit8_continue_div
5694 movl $0x80000000, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005695 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005696 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5697
5698.Lop_div_int_lit8_continue_div:
5699 mov rIBASE, LOCAL0(%esp)
5700 cltd
5701 idivl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005702 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005703 mov LOCAL0(%esp), rIBASE
5704 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5705
5706
5707/* ------------------------------ */
5708 .balign 128
5709.L_op_rem_int_lit8: /* 0xdc */
5710/* File: x86/op_rem_int_lit8.S */
5711/* File: x86/bindivLit8.S */
5712/*
5713 * 32-bit div/rem "lit8" binary operation. Handles special case of
5714 * op0=minint & op1=-1
5715 */
5716 /* div/rem/lit8 vAA, vBB, #+CC */
5717 movzbl 2(rPC), %eax # eax <- BB
5718 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005719 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005720 testl %ecx, %ecx
5721 je common_errDivideByZero
5722 cmpl $0x80000000, %eax
5723 jne .Lop_rem_int_lit8_continue_div
5724 cmpl $-1, %ecx
5725 jne .Lop_rem_int_lit8_continue_div
5726 movl $0, %eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005727 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005728 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5729
5730.Lop_rem_int_lit8_continue_div:
5731 mov rIBASE, LOCAL0(%esp)
5732 cltd
5733 idivl %ecx
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005734 SET_VREG rIBASE, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005735 mov LOCAL0(%esp), rIBASE
5736 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5737
5738
5739/* ------------------------------ */
5740 .balign 128
5741.L_op_and_int_lit8: /* 0xdd */
5742/* File: x86/op_and_int_lit8.S */
5743/* File: x86/binopLit8.S */
5744/*
5745 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5746 * that specifies an instruction that performs "result = eax op ecx".
5747 * This could be an x86 instruction or a function call. (If the result
5748 * comes back in a register other than r0, you can override "result".)
5749 *
5750 * For: add-int/lit8, rsub-int/lit8
5751 * and-int/lit8, or-int/lit8, xor-int/lit8,
5752 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5753 */
5754 /* binop/lit8 vAA, vBB, #+CC */
5755 movzbl 2(rPC), %eax # eax <- BB
5756 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005757 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005758 andl %ecx, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005759 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005760 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5761
5762
5763/* ------------------------------ */
5764 .balign 128
5765.L_op_or_int_lit8: /* 0xde */
5766/* File: x86/op_or_int_lit8.S */
5767/* File: x86/binopLit8.S */
5768/*
5769 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5770 * that specifies an instruction that performs "result = eax op ecx".
5771 * This could be an x86 instruction or a function call. (If the result
5772 * comes back in a register other than r0, you can override "result".)
5773 *
5774 * For: add-int/lit8, rsub-int/lit8
5775 * and-int/lit8, or-int/lit8, xor-int/lit8,
5776 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5777 */
5778 /* binop/lit8 vAA, vBB, #+CC */
5779 movzbl 2(rPC), %eax # eax <- BB
5780 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005781 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005782 orl %ecx, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005783 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005784 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5785
5786
5787/* ------------------------------ */
5788 .balign 128
5789.L_op_xor_int_lit8: /* 0xdf */
5790/* File: x86/op_xor_int_lit8.S */
5791/* File: x86/binopLit8.S */
5792/*
5793 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5794 * that specifies an instruction that performs "result = eax op ecx".
5795 * This could be an x86 instruction or a function call. (If the result
5796 * comes back in a register other than r0, you can override "result".)
5797 *
5798 * For: add-int/lit8, rsub-int/lit8
5799 * and-int/lit8, or-int/lit8, xor-int/lit8,
5800 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5801 */
5802 /* binop/lit8 vAA, vBB, #+CC */
5803 movzbl 2(rPC), %eax # eax <- BB
5804 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005805 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005806 xorl %ecx, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005807 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005808 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5809
5810
5811/* ------------------------------ */
5812 .balign 128
5813.L_op_shl_int_lit8: /* 0xe0 */
5814/* File: x86/op_shl_int_lit8.S */
5815/* File: x86/binopLit8.S */
5816/*
5817 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5818 * that specifies an instruction that performs "result = eax op ecx".
5819 * This could be an x86 instruction or a function call. (If the result
5820 * comes back in a register other than r0, you can override "result".)
5821 *
5822 * For: add-int/lit8, rsub-int/lit8
5823 * and-int/lit8, or-int/lit8, xor-int/lit8,
5824 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5825 */
5826 /* binop/lit8 vAA, vBB, #+CC */
5827 movzbl 2(rPC), %eax # eax <- BB
5828 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005829 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005830 sall %cl, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005831 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005832 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5833
5834
5835/* ------------------------------ */
5836 .balign 128
5837.L_op_shr_int_lit8: /* 0xe1 */
5838/* File: x86/op_shr_int_lit8.S */
5839/* File: x86/binopLit8.S */
5840/*
5841 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5842 * that specifies an instruction that performs "result = eax op ecx".
5843 * This could be an x86 instruction or a function call. (If the result
5844 * comes back in a register other than r0, you can override "result".)
5845 *
5846 * For: add-int/lit8, rsub-int/lit8
5847 * and-int/lit8, or-int/lit8, xor-int/lit8,
5848 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5849 */
5850 /* binop/lit8 vAA, vBB, #+CC */
5851 movzbl 2(rPC), %eax # eax <- BB
5852 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005853 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005854 sarl %cl, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005855 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005856 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5857
5858
5859/* ------------------------------ */
5860 .balign 128
5861.L_op_ushr_int_lit8: /* 0xe2 */
5862/* File: x86/op_ushr_int_lit8.S */
5863/* File: x86/binopLit8.S */
5864/*
5865 * Generic 32-bit "lit8" binary operation. Provide an "instr" line
5866 * that specifies an instruction that performs "result = eax op ecx".
5867 * This could be an x86 instruction or a function call. (If the result
5868 * comes back in a register other than r0, you can override "result".)
5869 *
5870 * For: add-int/lit8, rsub-int/lit8
5871 * and-int/lit8, or-int/lit8, xor-int/lit8,
5872 * shl-int/lit8, shr-int/lit8, ushr-int/lit8
5873 */
5874 /* binop/lit8 vAA, vBB, #+CC */
5875 movzbl 2(rPC), %eax # eax <- BB
5876 movsbl 3(rPC), %ecx # ecx <- ssssssCC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005877 GET_VREG %eax, %eax # eax <- rBB
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005878 shrl %cl, %eax # ex: addl %ecx,%eax
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005879 SET_VREG %eax, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005880 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5881
5882
5883/* ------------------------------ */
5884 .balign 128
5885.L_op_iget_quick: /* 0xe3 */
5886/* File: x86/op_iget_quick.S */
5887 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
5888 /* op vA, vB, offset@CCCC */
5889 movzbl rINSTbl, %ecx # ecx <- BA
5890 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005891 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005892 movzwl 2(rPC), %eax # eax <- field byte offset
5893 testl %ecx, %ecx # is object null?
5894 je common_errNullObject
5895 movl (%ecx,%eax,1), %eax
5896 andb $0xf,rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005897 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005898 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5899
5900/* ------------------------------ */
5901 .balign 128
5902.L_op_iget_wide_quick: /* 0xe4 */
5903/* File: x86/op_iget_wide_quick.S */
5904 /* iget-wide-quick vA, vB, offset@CCCC */
5905 movzbl rINSTbl, %ecx # ecx <- BA
5906 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005907 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005908 movzwl 2(rPC), %eax # eax <- field byte offset
5909 testl %ecx, %ecx # is object null?
5910 je common_errNullObject
5911 movq (%ecx,%eax,1), %xmm0
5912 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005913 SET_WIDE_FP_VREG %xmm0, rINST
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005914 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5915
5916/* ------------------------------ */
5917 .balign 128
5918.L_op_iget_object_quick: /* 0xe5 */
5919/* File: x86/op_iget_object_quick.S */
5920 /* For: iget-object-quick */
5921 /* op vA, vB, offset@CCCC */
5922 movzbl rINSTbl, %ecx # ecx <- BA
5923 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005924 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005925 movzwl 2(rPC), %eax # eax <- field byte offset
5926 movl %ecx, OUT_ARG0(%esp)
5927 movl %eax, OUT_ARG1(%esp)
5928 EXPORT_PC
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005929 call SYMBOL(artIGetObjectFromMterp) # (obj, offset)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005930 movl rSELF, %ecx
Serguei Katkovff8579e2016-02-17 11:30:23 +06005931 RESTORE_IBASE_FROM_SELF %ecx
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005932 cmpl $0, THREAD_EXCEPTION_OFFSET(%ecx)
5933 jnz MterpException # bail out
5934 andb $0xf,rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005935 SET_VREG_OBJECT %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005936 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5937
5938/* ------------------------------ */
5939 .balign 128
5940.L_op_iput_quick: /* 0xe6 */
5941/* File: x86/op_iput_quick.S */
5942 /* For: iput-quick, iput-object-quick */
5943 /* op vA, vB, offset@CCCC */
5944 movzbl rINSTbl, %ecx # ecx <- BA
5945 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005946 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005947 testl %ecx, %ecx # is object null?
5948 je common_errNullObject
5949 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005950 GET_VREG rINST, rINST # rINST <- v[A]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005951 movzwl 2(rPC), %eax # eax <- field byte offset
5952 movl rINST, (%ecx,%eax,1)
5953 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5954
5955/* ------------------------------ */
5956 .balign 128
5957.L_op_iput_wide_quick: /* 0xe7 */
5958/* File: x86/op_iput_wide_quick.S */
5959 /* iput-wide-quick vA, vB, offset@CCCC */
5960 movzbl rINSTbl, %ecx # ecx<- BA
5961 sarl $4, %ecx # ecx<- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005962 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005963 testl %ecx, %ecx # is object null?
5964 je common_errNullObject
5965 movzwl 2(rPC), %eax # eax<- field byte offset
5966 leal (%ecx,%eax,1), %ecx # ecx<- Address of 64-bit target
5967 andb $0xf, rINSTbl # rINST<- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005968 GET_WIDE_FP_VREG %xmm0, rINST # xmm0<- fp[A]/fp[A+1]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005969 movq %xmm0, (%ecx) # obj.field<- r0/r1
5970 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5971
5972/* ------------------------------ */
5973 .balign 128
5974.L_op_iput_object_quick: /* 0xe8 */
5975/* File: x86/op_iput_object_quick.S */
5976 EXPORT_PC
5977 leal OFF_FP_SHADOWFRAME(rFP), %eax
5978 movl %eax, OUT_ARG0(%esp)
5979 movl rPC, OUT_ARG1(%esp)
5980 REFRESH_INST 232
5981 movl rINST, OUT_ARG2(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06005982 call SYMBOL(MterpIputObjectQuick)
Serguei Katkovff8579e2016-02-17 11:30:23 +06005983 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005984 jz MterpException
Serguei Katkovff8579e2016-02-17 11:30:23 +06005985 RESTORE_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +00005986 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
5987
5988/* ------------------------------ */
5989 .balign 128
5990.L_op_invoke_virtual_quick: /* 0xe9 */
5991/* File: x86/op_invoke_virtual_quick.S */
5992/* File: x86/invoke.S */
5993/*
5994 * Generic invoke handler wrapper.
5995 */
5996 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
5997 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
5998 .extern MterpInvokeVirtualQuick
5999 EXPORT_PC
6000 movl rSELF, %ecx
6001 movl %ecx, OUT_ARG0(%esp)
6002 leal OFF_FP_SHADOWFRAME(rFP), %eax
6003 movl %eax, OUT_ARG1(%esp)
6004 movl rPC, OUT_ARG2(%esp)
6005 REFRESH_INST 233
6006 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006007 call SYMBOL(MterpInvokeVirtualQuick)
Serguei Katkovff8579e2016-02-17 11:30:23 +06006008 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006009 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00006010 ADVANCE_PC 3
6011 call SYMBOL(MterpShouldSwitchInterpreters)
6012 testb %al, %al
6013 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06006014 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00006015 FETCH_INST
6016 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006017
6018
6019/* ------------------------------ */
6020 .balign 128
6021.L_op_invoke_virtual_range_quick: /* 0xea */
6022/* File: x86/op_invoke_virtual_range_quick.S */
6023/* File: x86/invoke.S */
6024/*
6025 * Generic invoke handler wrapper.
6026 */
6027 /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
6028 /* op {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
6029 .extern MterpInvokeVirtualQuickRange
6030 EXPORT_PC
6031 movl rSELF, %ecx
6032 movl %ecx, OUT_ARG0(%esp)
6033 leal OFF_FP_SHADOWFRAME(rFP), %eax
6034 movl %eax, OUT_ARG1(%esp)
6035 movl rPC, OUT_ARG2(%esp)
6036 REFRESH_INST 234
6037 movl rINST, OUT_ARG3(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006038 call SYMBOL(MterpInvokeVirtualQuickRange)
Serguei Katkovff8579e2016-02-17 11:30:23 +06006039 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006040 jz MterpException
Bill Buzbee481352d2016-02-25 17:37:46 +00006041 ADVANCE_PC 3
6042 call SYMBOL(MterpShouldSwitchInterpreters)
6043 testb %al, %al
6044 jnz MterpFallback
Serguei Katkovff8579e2016-02-17 11:30:23 +06006045 RESTORE_IBASE
Bill Buzbee481352d2016-02-25 17:37:46 +00006046 FETCH_INST
6047 GOTO_NEXT
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006048
6049
6050/* ------------------------------ */
6051 .balign 128
6052.L_op_iput_boolean_quick: /* 0xeb */
6053/* File: x86/op_iput_boolean_quick.S */
6054/* File: x86/op_iput_quick.S */
6055 /* For: iput-quick, iput-object-quick */
6056 /* op vA, vB, offset@CCCC */
6057 movzbl rINSTbl, %ecx # ecx <- BA
6058 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006059 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006060 testl %ecx, %ecx # is object null?
6061 je common_errNullObject
6062 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006063 GET_VREG rINST, rINST # rINST <- v[A]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006064 movzwl 2(rPC), %eax # eax <- field byte offset
6065 movb rINSTbl, (%ecx,%eax,1)
6066 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6067
6068
6069/* ------------------------------ */
6070 .balign 128
6071.L_op_iput_byte_quick: /* 0xec */
6072/* File: x86/op_iput_byte_quick.S */
6073/* File: x86/op_iput_quick.S */
6074 /* For: iput-quick, iput-object-quick */
6075 /* op vA, vB, offset@CCCC */
6076 movzbl rINSTbl, %ecx # ecx <- BA
6077 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006078 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006079 testl %ecx, %ecx # is object null?
6080 je common_errNullObject
6081 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006082 GET_VREG rINST, rINST # rINST <- v[A]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006083 movzwl 2(rPC), %eax # eax <- field byte offset
6084 movb rINSTbl, (%ecx,%eax,1)
6085 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6086
6087
6088/* ------------------------------ */
6089 .balign 128
6090.L_op_iput_char_quick: /* 0xed */
6091/* File: x86/op_iput_char_quick.S */
6092/* File: x86/op_iput_quick.S */
6093 /* For: iput-quick, iput-object-quick */
6094 /* op vA, vB, offset@CCCC */
6095 movzbl rINSTbl, %ecx # ecx <- BA
6096 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006097 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006098 testl %ecx, %ecx # is object null?
6099 je common_errNullObject
6100 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006101 GET_VREG rINST, rINST # rINST <- v[A]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006102 movzwl 2(rPC), %eax # eax <- field byte offset
6103 movw rINSTw, (%ecx,%eax,1)
6104 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6105
6106
6107/* ------------------------------ */
6108 .balign 128
6109.L_op_iput_short_quick: /* 0xee */
6110/* File: x86/op_iput_short_quick.S */
6111/* File: x86/op_iput_quick.S */
6112 /* For: iput-quick, iput-object-quick */
6113 /* op vA, vB, offset@CCCC */
6114 movzbl rINSTbl, %ecx # ecx <- BA
6115 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006116 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006117 testl %ecx, %ecx # is object null?
6118 je common_errNullObject
6119 andb $0xf, rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006120 GET_VREG rINST, rINST # rINST <- v[A]
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006121 movzwl 2(rPC), %eax # eax <- field byte offset
6122 movw rINSTw, (%ecx,%eax,1)
6123 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6124
6125
6126/* ------------------------------ */
6127 .balign 128
6128.L_op_iget_boolean_quick: /* 0xef */
6129/* File: x86/op_iget_boolean_quick.S */
6130/* File: x86/op_iget_quick.S */
6131 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
6132 /* op vA, vB, offset@CCCC */
6133 movzbl rINSTbl, %ecx # ecx <- BA
6134 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006135 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006136 movzwl 2(rPC), %eax # eax <- field byte offset
6137 testl %ecx, %ecx # is object null?
6138 je common_errNullObject
6139 movsbl (%ecx,%eax,1), %eax
6140 andb $0xf,rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006141 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006142 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6143
6144
6145/* ------------------------------ */
6146 .balign 128
6147.L_op_iget_byte_quick: /* 0xf0 */
6148/* File: x86/op_iget_byte_quick.S */
6149/* File: x86/op_iget_quick.S */
6150 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
6151 /* op vA, vB, offset@CCCC */
6152 movzbl rINSTbl, %ecx # ecx <- BA
6153 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006154 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006155 movzwl 2(rPC), %eax # eax <- field byte offset
6156 testl %ecx, %ecx # is object null?
6157 je common_errNullObject
6158 movsbl (%ecx,%eax,1), %eax
6159 andb $0xf,rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006160 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006161 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6162
6163
6164/* ------------------------------ */
6165 .balign 128
6166.L_op_iget_char_quick: /* 0xf1 */
6167/* File: x86/op_iget_char_quick.S */
6168/* File: x86/op_iget_quick.S */
6169 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
6170 /* op vA, vB, offset@CCCC */
6171 movzbl rINSTbl, %ecx # ecx <- BA
6172 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006173 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006174 movzwl 2(rPC), %eax # eax <- field byte offset
6175 testl %ecx, %ecx # is object null?
6176 je common_errNullObject
6177 movzwl (%ecx,%eax,1), %eax
6178 andb $0xf,rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006179 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006180 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6181
6182
6183/* ------------------------------ */
6184 .balign 128
6185.L_op_iget_short_quick: /* 0xf2 */
6186/* File: x86/op_iget_short_quick.S */
6187/* File: x86/op_iget_quick.S */
6188 /* For: iget-quick, iget-boolean-quick, iget-byte-quick, iget-char-quick, iget-short-quick */
6189 /* op vA, vB, offset@CCCC */
6190 movzbl rINSTbl, %ecx # ecx <- BA
6191 sarl $4, %ecx # ecx <- B
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006192 GET_VREG %ecx, %ecx # vB (object we're operating on)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006193 movzwl 2(rPC), %eax # eax <- field byte offset
6194 testl %ecx, %ecx # is object null?
6195 je common_errNullObject
6196 movswl (%ecx,%eax,1), %eax
6197 andb $0xf,rINSTbl # rINST <- A
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006198 SET_VREG %eax, rINST # fp[A] <- value
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006199 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
6200
6201
6202/* ------------------------------ */
6203 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01006204.L_op_unused_f3: /* 0xf3 */
6205/* File: x86/op_unused_f3.S */
6206/* File: x86/unused.S */
6207/*
6208 * Bail to reference interpreter to throw.
6209 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006210 jmp MterpFallback
6211
6212
6213/* ------------------------------ */
6214 .balign 128
6215.L_op_unused_f4: /* 0xf4 */
6216/* File: x86/op_unused_f4.S */
6217/* File: x86/unused.S */
6218/*
6219 * Bail to reference interpreter to throw.
6220 */
6221 jmp MterpFallback
6222
6223
6224/* ------------------------------ */
6225 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01006226.L_op_unused_f5: /* 0xf5 */
6227/* File: x86/op_unused_f5.S */
6228/* File: x86/unused.S */
6229/*
6230 * Bail to reference interpreter to throw.
6231 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006232 jmp MterpFallback
6233
6234
6235/* ------------------------------ */
6236 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01006237.L_op_unused_f6: /* 0xf6 */
6238/* File: x86/op_unused_f6.S */
6239/* File: x86/unused.S */
6240/*
6241 * Bail to reference interpreter to throw.
6242 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006243 jmp MterpFallback
6244
6245
6246/* ------------------------------ */
6247 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01006248.L_op_unused_f7: /* 0xf7 */
6249/* File: x86/op_unused_f7.S */
6250/* File: x86/unused.S */
6251/*
6252 * Bail to reference interpreter to throw.
6253 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006254 jmp MterpFallback
6255
6256
6257/* ------------------------------ */
6258 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01006259.L_op_unused_f8: /* 0xf8 */
6260/* File: x86/op_unused_f8.S */
6261/* File: x86/unused.S */
6262/*
6263 * Bail to reference interpreter to throw.
6264 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006265 jmp MterpFallback
6266
6267
6268/* ------------------------------ */
6269 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +01006270.L_op_unused_f9: /* 0xf9 */
6271/* File: x86/op_unused_f9.S */
6272/* File: x86/unused.S */
6273/*
6274 * Bail to reference interpreter to throw.
6275 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006276 jmp MterpFallback
6277
6278
6279/* ------------------------------ */
6280 .balign 128
buzbee8a287142016-10-07 12:56:32 -07006281.L_op_invoke_polymorphic: /* 0xfa */
6282/* Transfer stub to alternate interpreter */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006283 jmp MterpFallback
6284
6285
6286/* ------------------------------ */
6287 .balign 128
buzbee8a287142016-10-07 12:56:32 -07006288.L_op_invoke_polymorphic_range: /* 0xfb */
6289/* Transfer stub to alternate interpreter */
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006290 jmp MterpFallback
6291
6292
6293/* ------------------------------ */
6294 .balign 128
6295.L_op_unused_fc: /* 0xfc */
6296/* File: x86/op_unused_fc.S */
6297/* File: x86/unused.S */
6298/*
6299 * Bail to reference interpreter to throw.
6300 */
6301 jmp MterpFallback
6302
6303
6304/* ------------------------------ */
6305 .balign 128
6306.L_op_unused_fd: /* 0xfd */
6307/* File: x86/op_unused_fd.S */
6308/* File: x86/unused.S */
6309/*
6310 * Bail to reference interpreter to throw.
6311 */
6312 jmp MterpFallback
6313
6314
6315/* ------------------------------ */
6316 .balign 128
6317.L_op_unused_fe: /* 0xfe */
6318/* File: x86/op_unused_fe.S */
6319/* File: x86/unused.S */
6320/*
6321 * Bail to reference interpreter to throw.
6322 */
6323 jmp MterpFallback
6324
6325
6326/* ------------------------------ */
6327 .balign 128
6328.L_op_unused_ff: /* 0xff */
6329/* File: x86/op_unused_ff.S */
6330/* File: x86/unused.S */
6331/*
6332 * Bail to reference interpreter to throw.
6333 */
6334 jmp MterpFallback
6335
6336
6337 .balign 128
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006338 SIZE(SYMBOL(artMterpAsmInstructionStart),SYMBOL(artMterpAsmInstructionStart))
6339 .global SYMBOL(artMterpAsmInstructionEnd)
6340SYMBOL(artMterpAsmInstructionEnd):
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006341
6342/*
6343 * ===========================================================================
6344 * Sister implementations
6345 * ===========================================================================
6346 */
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006347 .global SYMBOL(artMterpAsmSisterStart)
6348 FUNCTION_TYPE(SYMBOL(artMterpAsmSisterStart))
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006349 .text
6350 .balign 4
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006351SYMBOL(artMterpAsmSisterStart):
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006352
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006353 SIZE(SYMBOL(artMterpAsmSisterStart),SYMBOL(artMterpAsmSisterStart))
6354 .global SYMBOL(artMterpAsmSisterEnd)
6355SYMBOL(artMterpAsmSisterEnd):
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006356
6357
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006358 .global SYMBOL(artMterpAsmAltInstructionStart)
6359 FUNCTION_TYPE(SYMBOL(artMterpAsmAltInstructionStart))
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006360 .text
6361
Serguei Katkov05dfaaa2016-01-28 08:21:26 +06006362SYMBOL(artMterpAsmAltInstructionStart) = .L_ALT_op_nop
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006363/* ------------------------------ */
6364 .balign 128
6365.L_ALT_op_nop: /* 0x00 */
6366/* File: x86/alt_stub.S */
6367/*
6368 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6369 * any interesting requests and then jump to the real instruction
6370 * handler. Unlike the Arm handler, we can't do this as a tail call
6371 * because rIBASE is caller save and we need to reload it.
6372 *
6373 * Note that unlike in the Arm implementation, we should never arrive
6374 * here with a zero breakFlag because we always refresh rIBASE on
6375 * return.
6376 */
6377 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006378 movl rSELF, %ecx
6379 movl %ecx, OUT_ARG0(%esp)
6380 leal OFF_FP_SHADOWFRAME(rFP), %eax
6381 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006382 movl rPC, OUT_ARG2(%esp)
6383 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006384 REFRESH_IBASE
6385 jmp .L_op_nop+(0*128)
6386
6387/* ------------------------------ */
6388 .balign 128
6389.L_ALT_op_move: /* 0x01 */
6390/* File: x86/alt_stub.S */
6391/*
6392 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6393 * any interesting requests and then jump to the real instruction
6394 * handler. Unlike the Arm handler, we can't do this as a tail call
6395 * because rIBASE is caller save and we need to reload it.
6396 *
6397 * Note that unlike in the Arm implementation, we should never arrive
6398 * here with a zero breakFlag because we always refresh rIBASE on
6399 * return.
6400 */
6401 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006402 movl rSELF, %ecx
6403 movl %ecx, OUT_ARG0(%esp)
6404 leal OFF_FP_SHADOWFRAME(rFP), %eax
6405 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006406 movl rPC, OUT_ARG2(%esp)
6407 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006408 REFRESH_IBASE
6409 jmp .L_op_nop+(1*128)
6410
6411/* ------------------------------ */
6412 .balign 128
6413.L_ALT_op_move_from16: /* 0x02 */
6414/* File: x86/alt_stub.S */
6415/*
6416 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6417 * any interesting requests and then jump to the real instruction
6418 * handler. Unlike the Arm handler, we can't do this as a tail call
6419 * because rIBASE is caller save and we need to reload it.
6420 *
6421 * Note that unlike in the Arm implementation, we should never arrive
6422 * here with a zero breakFlag because we always refresh rIBASE on
6423 * return.
6424 */
6425 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006426 movl rSELF, %ecx
6427 movl %ecx, OUT_ARG0(%esp)
6428 leal OFF_FP_SHADOWFRAME(rFP), %eax
6429 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006430 movl rPC, OUT_ARG2(%esp)
6431 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006432 REFRESH_IBASE
6433 jmp .L_op_nop+(2*128)
6434
6435/* ------------------------------ */
6436 .balign 128
6437.L_ALT_op_move_16: /* 0x03 */
6438/* File: x86/alt_stub.S */
6439/*
6440 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6441 * any interesting requests and then jump to the real instruction
6442 * handler. Unlike the Arm handler, we can't do this as a tail call
6443 * because rIBASE is caller save and we need to reload it.
6444 *
6445 * Note that unlike in the Arm implementation, we should never arrive
6446 * here with a zero breakFlag because we always refresh rIBASE on
6447 * return.
6448 */
6449 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006450 movl rSELF, %ecx
6451 movl %ecx, OUT_ARG0(%esp)
6452 leal OFF_FP_SHADOWFRAME(rFP), %eax
6453 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006454 movl rPC, OUT_ARG2(%esp)
6455 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006456 REFRESH_IBASE
6457 jmp .L_op_nop+(3*128)
6458
6459/* ------------------------------ */
6460 .balign 128
6461.L_ALT_op_move_wide: /* 0x04 */
6462/* File: x86/alt_stub.S */
6463/*
6464 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6465 * any interesting requests and then jump to the real instruction
6466 * handler. Unlike the Arm handler, we can't do this as a tail call
6467 * because rIBASE is caller save and we need to reload it.
6468 *
6469 * Note that unlike in the Arm implementation, we should never arrive
6470 * here with a zero breakFlag because we always refresh rIBASE on
6471 * return.
6472 */
6473 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006474 movl rSELF, %ecx
6475 movl %ecx, OUT_ARG0(%esp)
6476 leal OFF_FP_SHADOWFRAME(rFP), %eax
6477 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006478 movl rPC, OUT_ARG2(%esp)
6479 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006480 REFRESH_IBASE
6481 jmp .L_op_nop+(4*128)
6482
6483/* ------------------------------ */
6484 .balign 128
6485.L_ALT_op_move_wide_from16: /* 0x05 */
6486/* File: x86/alt_stub.S */
6487/*
6488 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6489 * any interesting requests and then jump to the real instruction
6490 * handler. Unlike the Arm handler, we can't do this as a tail call
6491 * because rIBASE is caller save and we need to reload it.
6492 *
6493 * Note that unlike in the Arm implementation, we should never arrive
6494 * here with a zero breakFlag because we always refresh rIBASE on
6495 * return.
6496 */
6497 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006498 movl rSELF, %ecx
6499 movl %ecx, OUT_ARG0(%esp)
6500 leal OFF_FP_SHADOWFRAME(rFP), %eax
6501 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006502 movl rPC, OUT_ARG2(%esp)
6503 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006504 REFRESH_IBASE
6505 jmp .L_op_nop+(5*128)
6506
6507/* ------------------------------ */
6508 .balign 128
6509.L_ALT_op_move_wide_16: /* 0x06 */
6510/* File: x86/alt_stub.S */
6511/*
6512 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6513 * any interesting requests and then jump to the real instruction
6514 * handler. Unlike the Arm handler, we can't do this as a tail call
6515 * because rIBASE is caller save and we need to reload it.
6516 *
6517 * Note that unlike in the Arm implementation, we should never arrive
6518 * here with a zero breakFlag because we always refresh rIBASE on
6519 * return.
6520 */
6521 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006522 movl rSELF, %ecx
6523 movl %ecx, OUT_ARG0(%esp)
6524 leal OFF_FP_SHADOWFRAME(rFP), %eax
6525 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006526 movl rPC, OUT_ARG2(%esp)
6527 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006528 REFRESH_IBASE
6529 jmp .L_op_nop+(6*128)
6530
6531/* ------------------------------ */
6532 .balign 128
6533.L_ALT_op_move_object: /* 0x07 */
6534/* File: x86/alt_stub.S */
6535/*
6536 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6537 * any interesting requests and then jump to the real instruction
6538 * handler. Unlike the Arm handler, we can't do this as a tail call
6539 * because rIBASE is caller save and we need to reload it.
6540 *
6541 * Note that unlike in the Arm implementation, we should never arrive
6542 * here with a zero breakFlag because we always refresh rIBASE on
6543 * return.
6544 */
6545 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006546 movl rSELF, %ecx
6547 movl %ecx, OUT_ARG0(%esp)
6548 leal OFF_FP_SHADOWFRAME(rFP), %eax
6549 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006550 movl rPC, OUT_ARG2(%esp)
6551 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006552 REFRESH_IBASE
6553 jmp .L_op_nop+(7*128)
6554
6555/* ------------------------------ */
6556 .balign 128
6557.L_ALT_op_move_object_from16: /* 0x08 */
6558/* File: x86/alt_stub.S */
6559/*
6560 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6561 * any interesting requests and then jump to the real instruction
6562 * handler. Unlike the Arm handler, we can't do this as a tail call
6563 * because rIBASE is caller save and we need to reload it.
6564 *
6565 * Note that unlike in the Arm implementation, we should never arrive
6566 * here with a zero breakFlag because we always refresh rIBASE on
6567 * return.
6568 */
6569 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006570 movl rSELF, %ecx
6571 movl %ecx, OUT_ARG0(%esp)
6572 leal OFF_FP_SHADOWFRAME(rFP), %eax
6573 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006574 movl rPC, OUT_ARG2(%esp)
6575 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006576 REFRESH_IBASE
6577 jmp .L_op_nop+(8*128)
6578
6579/* ------------------------------ */
6580 .balign 128
6581.L_ALT_op_move_object_16: /* 0x09 */
6582/* File: x86/alt_stub.S */
6583/*
6584 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6585 * any interesting requests and then jump to the real instruction
6586 * handler. Unlike the Arm handler, we can't do this as a tail call
6587 * because rIBASE is caller save and we need to reload it.
6588 *
6589 * Note that unlike in the Arm implementation, we should never arrive
6590 * here with a zero breakFlag because we always refresh rIBASE on
6591 * return.
6592 */
6593 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006594 movl rSELF, %ecx
6595 movl %ecx, OUT_ARG0(%esp)
6596 leal OFF_FP_SHADOWFRAME(rFP), %eax
6597 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006598 movl rPC, OUT_ARG2(%esp)
6599 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006600 REFRESH_IBASE
6601 jmp .L_op_nop+(9*128)
6602
6603/* ------------------------------ */
6604 .balign 128
6605.L_ALT_op_move_result: /* 0x0a */
6606/* File: x86/alt_stub.S */
6607/*
6608 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6609 * any interesting requests and then jump to the real instruction
6610 * handler. Unlike the Arm handler, we can't do this as a tail call
6611 * because rIBASE is caller save and we need to reload it.
6612 *
6613 * Note that unlike in the Arm implementation, we should never arrive
6614 * here with a zero breakFlag because we always refresh rIBASE on
6615 * return.
6616 */
6617 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006618 movl rSELF, %ecx
6619 movl %ecx, OUT_ARG0(%esp)
6620 leal OFF_FP_SHADOWFRAME(rFP), %eax
6621 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006622 movl rPC, OUT_ARG2(%esp)
6623 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006624 REFRESH_IBASE
6625 jmp .L_op_nop+(10*128)
6626
6627/* ------------------------------ */
6628 .balign 128
6629.L_ALT_op_move_result_wide: /* 0x0b */
6630/* File: x86/alt_stub.S */
6631/*
6632 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6633 * any interesting requests and then jump to the real instruction
6634 * handler. Unlike the Arm handler, we can't do this as a tail call
6635 * because rIBASE is caller save and we need to reload it.
6636 *
6637 * Note that unlike in the Arm implementation, we should never arrive
6638 * here with a zero breakFlag because we always refresh rIBASE on
6639 * return.
6640 */
6641 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006642 movl rSELF, %ecx
6643 movl %ecx, OUT_ARG0(%esp)
6644 leal OFF_FP_SHADOWFRAME(rFP), %eax
6645 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006646 movl rPC, OUT_ARG2(%esp)
6647 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006648 REFRESH_IBASE
6649 jmp .L_op_nop+(11*128)
6650
6651/* ------------------------------ */
6652 .balign 128
6653.L_ALT_op_move_result_object: /* 0x0c */
6654/* File: x86/alt_stub.S */
6655/*
6656 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6657 * any interesting requests and then jump to the real instruction
6658 * handler. Unlike the Arm handler, we can't do this as a tail call
6659 * because rIBASE is caller save and we need to reload it.
6660 *
6661 * Note that unlike in the Arm implementation, we should never arrive
6662 * here with a zero breakFlag because we always refresh rIBASE on
6663 * return.
6664 */
6665 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006666 movl rSELF, %ecx
6667 movl %ecx, OUT_ARG0(%esp)
6668 leal OFF_FP_SHADOWFRAME(rFP), %eax
6669 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006670 movl rPC, OUT_ARG2(%esp)
6671 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006672 REFRESH_IBASE
6673 jmp .L_op_nop+(12*128)
6674
6675/* ------------------------------ */
6676 .balign 128
6677.L_ALT_op_move_exception: /* 0x0d */
6678/* File: x86/alt_stub.S */
6679/*
6680 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6681 * any interesting requests and then jump to the real instruction
6682 * handler. Unlike the Arm handler, we can't do this as a tail call
6683 * because rIBASE is caller save and we need to reload it.
6684 *
6685 * Note that unlike in the Arm implementation, we should never arrive
6686 * here with a zero breakFlag because we always refresh rIBASE on
6687 * return.
6688 */
6689 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006690 movl rSELF, %ecx
6691 movl %ecx, OUT_ARG0(%esp)
6692 leal OFF_FP_SHADOWFRAME(rFP), %eax
6693 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006694 movl rPC, OUT_ARG2(%esp)
6695 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006696 REFRESH_IBASE
6697 jmp .L_op_nop+(13*128)
6698
6699/* ------------------------------ */
6700 .balign 128
6701.L_ALT_op_return_void: /* 0x0e */
6702/* File: x86/alt_stub.S */
6703/*
6704 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6705 * any interesting requests and then jump to the real instruction
6706 * handler. Unlike the Arm handler, we can't do this as a tail call
6707 * because rIBASE is caller save and we need to reload it.
6708 *
6709 * Note that unlike in the Arm implementation, we should never arrive
6710 * here with a zero breakFlag because we always refresh rIBASE on
6711 * return.
6712 */
6713 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006714 movl rSELF, %ecx
6715 movl %ecx, OUT_ARG0(%esp)
6716 leal OFF_FP_SHADOWFRAME(rFP), %eax
6717 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006718 movl rPC, OUT_ARG2(%esp)
6719 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006720 REFRESH_IBASE
6721 jmp .L_op_nop+(14*128)
6722
6723/* ------------------------------ */
6724 .balign 128
6725.L_ALT_op_return: /* 0x0f */
6726/* File: x86/alt_stub.S */
6727/*
6728 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6729 * any interesting requests and then jump to the real instruction
6730 * handler. Unlike the Arm handler, we can't do this as a tail call
6731 * because rIBASE is caller save and we need to reload it.
6732 *
6733 * Note that unlike in the Arm implementation, we should never arrive
6734 * here with a zero breakFlag because we always refresh rIBASE on
6735 * return.
6736 */
6737 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006738 movl rSELF, %ecx
6739 movl %ecx, OUT_ARG0(%esp)
6740 leal OFF_FP_SHADOWFRAME(rFP), %eax
6741 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006742 movl rPC, OUT_ARG2(%esp)
6743 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006744 REFRESH_IBASE
6745 jmp .L_op_nop+(15*128)
6746
6747/* ------------------------------ */
6748 .balign 128
6749.L_ALT_op_return_wide: /* 0x10 */
6750/* File: x86/alt_stub.S */
6751/*
6752 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6753 * any interesting requests and then jump to the real instruction
6754 * handler. Unlike the Arm handler, we can't do this as a tail call
6755 * because rIBASE is caller save and we need to reload it.
6756 *
6757 * Note that unlike in the Arm implementation, we should never arrive
6758 * here with a zero breakFlag because we always refresh rIBASE on
6759 * return.
6760 */
6761 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006762 movl rSELF, %ecx
6763 movl %ecx, OUT_ARG0(%esp)
6764 leal OFF_FP_SHADOWFRAME(rFP), %eax
6765 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006766 movl rPC, OUT_ARG2(%esp)
6767 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006768 REFRESH_IBASE
6769 jmp .L_op_nop+(16*128)
6770
6771/* ------------------------------ */
6772 .balign 128
6773.L_ALT_op_return_object: /* 0x11 */
6774/* File: x86/alt_stub.S */
6775/*
6776 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6777 * any interesting requests and then jump to the real instruction
6778 * handler. Unlike the Arm handler, we can't do this as a tail call
6779 * because rIBASE is caller save and we need to reload it.
6780 *
6781 * Note that unlike in the Arm implementation, we should never arrive
6782 * here with a zero breakFlag because we always refresh rIBASE on
6783 * return.
6784 */
6785 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006786 movl rSELF, %ecx
6787 movl %ecx, OUT_ARG0(%esp)
6788 leal OFF_FP_SHADOWFRAME(rFP), %eax
6789 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006790 movl rPC, OUT_ARG2(%esp)
6791 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006792 REFRESH_IBASE
6793 jmp .L_op_nop+(17*128)
6794
6795/* ------------------------------ */
6796 .balign 128
6797.L_ALT_op_const_4: /* 0x12 */
6798/* File: x86/alt_stub.S */
6799/*
6800 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6801 * any interesting requests and then jump to the real instruction
6802 * handler. Unlike the Arm handler, we can't do this as a tail call
6803 * because rIBASE is caller save and we need to reload it.
6804 *
6805 * Note that unlike in the Arm implementation, we should never arrive
6806 * here with a zero breakFlag because we always refresh rIBASE on
6807 * return.
6808 */
6809 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006810 movl rSELF, %ecx
6811 movl %ecx, OUT_ARG0(%esp)
6812 leal OFF_FP_SHADOWFRAME(rFP), %eax
6813 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006814 movl rPC, OUT_ARG2(%esp)
6815 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006816 REFRESH_IBASE
6817 jmp .L_op_nop+(18*128)
6818
6819/* ------------------------------ */
6820 .balign 128
6821.L_ALT_op_const_16: /* 0x13 */
6822/* File: x86/alt_stub.S */
6823/*
6824 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6825 * any interesting requests and then jump to the real instruction
6826 * handler. Unlike the Arm handler, we can't do this as a tail call
6827 * because rIBASE is caller save and we need to reload it.
6828 *
6829 * Note that unlike in the Arm implementation, we should never arrive
6830 * here with a zero breakFlag because we always refresh rIBASE on
6831 * return.
6832 */
6833 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006834 movl rSELF, %ecx
6835 movl %ecx, OUT_ARG0(%esp)
6836 leal OFF_FP_SHADOWFRAME(rFP), %eax
6837 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006838 movl rPC, OUT_ARG2(%esp)
6839 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006840 REFRESH_IBASE
6841 jmp .L_op_nop+(19*128)
6842
6843/* ------------------------------ */
6844 .balign 128
6845.L_ALT_op_const: /* 0x14 */
6846/* File: x86/alt_stub.S */
6847/*
6848 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6849 * any interesting requests and then jump to the real instruction
6850 * handler. Unlike the Arm handler, we can't do this as a tail call
6851 * because rIBASE is caller save and we need to reload it.
6852 *
6853 * Note that unlike in the Arm implementation, we should never arrive
6854 * here with a zero breakFlag because we always refresh rIBASE on
6855 * return.
6856 */
6857 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006858 movl rSELF, %ecx
6859 movl %ecx, OUT_ARG0(%esp)
6860 leal OFF_FP_SHADOWFRAME(rFP), %eax
6861 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006862 movl rPC, OUT_ARG2(%esp)
6863 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006864 REFRESH_IBASE
6865 jmp .L_op_nop+(20*128)
6866
6867/* ------------------------------ */
6868 .balign 128
6869.L_ALT_op_const_high16: /* 0x15 */
6870/* File: x86/alt_stub.S */
6871/*
6872 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6873 * any interesting requests and then jump to the real instruction
6874 * handler. Unlike the Arm handler, we can't do this as a tail call
6875 * because rIBASE is caller save and we need to reload it.
6876 *
6877 * Note that unlike in the Arm implementation, we should never arrive
6878 * here with a zero breakFlag because we always refresh rIBASE on
6879 * return.
6880 */
6881 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006882 movl rSELF, %ecx
6883 movl %ecx, OUT_ARG0(%esp)
6884 leal OFF_FP_SHADOWFRAME(rFP), %eax
6885 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006886 movl rPC, OUT_ARG2(%esp)
6887 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006888 REFRESH_IBASE
6889 jmp .L_op_nop+(21*128)
6890
6891/* ------------------------------ */
6892 .balign 128
6893.L_ALT_op_const_wide_16: /* 0x16 */
6894/* File: x86/alt_stub.S */
6895/*
6896 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6897 * any interesting requests and then jump to the real instruction
6898 * handler. Unlike the Arm handler, we can't do this as a tail call
6899 * because rIBASE is caller save and we need to reload it.
6900 *
6901 * Note that unlike in the Arm implementation, we should never arrive
6902 * here with a zero breakFlag because we always refresh rIBASE on
6903 * return.
6904 */
6905 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006906 movl rSELF, %ecx
6907 movl %ecx, OUT_ARG0(%esp)
6908 leal OFF_FP_SHADOWFRAME(rFP), %eax
6909 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006910 movl rPC, OUT_ARG2(%esp)
6911 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006912 REFRESH_IBASE
6913 jmp .L_op_nop+(22*128)
6914
6915/* ------------------------------ */
6916 .balign 128
6917.L_ALT_op_const_wide_32: /* 0x17 */
6918/* File: x86/alt_stub.S */
6919/*
6920 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6921 * any interesting requests and then jump to the real instruction
6922 * handler. Unlike the Arm handler, we can't do this as a tail call
6923 * because rIBASE is caller save and we need to reload it.
6924 *
6925 * Note that unlike in the Arm implementation, we should never arrive
6926 * here with a zero breakFlag because we always refresh rIBASE on
6927 * return.
6928 */
6929 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006930 movl rSELF, %ecx
6931 movl %ecx, OUT_ARG0(%esp)
6932 leal OFF_FP_SHADOWFRAME(rFP), %eax
6933 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006934 movl rPC, OUT_ARG2(%esp)
6935 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006936 REFRESH_IBASE
6937 jmp .L_op_nop+(23*128)
6938
6939/* ------------------------------ */
6940 .balign 128
6941.L_ALT_op_const_wide: /* 0x18 */
6942/* File: x86/alt_stub.S */
6943/*
6944 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6945 * any interesting requests and then jump to the real instruction
6946 * handler. Unlike the Arm handler, we can't do this as a tail call
6947 * because rIBASE is caller save and we need to reload it.
6948 *
6949 * Note that unlike in the Arm implementation, we should never arrive
6950 * here with a zero breakFlag because we always refresh rIBASE on
6951 * return.
6952 */
6953 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006954 movl rSELF, %ecx
6955 movl %ecx, OUT_ARG0(%esp)
6956 leal OFF_FP_SHADOWFRAME(rFP), %eax
6957 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006958 movl rPC, OUT_ARG2(%esp)
6959 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006960 REFRESH_IBASE
6961 jmp .L_op_nop+(24*128)
6962
6963/* ------------------------------ */
6964 .balign 128
6965.L_ALT_op_const_wide_high16: /* 0x19 */
6966/* File: x86/alt_stub.S */
6967/*
6968 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6969 * any interesting requests and then jump to the real instruction
6970 * handler. Unlike the Arm handler, we can't do this as a tail call
6971 * because rIBASE is caller save and we need to reload it.
6972 *
6973 * Note that unlike in the Arm implementation, we should never arrive
6974 * here with a zero breakFlag because we always refresh rIBASE on
6975 * return.
6976 */
6977 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006978 movl rSELF, %ecx
6979 movl %ecx, OUT_ARG0(%esp)
6980 leal OFF_FP_SHADOWFRAME(rFP), %eax
6981 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00006982 movl rPC, OUT_ARG2(%esp)
6983 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00006984 REFRESH_IBASE
6985 jmp .L_op_nop+(25*128)
6986
6987/* ------------------------------ */
6988 .balign 128
6989.L_ALT_op_const_string: /* 0x1a */
6990/* File: x86/alt_stub.S */
6991/*
6992 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
6993 * any interesting requests and then jump to the real instruction
6994 * handler. Unlike the Arm handler, we can't do this as a tail call
6995 * because rIBASE is caller save and we need to reload it.
6996 *
6997 * Note that unlike in the Arm implementation, we should never arrive
6998 * here with a zero breakFlag because we always refresh rIBASE on
6999 * return.
7000 */
7001 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007002 movl rSELF, %ecx
7003 movl %ecx, OUT_ARG0(%esp)
7004 leal OFF_FP_SHADOWFRAME(rFP), %eax
7005 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007006 movl rPC, OUT_ARG2(%esp)
7007 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007008 REFRESH_IBASE
7009 jmp .L_op_nop+(26*128)
7010
7011/* ------------------------------ */
7012 .balign 128
7013.L_ALT_op_const_string_jumbo: /* 0x1b */
7014/* File: x86/alt_stub.S */
7015/*
7016 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7017 * any interesting requests and then jump to the real instruction
7018 * handler. Unlike the Arm handler, we can't do this as a tail call
7019 * because rIBASE is caller save and we need to reload it.
7020 *
7021 * Note that unlike in the Arm implementation, we should never arrive
7022 * here with a zero breakFlag because we always refresh rIBASE on
7023 * return.
7024 */
7025 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007026 movl rSELF, %ecx
7027 movl %ecx, OUT_ARG0(%esp)
7028 leal OFF_FP_SHADOWFRAME(rFP), %eax
7029 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007030 movl rPC, OUT_ARG2(%esp)
7031 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007032 REFRESH_IBASE
7033 jmp .L_op_nop+(27*128)
7034
7035/* ------------------------------ */
7036 .balign 128
7037.L_ALT_op_const_class: /* 0x1c */
7038/* File: x86/alt_stub.S */
7039/*
7040 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7041 * any interesting requests and then jump to the real instruction
7042 * handler. Unlike the Arm handler, we can't do this as a tail call
7043 * because rIBASE is caller save and we need to reload it.
7044 *
7045 * Note that unlike in the Arm implementation, we should never arrive
7046 * here with a zero breakFlag because we always refresh rIBASE on
7047 * return.
7048 */
7049 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007050 movl rSELF, %ecx
7051 movl %ecx, OUT_ARG0(%esp)
7052 leal OFF_FP_SHADOWFRAME(rFP), %eax
7053 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007054 movl rPC, OUT_ARG2(%esp)
7055 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007056 REFRESH_IBASE
7057 jmp .L_op_nop+(28*128)
7058
7059/* ------------------------------ */
7060 .balign 128
7061.L_ALT_op_monitor_enter: /* 0x1d */
7062/* File: x86/alt_stub.S */
7063/*
7064 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7065 * any interesting requests and then jump to the real instruction
7066 * handler. Unlike the Arm handler, we can't do this as a tail call
7067 * because rIBASE is caller save and we need to reload it.
7068 *
7069 * Note that unlike in the Arm implementation, we should never arrive
7070 * here with a zero breakFlag because we always refresh rIBASE on
7071 * return.
7072 */
7073 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007074 movl rSELF, %ecx
7075 movl %ecx, OUT_ARG0(%esp)
7076 leal OFF_FP_SHADOWFRAME(rFP), %eax
7077 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007078 movl rPC, OUT_ARG2(%esp)
7079 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007080 REFRESH_IBASE
7081 jmp .L_op_nop+(29*128)
7082
7083/* ------------------------------ */
7084 .balign 128
7085.L_ALT_op_monitor_exit: /* 0x1e */
7086/* File: x86/alt_stub.S */
7087/*
7088 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7089 * any interesting requests and then jump to the real instruction
7090 * handler. Unlike the Arm handler, we can't do this as a tail call
7091 * because rIBASE is caller save and we need to reload it.
7092 *
7093 * Note that unlike in the Arm implementation, we should never arrive
7094 * here with a zero breakFlag because we always refresh rIBASE on
7095 * return.
7096 */
7097 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007098 movl rSELF, %ecx
7099 movl %ecx, OUT_ARG0(%esp)
7100 leal OFF_FP_SHADOWFRAME(rFP), %eax
7101 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007102 movl rPC, OUT_ARG2(%esp)
7103 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007104 REFRESH_IBASE
7105 jmp .L_op_nop+(30*128)
7106
7107/* ------------------------------ */
7108 .balign 128
7109.L_ALT_op_check_cast: /* 0x1f */
7110/* File: x86/alt_stub.S */
7111/*
7112 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7113 * any interesting requests and then jump to the real instruction
7114 * handler. Unlike the Arm handler, we can't do this as a tail call
7115 * because rIBASE is caller save and we need to reload it.
7116 *
7117 * Note that unlike in the Arm implementation, we should never arrive
7118 * here with a zero breakFlag because we always refresh rIBASE on
7119 * return.
7120 */
7121 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007122 movl rSELF, %ecx
7123 movl %ecx, OUT_ARG0(%esp)
7124 leal OFF_FP_SHADOWFRAME(rFP), %eax
7125 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007126 movl rPC, OUT_ARG2(%esp)
7127 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007128 REFRESH_IBASE
7129 jmp .L_op_nop+(31*128)
7130
7131/* ------------------------------ */
7132 .balign 128
7133.L_ALT_op_instance_of: /* 0x20 */
7134/* File: x86/alt_stub.S */
7135/*
7136 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7137 * any interesting requests and then jump to the real instruction
7138 * handler. Unlike the Arm handler, we can't do this as a tail call
7139 * because rIBASE is caller save and we need to reload it.
7140 *
7141 * Note that unlike in the Arm implementation, we should never arrive
7142 * here with a zero breakFlag because we always refresh rIBASE on
7143 * return.
7144 */
7145 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007146 movl rSELF, %ecx
7147 movl %ecx, OUT_ARG0(%esp)
7148 leal OFF_FP_SHADOWFRAME(rFP), %eax
7149 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007150 movl rPC, OUT_ARG2(%esp)
7151 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007152 REFRESH_IBASE
7153 jmp .L_op_nop+(32*128)
7154
7155/* ------------------------------ */
7156 .balign 128
7157.L_ALT_op_array_length: /* 0x21 */
7158/* File: x86/alt_stub.S */
7159/*
7160 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7161 * any interesting requests and then jump to the real instruction
7162 * handler. Unlike the Arm handler, we can't do this as a tail call
7163 * because rIBASE is caller save and we need to reload it.
7164 *
7165 * Note that unlike in the Arm implementation, we should never arrive
7166 * here with a zero breakFlag because we always refresh rIBASE on
7167 * return.
7168 */
7169 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007170 movl rSELF, %ecx
7171 movl %ecx, OUT_ARG0(%esp)
7172 leal OFF_FP_SHADOWFRAME(rFP), %eax
7173 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007174 movl rPC, OUT_ARG2(%esp)
7175 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007176 REFRESH_IBASE
7177 jmp .L_op_nop+(33*128)
7178
7179/* ------------------------------ */
7180 .balign 128
7181.L_ALT_op_new_instance: /* 0x22 */
7182/* File: x86/alt_stub.S */
7183/*
7184 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7185 * any interesting requests and then jump to the real instruction
7186 * handler. Unlike the Arm handler, we can't do this as a tail call
7187 * because rIBASE is caller save and we need to reload it.
7188 *
7189 * Note that unlike in the Arm implementation, we should never arrive
7190 * here with a zero breakFlag because we always refresh rIBASE on
7191 * return.
7192 */
7193 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007194 movl rSELF, %ecx
7195 movl %ecx, OUT_ARG0(%esp)
7196 leal OFF_FP_SHADOWFRAME(rFP), %eax
7197 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007198 movl rPC, OUT_ARG2(%esp)
7199 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007200 REFRESH_IBASE
7201 jmp .L_op_nop+(34*128)
7202
7203/* ------------------------------ */
7204 .balign 128
7205.L_ALT_op_new_array: /* 0x23 */
7206/* File: x86/alt_stub.S */
7207/*
7208 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7209 * any interesting requests and then jump to the real instruction
7210 * handler. Unlike the Arm handler, we can't do this as a tail call
7211 * because rIBASE is caller save and we need to reload it.
7212 *
7213 * Note that unlike in the Arm implementation, we should never arrive
7214 * here with a zero breakFlag because we always refresh rIBASE on
7215 * return.
7216 */
7217 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007218 movl rSELF, %ecx
7219 movl %ecx, OUT_ARG0(%esp)
7220 leal OFF_FP_SHADOWFRAME(rFP), %eax
7221 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007222 movl rPC, OUT_ARG2(%esp)
7223 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007224 REFRESH_IBASE
7225 jmp .L_op_nop+(35*128)
7226
7227/* ------------------------------ */
7228 .balign 128
7229.L_ALT_op_filled_new_array: /* 0x24 */
7230/* File: x86/alt_stub.S */
7231/*
7232 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7233 * any interesting requests and then jump to the real instruction
7234 * handler. Unlike the Arm handler, we can't do this as a tail call
7235 * because rIBASE is caller save and we need to reload it.
7236 *
7237 * Note that unlike in the Arm implementation, we should never arrive
7238 * here with a zero breakFlag because we always refresh rIBASE on
7239 * return.
7240 */
7241 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007242 movl rSELF, %ecx
7243 movl %ecx, OUT_ARG0(%esp)
7244 leal OFF_FP_SHADOWFRAME(rFP), %eax
7245 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007246 movl rPC, OUT_ARG2(%esp)
7247 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007248 REFRESH_IBASE
7249 jmp .L_op_nop+(36*128)
7250
7251/* ------------------------------ */
7252 .balign 128
7253.L_ALT_op_filled_new_array_range: /* 0x25 */
7254/* File: x86/alt_stub.S */
7255/*
7256 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7257 * any interesting requests and then jump to the real instruction
7258 * handler. Unlike the Arm handler, we can't do this as a tail call
7259 * because rIBASE is caller save and we need to reload it.
7260 *
7261 * Note that unlike in the Arm implementation, we should never arrive
7262 * here with a zero breakFlag because we always refresh rIBASE on
7263 * return.
7264 */
7265 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007266 movl rSELF, %ecx
7267 movl %ecx, OUT_ARG0(%esp)
7268 leal OFF_FP_SHADOWFRAME(rFP), %eax
7269 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007270 movl rPC, OUT_ARG2(%esp)
7271 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007272 REFRESH_IBASE
7273 jmp .L_op_nop+(37*128)
7274
7275/* ------------------------------ */
7276 .balign 128
7277.L_ALT_op_fill_array_data: /* 0x26 */
7278/* File: x86/alt_stub.S */
7279/*
7280 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7281 * any interesting requests and then jump to the real instruction
7282 * handler. Unlike the Arm handler, we can't do this as a tail call
7283 * because rIBASE is caller save and we need to reload it.
7284 *
7285 * Note that unlike in the Arm implementation, we should never arrive
7286 * here with a zero breakFlag because we always refresh rIBASE on
7287 * return.
7288 */
7289 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007290 movl rSELF, %ecx
7291 movl %ecx, OUT_ARG0(%esp)
7292 leal OFF_FP_SHADOWFRAME(rFP), %eax
7293 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007294 movl rPC, OUT_ARG2(%esp)
7295 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007296 REFRESH_IBASE
7297 jmp .L_op_nop+(38*128)
7298
7299/* ------------------------------ */
7300 .balign 128
7301.L_ALT_op_throw: /* 0x27 */
7302/* File: x86/alt_stub.S */
7303/*
7304 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7305 * any interesting requests and then jump to the real instruction
7306 * handler. Unlike the Arm handler, we can't do this as a tail call
7307 * because rIBASE is caller save and we need to reload it.
7308 *
7309 * Note that unlike in the Arm implementation, we should never arrive
7310 * here with a zero breakFlag because we always refresh rIBASE on
7311 * return.
7312 */
7313 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007314 movl rSELF, %ecx
7315 movl %ecx, OUT_ARG0(%esp)
7316 leal OFF_FP_SHADOWFRAME(rFP), %eax
7317 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007318 movl rPC, OUT_ARG2(%esp)
7319 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007320 REFRESH_IBASE
7321 jmp .L_op_nop+(39*128)
7322
7323/* ------------------------------ */
7324 .balign 128
7325.L_ALT_op_goto: /* 0x28 */
7326/* File: x86/alt_stub.S */
7327/*
7328 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7329 * any interesting requests and then jump to the real instruction
7330 * handler. Unlike the Arm handler, we can't do this as a tail call
7331 * because rIBASE is caller save and we need to reload it.
7332 *
7333 * Note that unlike in the Arm implementation, we should never arrive
7334 * here with a zero breakFlag because we always refresh rIBASE on
7335 * return.
7336 */
7337 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007338 movl rSELF, %ecx
7339 movl %ecx, OUT_ARG0(%esp)
7340 leal OFF_FP_SHADOWFRAME(rFP), %eax
7341 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007342 movl rPC, OUT_ARG2(%esp)
7343 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007344 REFRESH_IBASE
7345 jmp .L_op_nop+(40*128)
7346
7347/* ------------------------------ */
7348 .balign 128
7349.L_ALT_op_goto_16: /* 0x29 */
7350/* File: x86/alt_stub.S */
7351/*
7352 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7353 * any interesting requests and then jump to the real instruction
7354 * handler. Unlike the Arm handler, we can't do this as a tail call
7355 * because rIBASE is caller save and we need to reload it.
7356 *
7357 * Note that unlike in the Arm implementation, we should never arrive
7358 * here with a zero breakFlag because we always refresh rIBASE on
7359 * return.
7360 */
7361 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007362 movl rSELF, %ecx
7363 movl %ecx, OUT_ARG0(%esp)
7364 leal OFF_FP_SHADOWFRAME(rFP), %eax
7365 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007366 movl rPC, OUT_ARG2(%esp)
7367 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007368 REFRESH_IBASE
7369 jmp .L_op_nop+(41*128)
7370
7371/* ------------------------------ */
7372 .balign 128
7373.L_ALT_op_goto_32: /* 0x2a */
7374/* File: x86/alt_stub.S */
7375/*
7376 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7377 * any interesting requests and then jump to the real instruction
7378 * handler. Unlike the Arm handler, we can't do this as a tail call
7379 * because rIBASE is caller save and we need to reload it.
7380 *
7381 * Note that unlike in the Arm implementation, we should never arrive
7382 * here with a zero breakFlag because we always refresh rIBASE on
7383 * return.
7384 */
7385 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007386 movl rSELF, %ecx
7387 movl %ecx, OUT_ARG0(%esp)
7388 leal OFF_FP_SHADOWFRAME(rFP), %eax
7389 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007390 movl rPC, OUT_ARG2(%esp)
7391 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007392 REFRESH_IBASE
7393 jmp .L_op_nop+(42*128)
7394
7395/* ------------------------------ */
7396 .balign 128
7397.L_ALT_op_packed_switch: /* 0x2b */
7398/* File: x86/alt_stub.S */
7399/*
7400 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7401 * any interesting requests and then jump to the real instruction
7402 * handler. Unlike the Arm handler, we can't do this as a tail call
7403 * because rIBASE is caller save and we need to reload it.
7404 *
7405 * Note that unlike in the Arm implementation, we should never arrive
7406 * here with a zero breakFlag because we always refresh rIBASE on
7407 * return.
7408 */
7409 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007410 movl rSELF, %ecx
7411 movl %ecx, OUT_ARG0(%esp)
7412 leal OFF_FP_SHADOWFRAME(rFP), %eax
7413 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007414 movl rPC, OUT_ARG2(%esp)
7415 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007416 REFRESH_IBASE
7417 jmp .L_op_nop+(43*128)
7418
7419/* ------------------------------ */
7420 .balign 128
7421.L_ALT_op_sparse_switch: /* 0x2c */
7422/* File: x86/alt_stub.S */
7423/*
7424 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7425 * any interesting requests and then jump to the real instruction
7426 * handler. Unlike the Arm handler, we can't do this as a tail call
7427 * because rIBASE is caller save and we need to reload it.
7428 *
7429 * Note that unlike in the Arm implementation, we should never arrive
7430 * here with a zero breakFlag because we always refresh rIBASE on
7431 * return.
7432 */
7433 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007434 movl rSELF, %ecx
7435 movl %ecx, OUT_ARG0(%esp)
7436 leal OFF_FP_SHADOWFRAME(rFP), %eax
7437 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007438 movl rPC, OUT_ARG2(%esp)
7439 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007440 REFRESH_IBASE
7441 jmp .L_op_nop+(44*128)
7442
7443/* ------------------------------ */
7444 .balign 128
7445.L_ALT_op_cmpl_float: /* 0x2d */
7446/* File: x86/alt_stub.S */
7447/*
7448 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7449 * any interesting requests and then jump to the real instruction
7450 * handler. Unlike the Arm handler, we can't do this as a tail call
7451 * because rIBASE is caller save and we need to reload it.
7452 *
7453 * Note that unlike in the Arm implementation, we should never arrive
7454 * here with a zero breakFlag because we always refresh rIBASE on
7455 * return.
7456 */
7457 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007458 movl rSELF, %ecx
7459 movl %ecx, OUT_ARG0(%esp)
7460 leal OFF_FP_SHADOWFRAME(rFP), %eax
7461 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007462 movl rPC, OUT_ARG2(%esp)
7463 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007464 REFRESH_IBASE
7465 jmp .L_op_nop+(45*128)
7466
7467/* ------------------------------ */
7468 .balign 128
7469.L_ALT_op_cmpg_float: /* 0x2e */
7470/* File: x86/alt_stub.S */
7471/*
7472 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7473 * any interesting requests and then jump to the real instruction
7474 * handler. Unlike the Arm handler, we can't do this as a tail call
7475 * because rIBASE is caller save and we need to reload it.
7476 *
7477 * Note that unlike in the Arm implementation, we should never arrive
7478 * here with a zero breakFlag because we always refresh rIBASE on
7479 * return.
7480 */
7481 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007482 movl rSELF, %ecx
7483 movl %ecx, OUT_ARG0(%esp)
7484 leal OFF_FP_SHADOWFRAME(rFP), %eax
7485 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007486 movl rPC, OUT_ARG2(%esp)
7487 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007488 REFRESH_IBASE
7489 jmp .L_op_nop+(46*128)
7490
7491/* ------------------------------ */
7492 .balign 128
7493.L_ALT_op_cmpl_double: /* 0x2f */
7494/* File: x86/alt_stub.S */
7495/*
7496 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7497 * any interesting requests and then jump to the real instruction
7498 * handler. Unlike the Arm handler, we can't do this as a tail call
7499 * because rIBASE is caller save and we need to reload it.
7500 *
7501 * Note that unlike in the Arm implementation, we should never arrive
7502 * here with a zero breakFlag because we always refresh rIBASE on
7503 * return.
7504 */
7505 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007506 movl rSELF, %ecx
7507 movl %ecx, OUT_ARG0(%esp)
7508 leal OFF_FP_SHADOWFRAME(rFP), %eax
7509 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007510 movl rPC, OUT_ARG2(%esp)
7511 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007512 REFRESH_IBASE
7513 jmp .L_op_nop+(47*128)
7514
7515/* ------------------------------ */
7516 .balign 128
7517.L_ALT_op_cmpg_double: /* 0x30 */
7518/* File: x86/alt_stub.S */
7519/*
7520 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7521 * any interesting requests and then jump to the real instruction
7522 * handler. Unlike the Arm handler, we can't do this as a tail call
7523 * because rIBASE is caller save and we need to reload it.
7524 *
7525 * Note that unlike in the Arm implementation, we should never arrive
7526 * here with a zero breakFlag because we always refresh rIBASE on
7527 * return.
7528 */
7529 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007530 movl rSELF, %ecx
7531 movl %ecx, OUT_ARG0(%esp)
7532 leal OFF_FP_SHADOWFRAME(rFP), %eax
7533 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007534 movl rPC, OUT_ARG2(%esp)
7535 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007536 REFRESH_IBASE
7537 jmp .L_op_nop+(48*128)
7538
7539/* ------------------------------ */
7540 .balign 128
7541.L_ALT_op_cmp_long: /* 0x31 */
7542/* File: x86/alt_stub.S */
7543/*
7544 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7545 * any interesting requests and then jump to the real instruction
7546 * handler. Unlike the Arm handler, we can't do this as a tail call
7547 * because rIBASE is caller save and we need to reload it.
7548 *
7549 * Note that unlike in the Arm implementation, we should never arrive
7550 * here with a zero breakFlag because we always refresh rIBASE on
7551 * return.
7552 */
7553 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007554 movl rSELF, %ecx
7555 movl %ecx, OUT_ARG0(%esp)
7556 leal OFF_FP_SHADOWFRAME(rFP), %eax
7557 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007558 movl rPC, OUT_ARG2(%esp)
7559 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007560 REFRESH_IBASE
7561 jmp .L_op_nop+(49*128)
7562
7563/* ------------------------------ */
7564 .balign 128
7565.L_ALT_op_if_eq: /* 0x32 */
7566/* File: x86/alt_stub.S */
7567/*
7568 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7569 * any interesting requests and then jump to the real instruction
7570 * handler. Unlike the Arm handler, we can't do this as a tail call
7571 * because rIBASE is caller save and we need to reload it.
7572 *
7573 * Note that unlike in the Arm implementation, we should never arrive
7574 * here with a zero breakFlag because we always refresh rIBASE on
7575 * return.
7576 */
7577 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007578 movl rSELF, %ecx
7579 movl %ecx, OUT_ARG0(%esp)
7580 leal OFF_FP_SHADOWFRAME(rFP), %eax
7581 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007582 movl rPC, OUT_ARG2(%esp)
7583 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007584 REFRESH_IBASE
7585 jmp .L_op_nop+(50*128)
7586
7587/* ------------------------------ */
7588 .balign 128
7589.L_ALT_op_if_ne: /* 0x33 */
7590/* File: x86/alt_stub.S */
7591/*
7592 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7593 * any interesting requests and then jump to the real instruction
7594 * handler. Unlike the Arm handler, we can't do this as a tail call
7595 * because rIBASE is caller save and we need to reload it.
7596 *
7597 * Note that unlike in the Arm implementation, we should never arrive
7598 * here with a zero breakFlag because we always refresh rIBASE on
7599 * return.
7600 */
7601 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007602 movl rSELF, %ecx
7603 movl %ecx, OUT_ARG0(%esp)
7604 leal OFF_FP_SHADOWFRAME(rFP), %eax
7605 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007606 movl rPC, OUT_ARG2(%esp)
7607 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007608 REFRESH_IBASE
7609 jmp .L_op_nop+(51*128)
7610
7611/* ------------------------------ */
7612 .balign 128
7613.L_ALT_op_if_lt: /* 0x34 */
7614/* File: x86/alt_stub.S */
7615/*
7616 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7617 * any interesting requests and then jump to the real instruction
7618 * handler. Unlike the Arm handler, we can't do this as a tail call
7619 * because rIBASE is caller save and we need to reload it.
7620 *
7621 * Note that unlike in the Arm implementation, we should never arrive
7622 * here with a zero breakFlag because we always refresh rIBASE on
7623 * return.
7624 */
7625 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007626 movl rSELF, %ecx
7627 movl %ecx, OUT_ARG0(%esp)
7628 leal OFF_FP_SHADOWFRAME(rFP), %eax
7629 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007630 movl rPC, OUT_ARG2(%esp)
7631 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007632 REFRESH_IBASE
7633 jmp .L_op_nop+(52*128)
7634
7635/* ------------------------------ */
7636 .balign 128
7637.L_ALT_op_if_ge: /* 0x35 */
7638/* File: x86/alt_stub.S */
7639/*
7640 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7641 * any interesting requests and then jump to the real instruction
7642 * handler. Unlike the Arm handler, we can't do this as a tail call
7643 * because rIBASE is caller save and we need to reload it.
7644 *
7645 * Note that unlike in the Arm implementation, we should never arrive
7646 * here with a zero breakFlag because we always refresh rIBASE on
7647 * return.
7648 */
7649 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007650 movl rSELF, %ecx
7651 movl %ecx, OUT_ARG0(%esp)
7652 leal OFF_FP_SHADOWFRAME(rFP), %eax
7653 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007654 movl rPC, OUT_ARG2(%esp)
7655 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007656 REFRESH_IBASE
7657 jmp .L_op_nop+(53*128)
7658
7659/* ------------------------------ */
7660 .balign 128
7661.L_ALT_op_if_gt: /* 0x36 */
7662/* File: x86/alt_stub.S */
7663/*
7664 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7665 * any interesting requests and then jump to the real instruction
7666 * handler. Unlike the Arm handler, we can't do this as a tail call
7667 * because rIBASE is caller save and we need to reload it.
7668 *
7669 * Note that unlike in the Arm implementation, we should never arrive
7670 * here with a zero breakFlag because we always refresh rIBASE on
7671 * return.
7672 */
7673 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007674 movl rSELF, %ecx
7675 movl %ecx, OUT_ARG0(%esp)
7676 leal OFF_FP_SHADOWFRAME(rFP), %eax
7677 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007678 movl rPC, OUT_ARG2(%esp)
7679 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007680 REFRESH_IBASE
7681 jmp .L_op_nop+(54*128)
7682
7683/* ------------------------------ */
7684 .balign 128
7685.L_ALT_op_if_le: /* 0x37 */
7686/* File: x86/alt_stub.S */
7687/*
7688 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7689 * any interesting requests and then jump to the real instruction
7690 * handler. Unlike the Arm handler, we can't do this as a tail call
7691 * because rIBASE is caller save and we need to reload it.
7692 *
7693 * Note that unlike in the Arm implementation, we should never arrive
7694 * here with a zero breakFlag because we always refresh rIBASE on
7695 * return.
7696 */
7697 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007698 movl rSELF, %ecx
7699 movl %ecx, OUT_ARG0(%esp)
7700 leal OFF_FP_SHADOWFRAME(rFP), %eax
7701 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007702 movl rPC, OUT_ARG2(%esp)
7703 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007704 REFRESH_IBASE
7705 jmp .L_op_nop+(55*128)
7706
7707/* ------------------------------ */
7708 .balign 128
7709.L_ALT_op_if_eqz: /* 0x38 */
7710/* File: x86/alt_stub.S */
7711/*
7712 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7713 * any interesting requests and then jump to the real instruction
7714 * handler. Unlike the Arm handler, we can't do this as a tail call
7715 * because rIBASE is caller save and we need to reload it.
7716 *
7717 * Note that unlike in the Arm implementation, we should never arrive
7718 * here with a zero breakFlag because we always refresh rIBASE on
7719 * return.
7720 */
7721 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007722 movl rSELF, %ecx
7723 movl %ecx, OUT_ARG0(%esp)
7724 leal OFF_FP_SHADOWFRAME(rFP), %eax
7725 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007726 movl rPC, OUT_ARG2(%esp)
7727 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007728 REFRESH_IBASE
7729 jmp .L_op_nop+(56*128)
7730
7731/* ------------------------------ */
7732 .balign 128
7733.L_ALT_op_if_nez: /* 0x39 */
7734/* File: x86/alt_stub.S */
7735/*
7736 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7737 * any interesting requests and then jump to the real instruction
7738 * handler. Unlike the Arm handler, we can't do this as a tail call
7739 * because rIBASE is caller save and we need to reload it.
7740 *
7741 * Note that unlike in the Arm implementation, we should never arrive
7742 * here with a zero breakFlag because we always refresh rIBASE on
7743 * return.
7744 */
7745 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007746 movl rSELF, %ecx
7747 movl %ecx, OUT_ARG0(%esp)
7748 leal OFF_FP_SHADOWFRAME(rFP), %eax
7749 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007750 movl rPC, OUT_ARG2(%esp)
7751 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007752 REFRESH_IBASE
7753 jmp .L_op_nop+(57*128)
7754
7755/* ------------------------------ */
7756 .balign 128
7757.L_ALT_op_if_ltz: /* 0x3a */
7758/* File: x86/alt_stub.S */
7759/*
7760 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7761 * any interesting requests and then jump to the real instruction
7762 * handler. Unlike the Arm handler, we can't do this as a tail call
7763 * because rIBASE is caller save and we need to reload it.
7764 *
7765 * Note that unlike in the Arm implementation, we should never arrive
7766 * here with a zero breakFlag because we always refresh rIBASE on
7767 * return.
7768 */
7769 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007770 movl rSELF, %ecx
7771 movl %ecx, OUT_ARG0(%esp)
7772 leal OFF_FP_SHADOWFRAME(rFP), %eax
7773 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007774 movl rPC, OUT_ARG2(%esp)
7775 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007776 REFRESH_IBASE
7777 jmp .L_op_nop+(58*128)
7778
7779/* ------------------------------ */
7780 .balign 128
7781.L_ALT_op_if_gez: /* 0x3b */
7782/* File: x86/alt_stub.S */
7783/*
7784 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7785 * any interesting requests and then jump to the real instruction
7786 * handler. Unlike the Arm handler, we can't do this as a tail call
7787 * because rIBASE is caller save and we need to reload it.
7788 *
7789 * Note that unlike in the Arm implementation, we should never arrive
7790 * here with a zero breakFlag because we always refresh rIBASE on
7791 * return.
7792 */
7793 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007794 movl rSELF, %ecx
7795 movl %ecx, OUT_ARG0(%esp)
7796 leal OFF_FP_SHADOWFRAME(rFP), %eax
7797 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007798 movl rPC, OUT_ARG2(%esp)
7799 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007800 REFRESH_IBASE
7801 jmp .L_op_nop+(59*128)
7802
7803/* ------------------------------ */
7804 .balign 128
7805.L_ALT_op_if_gtz: /* 0x3c */
7806/* File: x86/alt_stub.S */
7807/*
7808 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7809 * any interesting requests and then jump to the real instruction
7810 * handler. Unlike the Arm handler, we can't do this as a tail call
7811 * because rIBASE is caller save and we need to reload it.
7812 *
7813 * Note that unlike in the Arm implementation, we should never arrive
7814 * here with a zero breakFlag because we always refresh rIBASE on
7815 * return.
7816 */
7817 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007818 movl rSELF, %ecx
7819 movl %ecx, OUT_ARG0(%esp)
7820 leal OFF_FP_SHADOWFRAME(rFP), %eax
7821 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007822 movl rPC, OUT_ARG2(%esp)
7823 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007824 REFRESH_IBASE
7825 jmp .L_op_nop+(60*128)
7826
7827/* ------------------------------ */
7828 .balign 128
7829.L_ALT_op_if_lez: /* 0x3d */
7830/* File: x86/alt_stub.S */
7831/*
7832 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7833 * any interesting requests and then jump to the real instruction
7834 * handler. Unlike the Arm handler, we can't do this as a tail call
7835 * because rIBASE is caller save and we need to reload it.
7836 *
7837 * Note that unlike in the Arm implementation, we should never arrive
7838 * here with a zero breakFlag because we always refresh rIBASE on
7839 * return.
7840 */
7841 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007842 movl rSELF, %ecx
7843 movl %ecx, OUT_ARG0(%esp)
7844 leal OFF_FP_SHADOWFRAME(rFP), %eax
7845 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007846 movl rPC, OUT_ARG2(%esp)
7847 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007848 REFRESH_IBASE
7849 jmp .L_op_nop+(61*128)
7850
7851/* ------------------------------ */
7852 .balign 128
7853.L_ALT_op_unused_3e: /* 0x3e */
7854/* File: x86/alt_stub.S */
7855/*
7856 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7857 * any interesting requests and then jump to the real instruction
7858 * handler. Unlike the Arm handler, we can't do this as a tail call
7859 * because rIBASE is caller save and we need to reload it.
7860 *
7861 * Note that unlike in the Arm implementation, we should never arrive
7862 * here with a zero breakFlag because we always refresh rIBASE on
7863 * return.
7864 */
7865 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007866 movl rSELF, %ecx
7867 movl %ecx, OUT_ARG0(%esp)
7868 leal OFF_FP_SHADOWFRAME(rFP), %eax
7869 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007870 movl rPC, OUT_ARG2(%esp)
7871 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007872 REFRESH_IBASE
7873 jmp .L_op_nop+(62*128)
7874
7875/* ------------------------------ */
7876 .balign 128
7877.L_ALT_op_unused_3f: /* 0x3f */
7878/* File: x86/alt_stub.S */
7879/*
7880 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7881 * any interesting requests and then jump to the real instruction
7882 * handler. Unlike the Arm handler, we can't do this as a tail call
7883 * because rIBASE is caller save and we need to reload it.
7884 *
7885 * Note that unlike in the Arm implementation, we should never arrive
7886 * here with a zero breakFlag because we always refresh rIBASE on
7887 * return.
7888 */
7889 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007890 movl rSELF, %ecx
7891 movl %ecx, OUT_ARG0(%esp)
7892 leal OFF_FP_SHADOWFRAME(rFP), %eax
7893 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007894 movl rPC, OUT_ARG2(%esp)
7895 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007896 REFRESH_IBASE
7897 jmp .L_op_nop+(63*128)
7898
7899/* ------------------------------ */
7900 .balign 128
7901.L_ALT_op_unused_40: /* 0x40 */
7902/* File: x86/alt_stub.S */
7903/*
7904 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7905 * any interesting requests and then jump to the real instruction
7906 * handler. Unlike the Arm handler, we can't do this as a tail call
7907 * because rIBASE is caller save and we need to reload it.
7908 *
7909 * Note that unlike in the Arm implementation, we should never arrive
7910 * here with a zero breakFlag because we always refresh rIBASE on
7911 * return.
7912 */
7913 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007914 movl rSELF, %ecx
7915 movl %ecx, OUT_ARG0(%esp)
7916 leal OFF_FP_SHADOWFRAME(rFP), %eax
7917 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007918 movl rPC, OUT_ARG2(%esp)
7919 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007920 REFRESH_IBASE
7921 jmp .L_op_nop+(64*128)
7922
7923/* ------------------------------ */
7924 .balign 128
7925.L_ALT_op_unused_41: /* 0x41 */
7926/* File: x86/alt_stub.S */
7927/*
7928 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7929 * any interesting requests and then jump to the real instruction
7930 * handler. Unlike the Arm handler, we can't do this as a tail call
7931 * because rIBASE is caller save and we need to reload it.
7932 *
7933 * Note that unlike in the Arm implementation, we should never arrive
7934 * here with a zero breakFlag because we always refresh rIBASE on
7935 * return.
7936 */
7937 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007938 movl rSELF, %ecx
7939 movl %ecx, OUT_ARG0(%esp)
7940 leal OFF_FP_SHADOWFRAME(rFP), %eax
7941 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007942 movl rPC, OUT_ARG2(%esp)
7943 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007944 REFRESH_IBASE
7945 jmp .L_op_nop+(65*128)
7946
7947/* ------------------------------ */
7948 .balign 128
7949.L_ALT_op_unused_42: /* 0x42 */
7950/* File: x86/alt_stub.S */
7951/*
7952 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7953 * any interesting requests and then jump to the real instruction
7954 * handler. Unlike the Arm handler, we can't do this as a tail call
7955 * because rIBASE is caller save and we need to reload it.
7956 *
7957 * Note that unlike in the Arm implementation, we should never arrive
7958 * here with a zero breakFlag because we always refresh rIBASE on
7959 * return.
7960 */
7961 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007962 movl rSELF, %ecx
7963 movl %ecx, OUT_ARG0(%esp)
7964 leal OFF_FP_SHADOWFRAME(rFP), %eax
7965 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007966 movl rPC, OUT_ARG2(%esp)
7967 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007968 REFRESH_IBASE
7969 jmp .L_op_nop+(66*128)
7970
7971/* ------------------------------ */
7972 .balign 128
7973.L_ALT_op_unused_43: /* 0x43 */
7974/* File: x86/alt_stub.S */
7975/*
7976 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
7977 * any interesting requests and then jump to the real instruction
7978 * handler. Unlike the Arm handler, we can't do this as a tail call
7979 * because rIBASE is caller save and we need to reload it.
7980 *
7981 * Note that unlike in the Arm implementation, we should never arrive
7982 * here with a zero breakFlag because we always refresh rIBASE on
7983 * return.
7984 */
7985 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007986 movl rSELF, %ecx
7987 movl %ecx, OUT_ARG0(%esp)
7988 leal OFF_FP_SHADOWFRAME(rFP), %eax
7989 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00007990 movl rPC, OUT_ARG2(%esp)
7991 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00007992 REFRESH_IBASE
7993 jmp .L_op_nop+(67*128)
7994
7995/* ------------------------------ */
7996 .balign 128
7997.L_ALT_op_aget: /* 0x44 */
7998/* File: x86/alt_stub.S */
7999/*
8000 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8001 * any interesting requests and then jump to the real instruction
8002 * handler. Unlike the Arm handler, we can't do this as a tail call
8003 * because rIBASE is caller save and we need to reload it.
8004 *
8005 * Note that unlike in the Arm implementation, we should never arrive
8006 * here with a zero breakFlag because we always refresh rIBASE on
8007 * return.
8008 */
8009 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008010 movl rSELF, %ecx
8011 movl %ecx, OUT_ARG0(%esp)
8012 leal OFF_FP_SHADOWFRAME(rFP), %eax
8013 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008014 movl rPC, OUT_ARG2(%esp)
8015 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008016 REFRESH_IBASE
8017 jmp .L_op_nop+(68*128)
8018
8019/* ------------------------------ */
8020 .balign 128
8021.L_ALT_op_aget_wide: /* 0x45 */
8022/* File: x86/alt_stub.S */
8023/*
8024 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8025 * any interesting requests and then jump to the real instruction
8026 * handler. Unlike the Arm handler, we can't do this as a tail call
8027 * because rIBASE is caller save and we need to reload it.
8028 *
8029 * Note that unlike in the Arm implementation, we should never arrive
8030 * here with a zero breakFlag because we always refresh rIBASE on
8031 * return.
8032 */
8033 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008034 movl rSELF, %ecx
8035 movl %ecx, OUT_ARG0(%esp)
8036 leal OFF_FP_SHADOWFRAME(rFP), %eax
8037 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008038 movl rPC, OUT_ARG2(%esp)
8039 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008040 REFRESH_IBASE
8041 jmp .L_op_nop+(69*128)
8042
8043/* ------------------------------ */
8044 .balign 128
8045.L_ALT_op_aget_object: /* 0x46 */
8046/* File: x86/alt_stub.S */
8047/*
8048 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8049 * any interesting requests and then jump to the real instruction
8050 * handler. Unlike the Arm handler, we can't do this as a tail call
8051 * because rIBASE is caller save and we need to reload it.
8052 *
8053 * Note that unlike in the Arm implementation, we should never arrive
8054 * here with a zero breakFlag because we always refresh rIBASE on
8055 * return.
8056 */
8057 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008058 movl rSELF, %ecx
8059 movl %ecx, OUT_ARG0(%esp)
8060 leal OFF_FP_SHADOWFRAME(rFP), %eax
8061 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008062 movl rPC, OUT_ARG2(%esp)
8063 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008064 REFRESH_IBASE
8065 jmp .L_op_nop+(70*128)
8066
8067/* ------------------------------ */
8068 .balign 128
8069.L_ALT_op_aget_boolean: /* 0x47 */
8070/* File: x86/alt_stub.S */
8071/*
8072 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8073 * any interesting requests and then jump to the real instruction
8074 * handler. Unlike the Arm handler, we can't do this as a tail call
8075 * because rIBASE is caller save and we need to reload it.
8076 *
8077 * Note that unlike in the Arm implementation, we should never arrive
8078 * here with a zero breakFlag because we always refresh rIBASE on
8079 * return.
8080 */
8081 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008082 movl rSELF, %ecx
8083 movl %ecx, OUT_ARG0(%esp)
8084 leal OFF_FP_SHADOWFRAME(rFP), %eax
8085 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008086 movl rPC, OUT_ARG2(%esp)
8087 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008088 REFRESH_IBASE
8089 jmp .L_op_nop+(71*128)
8090
8091/* ------------------------------ */
8092 .balign 128
8093.L_ALT_op_aget_byte: /* 0x48 */
8094/* File: x86/alt_stub.S */
8095/*
8096 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8097 * any interesting requests and then jump to the real instruction
8098 * handler. Unlike the Arm handler, we can't do this as a tail call
8099 * because rIBASE is caller save and we need to reload it.
8100 *
8101 * Note that unlike in the Arm implementation, we should never arrive
8102 * here with a zero breakFlag because we always refresh rIBASE on
8103 * return.
8104 */
8105 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008106 movl rSELF, %ecx
8107 movl %ecx, OUT_ARG0(%esp)
8108 leal OFF_FP_SHADOWFRAME(rFP), %eax
8109 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008110 movl rPC, OUT_ARG2(%esp)
8111 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008112 REFRESH_IBASE
8113 jmp .L_op_nop+(72*128)
8114
8115/* ------------------------------ */
8116 .balign 128
8117.L_ALT_op_aget_char: /* 0x49 */
8118/* File: x86/alt_stub.S */
8119/*
8120 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8121 * any interesting requests and then jump to the real instruction
8122 * handler. Unlike the Arm handler, we can't do this as a tail call
8123 * because rIBASE is caller save and we need to reload it.
8124 *
8125 * Note that unlike in the Arm implementation, we should never arrive
8126 * here with a zero breakFlag because we always refresh rIBASE on
8127 * return.
8128 */
8129 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008130 movl rSELF, %ecx
8131 movl %ecx, OUT_ARG0(%esp)
8132 leal OFF_FP_SHADOWFRAME(rFP), %eax
8133 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008134 movl rPC, OUT_ARG2(%esp)
8135 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008136 REFRESH_IBASE
8137 jmp .L_op_nop+(73*128)
8138
8139/* ------------------------------ */
8140 .balign 128
8141.L_ALT_op_aget_short: /* 0x4a */
8142/* File: x86/alt_stub.S */
8143/*
8144 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8145 * any interesting requests and then jump to the real instruction
8146 * handler. Unlike the Arm handler, we can't do this as a tail call
8147 * because rIBASE is caller save and we need to reload it.
8148 *
8149 * Note that unlike in the Arm implementation, we should never arrive
8150 * here with a zero breakFlag because we always refresh rIBASE on
8151 * return.
8152 */
8153 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008154 movl rSELF, %ecx
8155 movl %ecx, OUT_ARG0(%esp)
8156 leal OFF_FP_SHADOWFRAME(rFP), %eax
8157 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008158 movl rPC, OUT_ARG2(%esp)
8159 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008160 REFRESH_IBASE
8161 jmp .L_op_nop+(74*128)
8162
8163/* ------------------------------ */
8164 .balign 128
8165.L_ALT_op_aput: /* 0x4b */
8166/* File: x86/alt_stub.S */
8167/*
8168 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8169 * any interesting requests and then jump to the real instruction
8170 * handler. Unlike the Arm handler, we can't do this as a tail call
8171 * because rIBASE is caller save and we need to reload it.
8172 *
8173 * Note that unlike in the Arm implementation, we should never arrive
8174 * here with a zero breakFlag because we always refresh rIBASE on
8175 * return.
8176 */
8177 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008178 movl rSELF, %ecx
8179 movl %ecx, OUT_ARG0(%esp)
8180 leal OFF_FP_SHADOWFRAME(rFP), %eax
8181 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008182 movl rPC, OUT_ARG2(%esp)
8183 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008184 REFRESH_IBASE
8185 jmp .L_op_nop+(75*128)
8186
8187/* ------------------------------ */
8188 .balign 128
8189.L_ALT_op_aput_wide: /* 0x4c */
8190/* File: x86/alt_stub.S */
8191/*
8192 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8193 * any interesting requests and then jump to the real instruction
8194 * handler. Unlike the Arm handler, we can't do this as a tail call
8195 * because rIBASE is caller save and we need to reload it.
8196 *
8197 * Note that unlike in the Arm implementation, we should never arrive
8198 * here with a zero breakFlag because we always refresh rIBASE on
8199 * return.
8200 */
8201 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008202 movl rSELF, %ecx
8203 movl %ecx, OUT_ARG0(%esp)
8204 leal OFF_FP_SHADOWFRAME(rFP), %eax
8205 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008206 movl rPC, OUT_ARG2(%esp)
8207 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008208 REFRESH_IBASE
8209 jmp .L_op_nop+(76*128)
8210
8211/* ------------------------------ */
8212 .balign 128
8213.L_ALT_op_aput_object: /* 0x4d */
8214/* File: x86/alt_stub.S */
8215/*
8216 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8217 * any interesting requests and then jump to the real instruction
8218 * handler. Unlike the Arm handler, we can't do this as a tail call
8219 * because rIBASE is caller save and we need to reload it.
8220 *
8221 * Note that unlike in the Arm implementation, we should never arrive
8222 * here with a zero breakFlag because we always refresh rIBASE on
8223 * return.
8224 */
8225 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008226 movl rSELF, %ecx
8227 movl %ecx, OUT_ARG0(%esp)
8228 leal OFF_FP_SHADOWFRAME(rFP), %eax
8229 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008230 movl rPC, OUT_ARG2(%esp)
8231 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008232 REFRESH_IBASE
8233 jmp .L_op_nop+(77*128)
8234
8235/* ------------------------------ */
8236 .balign 128
8237.L_ALT_op_aput_boolean: /* 0x4e */
8238/* File: x86/alt_stub.S */
8239/*
8240 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8241 * any interesting requests and then jump to the real instruction
8242 * handler. Unlike the Arm handler, we can't do this as a tail call
8243 * because rIBASE is caller save and we need to reload it.
8244 *
8245 * Note that unlike in the Arm implementation, we should never arrive
8246 * here with a zero breakFlag because we always refresh rIBASE on
8247 * return.
8248 */
8249 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008250 movl rSELF, %ecx
8251 movl %ecx, OUT_ARG0(%esp)
8252 leal OFF_FP_SHADOWFRAME(rFP), %eax
8253 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008254 movl rPC, OUT_ARG2(%esp)
8255 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008256 REFRESH_IBASE
8257 jmp .L_op_nop+(78*128)
8258
8259/* ------------------------------ */
8260 .balign 128
8261.L_ALT_op_aput_byte: /* 0x4f */
8262/* File: x86/alt_stub.S */
8263/*
8264 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8265 * any interesting requests and then jump to the real instruction
8266 * handler. Unlike the Arm handler, we can't do this as a tail call
8267 * because rIBASE is caller save and we need to reload it.
8268 *
8269 * Note that unlike in the Arm implementation, we should never arrive
8270 * here with a zero breakFlag because we always refresh rIBASE on
8271 * return.
8272 */
8273 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008274 movl rSELF, %ecx
8275 movl %ecx, OUT_ARG0(%esp)
8276 leal OFF_FP_SHADOWFRAME(rFP), %eax
8277 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008278 movl rPC, OUT_ARG2(%esp)
8279 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008280 REFRESH_IBASE
8281 jmp .L_op_nop+(79*128)
8282
8283/* ------------------------------ */
8284 .balign 128
8285.L_ALT_op_aput_char: /* 0x50 */
8286/* File: x86/alt_stub.S */
8287/*
8288 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8289 * any interesting requests and then jump to the real instruction
8290 * handler. Unlike the Arm handler, we can't do this as a tail call
8291 * because rIBASE is caller save and we need to reload it.
8292 *
8293 * Note that unlike in the Arm implementation, we should never arrive
8294 * here with a zero breakFlag because we always refresh rIBASE on
8295 * return.
8296 */
8297 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008298 movl rSELF, %ecx
8299 movl %ecx, OUT_ARG0(%esp)
8300 leal OFF_FP_SHADOWFRAME(rFP), %eax
8301 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008302 movl rPC, OUT_ARG2(%esp)
8303 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008304 REFRESH_IBASE
8305 jmp .L_op_nop+(80*128)
8306
8307/* ------------------------------ */
8308 .balign 128
8309.L_ALT_op_aput_short: /* 0x51 */
8310/* File: x86/alt_stub.S */
8311/*
8312 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8313 * any interesting requests and then jump to the real instruction
8314 * handler. Unlike the Arm handler, we can't do this as a tail call
8315 * because rIBASE is caller save and we need to reload it.
8316 *
8317 * Note that unlike in the Arm implementation, we should never arrive
8318 * here with a zero breakFlag because we always refresh rIBASE on
8319 * return.
8320 */
8321 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008322 movl rSELF, %ecx
8323 movl %ecx, OUT_ARG0(%esp)
8324 leal OFF_FP_SHADOWFRAME(rFP), %eax
8325 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008326 movl rPC, OUT_ARG2(%esp)
8327 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008328 REFRESH_IBASE
8329 jmp .L_op_nop+(81*128)
8330
8331/* ------------------------------ */
8332 .balign 128
8333.L_ALT_op_iget: /* 0x52 */
8334/* File: x86/alt_stub.S */
8335/*
8336 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8337 * any interesting requests and then jump to the real instruction
8338 * handler. Unlike the Arm handler, we can't do this as a tail call
8339 * because rIBASE is caller save and we need to reload it.
8340 *
8341 * Note that unlike in the Arm implementation, we should never arrive
8342 * here with a zero breakFlag because we always refresh rIBASE on
8343 * return.
8344 */
8345 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008346 movl rSELF, %ecx
8347 movl %ecx, OUT_ARG0(%esp)
8348 leal OFF_FP_SHADOWFRAME(rFP), %eax
8349 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008350 movl rPC, OUT_ARG2(%esp)
8351 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008352 REFRESH_IBASE
8353 jmp .L_op_nop+(82*128)
8354
8355/* ------------------------------ */
8356 .balign 128
8357.L_ALT_op_iget_wide: /* 0x53 */
8358/* File: x86/alt_stub.S */
8359/*
8360 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8361 * any interesting requests and then jump to the real instruction
8362 * handler. Unlike the Arm handler, we can't do this as a tail call
8363 * because rIBASE is caller save and we need to reload it.
8364 *
8365 * Note that unlike in the Arm implementation, we should never arrive
8366 * here with a zero breakFlag because we always refresh rIBASE on
8367 * return.
8368 */
8369 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008370 movl rSELF, %ecx
8371 movl %ecx, OUT_ARG0(%esp)
8372 leal OFF_FP_SHADOWFRAME(rFP), %eax
8373 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008374 movl rPC, OUT_ARG2(%esp)
8375 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008376 REFRESH_IBASE
8377 jmp .L_op_nop+(83*128)
8378
8379/* ------------------------------ */
8380 .balign 128
8381.L_ALT_op_iget_object: /* 0x54 */
8382/* File: x86/alt_stub.S */
8383/*
8384 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8385 * any interesting requests and then jump to the real instruction
8386 * handler. Unlike the Arm handler, we can't do this as a tail call
8387 * because rIBASE is caller save and we need to reload it.
8388 *
8389 * Note that unlike in the Arm implementation, we should never arrive
8390 * here with a zero breakFlag because we always refresh rIBASE on
8391 * return.
8392 */
8393 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008394 movl rSELF, %ecx
8395 movl %ecx, OUT_ARG0(%esp)
8396 leal OFF_FP_SHADOWFRAME(rFP), %eax
8397 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008398 movl rPC, OUT_ARG2(%esp)
8399 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008400 REFRESH_IBASE
8401 jmp .L_op_nop+(84*128)
8402
8403/* ------------------------------ */
8404 .balign 128
8405.L_ALT_op_iget_boolean: /* 0x55 */
8406/* File: x86/alt_stub.S */
8407/*
8408 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8409 * any interesting requests and then jump to the real instruction
8410 * handler. Unlike the Arm handler, we can't do this as a tail call
8411 * because rIBASE is caller save and we need to reload it.
8412 *
8413 * Note that unlike in the Arm implementation, we should never arrive
8414 * here with a zero breakFlag because we always refresh rIBASE on
8415 * return.
8416 */
8417 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008418 movl rSELF, %ecx
8419 movl %ecx, OUT_ARG0(%esp)
8420 leal OFF_FP_SHADOWFRAME(rFP), %eax
8421 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008422 movl rPC, OUT_ARG2(%esp)
8423 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008424 REFRESH_IBASE
8425 jmp .L_op_nop+(85*128)
8426
8427/* ------------------------------ */
8428 .balign 128
8429.L_ALT_op_iget_byte: /* 0x56 */
8430/* File: x86/alt_stub.S */
8431/*
8432 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8433 * any interesting requests and then jump to the real instruction
8434 * handler. Unlike the Arm handler, we can't do this as a tail call
8435 * because rIBASE is caller save and we need to reload it.
8436 *
8437 * Note that unlike in the Arm implementation, we should never arrive
8438 * here with a zero breakFlag because we always refresh rIBASE on
8439 * return.
8440 */
8441 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008442 movl rSELF, %ecx
8443 movl %ecx, OUT_ARG0(%esp)
8444 leal OFF_FP_SHADOWFRAME(rFP), %eax
8445 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008446 movl rPC, OUT_ARG2(%esp)
8447 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008448 REFRESH_IBASE
8449 jmp .L_op_nop+(86*128)
8450
8451/* ------------------------------ */
8452 .balign 128
8453.L_ALT_op_iget_char: /* 0x57 */
8454/* File: x86/alt_stub.S */
8455/*
8456 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8457 * any interesting requests and then jump to the real instruction
8458 * handler. Unlike the Arm handler, we can't do this as a tail call
8459 * because rIBASE is caller save and we need to reload it.
8460 *
8461 * Note that unlike in the Arm implementation, we should never arrive
8462 * here with a zero breakFlag because we always refresh rIBASE on
8463 * return.
8464 */
8465 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008466 movl rSELF, %ecx
8467 movl %ecx, OUT_ARG0(%esp)
8468 leal OFF_FP_SHADOWFRAME(rFP), %eax
8469 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008470 movl rPC, OUT_ARG2(%esp)
8471 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008472 REFRESH_IBASE
8473 jmp .L_op_nop+(87*128)
8474
8475/* ------------------------------ */
8476 .balign 128
8477.L_ALT_op_iget_short: /* 0x58 */
8478/* File: x86/alt_stub.S */
8479/*
8480 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8481 * any interesting requests and then jump to the real instruction
8482 * handler. Unlike the Arm handler, we can't do this as a tail call
8483 * because rIBASE is caller save and we need to reload it.
8484 *
8485 * Note that unlike in the Arm implementation, we should never arrive
8486 * here with a zero breakFlag because we always refresh rIBASE on
8487 * return.
8488 */
8489 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008490 movl rSELF, %ecx
8491 movl %ecx, OUT_ARG0(%esp)
8492 leal OFF_FP_SHADOWFRAME(rFP), %eax
8493 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008494 movl rPC, OUT_ARG2(%esp)
8495 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008496 REFRESH_IBASE
8497 jmp .L_op_nop+(88*128)
8498
8499/* ------------------------------ */
8500 .balign 128
8501.L_ALT_op_iput: /* 0x59 */
8502/* File: x86/alt_stub.S */
8503/*
8504 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8505 * any interesting requests and then jump to the real instruction
8506 * handler. Unlike the Arm handler, we can't do this as a tail call
8507 * because rIBASE is caller save and we need to reload it.
8508 *
8509 * Note that unlike in the Arm implementation, we should never arrive
8510 * here with a zero breakFlag because we always refresh rIBASE on
8511 * return.
8512 */
8513 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008514 movl rSELF, %ecx
8515 movl %ecx, OUT_ARG0(%esp)
8516 leal OFF_FP_SHADOWFRAME(rFP), %eax
8517 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008518 movl rPC, OUT_ARG2(%esp)
8519 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008520 REFRESH_IBASE
8521 jmp .L_op_nop+(89*128)
8522
8523/* ------------------------------ */
8524 .balign 128
8525.L_ALT_op_iput_wide: /* 0x5a */
8526/* File: x86/alt_stub.S */
8527/*
8528 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8529 * any interesting requests and then jump to the real instruction
8530 * handler. Unlike the Arm handler, we can't do this as a tail call
8531 * because rIBASE is caller save and we need to reload it.
8532 *
8533 * Note that unlike in the Arm implementation, we should never arrive
8534 * here with a zero breakFlag because we always refresh rIBASE on
8535 * return.
8536 */
8537 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008538 movl rSELF, %ecx
8539 movl %ecx, OUT_ARG0(%esp)
8540 leal OFF_FP_SHADOWFRAME(rFP), %eax
8541 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008542 movl rPC, OUT_ARG2(%esp)
8543 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008544 REFRESH_IBASE
8545 jmp .L_op_nop+(90*128)
8546
8547/* ------------------------------ */
8548 .balign 128
8549.L_ALT_op_iput_object: /* 0x5b */
8550/* File: x86/alt_stub.S */
8551/*
8552 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8553 * any interesting requests and then jump to the real instruction
8554 * handler. Unlike the Arm handler, we can't do this as a tail call
8555 * because rIBASE is caller save and we need to reload it.
8556 *
8557 * Note that unlike in the Arm implementation, we should never arrive
8558 * here with a zero breakFlag because we always refresh rIBASE on
8559 * return.
8560 */
8561 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008562 movl rSELF, %ecx
8563 movl %ecx, OUT_ARG0(%esp)
8564 leal OFF_FP_SHADOWFRAME(rFP), %eax
8565 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008566 movl rPC, OUT_ARG2(%esp)
8567 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008568 REFRESH_IBASE
8569 jmp .L_op_nop+(91*128)
8570
8571/* ------------------------------ */
8572 .balign 128
8573.L_ALT_op_iput_boolean: /* 0x5c */
8574/* File: x86/alt_stub.S */
8575/*
8576 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8577 * any interesting requests and then jump to the real instruction
8578 * handler. Unlike the Arm handler, we can't do this as a tail call
8579 * because rIBASE is caller save and we need to reload it.
8580 *
8581 * Note that unlike in the Arm implementation, we should never arrive
8582 * here with a zero breakFlag because we always refresh rIBASE on
8583 * return.
8584 */
8585 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008586 movl rSELF, %ecx
8587 movl %ecx, OUT_ARG0(%esp)
8588 leal OFF_FP_SHADOWFRAME(rFP), %eax
8589 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008590 movl rPC, OUT_ARG2(%esp)
8591 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008592 REFRESH_IBASE
8593 jmp .L_op_nop+(92*128)
8594
8595/* ------------------------------ */
8596 .balign 128
8597.L_ALT_op_iput_byte: /* 0x5d */
8598/* File: x86/alt_stub.S */
8599/*
8600 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8601 * any interesting requests and then jump to the real instruction
8602 * handler. Unlike the Arm handler, we can't do this as a tail call
8603 * because rIBASE is caller save and we need to reload it.
8604 *
8605 * Note that unlike in the Arm implementation, we should never arrive
8606 * here with a zero breakFlag because we always refresh rIBASE on
8607 * return.
8608 */
8609 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008610 movl rSELF, %ecx
8611 movl %ecx, OUT_ARG0(%esp)
8612 leal OFF_FP_SHADOWFRAME(rFP), %eax
8613 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008614 movl rPC, OUT_ARG2(%esp)
8615 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008616 REFRESH_IBASE
8617 jmp .L_op_nop+(93*128)
8618
8619/* ------------------------------ */
8620 .balign 128
8621.L_ALT_op_iput_char: /* 0x5e */
8622/* File: x86/alt_stub.S */
8623/*
8624 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8625 * any interesting requests and then jump to the real instruction
8626 * handler. Unlike the Arm handler, we can't do this as a tail call
8627 * because rIBASE is caller save and we need to reload it.
8628 *
8629 * Note that unlike in the Arm implementation, we should never arrive
8630 * here with a zero breakFlag because we always refresh rIBASE on
8631 * return.
8632 */
8633 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008634 movl rSELF, %ecx
8635 movl %ecx, OUT_ARG0(%esp)
8636 leal OFF_FP_SHADOWFRAME(rFP), %eax
8637 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008638 movl rPC, OUT_ARG2(%esp)
8639 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008640 REFRESH_IBASE
8641 jmp .L_op_nop+(94*128)
8642
8643/* ------------------------------ */
8644 .balign 128
8645.L_ALT_op_iput_short: /* 0x5f */
8646/* File: x86/alt_stub.S */
8647/*
8648 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8649 * any interesting requests and then jump to the real instruction
8650 * handler. Unlike the Arm handler, we can't do this as a tail call
8651 * because rIBASE is caller save and we need to reload it.
8652 *
8653 * Note that unlike in the Arm implementation, we should never arrive
8654 * here with a zero breakFlag because we always refresh rIBASE on
8655 * return.
8656 */
8657 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008658 movl rSELF, %ecx
8659 movl %ecx, OUT_ARG0(%esp)
8660 leal OFF_FP_SHADOWFRAME(rFP), %eax
8661 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008662 movl rPC, OUT_ARG2(%esp)
8663 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008664 REFRESH_IBASE
8665 jmp .L_op_nop+(95*128)
8666
8667/* ------------------------------ */
8668 .balign 128
8669.L_ALT_op_sget: /* 0x60 */
8670/* File: x86/alt_stub.S */
8671/*
8672 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8673 * any interesting requests and then jump to the real instruction
8674 * handler. Unlike the Arm handler, we can't do this as a tail call
8675 * because rIBASE is caller save and we need to reload it.
8676 *
8677 * Note that unlike in the Arm implementation, we should never arrive
8678 * here with a zero breakFlag because we always refresh rIBASE on
8679 * return.
8680 */
8681 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008682 movl rSELF, %ecx
8683 movl %ecx, OUT_ARG0(%esp)
8684 leal OFF_FP_SHADOWFRAME(rFP), %eax
8685 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008686 movl rPC, OUT_ARG2(%esp)
8687 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008688 REFRESH_IBASE
8689 jmp .L_op_nop+(96*128)
8690
8691/* ------------------------------ */
8692 .balign 128
8693.L_ALT_op_sget_wide: /* 0x61 */
8694/* File: x86/alt_stub.S */
8695/*
8696 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8697 * any interesting requests and then jump to the real instruction
8698 * handler. Unlike the Arm handler, we can't do this as a tail call
8699 * because rIBASE is caller save and we need to reload it.
8700 *
8701 * Note that unlike in the Arm implementation, we should never arrive
8702 * here with a zero breakFlag because we always refresh rIBASE on
8703 * return.
8704 */
8705 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008706 movl rSELF, %ecx
8707 movl %ecx, OUT_ARG0(%esp)
8708 leal OFF_FP_SHADOWFRAME(rFP), %eax
8709 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008710 movl rPC, OUT_ARG2(%esp)
8711 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008712 REFRESH_IBASE
8713 jmp .L_op_nop+(97*128)
8714
8715/* ------------------------------ */
8716 .balign 128
8717.L_ALT_op_sget_object: /* 0x62 */
8718/* File: x86/alt_stub.S */
8719/*
8720 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8721 * any interesting requests and then jump to the real instruction
8722 * handler. Unlike the Arm handler, we can't do this as a tail call
8723 * because rIBASE is caller save and we need to reload it.
8724 *
8725 * Note that unlike in the Arm implementation, we should never arrive
8726 * here with a zero breakFlag because we always refresh rIBASE on
8727 * return.
8728 */
8729 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008730 movl rSELF, %ecx
8731 movl %ecx, OUT_ARG0(%esp)
8732 leal OFF_FP_SHADOWFRAME(rFP), %eax
8733 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008734 movl rPC, OUT_ARG2(%esp)
8735 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008736 REFRESH_IBASE
8737 jmp .L_op_nop+(98*128)
8738
8739/* ------------------------------ */
8740 .balign 128
8741.L_ALT_op_sget_boolean: /* 0x63 */
8742/* File: x86/alt_stub.S */
8743/*
8744 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8745 * any interesting requests and then jump to the real instruction
8746 * handler. Unlike the Arm handler, we can't do this as a tail call
8747 * because rIBASE is caller save and we need to reload it.
8748 *
8749 * Note that unlike in the Arm implementation, we should never arrive
8750 * here with a zero breakFlag because we always refresh rIBASE on
8751 * return.
8752 */
8753 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008754 movl rSELF, %ecx
8755 movl %ecx, OUT_ARG0(%esp)
8756 leal OFF_FP_SHADOWFRAME(rFP), %eax
8757 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008758 movl rPC, OUT_ARG2(%esp)
8759 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008760 REFRESH_IBASE
8761 jmp .L_op_nop+(99*128)
8762
8763/* ------------------------------ */
8764 .balign 128
8765.L_ALT_op_sget_byte: /* 0x64 */
8766/* File: x86/alt_stub.S */
8767/*
8768 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8769 * any interesting requests and then jump to the real instruction
8770 * handler. Unlike the Arm handler, we can't do this as a tail call
8771 * because rIBASE is caller save and we need to reload it.
8772 *
8773 * Note that unlike in the Arm implementation, we should never arrive
8774 * here with a zero breakFlag because we always refresh rIBASE on
8775 * return.
8776 */
8777 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008778 movl rSELF, %ecx
8779 movl %ecx, OUT_ARG0(%esp)
8780 leal OFF_FP_SHADOWFRAME(rFP), %eax
8781 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008782 movl rPC, OUT_ARG2(%esp)
8783 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008784 REFRESH_IBASE
8785 jmp .L_op_nop+(100*128)
8786
8787/* ------------------------------ */
8788 .balign 128
8789.L_ALT_op_sget_char: /* 0x65 */
8790/* File: x86/alt_stub.S */
8791/*
8792 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8793 * any interesting requests and then jump to the real instruction
8794 * handler. Unlike the Arm handler, we can't do this as a tail call
8795 * because rIBASE is caller save and we need to reload it.
8796 *
8797 * Note that unlike in the Arm implementation, we should never arrive
8798 * here with a zero breakFlag because we always refresh rIBASE on
8799 * return.
8800 */
8801 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008802 movl rSELF, %ecx
8803 movl %ecx, OUT_ARG0(%esp)
8804 leal OFF_FP_SHADOWFRAME(rFP), %eax
8805 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008806 movl rPC, OUT_ARG2(%esp)
8807 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008808 REFRESH_IBASE
8809 jmp .L_op_nop+(101*128)
8810
8811/* ------------------------------ */
8812 .balign 128
8813.L_ALT_op_sget_short: /* 0x66 */
8814/* File: x86/alt_stub.S */
8815/*
8816 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8817 * any interesting requests and then jump to the real instruction
8818 * handler. Unlike the Arm handler, we can't do this as a tail call
8819 * because rIBASE is caller save and we need to reload it.
8820 *
8821 * Note that unlike in the Arm implementation, we should never arrive
8822 * here with a zero breakFlag because we always refresh rIBASE on
8823 * return.
8824 */
8825 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008826 movl rSELF, %ecx
8827 movl %ecx, OUT_ARG0(%esp)
8828 leal OFF_FP_SHADOWFRAME(rFP), %eax
8829 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008830 movl rPC, OUT_ARG2(%esp)
8831 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008832 REFRESH_IBASE
8833 jmp .L_op_nop+(102*128)
8834
8835/* ------------------------------ */
8836 .balign 128
8837.L_ALT_op_sput: /* 0x67 */
8838/* File: x86/alt_stub.S */
8839/*
8840 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8841 * any interesting requests and then jump to the real instruction
8842 * handler. Unlike the Arm handler, we can't do this as a tail call
8843 * because rIBASE is caller save and we need to reload it.
8844 *
8845 * Note that unlike in the Arm implementation, we should never arrive
8846 * here with a zero breakFlag because we always refresh rIBASE on
8847 * return.
8848 */
8849 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008850 movl rSELF, %ecx
8851 movl %ecx, OUT_ARG0(%esp)
8852 leal OFF_FP_SHADOWFRAME(rFP), %eax
8853 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008854 movl rPC, OUT_ARG2(%esp)
8855 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008856 REFRESH_IBASE
8857 jmp .L_op_nop+(103*128)
8858
8859/* ------------------------------ */
8860 .balign 128
8861.L_ALT_op_sput_wide: /* 0x68 */
8862/* File: x86/alt_stub.S */
8863/*
8864 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8865 * any interesting requests and then jump to the real instruction
8866 * handler. Unlike the Arm handler, we can't do this as a tail call
8867 * because rIBASE is caller save and we need to reload it.
8868 *
8869 * Note that unlike in the Arm implementation, we should never arrive
8870 * here with a zero breakFlag because we always refresh rIBASE on
8871 * return.
8872 */
8873 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008874 movl rSELF, %ecx
8875 movl %ecx, OUT_ARG0(%esp)
8876 leal OFF_FP_SHADOWFRAME(rFP), %eax
8877 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008878 movl rPC, OUT_ARG2(%esp)
8879 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008880 REFRESH_IBASE
8881 jmp .L_op_nop+(104*128)
8882
8883/* ------------------------------ */
8884 .balign 128
8885.L_ALT_op_sput_object: /* 0x69 */
8886/* File: x86/alt_stub.S */
8887/*
8888 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8889 * any interesting requests and then jump to the real instruction
8890 * handler. Unlike the Arm handler, we can't do this as a tail call
8891 * because rIBASE is caller save and we need to reload it.
8892 *
8893 * Note that unlike in the Arm implementation, we should never arrive
8894 * here with a zero breakFlag because we always refresh rIBASE on
8895 * return.
8896 */
8897 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008898 movl rSELF, %ecx
8899 movl %ecx, OUT_ARG0(%esp)
8900 leal OFF_FP_SHADOWFRAME(rFP), %eax
8901 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008902 movl rPC, OUT_ARG2(%esp)
8903 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008904 REFRESH_IBASE
8905 jmp .L_op_nop+(105*128)
8906
8907/* ------------------------------ */
8908 .balign 128
8909.L_ALT_op_sput_boolean: /* 0x6a */
8910/* File: x86/alt_stub.S */
8911/*
8912 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8913 * any interesting requests and then jump to the real instruction
8914 * handler. Unlike the Arm handler, we can't do this as a tail call
8915 * because rIBASE is caller save and we need to reload it.
8916 *
8917 * Note that unlike in the Arm implementation, we should never arrive
8918 * here with a zero breakFlag because we always refresh rIBASE on
8919 * return.
8920 */
8921 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008922 movl rSELF, %ecx
8923 movl %ecx, OUT_ARG0(%esp)
8924 leal OFF_FP_SHADOWFRAME(rFP), %eax
8925 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008926 movl rPC, OUT_ARG2(%esp)
8927 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008928 REFRESH_IBASE
8929 jmp .L_op_nop+(106*128)
8930
8931/* ------------------------------ */
8932 .balign 128
8933.L_ALT_op_sput_byte: /* 0x6b */
8934/* File: x86/alt_stub.S */
8935/*
8936 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8937 * any interesting requests and then jump to the real instruction
8938 * handler. Unlike the Arm handler, we can't do this as a tail call
8939 * because rIBASE is caller save and we need to reload it.
8940 *
8941 * Note that unlike in the Arm implementation, we should never arrive
8942 * here with a zero breakFlag because we always refresh rIBASE on
8943 * return.
8944 */
8945 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008946 movl rSELF, %ecx
8947 movl %ecx, OUT_ARG0(%esp)
8948 leal OFF_FP_SHADOWFRAME(rFP), %eax
8949 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008950 movl rPC, OUT_ARG2(%esp)
8951 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008952 REFRESH_IBASE
8953 jmp .L_op_nop+(107*128)
8954
8955/* ------------------------------ */
8956 .balign 128
8957.L_ALT_op_sput_char: /* 0x6c */
8958/* File: x86/alt_stub.S */
8959/*
8960 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8961 * any interesting requests and then jump to the real instruction
8962 * handler. Unlike the Arm handler, we can't do this as a tail call
8963 * because rIBASE is caller save and we need to reload it.
8964 *
8965 * Note that unlike in the Arm implementation, we should never arrive
8966 * here with a zero breakFlag because we always refresh rIBASE on
8967 * return.
8968 */
8969 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008970 movl rSELF, %ecx
8971 movl %ecx, OUT_ARG0(%esp)
8972 leal OFF_FP_SHADOWFRAME(rFP), %eax
8973 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008974 movl rPC, OUT_ARG2(%esp)
8975 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008976 REFRESH_IBASE
8977 jmp .L_op_nop+(108*128)
8978
8979/* ------------------------------ */
8980 .balign 128
8981.L_ALT_op_sput_short: /* 0x6d */
8982/* File: x86/alt_stub.S */
8983/*
8984 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
8985 * any interesting requests and then jump to the real instruction
8986 * handler. Unlike the Arm handler, we can't do this as a tail call
8987 * because rIBASE is caller save and we need to reload it.
8988 *
8989 * Note that unlike in the Arm implementation, we should never arrive
8990 * here with a zero breakFlag because we always refresh rIBASE on
8991 * return.
8992 */
8993 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00008994 movl rSELF, %ecx
8995 movl %ecx, OUT_ARG0(%esp)
8996 leal OFF_FP_SHADOWFRAME(rFP), %eax
8997 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00008998 movl rPC, OUT_ARG2(%esp)
8999 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009000 REFRESH_IBASE
9001 jmp .L_op_nop+(109*128)
9002
9003/* ------------------------------ */
9004 .balign 128
9005.L_ALT_op_invoke_virtual: /* 0x6e */
9006/* File: x86/alt_stub.S */
9007/*
9008 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9009 * any interesting requests and then jump to the real instruction
9010 * handler. Unlike the Arm handler, we can't do this as a tail call
9011 * because rIBASE is caller save and we need to reload it.
9012 *
9013 * Note that unlike in the Arm implementation, we should never arrive
9014 * here with a zero breakFlag because we always refresh rIBASE on
9015 * return.
9016 */
9017 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009018 movl rSELF, %ecx
9019 movl %ecx, OUT_ARG0(%esp)
9020 leal OFF_FP_SHADOWFRAME(rFP), %eax
9021 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009022 movl rPC, OUT_ARG2(%esp)
9023 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009024 REFRESH_IBASE
9025 jmp .L_op_nop+(110*128)
9026
9027/* ------------------------------ */
9028 .balign 128
9029.L_ALT_op_invoke_super: /* 0x6f */
9030/* File: x86/alt_stub.S */
9031/*
9032 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9033 * any interesting requests and then jump to the real instruction
9034 * handler. Unlike the Arm handler, we can't do this as a tail call
9035 * because rIBASE is caller save and we need to reload it.
9036 *
9037 * Note that unlike in the Arm implementation, we should never arrive
9038 * here with a zero breakFlag because we always refresh rIBASE on
9039 * return.
9040 */
9041 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009042 movl rSELF, %ecx
9043 movl %ecx, OUT_ARG0(%esp)
9044 leal OFF_FP_SHADOWFRAME(rFP), %eax
9045 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009046 movl rPC, OUT_ARG2(%esp)
9047 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009048 REFRESH_IBASE
9049 jmp .L_op_nop+(111*128)
9050
9051/* ------------------------------ */
9052 .balign 128
9053.L_ALT_op_invoke_direct: /* 0x70 */
9054/* File: x86/alt_stub.S */
9055/*
9056 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9057 * any interesting requests and then jump to the real instruction
9058 * handler. Unlike the Arm handler, we can't do this as a tail call
9059 * because rIBASE is caller save and we need to reload it.
9060 *
9061 * Note that unlike in the Arm implementation, we should never arrive
9062 * here with a zero breakFlag because we always refresh rIBASE on
9063 * return.
9064 */
9065 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009066 movl rSELF, %ecx
9067 movl %ecx, OUT_ARG0(%esp)
9068 leal OFF_FP_SHADOWFRAME(rFP), %eax
9069 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009070 movl rPC, OUT_ARG2(%esp)
9071 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009072 REFRESH_IBASE
9073 jmp .L_op_nop+(112*128)
9074
9075/* ------------------------------ */
9076 .balign 128
9077.L_ALT_op_invoke_static: /* 0x71 */
9078/* File: x86/alt_stub.S */
9079/*
9080 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9081 * any interesting requests and then jump to the real instruction
9082 * handler. Unlike the Arm handler, we can't do this as a tail call
9083 * because rIBASE is caller save and we need to reload it.
9084 *
9085 * Note that unlike in the Arm implementation, we should never arrive
9086 * here with a zero breakFlag because we always refresh rIBASE on
9087 * return.
9088 */
9089 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009090 movl rSELF, %ecx
9091 movl %ecx, OUT_ARG0(%esp)
9092 leal OFF_FP_SHADOWFRAME(rFP), %eax
9093 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009094 movl rPC, OUT_ARG2(%esp)
9095 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009096 REFRESH_IBASE
9097 jmp .L_op_nop+(113*128)
9098
9099/* ------------------------------ */
9100 .balign 128
9101.L_ALT_op_invoke_interface: /* 0x72 */
9102/* File: x86/alt_stub.S */
9103/*
9104 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9105 * any interesting requests and then jump to the real instruction
9106 * handler. Unlike the Arm handler, we can't do this as a tail call
9107 * because rIBASE is caller save and we need to reload it.
9108 *
9109 * Note that unlike in the Arm implementation, we should never arrive
9110 * here with a zero breakFlag because we always refresh rIBASE on
9111 * return.
9112 */
9113 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009114 movl rSELF, %ecx
9115 movl %ecx, OUT_ARG0(%esp)
9116 leal OFF_FP_SHADOWFRAME(rFP), %eax
9117 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009118 movl rPC, OUT_ARG2(%esp)
9119 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009120 REFRESH_IBASE
9121 jmp .L_op_nop+(114*128)
9122
9123/* ------------------------------ */
9124 .balign 128
9125.L_ALT_op_return_void_no_barrier: /* 0x73 */
9126/* File: x86/alt_stub.S */
9127/*
9128 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9129 * any interesting requests and then jump to the real instruction
9130 * handler. Unlike the Arm handler, we can't do this as a tail call
9131 * because rIBASE is caller save and we need to reload it.
9132 *
9133 * Note that unlike in the Arm implementation, we should never arrive
9134 * here with a zero breakFlag because we always refresh rIBASE on
9135 * return.
9136 */
9137 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009138 movl rSELF, %ecx
9139 movl %ecx, OUT_ARG0(%esp)
9140 leal OFF_FP_SHADOWFRAME(rFP), %eax
9141 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009142 movl rPC, OUT_ARG2(%esp)
9143 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009144 REFRESH_IBASE
9145 jmp .L_op_nop+(115*128)
9146
9147/* ------------------------------ */
9148 .balign 128
9149.L_ALT_op_invoke_virtual_range: /* 0x74 */
9150/* File: x86/alt_stub.S */
9151/*
9152 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9153 * any interesting requests and then jump to the real instruction
9154 * handler. Unlike the Arm handler, we can't do this as a tail call
9155 * because rIBASE is caller save and we need to reload it.
9156 *
9157 * Note that unlike in the Arm implementation, we should never arrive
9158 * here with a zero breakFlag because we always refresh rIBASE on
9159 * return.
9160 */
9161 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009162 movl rSELF, %ecx
9163 movl %ecx, OUT_ARG0(%esp)
9164 leal OFF_FP_SHADOWFRAME(rFP), %eax
9165 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009166 movl rPC, OUT_ARG2(%esp)
9167 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009168 REFRESH_IBASE
9169 jmp .L_op_nop+(116*128)
9170
9171/* ------------------------------ */
9172 .balign 128
9173.L_ALT_op_invoke_super_range: /* 0x75 */
9174/* File: x86/alt_stub.S */
9175/*
9176 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9177 * any interesting requests and then jump to the real instruction
9178 * handler. Unlike the Arm handler, we can't do this as a tail call
9179 * because rIBASE is caller save and we need to reload it.
9180 *
9181 * Note that unlike in the Arm implementation, we should never arrive
9182 * here with a zero breakFlag because we always refresh rIBASE on
9183 * return.
9184 */
9185 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009186 movl rSELF, %ecx
9187 movl %ecx, OUT_ARG0(%esp)
9188 leal OFF_FP_SHADOWFRAME(rFP), %eax
9189 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009190 movl rPC, OUT_ARG2(%esp)
9191 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009192 REFRESH_IBASE
9193 jmp .L_op_nop+(117*128)
9194
9195/* ------------------------------ */
9196 .balign 128
9197.L_ALT_op_invoke_direct_range: /* 0x76 */
9198/* File: x86/alt_stub.S */
9199/*
9200 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9201 * any interesting requests and then jump to the real instruction
9202 * handler. Unlike the Arm handler, we can't do this as a tail call
9203 * because rIBASE is caller save and we need to reload it.
9204 *
9205 * Note that unlike in the Arm implementation, we should never arrive
9206 * here with a zero breakFlag because we always refresh rIBASE on
9207 * return.
9208 */
9209 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009210 movl rSELF, %ecx
9211 movl %ecx, OUT_ARG0(%esp)
9212 leal OFF_FP_SHADOWFRAME(rFP), %eax
9213 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009214 movl rPC, OUT_ARG2(%esp)
9215 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009216 REFRESH_IBASE
9217 jmp .L_op_nop+(118*128)
9218
9219/* ------------------------------ */
9220 .balign 128
9221.L_ALT_op_invoke_static_range: /* 0x77 */
9222/* File: x86/alt_stub.S */
9223/*
9224 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9225 * any interesting requests and then jump to the real instruction
9226 * handler. Unlike the Arm handler, we can't do this as a tail call
9227 * because rIBASE is caller save and we need to reload it.
9228 *
9229 * Note that unlike in the Arm implementation, we should never arrive
9230 * here with a zero breakFlag because we always refresh rIBASE on
9231 * return.
9232 */
9233 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009234 movl rSELF, %ecx
9235 movl %ecx, OUT_ARG0(%esp)
9236 leal OFF_FP_SHADOWFRAME(rFP), %eax
9237 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009238 movl rPC, OUT_ARG2(%esp)
9239 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009240 REFRESH_IBASE
9241 jmp .L_op_nop+(119*128)
9242
9243/* ------------------------------ */
9244 .balign 128
9245.L_ALT_op_invoke_interface_range: /* 0x78 */
9246/* File: x86/alt_stub.S */
9247/*
9248 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9249 * any interesting requests and then jump to the real instruction
9250 * handler. Unlike the Arm handler, we can't do this as a tail call
9251 * because rIBASE is caller save and we need to reload it.
9252 *
9253 * Note that unlike in the Arm implementation, we should never arrive
9254 * here with a zero breakFlag because we always refresh rIBASE on
9255 * return.
9256 */
9257 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009258 movl rSELF, %ecx
9259 movl %ecx, OUT_ARG0(%esp)
9260 leal OFF_FP_SHADOWFRAME(rFP), %eax
9261 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009262 movl rPC, OUT_ARG2(%esp)
9263 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009264 REFRESH_IBASE
9265 jmp .L_op_nop+(120*128)
9266
9267/* ------------------------------ */
9268 .balign 128
9269.L_ALT_op_unused_79: /* 0x79 */
9270/* File: x86/alt_stub.S */
9271/*
9272 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9273 * any interesting requests and then jump to the real instruction
9274 * handler. Unlike the Arm handler, we can't do this as a tail call
9275 * because rIBASE is caller save and we need to reload it.
9276 *
9277 * Note that unlike in the Arm implementation, we should never arrive
9278 * here with a zero breakFlag because we always refresh rIBASE on
9279 * return.
9280 */
9281 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009282 movl rSELF, %ecx
9283 movl %ecx, OUT_ARG0(%esp)
9284 leal OFF_FP_SHADOWFRAME(rFP), %eax
9285 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009286 movl rPC, OUT_ARG2(%esp)
9287 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009288 REFRESH_IBASE
9289 jmp .L_op_nop+(121*128)
9290
9291/* ------------------------------ */
9292 .balign 128
9293.L_ALT_op_unused_7a: /* 0x7a */
9294/* File: x86/alt_stub.S */
9295/*
9296 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9297 * any interesting requests and then jump to the real instruction
9298 * handler. Unlike the Arm handler, we can't do this as a tail call
9299 * because rIBASE is caller save and we need to reload it.
9300 *
9301 * Note that unlike in the Arm implementation, we should never arrive
9302 * here with a zero breakFlag because we always refresh rIBASE on
9303 * return.
9304 */
9305 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009306 movl rSELF, %ecx
9307 movl %ecx, OUT_ARG0(%esp)
9308 leal OFF_FP_SHADOWFRAME(rFP), %eax
9309 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009310 movl rPC, OUT_ARG2(%esp)
9311 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009312 REFRESH_IBASE
9313 jmp .L_op_nop+(122*128)
9314
9315/* ------------------------------ */
9316 .balign 128
9317.L_ALT_op_neg_int: /* 0x7b */
9318/* File: x86/alt_stub.S */
9319/*
9320 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9321 * any interesting requests and then jump to the real instruction
9322 * handler. Unlike the Arm handler, we can't do this as a tail call
9323 * because rIBASE is caller save and we need to reload it.
9324 *
9325 * Note that unlike in the Arm implementation, we should never arrive
9326 * here with a zero breakFlag because we always refresh rIBASE on
9327 * return.
9328 */
9329 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009330 movl rSELF, %ecx
9331 movl %ecx, OUT_ARG0(%esp)
9332 leal OFF_FP_SHADOWFRAME(rFP), %eax
9333 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009334 movl rPC, OUT_ARG2(%esp)
9335 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009336 REFRESH_IBASE
9337 jmp .L_op_nop+(123*128)
9338
9339/* ------------------------------ */
9340 .balign 128
9341.L_ALT_op_not_int: /* 0x7c */
9342/* File: x86/alt_stub.S */
9343/*
9344 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9345 * any interesting requests and then jump to the real instruction
9346 * handler. Unlike the Arm handler, we can't do this as a tail call
9347 * because rIBASE is caller save and we need to reload it.
9348 *
9349 * Note that unlike in the Arm implementation, we should never arrive
9350 * here with a zero breakFlag because we always refresh rIBASE on
9351 * return.
9352 */
9353 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009354 movl rSELF, %ecx
9355 movl %ecx, OUT_ARG0(%esp)
9356 leal OFF_FP_SHADOWFRAME(rFP), %eax
9357 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009358 movl rPC, OUT_ARG2(%esp)
9359 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009360 REFRESH_IBASE
9361 jmp .L_op_nop+(124*128)
9362
9363/* ------------------------------ */
9364 .balign 128
9365.L_ALT_op_neg_long: /* 0x7d */
9366/* File: x86/alt_stub.S */
9367/*
9368 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9369 * any interesting requests and then jump to the real instruction
9370 * handler. Unlike the Arm handler, we can't do this as a tail call
9371 * because rIBASE is caller save and we need to reload it.
9372 *
9373 * Note that unlike in the Arm implementation, we should never arrive
9374 * here with a zero breakFlag because we always refresh rIBASE on
9375 * return.
9376 */
9377 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009378 movl rSELF, %ecx
9379 movl %ecx, OUT_ARG0(%esp)
9380 leal OFF_FP_SHADOWFRAME(rFP), %eax
9381 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009382 movl rPC, OUT_ARG2(%esp)
9383 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009384 REFRESH_IBASE
9385 jmp .L_op_nop+(125*128)
9386
9387/* ------------------------------ */
9388 .balign 128
9389.L_ALT_op_not_long: /* 0x7e */
9390/* File: x86/alt_stub.S */
9391/*
9392 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9393 * any interesting requests and then jump to the real instruction
9394 * handler. Unlike the Arm handler, we can't do this as a tail call
9395 * because rIBASE is caller save and we need to reload it.
9396 *
9397 * Note that unlike in the Arm implementation, we should never arrive
9398 * here with a zero breakFlag because we always refresh rIBASE on
9399 * return.
9400 */
9401 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009402 movl rSELF, %ecx
9403 movl %ecx, OUT_ARG0(%esp)
9404 leal OFF_FP_SHADOWFRAME(rFP), %eax
9405 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009406 movl rPC, OUT_ARG2(%esp)
9407 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009408 REFRESH_IBASE
9409 jmp .L_op_nop+(126*128)
9410
9411/* ------------------------------ */
9412 .balign 128
9413.L_ALT_op_neg_float: /* 0x7f */
9414/* File: x86/alt_stub.S */
9415/*
9416 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9417 * any interesting requests and then jump to the real instruction
9418 * handler. Unlike the Arm handler, we can't do this as a tail call
9419 * because rIBASE is caller save and we need to reload it.
9420 *
9421 * Note that unlike in the Arm implementation, we should never arrive
9422 * here with a zero breakFlag because we always refresh rIBASE on
9423 * return.
9424 */
9425 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009426 movl rSELF, %ecx
9427 movl %ecx, OUT_ARG0(%esp)
9428 leal OFF_FP_SHADOWFRAME(rFP), %eax
9429 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009430 movl rPC, OUT_ARG2(%esp)
9431 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009432 REFRESH_IBASE
9433 jmp .L_op_nop+(127*128)
9434
9435/* ------------------------------ */
9436 .balign 128
9437.L_ALT_op_neg_double: /* 0x80 */
9438/* File: x86/alt_stub.S */
9439/*
9440 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9441 * any interesting requests and then jump to the real instruction
9442 * handler. Unlike the Arm handler, we can't do this as a tail call
9443 * because rIBASE is caller save and we need to reload it.
9444 *
9445 * Note that unlike in the Arm implementation, we should never arrive
9446 * here with a zero breakFlag because we always refresh rIBASE on
9447 * return.
9448 */
9449 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009450 movl rSELF, %ecx
9451 movl %ecx, OUT_ARG0(%esp)
9452 leal OFF_FP_SHADOWFRAME(rFP), %eax
9453 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009454 movl rPC, OUT_ARG2(%esp)
9455 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009456 REFRESH_IBASE
9457 jmp .L_op_nop+(128*128)
9458
9459/* ------------------------------ */
9460 .balign 128
9461.L_ALT_op_int_to_long: /* 0x81 */
9462/* File: x86/alt_stub.S */
9463/*
9464 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9465 * any interesting requests and then jump to the real instruction
9466 * handler. Unlike the Arm handler, we can't do this as a tail call
9467 * because rIBASE is caller save and we need to reload it.
9468 *
9469 * Note that unlike in the Arm implementation, we should never arrive
9470 * here with a zero breakFlag because we always refresh rIBASE on
9471 * return.
9472 */
9473 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009474 movl rSELF, %ecx
9475 movl %ecx, OUT_ARG0(%esp)
9476 leal OFF_FP_SHADOWFRAME(rFP), %eax
9477 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009478 movl rPC, OUT_ARG2(%esp)
9479 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009480 REFRESH_IBASE
9481 jmp .L_op_nop+(129*128)
9482
9483/* ------------------------------ */
9484 .balign 128
9485.L_ALT_op_int_to_float: /* 0x82 */
9486/* File: x86/alt_stub.S */
9487/*
9488 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9489 * any interesting requests and then jump to the real instruction
9490 * handler. Unlike the Arm handler, we can't do this as a tail call
9491 * because rIBASE is caller save and we need to reload it.
9492 *
9493 * Note that unlike in the Arm implementation, we should never arrive
9494 * here with a zero breakFlag because we always refresh rIBASE on
9495 * return.
9496 */
9497 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009498 movl rSELF, %ecx
9499 movl %ecx, OUT_ARG0(%esp)
9500 leal OFF_FP_SHADOWFRAME(rFP), %eax
9501 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009502 movl rPC, OUT_ARG2(%esp)
9503 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009504 REFRESH_IBASE
9505 jmp .L_op_nop+(130*128)
9506
9507/* ------------------------------ */
9508 .balign 128
9509.L_ALT_op_int_to_double: /* 0x83 */
9510/* File: x86/alt_stub.S */
9511/*
9512 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9513 * any interesting requests and then jump to the real instruction
9514 * handler. Unlike the Arm handler, we can't do this as a tail call
9515 * because rIBASE is caller save and we need to reload it.
9516 *
9517 * Note that unlike in the Arm implementation, we should never arrive
9518 * here with a zero breakFlag because we always refresh rIBASE on
9519 * return.
9520 */
9521 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009522 movl rSELF, %ecx
9523 movl %ecx, OUT_ARG0(%esp)
9524 leal OFF_FP_SHADOWFRAME(rFP), %eax
9525 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009526 movl rPC, OUT_ARG2(%esp)
9527 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009528 REFRESH_IBASE
9529 jmp .L_op_nop+(131*128)
9530
9531/* ------------------------------ */
9532 .balign 128
9533.L_ALT_op_long_to_int: /* 0x84 */
9534/* File: x86/alt_stub.S */
9535/*
9536 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9537 * any interesting requests and then jump to the real instruction
9538 * handler. Unlike the Arm handler, we can't do this as a tail call
9539 * because rIBASE is caller save and we need to reload it.
9540 *
9541 * Note that unlike in the Arm implementation, we should never arrive
9542 * here with a zero breakFlag because we always refresh rIBASE on
9543 * return.
9544 */
9545 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009546 movl rSELF, %ecx
9547 movl %ecx, OUT_ARG0(%esp)
9548 leal OFF_FP_SHADOWFRAME(rFP), %eax
9549 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009550 movl rPC, OUT_ARG2(%esp)
9551 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009552 REFRESH_IBASE
9553 jmp .L_op_nop+(132*128)
9554
9555/* ------------------------------ */
9556 .balign 128
9557.L_ALT_op_long_to_float: /* 0x85 */
9558/* File: x86/alt_stub.S */
9559/*
9560 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9561 * any interesting requests and then jump to the real instruction
9562 * handler. Unlike the Arm handler, we can't do this as a tail call
9563 * because rIBASE is caller save and we need to reload it.
9564 *
9565 * Note that unlike in the Arm implementation, we should never arrive
9566 * here with a zero breakFlag because we always refresh rIBASE on
9567 * return.
9568 */
9569 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009570 movl rSELF, %ecx
9571 movl %ecx, OUT_ARG0(%esp)
9572 leal OFF_FP_SHADOWFRAME(rFP), %eax
9573 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009574 movl rPC, OUT_ARG2(%esp)
9575 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009576 REFRESH_IBASE
9577 jmp .L_op_nop+(133*128)
9578
9579/* ------------------------------ */
9580 .balign 128
9581.L_ALT_op_long_to_double: /* 0x86 */
9582/* File: x86/alt_stub.S */
9583/*
9584 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9585 * any interesting requests and then jump to the real instruction
9586 * handler. Unlike the Arm handler, we can't do this as a tail call
9587 * because rIBASE is caller save and we need to reload it.
9588 *
9589 * Note that unlike in the Arm implementation, we should never arrive
9590 * here with a zero breakFlag because we always refresh rIBASE on
9591 * return.
9592 */
9593 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009594 movl rSELF, %ecx
9595 movl %ecx, OUT_ARG0(%esp)
9596 leal OFF_FP_SHADOWFRAME(rFP), %eax
9597 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009598 movl rPC, OUT_ARG2(%esp)
9599 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009600 REFRESH_IBASE
9601 jmp .L_op_nop+(134*128)
9602
9603/* ------------------------------ */
9604 .balign 128
9605.L_ALT_op_float_to_int: /* 0x87 */
9606/* File: x86/alt_stub.S */
9607/*
9608 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9609 * any interesting requests and then jump to the real instruction
9610 * handler. Unlike the Arm handler, we can't do this as a tail call
9611 * because rIBASE is caller save and we need to reload it.
9612 *
9613 * Note that unlike in the Arm implementation, we should never arrive
9614 * here with a zero breakFlag because we always refresh rIBASE on
9615 * return.
9616 */
9617 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009618 movl rSELF, %ecx
9619 movl %ecx, OUT_ARG0(%esp)
9620 leal OFF_FP_SHADOWFRAME(rFP), %eax
9621 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009622 movl rPC, OUT_ARG2(%esp)
9623 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009624 REFRESH_IBASE
9625 jmp .L_op_nop+(135*128)
9626
9627/* ------------------------------ */
9628 .balign 128
9629.L_ALT_op_float_to_long: /* 0x88 */
9630/* File: x86/alt_stub.S */
9631/*
9632 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9633 * any interesting requests and then jump to the real instruction
9634 * handler. Unlike the Arm handler, we can't do this as a tail call
9635 * because rIBASE is caller save and we need to reload it.
9636 *
9637 * Note that unlike in the Arm implementation, we should never arrive
9638 * here with a zero breakFlag because we always refresh rIBASE on
9639 * return.
9640 */
9641 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009642 movl rSELF, %ecx
9643 movl %ecx, OUT_ARG0(%esp)
9644 leal OFF_FP_SHADOWFRAME(rFP), %eax
9645 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009646 movl rPC, OUT_ARG2(%esp)
9647 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009648 REFRESH_IBASE
9649 jmp .L_op_nop+(136*128)
9650
9651/* ------------------------------ */
9652 .balign 128
9653.L_ALT_op_float_to_double: /* 0x89 */
9654/* File: x86/alt_stub.S */
9655/*
9656 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9657 * any interesting requests and then jump to the real instruction
9658 * handler. Unlike the Arm handler, we can't do this as a tail call
9659 * because rIBASE is caller save and we need to reload it.
9660 *
9661 * Note that unlike in the Arm implementation, we should never arrive
9662 * here with a zero breakFlag because we always refresh rIBASE on
9663 * return.
9664 */
9665 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009666 movl rSELF, %ecx
9667 movl %ecx, OUT_ARG0(%esp)
9668 leal OFF_FP_SHADOWFRAME(rFP), %eax
9669 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009670 movl rPC, OUT_ARG2(%esp)
9671 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009672 REFRESH_IBASE
9673 jmp .L_op_nop+(137*128)
9674
9675/* ------------------------------ */
9676 .balign 128
9677.L_ALT_op_double_to_int: /* 0x8a */
9678/* File: x86/alt_stub.S */
9679/*
9680 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9681 * any interesting requests and then jump to the real instruction
9682 * handler. Unlike the Arm handler, we can't do this as a tail call
9683 * because rIBASE is caller save and we need to reload it.
9684 *
9685 * Note that unlike in the Arm implementation, we should never arrive
9686 * here with a zero breakFlag because we always refresh rIBASE on
9687 * return.
9688 */
9689 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009690 movl rSELF, %ecx
9691 movl %ecx, OUT_ARG0(%esp)
9692 leal OFF_FP_SHADOWFRAME(rFP), %eax
9693 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009694 movl rPC, OUT_ARG2(%esp)
9695 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009696 REFRESH_IBASE
9697 jmp .L_op_nop+(138*128)
9698
9699/* ------------------------------ */
9700 .balign 128
9701.L_ALT_op_double_to_long: /* 0x8b */
9702/* File: x86/alt_stub.S */
9703/*
9704 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9705 * any interesting requests and then jump to the real instruction
9706 * handler. Unlike the Arm handler, we can't do this as a tail call
9707 * because rIBASE is caller save and we need to reload it.
9708 *
9709 * Note that unlike in the Arm implementation, we should never arrive
9710 * here with a zero breakFlag because we always refresh rIBASE on
9711 * return.
9712 */
9713 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009714 movl rSELF, %ecx
9715 movl %ecx, OUT_ARG0(%esp)
9716 leal OFF_FP_SHADOWFRAME(rFP), %eax
9717 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009718 movl rPC, OUT_ARG2(%esp)
9719 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009720 REFRESH_IBASE
9721 jmp .L_op_nop+(139*128)
9722
9723/* ------------------------------ */
9724 .balign 128
9725.L_ALT_op_double_to_float: /* 0x8c */
9726/* File: x86/alt_stub.S */
9727/*
9728 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9729 * any interesting requests and then jump to the real instruction
9730 * handler. Unlike the Arm handler, we can't do this as a tail call
9731 * because rIBASE is caller save and we need to reload it.
9732 *
9733 * Note that unlike in the Arm implementation, we should never arrive
9734 * here with a zero breakFlag because we always refresh rIBASE on
9735 * return.
9736 */
9737 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009738 movl rSELF, %ecx
9739 movl %ecx, OUT_ARG0(%esp)
9740 leal OFF_FP_SHADOWFRAME(rFP), %eax
9741 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009742 movl rPC, OUT_ARG2(%esp)
9743 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009744 REFRESH_IBASE
9745 jmp .L_op_nop+(140*128)
9746
9747/* ------------------------------ */
9748 .balign 128
9749.L_ALT_op_int_to_byte: /* 0x8d */
9750/* File: x86/alt_stub.S */
9751/*
9752 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9753 * any interesting requests and then jump to the real instruction
9754 * handler. Unlike the Arm handler, we can't do this as a tail call
9755 * because rIBASE is caller save and we need to reload it.
9756 *
9757 * Note that unlike in the Arm implementation, we should never arrive
9758 * here with a zero breakFlag because we always refresh rIBASE on
9759 * return.
9760 */
9761 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009762 movl rSELF, %ecx
9763 movl %ecx, OUT_ARG0(%esp)
9764 leal OFF_FP_SHADOWFRAME(rFP), %eax
9765 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009766 movl rPC, OUT_ARG2(%esp)
9767 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009768 REFRESH_IBASE
9769 jmp .L_op_nop+(141*128)
9770
9771/* ------------------------------ */
9772 .balign 128
9773.L_ALT_op_int_to_char: /* 0x8e */
9774/* File: x86/alt_stub.S */
9775/*
9776 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9777 * any interesting requests and then jump to the real instruction
9778 * handler. Unlike the Arm handler, we can't do this as a tail call
9779 * because rIBASE is caller save and we need to reload it.
9780 *
9781 * Note that unlike in the Arm implementation, we should never arrive
9782 * here with a zero breakFlag because we always refresh rIBASE on
9783 * return.
9784 */
9785 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009786 movl rSELF, %ecx
9787 movl %ecx, OUT_ARG0(%esp)
9788 leal OFF_FP_SHADOWFRAME(rFP), %eax
9789 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009790 movl rPC, OUT_ARG2(%esp)
9791 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009792 REFRESH_IBASE
9793 jmp .L_op_nop+(142*128)
9794
9795/* ------------------------------ */
9796 .balign 128
9797.L_ALT_op_int_to_short: /* 0x8f */
9798/* File: x86/alt_stub.S */
9799/*
9800 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9801 * any interesting requests and then jump to the real instruction
9802 * handler. Unlike the Arm handler, we can't do this as a tail call
9803 * because rIBASE is caller save and we need to reload it.
9804 *
9805 * Note that unlike in the Arm implementation, we should never arrive
9806 * here with a zero breakFlag because we always refresh rIBASE on
9807 * return.
9808 */
9809 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009810 movl rSELF, %ecx
9811 movl %ecx, OUT_ARG0(%esp)
9812 leal OFF_FP_SHADOWFRAME(rFP), %eax
9813 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009814 movl rPC, OUT_ARG2(%esp)
9815 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009816 REFRESH_IBASE
9817 jmp .L_op_nop+(143*128)
9818
9819/* ------------------------------ */
9820 .balign 128
9821.L_ALT_op_add_int: /* 0x90 */
9822/* File: x86/alt_stub.S */
9823/*
9824 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9825 * any interesting requests and then jump to the real instruction
9826 * handler. Unlike the Arm handler, we can't do this as a tail call
9827 * because rIBASE is caller save and we need to reload it.
9828 *
9829 * Note that unlike in the Arm implementation, we should never arrive
9830 * here with a zero breakFlag because we always refresh rIBASE on
9831 * return.
9832 */
9833 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009834 movl rSELF, %ecx
9835 movl %ecx, OUT_ARG0(%esp)
9836 leal OFF_FP_SHADOWFRAME(rFP), %eax
9837 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009838 movl rPC, OUT_ARG2(%esp)
9839 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009840 REFRESH_IBASE
9841 jmp .L_op_nop+(144*128)
9842
9843/* ------------------------------ */
9844 .balign 128
9845.L_ALT_op_sub_int: /* 0x91 */
9846/* File: x86/alt_stub.S */
9847/*
9848 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9849 * any interesting requests and then jump to the real instruction
9850 * handler. Unlike the Arm handler, we can't do this as a tail call
9851 * because rIBASE is caller save and we need to reload it.
9852 *
9853 * Note that unlike in the Arm implementation, we should never arrive
9854 * here with a zero breakFlag because we always refresh rIBASE on
9855 * return.
9856 */
9857 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009858 movl rSELF, %ecx
9859 movl %ecx, OUT_ARG0(%esp)
9860 leal OFF_FP_SHADOWFRAME(rFP), %eax
9861 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009862 movl rPC, OUT_ARG2(%esp)
9863 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009864 REFRESH_IBASE
9865 jmp .L_op_nop+(145*128)
9866
9867/* ------------------------------ */
9868 .balign 128
9869.L_ALT_op_mul_int: /* 0x92 */
9870/* File: x86/alt_stub.S */
9871/*
9872 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9873 * any interesting requests and then jump to the real instruction
9874 * handler. Unlike the Arm handler, we can't do this as a tail call
9875 * because rIBASE is caller save and we need to reload it.
9876 *
9877 * Note that unlike in the Arm implementation, we should never arrive
9878 * here with a zero breakFlag because we always refresh rIBASE on
9879 * return.
9880 */
9881 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009882 movl rSELF, %ecx
9883 movl %ecx, OUT_ARG0(%esp)
9884 leal OFF_FP_SHADOWFRAME(rFP), %eax
9885 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009886 movl rPC, OUT_ARG2(%esp)
9887 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009888 REFRESH_IBASE
9889 jmp .L_op_nop+(146*128)
9890
9891/* ------------------------------ */
9892 .balign 128
9893.L_ALT_op_div_int: /* 0x93 */
9894/* File: x86/alt_stub.S */
9895/*
9896 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9897 * any interesting requests and then jump to the real instruction
9898 * handler. Unlike the Arm handler, we can't do this as a tail call
9899 * because rIBASE is caller save and we need to reload it.
9900 *
9901 * Note that unlike in the Arm implementation, we should never arrive
9902 * here with a zero breakFlag because we always refresh rIBASE on
9903 * return.
9904 */
9905 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009906 movl rSELF, %ecx
9907 movl %ecx, OUT_ARG0(%esp)
9908 leal OFF_FP_SHADOWFRAME(rFP), %eax
9909 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009910 movl rPC, OUT_ARG2(%esp)
9911 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009912 REFRESH_IBASE
9913 jmp .L_op_nop+(147*128)
9914
9915/* ------------------------------ */
9916 .balign 128
9917.L_ALT_op_rem_int: /* 0x94 */
9918/* File: x86/alt_stub.S */
9919/*
9920 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9921 * any interesting requests and then jump to the real instruction
9922 * handler. Unlike the Arm handler, we can't do this as a tail call
9923 * because rIBASE is caller save and we need to reload it.
9924 *
9925 * Note that unlike in the Arm implementation, we should never arrive
9926 * here with a zero breakFlag because we always refresh rIBASE on
9927 * return.
9928 */
9929 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009930 movl rSELF, %ecx
9931 movl %ecx, OUT_ARG0(%esp)
9932 leal OFF_FP_SHADOWFRAME(rFP), %eax
9933 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009934 movl rPC, OUT_ARG2(%esp)
9935 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009936 REFRESH_IBASE
9937 jmp .L_op_nop+(148*128)
9938
9939/* ------------------------------ */
9940 .balign 128
9941.L_ALT_op_and_int: /* 0x95 */
9942/* File: x86/alt_stub.S */
9943/*
9944 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9945 * any interesting requests and then jump to the real instruction
9946 * handler. Unlike the Arm handler, we can't do this as a tail call
9947 * because rIBASE is caller save and we need to reload it.
9948 *
9949 * Note that unlike in the Arm implementation, we should never arrive
9950 * here with a zero breakFlag because we always refresh rIBASE on
9951 * return.
9952 */
9953 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009954 movl rSELF, %ecx
9955 movl %ecx, OUT_ARG0(%esp)
9956 leal OFF_FP_SHADOWFRAME(rFP), %eax
9957 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009958 movl rPC, OUT_ARG2(%esp)
9959 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009960 REFRESH_IBASE
9961 jmp .L_op_nop+(149*128)
9962
9963/* ------------------------------ */
9964 .balign 128
9965.L_ALT_op_or_int: /* 0x96 */
9966/* File: x86/alt_stub.S */
9967/*
9968 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9969 * any interesting requests and then jump to the real instruction
9970 * handler. Unlike the Arm handler, we can't do this as a tail call
9971 * because rIBASE is caller save and we need to reload it.
9972 *
9973 * Note that unlike in the Arm implementation, we should never arrive
9974 * here with a zero breakFlag because we always refresh rIBASE on
9975 * return.
9976 */
9977 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009978 movl rSELF, %ecx
9979 movl %ecx, OUT_ARG0(%esp)
9980 leal OFF_FP_SHADOWFRAME(rFP), %eax
9981 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +00009982 movl rPC, OUT_ARG2(%esp)
9983 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +00009984 REFRESH_IBASE
9985 jmp .L_op_nop+(150*128)
9986
9987/* ------------------------------ */
9988 .balign 128
9989.L_ALT_op_xor_int: /* 0x97 */
9990/* File: x86/alt_stub.S */
9991/*
9992 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
9993 * any interesting requests and then jump to the real instruction
9994 * handler. Unlike the Arm handler, we can't do this as a tail call
9995 * because rIBASE is caller save and we need to reload it.
9996 *
9997 * Note that unlike in the Arm implementation, we should never arrive
9998 * here with a zero breakFlag because we always refresh rIBASE on
9999 * return.
10000 */
10001 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010002 movl rSELF, %ecx
10003 movl %ecx, OUT_ARG0(%esp)
10004 leal OFF_FP_SHADOWFRAME(rFP), %eax
10005 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010006 movl rPC, OUT_ARG2(%esp)
10007 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010008 REFRESH_IBASE
10009 jmp .L_op_nop+(151*128)
10010
10011/* ------------------------------ */
10012 .balign 128
10013.L_ALT_op_shl_int: /* 0x98 */
10014/* File: x86/alt_stub.S */
10015/*
10016 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10017 * any interesting requests and then jump to the real instruction
10018 * handler. Unlike the Arm handler, we can't do this as a tail call
10019 * because rIBASE is caller save and we need to reload it.
10020 *
10021 * Note that unlike in the Arm implementation, we should never arrive
10022 * here with a zero breakFlag because we always refresh rIBASE on
10023 * return.
10024 */
10025 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010026 movl rSELF, %ecx
10027 movl %ecx, OUT_ARG0(%esp)
10028 leal OFF_FP_SHADOWFRAME(rFP), %eax
10029 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010030 movl rPC, OUT_ARG2(%esp)
10031 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010032 REFRESH_IBASE
10033 jmp .L_op_nop+(152*128)
10034
10035/* ------------------------------ */
10036 .balign 128
10037.L_ALT_op_shr_int: /* 0x99 */
10038/* File: x86/alt_stub.S */
10039/*
10040 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10041 * any interesting requests and then jump to the real instruction
10042 * handler. Unlike the Arm handler, we can't do this as a tail call
10043 * because rIBASE is caller save and we need to reload it.
10044 *
10045 * Note that unlike in the Arm implementation, we should never arrive
10046 * here with a zero breakFlag because we always refresh rIBASE on
10047 * return.
10048 */
10049 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010050 movl rSELF, %ecx
10051 movl %ecx, OUT_ARG0(%esp)
10052 leal OFF_FP_SHADOWFRAME(rFP), %eax
10053 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010054 movl rPC, OUT_ARG2(%esp)
10055 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010056 REFRESH_IBASE
10057 jmp .L_op_nop+(153*128)
10058
10059/* ------------------------------ */
10060 .balign 128
10061.L_ALT_op_ushr_int: /* 0x9a */
10062/* File: x86/alt_stub.S */
10063/*
10064 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10065 * any interesting requests and then jump to the real instruction
10066 * handler. Unlike the Arm handler, we can't do this as a tail call
10067 * because rIBASE is caller save and we need to reload it.
10068 *
10069 * Note that unlike in the Arm implementation, we should never arrive
10070 * here with a zero breakFlag because we always refresh rIBASE on
10071 * return.
10072 */
10073 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010074 movl rSELF, %ecx
10075 movl %ecx, OUT_ARG0(%esp)
10076 leal OFF_FP_SHADOWFRAME(rFP), %eax
10077 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010078 movl rPC, OUT_ARG2(%esp)
10079 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010080 REFRESH_IBASE
10081 jmp .L_op_nop+(154*128)
10082
10083/* ------------------------------ */
10084 .balign 128
10085.L_ALT_op_add_long: /* 0x9b */
10086/* File: x86/alt_stub.S */
10087/*
10088 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10089 * any interesting requests and then jump to the real instruction
10090 * handler. Unlike the Arm handler, we can't do this as a tail call
10091 * because rIBASE is caller save and we need to reload it.
10092 *
10093 * Note that unlike in the Arm implementation, we should never arrive
10094 * here with a zero breakFlag because we always refresh rIBASE on
10095 * return.
10096 */
10097 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010098 movl rSELF, %ecx
10099 movl %ecx, OUT_ARG0(%esp)
10100 leal OFF_FP_SHADOWFRAME(rFP), %eax
10101 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010102 movl rPC, OUT_ARG2(%esp)
10103 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010104 REFRESH_IBASE
10105 jmp .L_op_nop+(155*128)
10106
10107/* ------------------------------ */
10108 .balign 128
10109.L_ALT_op_sub_long: /* 0x9c */
10110/* File: x86/alt_stub.S */
10111/*
10112 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10113 * any interesting requests and then jump to the real instruction
10114 * handler. Unlike the Arm handler, we can't do this as a tail call
10115 * because rIBASE is caller save and we need to reload it.
10116 *
10117 * Note that unlike in the Arm implementation, we should never arrive
10118 * here with a zero breakFlag because we always refresh rIBASE on
10119 * return.
10120 */
10121 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010122 movl rSELF, %ecx
10123 movl %ecx, OUT_ARG0(%esp)
10124 leal OFF_FP_SHADOWFRAME(rFP), %eax
10125 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010126 movl rPC, OUT_ARG2(%esp)
10127 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010128 REFRESH_IBASE
10129 jmp .L_op_nop+(156*128)
10130
10131/* ------------------------------ */
10132 .balign 128
10133.L_ALT_op_mul_long: /* 0x9d */
10134/* File: x86/alt_stub.S */
10135/*
10136 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10137 * any interesting requests and then jump to the real instruction
10138 * handler. Unlike the Arm handler, we can't do this as a tail call
10139 * because rIBASE is caller save and we need to reload it.
10140 *
10141 * Note that unlike in the Arm implementation, we should never arrive
10142 * here with a zero breakFlag because we always refresh rIBASE on
10143 * return.
10144 */
10145 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010146 movl rSELF, %ecx
10147 movl %ecx, OUT_ARG0(%esp)
10148 leal OFF_FP_SHADOWFRAME(rFP), %eax
10149 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010150 movl rPC, OUT_ARG2(%esp)
10151 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010152 REFRESH_IBASE
10153 jmp .L_op_nop+(157*128)
10154
10155/* ------------------------------ */
10156 .balign 128
10157.L_ALT_op_div_long: /* 0x9e */
10158/* File: x86/alt_stub.S */
10159/*
10160 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10161 * any interesting requests and then jump to the real instruction
10162 * handler. Unlike the Arm handler, we can't do this as a tail call
10163 * because rIBASE is caller save and we need to reload it.
10164 *
10165 * Note that unlike in the Arm implementation, we should never arrive
10166 * here with a zero breakFlag because we always refresh rIBASE on
10167 * return.
10168 */
10169 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010170 movl rSELF, %ecx
10171 movl %ecx, OUT_ARG0(%esp)
10172 leal OFF_FP_SHADOWFRAME(rFP), %eax
10173 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010174 movl rPC, OUT_ARG2(%esp)
10175 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010176 REFRESH_IBASE
10177 jmp .L_op_nop+(158*128)
10178
10179/* ------------------------------ */
10180 .balign 128
10181.L_ALT_op_rem_long: /* 0x9f */
10182/* File: x86/alt_stub.S */
10183/*
10184 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10185 * any interesting requests and then jump to the real instruction
10186 * handler. Unlike the Arm handler, we can't do this as a tail call
10187 * because rIBASE is caller save and we need to reload it.
10188 *
10189 * Note that unlike in the Arm implementation, we should never arrive
10190 * here with a zero breakFlag because we always refresh rIBASE on
10191 * return.
10192 */
10193 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010194 movl rSELF, %ecx
10195 movl %ecx, OUT_ARG0(%esp)
10196 leal OFF_FP_SHADOWFRAME(rFP), %eax
10197 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010198 movl rPC, OUT_ARG2(%esp)
10199 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010200 REFRESH_IBASE
10201 jmp .L_op_nop+(159*128)
10202
10203/* ------------------------------ */
10204 .balign 128
10205.L_ALT_op_and_long: /* 0xa0 */
10206/* File: x86/alt_stub.S */
10207/*
10208 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10209 * any interesting requests and then jump to the real instruction
10210 * handler. Unlike the Arm handler, we can't do this as a tail call
10211 * because rIBASE is caller save and we need to reload it.
10212 *
10213 * Note that unlike in the Arm implementation, we should never arrive
10214 * here with a zero breakFlag because we always refresh rIBASE on
10215 * return.
10216 */
10217 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010218 movl rSELF, %ecx
10219 movl %ecx, OUT_ARG0(%esp)
10220 leal OFF_FP_SHADOWFRAME(rFP), %eax
10221 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010222 movl rPC, OUT_ARG2(%esp)
10223 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010224 REFRESH_IBASE
10225 jmp .L_op_nop+(160*128)
10226
10227/* ------------------------------ */
10228 .balign 128
10229.L_ALT_op_or_long: /* 0xa1 */
10230/* File: x86/alt_stub.S */
10231/*
10232 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10233 * any interesting requests and then jump to the real instruction
10234 * handler. Unlike the Arm handler, we can't do this as a tail call
10235 * because rIBASE is caller save and we need to reload it.
10236 *
10237 * Note that unlike in the Arm implementation, we should never arrive
10238 * here with a zero breakFlag because we always refresh rIBASE on
10239 * return.
10240 */
10241 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010242 movl rSELF, %ecx
10243 movl %ecx, OUT_ARG0(%esp)
10244 leal OFF_FP_SHADOWFRAME(rFP), %eax
10245 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010246 movl rPC, OUT_ARG2(%esp)
10247 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010248 REFRESH_IBASE
10249 jmp .L_op_nop+(161*128)
10250
10251/* ------------------------------ */
10252 .balign 128
10253.L_ALT_op_xor_long: /* 0xa2 */
10254/* File: x86/alt_stub.S */
10255/*
10256 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10257 * any interesting requests and then jump to the real instruction
10258 * handler. Unlike the Arm handler, we can't do this as a tail call
10259 * because rIBASE is caller save and we need to reload it.
10260 *
10261 * Note that unlike in the Arm implementation, we should never arrive
10262 * here with a zero breakFlag because we always refresh rIBASE on
10263 * return.
10264 */
10265 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010266 movl rSELF, %ecx
10267 movl %ecx, OUT_ARG0(%esp)
10268 leal OFF_FP_SHADOWFRAME(rFP), %eax
10269 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010270 movl rPC, OUT_ARG2(%esp)
10271 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010272 REFRESH_IBASE
10273 jmp .L_op_nop+(162*128)
10274
10275/* ------------------------------ */
10276 .balign 128
10277.L_ALT_op_shl_long: /* 0xa3 */
10278/* File: x86/alt_stub.S */
10279/*
10280 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10281 * any interesting requests and then jump to the real instruction
10282 * handler. Unlike the Arm handler, we can't do this as a tail call
10283 * because rIBASE is caller save and we need to reload it.
10284 *
10285 * Note that unlike in the Arm implementation, we should never arrive
10286 * here with a zero breakFlag because we always refresh rIBASE on
10287 * return.
10288 */
10289 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010290 movl rSELF, %ecx
10291 movl %ecx, OUT_ARG0(%esp)
10292 leal OFF_FP_SHADOWFRAME(rFP), %eax
10293 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010294 movl rPC, OUT_ARG2(%esp)
10295 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010296 REFRESH_IBASE
10297 jmp .L_op_nop+(163*128)
10298
10299/* ------------------------------ */
10300 .balign 128
10301.L_ALT_op_shr_long: /* 0xa4 */
10302/* File: x86/alt_stub.S */
10303/*
10304 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10305 * any interesting requests and then jump to the real instruction
10306 * handler. Unlike the Arm handler, we can't do this as a tail call
10307 * because rIBASE is caller save and we need to reload it.
10308 *
10309 * Note that unlike in the Arm implementation, we should never arrive
10310 * here with a zero breakFlag because we always refresh rIBASE on
10311 * return.
10312 */
10313 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010314 movl rSELF, %ecx
10315 movl %ecx, OUT_ARG0(%esp)
10316 leal OFF_FP_SHADOWFRAME(rFP), %eax
10317 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010318 movl rPC, OUT_ARG2(%esp)
10319 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010320 REFRESH_IBASE
10321 jmp .L_op_nop+(164*128)
10322
10323/* ------------------------------ */
10324 .balign 128
10325.L_ALT_op_ushr_long: /* 0xa5 */
10326/* File: x86/alt_stub.S */
10327/*
10328 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10329 * any interesting requests and then jump to the real instruction
10330 * handler. Unlike the Arm handler, we can't do this as a tail call
10331 * because rIBASE is caller save and we need to reload it.
10332 *
10333 * Note that unlike in the Arm implementation, we should never arrive
10334 * here with a zero breakFlag because we always refresh rIBASE on
10335 * return.
10336 */
10337 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010338 movl rSELF, %ecx
10339 movl %ecx, OUT_ARG0(%esp)
10340 leal OFF_FP_SHADOWFRAME(rFP), %eax
10341 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010342 movl rPC, OUT_ARG2(%esp)
10343 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010344 REFRESH_IBASE
10345 jmp .L_op_nop+(165*128)
10346
10347/* ------------------------------ */
10348 .balign 128
10349.L_ALT_op_add_float: /* 0xa6 */
10350/* File: x86/alt_stub.S */
10351/*
10352 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10353 * any interesting requests and then jump to the real instruction
10354 * handler. Unlike the Arm handler, we can't do this as a tail call
10355 * because rIBASE is caller save and we need to reload it.
10356 *
10357 * Note that unlike in the Arm implementation, we should never arrive
10358 * here with a zero breakFlag because we always refresh rIBASE on
10359 * return.
10360 */
10361 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010362 movl rSELF, %ecx
10363 movl %ecx, OUT_ARG0(%esp)
10364 leal OFF_FP_SHADOWFRAME(rFP), %eax
10365 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010366 movl rPC, OUT_ARG2(%esp)
10367 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010368 REFRESH_IBASE
10369 jmp .L_op_nop+(166*128)
10370
10371/* ------------------------------ */
10372 .balign 128
10373.L_ALT_op_sub_float: /* 0xa7 */
10374/* File: x86/alt_stub.S */
10375/*
10376 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10377 * any interesting requests and then jump to the real instruction
10378 * handler. Unlike the Arm handler, we can't do this as a tail call
10379 * because rIBASE is caller save and we need to reload it.
10380 *
10381 * Note that unlike in the Arm implementation, we should never arrive
10382 * here with a zero breakFlag because we always refresh rIBASE on
10383 * return.
10384 */
10385 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010386 movl rSELF, %ecx
10387 movl %ecx, OUT_ARG0(%esp)
10388 leal OFF_FP_SHADOWFRAME(rFP), %eax
10389 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010390 movl rPC, OUT_ARG2(%esp)
10391 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010392 REFRESH_IBASE
10393 jmp .L_op_nop+(167*128)
10394
10395/* ------------------------------ */
10396 .balign 128
10397.L_ALT_op_mul_float: /* 0xa8 */
10398/* File: x86/alt_stub.S */
10399/*
10400 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10401 * any interesting requests and then jump to the real instruction
10402 * handler. Unlike the Arm handler, we can't do this as a tail call
10403 * because rIBASE is caller save and we need to reload it.
10404 *
10405 * Note that unlike in the Arm implementation, we should never arrive
10406 * here with a zero breakFlag because we always refresh rIBASE on
10407 * return.
10408 */
10409 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010410 movl rSELF, %ecx
10411 movl %ecx, OUT_ARG0(%esp)
10412 leal OFF_FP_SHADOWFRAME(rFP), %eax
10413 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010414 movl rPC, OUT_ARG2(%esp)
10415 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010416 REFRESH_IBASE
10417 jmp .L_op_nop+(168*128)
10418
10419/* ------------------------------ */
10420 .balign 128
10421.L_ALT_op_div_float: /* 0xa9 */
10422/* File: x86/alt_stub.S */
10423/*
10424 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10425 * any interesting requests and then jump to the real instruction
10426 * handler. Unlike the Arm handler, we can't do this as a tail call
10427 * because rIBASE is caller save and we need to reload it.
10428 *
10429 * Note that unlike in the Arm implementation, we should never arrive
10430 * here with a zero breakFlag because we always refresh rIBASE on
10431 * return.
10432 */
10433 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010434 movl rSELF, %ecx
10435 movl %ecx, OUT_ARG0(%esp)
10436 leal OFF_FP_SHADOWFRAME(rFP), %eax
10437 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010438 movl rPC, OUT_ARG2(%esp)
10439 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010440 REFRESH_IBASE
10441 jmp .L_op_nop+(169*128)
10442
10443/* ------------------------------ */
10444 .balign 128
10445.L_ALT_op_rem_float: /* 0xaa */
10446/* File: x86/alt_stub.S */
10447/*
10448 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10449 * any interesting requests and then jump to the real instruction
10450 * handler. Unlike the Arm handler, we can't do this as a tail call
10451 * because rIBASE is caller save and we need to reload it.
10452 *
10453 * Note that unlike in the Arm implementation, we should never arrive
10454 * here with a zero breakFlag because we always refresh rIBASE on
10455 * return.
10456 */
10457 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010458 movl rSELF, %ecx
10459 movl %ecx, OUT_ARG0(%esp)
10460 leal OFF_FP_SHADOWFRAME(rFP), %eax
10461 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010462 movl rPC, OUT_ARG2(%esp)
10463 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010464 REFRESH_IBASE
10465 jmp .L_op_nop+(170*128)
10466
10467/* ------------------------------ */
10468 .balign 128
10469.L_ALT_op_add_double: /* 0xab */
10470/* File: x86/alt_stub.S */
10471/*
10472 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10473 * any interesting requests and then jump to the real instruction
10474 * handler. Unlike the Arm handler, we can't do this as a tail call
10475 * because rIBASE is caller save and we need to reload it.
10476 *
10477 * Note that unlike in the Arm implementation, we should never arrive
10478 * here with a zero breakFlag because we always refresh rIBASE on
10479 * return.
10480 */
10481 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010482 movl rSELF, %ecx
10483 movl %ecx, OUT_ARG0(%esp)
10484 leal OFF_FP_SHADOWFRAME(rFP), %eax
10485 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010486 movl rPC, OUT_ARG2(%esp)
10487 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010488 REFRESH_IBASE
10489 jmp .L_op_nop+(171*128)
10490
10491/* ------------------------------ */
10492 .balign 128
10493.L_ALT_op_sub_double: /* 0xac */
10494/* File: x86/alt_stub.S */
10495/*
10496 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10497 * any interesting requests and then jump to the real instruction
10498 * handler. Unlike the Arm handler, we can't do this as a tail call
10499 * because rIBASE is caller save and we need to reload it.
10500 *
10501 * Note that unlike in the Arm implementation, we should never arrive
10502 * here with a zero breakFlag because we always refresh rIBASE on
10503 * return.
10504 */
10505 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010506 movl rSELF, %ecx
10507 movl %ecx, OUT_ARG0(%esp)
10508 leal OFF_FP_SHADOWFRAME(rFP), %eax
10509 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010510 movl rPC, OUT_ARG2(%esp)
10511 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010512 REFRESH_IBASE
10513 jmp .L_op_nop+(172*128)
10514
10515/* ------------------------------ */
10516 .balign 128
10517.L_ALT_op_mul_double: /* 0xad */
10518/* File: x86/alt_stub.S */
10519/*
10520 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10521 * any interesting requests and then jump to the real instruction
10522 * handler. Unlike the Arm handler, we can't do this as a tail call
10523 * because rIBASE is caller save and we need to reload it.
10524 *
10525 * Note that unlike in the Arm implementation, we should never arrive
10526 * here with a zero breakFlag because we always refresh rIBASE on
10527 * return.
10528 */
10529 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010530 movl rSELF, %ecx
10531 movl %ecx, OUT_ARG0(%esp)
10532 leal OFF_FP_SHADOWFRAME(rFP), %eax
10533 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010534 movl rPC, OUT_ARG2(%esp)
10535 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010536 REFRESH_IBASE
10537 jmp .L_op_nop+(173*128)
10538
10539/* ------------------------------ */
10540 .balign 128
10541.L_ALT_op_div_double: /* 0xae */
10542/* File: x86/alt_stub.S */
10543/*
10544 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10545 * any interesting requests and then jump to the real instruction
10546 * handler. Unlike the Arm handler, we can't do this as a tail call
10547 * because rIBASE is caller save and we need to reload it.
10548 *
10549 * Note that unlike in the Arm implementation, we should never arrive
10550 * here with a zero breakFlag because we always refresh rIBASE on
10551 * return.
10552 */
10553 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010554 movl rSELF, %ecx
10555 movl %ecx, OUT_ARG0(%esp)
10556 leal OFF_FP_SHADOWFRAME(rFP), %eax
10557 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010558 movl rPC, OUT_ARG2(%esp)
10559 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010560 REFRESH_IBASE
10561 jmp .L_op_nop+(174*128)
10562
10563/* ------------------------------ */
10564 .balign 128
10565.L_ALT_op_rem_double: /* 0xaf */
10566/* File: x86/alt_stub.S */
10567/*
10568 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10569 * any interesting requests and then jump to the real instruction
10570 * handler. Unlike the Arm handler, we can't do this as a tail call
10571 * because rIBASE is caller save and we need to reload it.
10572 *
10573 * Note that unlike in the Arm implementation, we should never arrive
10574 * here with a zero breakFlag because we always refresh rIBASE on
10575 * return.
10576 */
10577 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010578 movl rSELF, %ecx
10579 movl %ecx, OUT_ARG0(%esp)
10580 leal OFF_FP_SHADOWFRAME(rFP), %eax
10581 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010582 movl rPC, OUT_ARG2(%esp)
10583 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010584 REFRESH_IBASE
10585 jmp .L_op_nop+(175*128)
10586
10587/* ------------------------------ */
10588 .balign 128
10589.L_ALT_op_add_int_2addr: /* 0xb0 */
10590/* File: x86/alt_stub.S */
10591/*
10592 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10593 * any interesting requests and then jump to the real instruction
10594 * handler. Unlike the Arm handler, we can't do this as a tail call
10595 * because rIBASE is caller save and we need to reload it.
10596 *
10597 * Note that unlike in the Arm implementation, we should never arrive
10598 * here with a zero breakFlag because we always refresh rIBASE on
10599 * return.
10600 */
10601 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010602 movl rSELF, %ecx
10603 movl %ecx, OUT_ARG0(%esp)
10604 leal OFF_FP_SHADOWFRAME(rFP), %eax
10605 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010606 movl rPC, OUT_ARG2(%esp)
10607 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010608 REFRESH_IBASE
10609 jmp .L_op_nop+(176*128)
10610
10611/* ------------------------------ */
10612 .balign 128
10613.L_ALT_op_sub_int_2addr: /* 0xb1 */
10614/* File: x86/alt_stub.S */
10615/*
10616 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10617 * any interesting requests and then jump to the real instruction
10618 * handler. Unlike the Arm handler, we can't do this as a tail call
10619 * because rIBASE is caller save and we need to reload it.
10620 *
10621 * Note that unlike in the Arm implementation, we should never arrive
10622 * here with a zero breakFlag because we always refresh rIBASE on
10623 * return.
10624 */
10625 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010626 movl rSELF, %ecx
10627 movl %ecx, OUT_ARG0(%esp)
10628 leal OFF_FP_SHADOWFRAME(rFP), %eax
10629 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010630 movl rPC, OUT_ARG2(%esp)
10631 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010632 REFRESH_IBASE
10633 jmp .L_op_nop+(177*128)
10634
10635/* ------------------------------ */
10636 .balign 128
10637.L_ALT_op_mul_int_2addr: /* 0xb2 */
10638/* File: x86/alt_stub.S */
10639/*
10640 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10641 * any interesting requests and then jump to the real instruction
10642 * handler. Unlike the Arm handler, we can't do this as a tail call
10643 * because rIBASE is caller save and we need to reload it.
10644 *
10645 * Note that unlike in the Arm implementation, we should never arrive
10646 * here with a zero breakFlag because we always refresh rIBASE on
10647 * return.
10648 */
10649 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010650 movl rSELF, %ecx
10651 movl %ecx, OUT_ARG0(%esp)
10652 leal OFF_FP_SHADOWFRAME(rFP), %eax
10653 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010654 movl rPC, OUT_ARG2(%esp)
10655 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010656 REFRESH_IBASE
10657 jmp .L_op_nop+(178*128)
10658
10659/* ------------------------------ */
10660 .balign 128
10661.L_ALT_op_div_int_2addr: /* 0xb3 */
10662/* File: x86/alt_stub.S */
10663/*
10664 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10665 * any interesting requests and then jump to the real instruction
10666 * handler. Unlike the Arm handler, we can't do this as a tail call
10667 * because rIBASE is caller save and we need to reload it.
10668 *
10669 * Note that unlike in the Arm implementation, we should never arrive
10670 * here with a zero breakFlag because we always refresh rIBASE on
10671 * return.
10672 */
10673 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010674 movl rSELF, %ecx
10675 movl %ecx, OUT_ARG0(%esp)
10676 leal OFF_FP_SHADOWFRAME(rFP), %eax
10677 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010678 movl rPC, OUT_ARG2(%esp)
10679 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010680 REFRESH_IBASE
10681 jmp .L_op_nop+(179*128)
10682
10683/* ------------------------------ */
10684 .balign 128
10685.L_ALT_op_rem_int_2addr: /* 0xb4 */
10686/* File: x86/alt_stub.S */
10687/*
10688 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10689 * any interesting requests and then jump to the real instruction
10690 * handler. Unlike the Arm handler, we can't do this as a tail call
10691 * because rIBASE is caller save and we need to reload it.
10692 *
10693 * Note that unlike in the Arm implementation, we should never arrive
10694 * here with a zero breakFlag because we always refresh rIBASE on
10695 * return.
10696 */
10697 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010698 movl rSELF, %ecx
10699 movl %ecx, OUT_ARG0(%esp)
10700 leal OFF_FP_SHADOWFRAME(rFP), %eax
10701 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010702 movl rPC, OUT_ARG2(%esp)
10703 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010704 REFRESH_IBASE
10705 jmp .L_op_nop+(180*128)
10706
10707/* ------------------------------ */
10708 .balign 128
10709.L_ALT_op_and_int_2addr: /* 0xb5 */
10710/* File: x86/alt_stub.S */
10711/*
10712 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10713 * any interesting requests and then jump to the real instruction
10714 * handler. Unlike the Arm handler, we can't do this as a tail call
10715 * because rIBASE is caller save and we need to reload it.
10716 *
10717 * Note that unlike in the Arm implementation, we should never arrive
10718 * here with a zero breakFlag because we always refresh rIBASE on
10719 * return.
10720 */
10721 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010722 movl rSELF, %ecx
10723 movl %ecx, OUT_ARG0(%esp)
10724 leal OFF_FP_SHADOWFRAME(rFP), %eax
10725 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010726 movl rPC, OUT_ARG2(%esp)
10727 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010728 REFRESH_IBASE
10729 jmp .L_op_nop+(181*128)
10730
10731/* ------------------------------ */
10732 .balign 128
10733.L_ALT_op_or_int_2addr: /* 0xb6 */
10734/* File: x86/alt_stub.S */
10735/*
10736 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10737 * any interesting requests and then jump to the real instruction
10738 * handler. Unlike the Arm handler, we can't do this as a tail call
10739 * because rIBASE is caller save and we need to reload it.
10740 *
10741 * Note that unlike in the Arm implementation, we should never arrive
10742 * here with a zero breakFlag because we always refresh rIBASE on
10743 * return.
10744 */
10745 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010746 movl rSELF, %ecx
10747 movl %ecx, OUT_ARG0(%esp)
10748 leal OFF_FP_SHADOWFRAME(rFP), %eax
10749 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010750 movl rPC, OUT_ARG2(%esp)
10751 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010752 REFRESH_IBASE
10753 jmp .L_op_nop+(182*128)
10754
10755/* ------------------------------ */
10756 .balign 128
10757.L_ALT_op_xor_int_2addr: /* 0xb7 */
10758/* File: x86/alt_stub.S */
10759/*
10760 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10761 * any interesting requests and then jump to the real instruction
10762 * handler. Unlike the Arm handler, we can't do this as a tail call
10763 * because rIBASE is caller save and we need to reload it.
10764 *
10765 * Note that unlike in the Arm implementation, we should never arrive
10766 * here with a zero breakFlag because we always refresh rIBASE on
10767 * return.
10768 */
10769 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010770 movl rSELF, %ecx
10771 movl %ecx, OUT_ARG0(%esp)
10772 leal OFF_FP_SHADOWFRAME(rFP), %eax
10773 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010774 movl rPC, OUT_ARG2(%esp)
10775 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010776 REFRESH_IBASE
10777 jmp .L_op_nop+(183*128)
10778
10779/* ------------------------------ */
10780 .balign 128
10781.L_ALT_op_shl_int_2addr: /* 0xb8 */
10782/* File: x86/alt_stub.S */
10783/*
10784 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10785 * any interesting requests and then jump to the real instruction
10786 * handler. Unlike the Arm handler, we can't do this as a tail call
10787 * because rIBASE is caller save and we need to reload it.
10788 *
10789 * Note that unlike in the Arm implementation, we should never arrive
10790 * here with a zero breakFlag because we always refresh rIBASE on
10791 * return.
10792 */
10793 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010794 movl rSELF, %ecx
10795 movl %ecx, OUT_ARG0(%esp)
10796 leal OFF_FP_SHADOWFRAME(rFP), %eax
10797 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010798 movl rPC, OUT_ARG2(%esp)
10799 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010800 REFRESH_IBASE
10801 jmp .L_op_nop+(184*128)
10802
10803/* ------------------------------ */
10804 .balign 128
10805.L_ALT_op_shr_int_2addr: /* 0xb9 */
10806/* File: x86/alt_stub.S */
10807/*
10808 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10809 * any interesting requests and then jump to the real instruction
10810 * handler. Unlike the Arm handler, we can't do this as a tail call
10811 * because rIBASE is caller save and we need to reload it.
10812 *
10813 * Note that unlike in the Arm implementation, we should never arrive
10814 * here with a zero breakFlag because we always refresh rIBASE on
10815 * return.
10816 */
10817 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010818 movl rSELF, %ecx
10819 movl %ecx, OUT_ARG0(%esp)
10820 leal OFF_FP_SHADOWFRAME(rFP), %eax
10821 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010822 movl rPC, OUT_ARG2(%esp)
10823 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010824 REFRESH_IBASE
10825 jmp .L_op_nop+(185*128)
10826
10827/* ------------------------------ */
10828 .balign 128
10829.L_ALT_op_ushr_int_2addr: /* 0xba */
10830/* File: x86/alt_stub.S */
10831/*
10832 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10833 * any interesting requests and then jump to the real instruction
10834 * handler. Unlike the Arm handler, we can't do this as a tail call
10835 * because rIBASE is caller save and we need to reload it.
10836 *
10837 * Note that unlike in the Arm implementation, we should never arrive
10838 * here with a zero breakFlag because we always refresh rIBASE on
10839 * return.
10840 */
10841 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010842 movl rSELF, %ecx
10843 movl %ecx, OUT_ARG0(%esp)
10844 leal OFF_FP_SHADOWFRAME(rFP), %eax
10845 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010846 movl rPC, OUT_ARG2(%esp)
10847 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010848 REFRESH_IBASE
10849 jmp .L_op_nop+(186*128)
10850
10851/* ------------------------------ */
10852 .balign 128
10853.L_ALT_op_add_long_2addr: /* 0xbb */
10854/* File: x86/alt_stub.S */
10855/*
10856 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10857 * any interesting requests and then jump to the real instruction
10858 * handler. Unlike the Arm handler, we can't do this as a tail call
10859 * because rIBASE is caller save and we need to reload it.
10860 *
10861 * Note that unlike in the Arm implementation, we should never arrive
10862 * here with a zero breakFlag because we always refresh rIBASE on
10863 * return.
10864 */
10865 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010866 movl rSELF, %ecx
10867 movl %ecx, OUT_ARG0(%esp)
10868 leal OFF_FP_SHADOWFRAME(rFP), %eax
10869 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010870 movl rPC, OUT_ARG2(%esp)
10871 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010872 REFRESH_IBASE
10873 jmp .L_op_nop+(187*128)
10874
10875/* ------------------------------ */
10876 .balign 128
10877.L_ALT_op_sub_long_2addr: /* 0xbc */
10878/* File: x86/alt_stub.S */
10879/*
10880 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10881 * any interesting requests and then jump to the real instruction
10882 * handler. Unlike the Arm handler, we can't do this as a tail call
10883 * because rIBASE is caller save and we need to reload it.
10884 *
10885 * Note that unlike in the Arm implementation, we should never arrive
10886 * here with a zero breakFlag because we always refresh rIBASE on
10887 * return.
10888 */
10889 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010890 movl rSELF, %ecx
10891 movl %ecx, OUT_ARG0(%esp)
10892 leal OFF_FP_SHADOWFRAME(rFP), %eax
10893 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010894 movl rPC, OUT_ARG2(%esp)
10895 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010896 REFRESH_IBASE
10897 jmp .L_op_nop+(188*128)
10898
10899/* ------------------------------ */
10900 .balign 128
10901.L_ALT_op_mul_long_2addr: /* 0xbd */
10902/* File: x86/alt_stub.S */
10903/*
10904 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10905 * any interesting requests and then jump to the real instruction
10906 * handler. Unlike the Arm handler, we can't do this as a tail call
10907 * because rIBASE is caller save and we need to reload it.
10908 *
10909 * Note that unlike in the Arm implementation, we should never arrive
10910 * here with a zero breakFlag because we always refresh rIBASE on
10911 * return.
10912 */
10913 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010914 movl rSELF, %ecx
10915 movl %ecx, OUT_ARG0(%esp)
10916 leal OFF_FP_SHADOWFRAME(rFP), %eax
10917 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010918 movl rPC, OUT_ARG2(%esp)
10919 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010920 REFRESH_IBASE
10921 jmp .L_op_nop+(189*128)
10922
10923/* ------------------------------ */
10924 .balign 128
10925.L_ALT_op_div_long_2addr: /* 0xbe */
10926/* File: x86/alt_stub.S */
10927/*
10928 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10929 * any interesting requests and then jump to the real instruction
10930 * handler. Unlike the Arm handler, we can't do this as a tail call
10931 * because rIBASE is caller save and we need to reload it.
10932 *
10933 * Note that unlike in the Arm implementation, we should never arrive
10934 * here with a zero breakFlag because we always refresh rIBASE on
10935 * return.
10936 */
10937 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010938 movl rSELF, %ecx
10939 movl %ecx, OUT_ARG0(%esp)
10940 leal OFF_FP_SHADOWFRAME(rFP), %eax
10941 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010942 movl rPC, OUT_ARG2(%esp)
10943 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010944 REFRESH_IBASE
10945 jmp .L_op_nop+(190*128)
10946
10947/* ------------------------------ */
10948 .balign 128
10949.L_ALT_op_rem_long_2addr: /* 0xbf */
10950/* File: x86/alt_stub.S */
10951/*
10952 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10953 * any interesting requests and then jump to the real instruction
10954 * handler. Unlike the Arm handler, we can't do this as a tail call
10955 * because rIBASE is caller save and we need to reload it.
10956 *
10957 * Note that unlike in the Arm implementation, we should never arrive
10958 * here with a zero breakFlag because we always refresh rIBASE on
10959 * return.
10960 */
10961 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010962 movl rSELF, %ecx
10963 movl %ecx, OUT_ARG0(%esp)
10964 leal OFF_FP_SHADOWFRAME(rFP), %eax
10965 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010966 movl rPC, OUT_ARG2(%esp)
10967 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010968 REFRESH_IBASE
10969 jmp .L_op_nop+(191*128)
10970
10971/* ------------------------------ */
10972 .balign 128
10973.L_ALT_op_and_long_2addr: /* 0xc0 */
10974/* File: x86/alt_stub.S */
10975/*
10976 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
10977 * any interesting requests and then jump to the real instruction
10978 * handler. Unlike the Arm handler, we can't do this as a tail call
10979 * because rIBASE is caller save and we need to reload it.
10980 *
10981 * Note that unlike in the Arm implementation, we should never arrive
10982 * here with a zero breakFlag because we always refresh rIBASE on
10983 * return.
10984 */
10985 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010986 movl rSELF, %ecx
10987 movl %ecx, OUT_ARG0(%esp)
10988 leal OFF_FP_SHADOWFRAME(rFP), %eax
10989 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000010990 movl rPC, OUT_ARG2(%esp)
10991 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000010992 REFRESH_IBASE
10993 jmp .L_op_nop+(192*128)
10994
10995/* ------------------------------ */
10996 .balign 128
10997.L_ALT_op_or_long_2addr: /* 0xc1 */
10998/* File: x86/alt_stub.S */
10999/*
11000 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11001 * any interesting requests and then jump to the real instruction
11002 * handler. Unlike the Arm handler, we can't do this as a tail call
11003 * because rIBASE is caller save and we need to reload it.
11004 *
11005 * Note that unlike in the Arm implementation, we should never arrive
11006 * here with a zero breakFlag because we always refresh rIBASE on
11007 * return.
11008 */
11009 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011010 movl rSELF, %ecx
11011 movl %ecx, OUT_ARG0(%esp)
11012 leal OFF_FP_SHADOWFRAME(rFP), %eax
11013 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011014 movl rPC, OUT_ARG2(%esp)
11015 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011016 REFRESH_IBASE
11017 jmp .L_op_nop+(193*128)
11018
11019/* ------------------------------ */
11020 .balign 128
11021.L_ALT_op_xor_long_2addr: /* 0xc2 */
11022/* File: x86/alt_stub.S */
11023/*
11024 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11025 * any interesting requests and then jump to the real instruction
11026 * handler. Unlike the Arm handler, we can't do this as a tail call
11027 * because rIBASE is caller save and we need to reload it.
11028 *
11029 * Note that unlike in the Arm implementation, we should never arrive
11030 * here with a zero breakFlag because we always refresh rIBASE on
11031 * return.
11032 */
11033 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011034 movl rSELF, %ecx
11035 movl %ecx, OUT_ARG0(%esp)
11036 leal OFF_FP_SHADOWFRAME(rFP), %eax
11037 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011038 movl rPC, OUT_ARG2(%esp)
11039 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011040 REFRESH_IBASE
11041 jmp .L_op_nop+(194*128)
11042
11043/* ------------------------------ */
11044 .balign 128
11045.L_ALT_op_shl_long_2addr: /* 0xc3 */
11046/* File: x86/alt_stub.S */
11047/*
11048 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11049 * any interesting requests and then jump to the real instruction
11050 * handler. Unlike the Arm handler, we can't do this as a tail call
11051 * because rIBASE is caller save and we need to reload it.
11052 *
11053 * Note that unlike in the Arm implementation, we should never arrive
11054 * here with a zero breakFlag because we always refresh rIBASE on
11055 * return.
11056 */
11057 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011058 movl rSELF, %ecx
11059 movl %ecx, OUT_ARG0(%esp)
11060 leal OFF_FP_SHADOWFRAME(rFP), %eax
11061 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011062 movl rPC, OUT_ARG2(%esp)
11063 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011064 REFRESH_IBASE
11065 jmp .L_op_nop+(195*128)
11066
11067/* ------------------------------ */
11068 .balign 128
11069.L_ALT_op_shr_long_2addr: /* 0xc4 */
11070/* File: x86/alt_stub.S */
11071/*
11072 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11073 * any interesting requests and then jump to the real instruction
11074 * handler. Unlike the Arm handler, we can't do this as a tail call
11075 * because rIBASE is caller save and we need to reload it.
11076 *
11077 * Note that unlike in the Arm implementation, we should never arrive
11078 * here with a zero breakFlag because we always refresh rIBASE on
11079 * return.
11080 */
11081 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011082 movl rSELF, %ecx
11083 movl %ecx, OUT_ARG0(%esp)
11084 leal OFF_FP_SHADOWFRAME(rFP), %eax
11085 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011086 movl rPC, OUT_ARG2(%esp)
11087 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011088 REFRESH_IBASE
11089 jmp .L_op_nop+(196*128)
11090
11091/* ------------------------------ */
11092 .balign 128
11093.L_ALT_op_ushr_long_2addr: /* 0xc5 */
11094/* File: x86/alt_stub.S */
11095/*
11096 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11097 * any interesting requests and then jump to the real instruction
11098 * handler. Unlike the Arm handler, we can't do this as a tail call
11099 * because rIBASE is caller save and we need to reload it.
11100 *
11101 * Note that unlike in the Arm implementation, we should never arrive
11102 * here with a zero breakFlag because we always refresh rIBASE on
11103 * return.
11104 */
11105 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011106 movl rSELF, %ecx
11107 movl %ecx, OUT_ARG0(%esp)
11108 leal OFF_FP_SHADOWFRAME(rFP), %eax
11109 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011110 movl rPC, OUT_ARG2(%esp)
11111 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011112 REFRESH_IBASE
11113 jmp .L_op_nop+(197*128)
11114
11115/* ------------------------------ */
11116 .balign 128
11117.L_ALT_op_add_float_2addr: /* 0xc6 */
11118/* File: x86/alt_stub.S */
11119/*
11120 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11121 * any interesting requests and then jump to the real instruction
11122 * handler. Unlike the Arm handler, we can't do this as a tail call
11123 * because rIBASE is caller save and we need to reload it.
11124 *
11125 * Note that unlike in the Arm implementation, we should never arrive
11126 * here with a zero breakFlag because we always refresh rIBASE on
11127 * return.
11128 */
11129 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011130 movl rSELF, %ecx
11131 movl %ecx, OUT_ARG0(%esp)
11132 leal OFF_FP_SHADOWFRAME(rFP), %eax
11133 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011134 movl rPC, OUT_ARG2(%esp)
11135 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011136 REFRESH_IBASE
11137 jmp .L_op_nop+(198*128)
11138
11139/* ------------------------------ */
11140 .balign 128
11141.L_ALT_op_sub_float_2addr: /* 0xc7 */
11142/* File: x86/alt_stub.S */
11143/*
11144 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11145 * any interesting requests and then jump to the real instruction
11146 * handler. Unlike the Arm handler, we can't do this as a tail call
11147 * because rIBASE is caller save and we need to reload it.
11148 *
11149 * Note that unlike in the Arm implementation, we should never arrive
11150 * here with a zero breakFlag because we always refresh rIBASE on
11151 * return.
11152 */
11153 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011154 movl rSELF, %ecx
11155 movl %ecx, OUT_ARG0(%esp)
11156 leal OFF_FP_SHADOWFRAME(rFP), %eax
11157 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011158 movl rPC, OUT_ARG2(%esp)
11159 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011160 REFRESH_IBASE
11161 jmp .L_op_nop+(199*128)
11162
11163/* ------------------------------ */
11164 .balign 128
11165.L_ALT_op_mul_float_2addr: /* 0xc8 */
11166/* File: x86/alt_stub.S */
11167/*
11168 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11169 * any interesting requests and then jump to the real instruction
11170 * handler. Unlike the Arm handler, we can't do this as a tail call
11171 * because rIBASE is caller save and we need to reload it.
11172 *
11173 * Note that unlike in the Arm implementation, we should never arrive
11174 * here with a zero breakFlag because we always refresh rIBASE on
11175 * return.
11176 */
11177 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011178 movl rSELF, %ecx
11179 movl %ecx, OUT_ARG0(%esp)
11180 leal OFF_FP_SHADOWFRAME(rFP), %eax
11181 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011182 movl rPC, OUT_ARG2(%esp)
11183 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011184 REFRESH_IBASE
11185 jmp .L_op_nop+(200*128)
11186
11187/* ------------------------------ */
11188 .balign 128
11189.L_ALT_op_div_float_2addr: /* 0xc9 */
11190/* File: x86/alt_stub.S */
11191/*
11192 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11193 * any interesting requests and then jump to the real instruction
11194 * handler. Unlike the Arm handler, we can't do this as a tail call
11195 * because rIBASE is caller save and we need to reload it.
11196 *
11197 * Note that unlike in the Arm implementation, we should never arrive
11198 * here with a zero breakFlag because we always refresh rIBASE on
11199 * return.
11200 */
11201 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011202 movl rSELF, %ecx
11203 movl %ecx, OUT_ARG0(%esp)
11204 leal OFF_FP_SHADOWFRAME(rFP), %eax
11205 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011206 movl rPC, OUT_ARG2(%esp)
11207 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011208 REFRESH_IBASE
11209 jmp .L_op_nop+(201*128)
11210
11211/* ------------------------------ */
11212 .balign 128
11213.L_ALT_op_rem_float_2addr: /* 0xca */
11214/* File: x86/alt_stub.S */
11215/*
11216 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11217 * any interesting requests and then jump to the real instruction
11218 * handler. Unlike the Arm handler, we can't do this as a tail call
11219 * because rIBASE is caller save and we need to reload it.
11220 *
11221 * Note that unlike in the Arm implementation, we should never arrive
11222 * here with a zero breakFlag because we always refresh rIBASE on
11223 * return.
11224 */
11225 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011226 movl rSELF, %ecx
11227 movl %ecx, OUT_ARG0(%esp)
11228 leal OFF_FP_SHADOWFRAME(rFP), %eax
11229 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011230 movl rPC, OUT_ARG2(%esp)
11231 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011232 REFRESH_IBASE
11233 jmp .L_op_nop+(202*128)
11234
11235/* ------------------------------ */
11236 .balign 128
11237.L_ALT_op_add_double_2addr: /* 0xcb */
11238/* File: x86/alt_stub.S */
11239/*
11240 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11241 * any interesting requests and then jump to the real instruction
11242 * handler. Unlike the Arm handler, we can't do this as a tail call
11243 * because rIBASE is caller save and we need to reload it.
11244 *
11245 * Note that unlike in the Arm implementation, we should never arrive
11246 * here with a zero breakFlag because we always refresh rIBASE on
11247 * return.
11248 */
11249 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011250 movl rSELF, %ecx
11251 movl %ecx, OUT_ARG0(%esp)
11252 leal OFF_FP_SHADOWFRAME(rFP), %eax
11253 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011254 movl rPC, OUT_ARG2(%esp)
11255 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011256 REFRESH_IBASE
11257 jmp .L_op_nop+(203*128)
11258
11259/* ------------------------------ */
11260 .balign 128
11261.L_ALT_op_sub_double_2addr: /* 0xcc */
11262/* File: x86/alt_stub.S */
11263/*
11264 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11265 * any interesting requests and then jump to the real instruction
11266 * handler. Unlike the Arm handler, we can't do this as a tail call
11267 * because rIBASE is caller save and we need to reload it.
11268 *
11269 * Note that unlike in the Arm implementation, we should never arrive
11270 * here with a zero breakFlag because we always refresh rIBASE on
11271 * return.
11272 */
11273 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011274 movl rSELF, %ecx
11275 movl %ecx, OUT_ARG0(%esp)
11276 leal OFF_FP_SHADOWFRAME(rFP), %eax
11277 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011278 movl rPC, OUT_ARG2(%esp)
11279 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011280 REFRESH_IBASE
11281 jmp .L_op_nop+(204*128)
11282
11283/* ------------------------------ */
11284 .balign 128
11285.L_ALT_op_mul_double_2addr: /* 0xcd */
11286/* File: x86/alt_stub.S */
11287/*
11288 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11289 * any interesting requests and then jump to the real instruction
11290 * handler. Unlike the Arm handler, we can't do this as a tail call
11291 * because rIBASE is caller save and we need to reload it.
11292 *
11293 * Note that unlike in the Arm implementation, we should never arrive
11294 * here with a zero breakFlag because we always refresh rIBASE on
11295 * return.
11296 */
11297 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011298 movl rSELF, %ecx
11299 movl %ecx, OUT_ARG0(%esp)
11300 leal OFF_FP_SHADOWFRAME(rFP), %eax
11301 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011302 movl rPC, OUT_ARG2(%esp)
11303 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011304 REFRESH_IBASE
11305 jmp .L_op_nop+(205*128)
11306
11307/* ------------------------------ */
11308 .balign 128
11309.L_ALT_op_div_double_2addr: /* 0xce */
11310/* File: x86/alt_stub.S */
11311/*
11312 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11313 * any interesting requests and then jump to the real instruction
11314 * handler. Unlike the Arm handler, we can't do this as a tail call
11315 * because rIBASE is caller save and we need to reload it.
11316 *
11317 * Note that unlike in the Arm implementation, we should never arrive
11318 * here with a zero breakFlag because we always refresh rIBASE on
11319 * return.
11320 */
11321 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011322 movl rSELF, %ecx
11323 movl %ecx, OUT_ARG0(%esp)
11324 leal OFF_FP_SHADOWFRAME(rFP), %eax
11325 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011326 movl rPC, OUT_ARG2(%esp)
11327 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011328 REFRESH_IBASE
11329 jmp .L_op_nop+(206*128)
11330
11331/* ------------------------------ */
11332 .balign 128
11333.L_ALT_op_rem_double_2addr: /* 0xcf */
11334/* File: x86/alt_stub.S */
11335/*
11336 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11337 * any interesting requests and then jump to the real instruction
11338 * handler. Unlike the Arm handler, we can't do this as a tail call
11339 * because rIBASE is caller save and we need to reload it.
11340 *
11341 * Note that unlike in the Arm implementation, we should never arrive
11342 * here with a zero breakFlag because we always refresh rIBASE on
11343 * return.
11344 */
11345 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011346 movl rSELF, %ecx
11347 movl %ecx, OUT_ARG0(%esp)
11348 leal OFF_FP_SHADOWFRAME(rFP), %eax
11349 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011350 movl rPC, OUT_ARG2(%esp)
11351 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011352 REFRESH_IBASE
11353 jmp .L_op_nop+(207*128)
11354
11355/* ------------------------------ */
11356 .balign 128
11357.L_ALT_op_add_int_lit16: /* 0xd0 */
11358/* File: x86/alt_stub.S */
11359/*
11360 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11361 * any interesting requests and then jump to the real instruction
11362 * handler. Unlike the Arm handler, we can't do this as a tail call
11363 * because rIBASE is caller save and we need to reload it.
11364 *
11365 * Note that unlike in the Arm implementation, we should never arrive
11366 * here with a zero breakFlag because we always refresh rIBASE on
11367 * return.
11368 */
11369 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011370 movl rSELF, %ecx
11371 movl %ecx, OUT_ARG0(%esp)
11372 leal OFF_FP_SHADOWFRAME(rFP), %eax
11373 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011374 movl rPC, OUT_ARG2(%esp)
11375 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011376 REFRESH_IBASE
11377 jmp .L_op_nop+(208*128)
11378
11379/* ------------------------------ */
11380 .balign 128
11381.L_ALT_op_rsub_int: /* 0xd1 */
11382/* File: x86/alt_stub.S */
11383/*
11384 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11385 * any interesting requests and then jump to the real instruction
11386 * handler. Unlike the Arm handler, we can't do this as a tail call
11387 * because rIBASE is caller save and we need to reload it.
11388 *
11389 * Note that unlike in the Arm implementation, we should never arrive
11390 * here with a zero breakFlag because we always refresh rIBASE on
11391 * return.
11392 */
11393 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011394 movl rSELF, %ecx
11395 movl %ecx, OUT_ARG0(%esp)
11396 leal OFF_FP_SHADOWFRAME(rFP), %eax
11397 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011398 movl rPC, OUT_ARG2(%esp)
11399 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011400 REFRESH_IBASE
11401 jmp .L_op_nop+(209*128)
11402
11403/* ------------------------------ */
11404 .balign 128
11405.L_ALT_op_mul_int_lit16: /* 0xd2 */
11406/* File: x86/alt_stub.S */
11407/*
11408 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11409 * any interesting requests and then jump to the real instruction
11410 * handler. Unlike the Arm handler, we can't do this as a tail call
11411 * because rIBASE is caller save and we need to reload it.
11412 *
11413 * Note that unlike in the Arm implementation, we should never arrive
11414 * here with a zero breakFlag because we always refresh rIBASE on
11415 * return.
11416 */
11417 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011418 movl rSELF, %ecx
11419 movl %ecx, OUT_ARG0(%esp)
11420 leal OFF_FP_SHADOWFRAME(rFP), %eax
11421 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011422 movl rPC, OUT_ARG2(%esp)
11423 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011424 REFRESH_IBASE
11425 jmp .L_op_nop+(210*128)
11426
11427/* ------------------------------ */
11428 .balign 128
11429.L_ALT_op_div_int_lit16: /* 0xd3 */
11430/* File: x86/alt_stub.S */
11431/*
11432 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11433 * any interesting requests and then jump to the real instruction
11434 * handler. Unlike the Arm handler, we can't do this as a tail call
11435 * because rIBASE is caller save and we need to reload it.
11436 *
11437 * Note that unlike in the Arm implementation, we should never arrive
11438 * here with a zero breakFlag because we always refresh rIBASE on
11439 * return.
11440 */
11441 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011442 movl rSELF, %ecx
11443 movl %ecx, OUT_ARG0(%esp)
11444 leal OFF_FP_SHADOWFRAME(rFP), %eax
11445 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011446 movl rPC, OUT_ARG2(%esp)
11447 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011448 REFRESH_IBASE
11449 jmp .L_op_nop+(211*128)
11450
11451/* ------------------------------ */
11452 .balign 128
11453.L_ALT_op_rem_int_lit16: /* 0xd4 */
11454/* File: x86/alt_stub.S */
11455/*
11456 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11457 * any interesting requests and then jump to the real instruction
11458 * handler. Unlike the Arm handler, we can't do this as a tail call
11459 * because rIBASE is caller save and we need to reload it.
11460 *
11461 * Note that unlike in the Arm implementation, we should never arrive
11462 * here with a zero breakFlag because we always refresh rIBASE on
11463 * return.
11464 */
11465 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011466 movl rSELF, %ecx
11467 movl %ecx, OUT_ARG0(%esp)
11468 leal OFF_FP_SHADOWFRAME(rFP), %eax
11469 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011470 movl rPC, OUT_ARG2(%esp)
11471 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011472 REFRESH_IBASE
11473 jmp .L_op_nop+(212*128)
11474
11475/* ------------------------------ */
11476 .balign 128
11477.L_ALT_op_and_int_lit16: /* 0xd5 */
11478/* File: x86/alt_stub.S */
11479/*
11480 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11481 * any interesting requests and then jump to the real instruction
11482 * handler. Unlike the Arm handler, we can't do this as a tail call
11483 * because rIBASE is caller save and we need to reload it.
11484 *
11485 * Note that unlike in the Arm implementation, we should never arrive
11486 * here with a zero breakFlag because we always refresh rIBASE on
11487 * return.
11488 */
11489 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011490 movl rSELF, %ecx
11491 movl %ecx, OUT_ARG0(%esp)
11492 leal OFF_FP_SHADOWFRAME(rFP), %eax
11493 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011494 movl rPC, OUT_ARG2(%esp)
11495 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011496 REFRESH_IBASE
11497 jmp .L_op_nop+(213*128)
11498
11499/* ------------------------------ */
11500 .balign 128
11501.L_ALT_op_or_int_lit16: /* 0xd6 */
11502/* File: x86/alt_stub.S */
11503/*
11504 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11505 * any interesting requests and then jump to the real instruction
11506 * handler. Unlike the Arm handler, we can't do this as a tail call
11507 * because rIBASE is caller save and we need to reload it.
11508 *
11509 * Note that unlike in the Arm implementation, we should never arrive
11510 * here with a zero breakFlag because we always refresh rIBASE on
11511 * return.
11512 */
11513 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011514 movl rSELF, %ecx
11515 movl %ecx, OUT_ARG0(%esp)
11516 leal OFF_FP_SHADOWFRAME(rFP), %eax
11517 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011518 movl rPC, OUT_ARG2(%esp)
11519 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011520 REFRESH_IBASE
11521 jmp .L_op_nop+(214*128)
11522
11523/* ------------------------------ */
11524 .balign 128
11525.L_ALT_op_xor_int_lit16: /* 0xd7 */
11526/* File: x86/alt_stub.S */
11527/*
11528 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11529 * any interesting requests and then jump to the real instruction
11530 * handler. Unlike the Arm handler, we can't do this as a tail call
11531 * because rIBASE is caller save and we need to reload it.
11532 *
11533 * Note that unlike in the Arm implementation, we should never arrive
11534 * here with a zero breakFlag because we always refresh rIBASE on
11535 * return.
11536 */
11537 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011538 movl rSELF, %ecx
11539 movl %ecx, OUT_ARG0(%esp)
11540 leal OFF_FP_SHADOWFRAME(rFP), %eax
11541 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011542 movl rPC, OUT_ARG2(%esp)
11543 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011544 REFRESH_IBASE
11545 jmp .L_op_nop+(215*128)
11546
11547/* ------------------------------ */
11548 .balign 128
11549.L_ALT_op_add_int_lit8: /* 0xd8 */
11550/* File: x86/alt_stub.S */
11551/*
11552 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11553 * any interesting requests and then jump to the real instruction
11554 * handler. Unlike the Arm handler, we can't do this as a tail call
11555 * because rIBASE is caller save and we need to reload it.
11556 *
11557 * Note that unlike in the Arm implementation, we should never arrive
11558 * here with a zero breakFlag because we always refresh rIBASE on
11559 * return.
11560 */
11561 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011562 movl rSELF, %ecx
11563 movl %ecx, OUT_ARG0(%esp)
11564 leal OFF_FP_SHADOWFRAME(rFP), %eax
11565 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011566 movl rPC, OUT_ARG2(%esp)
11567 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011568 REFRESH_IBASE
11569 jmp .L_op_nop+(216*128)
11570
11571/* ------------------------------ */
11572 .balign 128
11573.L_ALT_op_rsub_int_lit8: /* 0xd9 */
11574/* File: x86/alt_stub.S */
11575/*
11576 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11577 * any interesting requests and then jump to the real instruction
11578 * handler. Unlike the Arm handler, we can't do this as a tail call
11579 * because rIBASE is caller save and we need to reload it.
11580 *
11581 * Note that unlike in the Arm implementation, we should never arrive
11582 * here with a zero breakFlag because we always refresh rIBASE on
11583 * return.
11584 */
11585 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011586 movl rSELF, %ecx
11587 movl %ecx, OUT_ARG0(%esp)
11588 leal OFF_FP_SHADOWFRAME(rFP), %eax
11589 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011590 movl rPC, OUT_ARG2(%esp)
11591 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011592 REFRESH_IBASE
11593 jmp .L_op_nop+(217*128)
11594
11595/* ------------------------------ */
11596 .balign 128
11597.L_ALT_op_mul_int_lit8: /* 0xda */
11598/* File: x86/alt_stub.S */
11599/*
11600 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11601 * any interesting requests and then jump to the real instruction
11602 * handler. Unlike the Arm handler, we can't do this as a tail call
11603 * because rIBASE is caller save and we need to reload it.
11604 *
11605 * Note that unlike in the Arm implementation, we should never arrive
11606 * here with a zero breakFlag because we always refresh rIBASE on
11607 * return.
11608 */
11609 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011610 movl rSELF, %ecx
11611 movl %ecx, OUT_ARG0(%esp)
11612 leal OFF_FP_SHADOWFRAME(rFP), %eax
11613 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011614 movl rPC, OUT_ARG2(%esp)
11615 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011616 REFRESH_IBASE
11617 jmp .L_op_nop+(218*128)
11618
11619/* ------------------------------ */
11620 .balign 128
11621.L_ALT_op_div_int_lit8: /* 0xdb */
11622/* File: x86/alt_stub.S */
11623/*
11624 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11625 * any interesting requests and then jump to the real instruction
11626 * handler. Unlike the Arm handler, we can't do this as a tail call
11627 * because rIBASE is caller save and we need to reload it.
11628 *
11629 * Note that unlike in the Arm implementation, we should never arrive
11630 * here with a zero breakFlag because we always refresh rIBASE on
11631 * return.
11632 */
11633 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011634 movl rSELF, %ecx
11635 movl %ecx, OUT_ARG0(%esp)
11636 leal OFF_FP_SHADOWFRAME(rFP), %eax
11637 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011638 movl rPC, OUT_ARG2(%esp)
11639 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011640 REFRESH_IBASE
11641 jmp .L_op_nop+(219*128)
11642
11643/* ------------------------------ */
11644 .balign 128
11645.L_ALT_op_rem_int_lit8: /* 0xdc */
11646/* File: x86/alt_stub.S */
11647/*
11648 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11649 * any interesting requests and then jump to the real instruction
11650 * handler. Unlike the Arm handler, we can't do this as a tail call
11651 * because rIBASE is caller save and we need to reload it.
11652 *
11653 * Note that unlike in the Arm implementation, we should never arrive
11654 * here with a zero breakFlag because we always refresh rIBASE on
11655 * return.
11656 */
11657 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011658 movl rSELF, %ecx
11659 movl %ecx, OUT_ARG0(%esp)
11660 leal OFF_FP_SHADOWFRAME(rFP), %eax
11661 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011662 movl rPC, OUT_ARG2(%esp)
11663 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011664 REFRESH_IBASE
11665 jmp .L_op_nop+(220*128)
11666
11667/* ------------------------------ */
11668 .balign 128
11669.L_ALT_op_and_int_lit8: /* 0xdd */
11670/* File: x86/alt_stub.S */
11671/*
11672 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11673 * any interesting requests and then jump to the real instruction
11674 * handler. Unlike the Arm handler, we can't do this as a tail call
11675 * because rIBASE is caller save and we need to reload it.
11676 *
11677 * Note that unlike in the Arm implementation, we should never arrive
11678 * here with a zero breakFlag because we always refresh rIBASE on
11679 * return.
11680 */
11681 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011682 movl rSELF, %ecx
11683 movl %ecx, OUT_ARG0(%esp)
11684 leal OFF_FP_SHADOWFRAME(rFP), %eax
11685 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011686 movl rPC, OUT_ARG2(%esp)
11687 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011688 REFRESH_IBASE
11689 jmp .L_op_nop+(221*128)
11690
11691/* ------------------------------ */
11692 .balign 128
11693.L_ALT_op_or_int_lit8: /* 0xde */
11694/* File: x86/alt_stub.S */
11695/*
11696 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11697 * any interesting requests and then jump to the real instruction
11698 * handler. Unlike the Arm handler, we can't do this as a tail call
11699 * because rIBASE is caller save and we need to reload it.
11700 *
11701 * Note that unlike in the Arm implementation, we should never arrive
11702 * here with a zero breakFlag because we always refresh rIBASE on
11703 * return.
11704 */
11705 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011706 movl rSELF, %ecx
11707 movl %ecx, OUT_ARG0(%esp)
11708 leal OFF_FP_SHADOWFRAME(rFP), %eax
11709 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011710 movl rPC, OUT_ARG2(%esp)
11711 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011712 REFRESH_IBASE
11713 jmp .L_op_nop+(222*128)
11714
11715/* ------------------------------ */
11716 .balign 128
11717.L_ALT_op_xor_int_lit8: /* 0xdf */
11718/* File: x86/alt_stub.S */
11719/*
11720 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11721 * any interesting requests and then jump to the real instruction
11722 * handler. Unlike the Arm handler, we can't do this as a tail call
11723 * because rIBASE is caller save and we need to reload it.
11724 *
11725 * Note that unlike in the Arm implementation, we should never arrive
11726 * here with a zero breakFlag because we always refresh rIBASE on
11727 * return.
11728 */
11729 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011730 movl rSELF, %ecx
11731 movl %ecx, OUT_ARG0(%esp)
11732 leal OFF_FP_SHADOWFRAME(rFP), %eax
11733 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011734 movl rPC, OUT_ARG2(%esp)
11735 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011736 REFRESH_IBASE
11737 jmp .L_op_nop+(223*128)
11738
11739/* ------------------------------ */
11740 .balign 128
11741.L_ALT_op_shl_int_lit8: /* 0xe0 */
11742/* File: x86/alt_stub.S */
11743/*
11744 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11745 * any interesting requests and then jump to the real instruction
11746 * handler. Unlike the Arm handler, we can't do this as a tail call
11747 * because rIBASE is caller save and we need to reload it.
11748 *
11749 * Note that unlike in the Arm implementation, we should never arrive
11750 * here with a zero breakFlag because we always refresh rIBASE on
11751 * return.
11752 */
11753 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011754 movl rSELF, %ecx
11755 movl %ecx, OUT_ARG0(%esp)
11756 leal OFF_FP_SHADOWFRAME(rFP), %eax
11757 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011758 movl rPC, OUT_ARG2(%esp)
11759 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011760 REFRESH_IBASE
11761 jmp .L_op_nop+(224*128)
11762
11763/* ------------------------------ */
11764 .balign 128
11765.L_ALT_op_shr_int_lit8: /* 0xe1 */
11766/* File: x86/alt_stub.S */
11767/*
11768 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11769 * any interesting requests and then jump to the real instruction
11770 * handler. Unlike the Arm handler, we can't do this as a tail call
11771 * because rIBASE is caller save and we need to reload it.
11772 *
11773 * Note that unlike in the Arm implementation, we should never arrive
11774 * here with a zero breakFlag because we always refresh rIBASE on
11775 * return.
11776 */
11777 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011778 movl rSELF, %ecx
11779 movl %ecx, OUT_ARG0(%esp)
11780 leal OFF_FP_SHADOWFRAME(rFP), %eax
11781 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011782 movl rPC, OUT_ARG2(%esp)
11783 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011784 REFRESH_IBASE
11785 jmp .L_op_nop+(225*128)
11786
11787/* ------------------------------ */
11788 .balign 128
11789.L_ALT_op_ushr_int_lit8: /* 0xe2 */
11790/* File: x86/alt_stub.S */
11791/*
11792 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11793 * any interesting requests and then jump to the real instruction
11794 * handler. Unlike the Arm handler, we can't do this as a tail call
11795 * because rIBASE is caller save and we need to reload it.
11796 *
11797 * Note that unlike in the Arm implementation, we should never arrive
11798 * here with a zero breakFlag because we always refresh rIBASE on
11799 * return.
11800 */
11801 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011802 movl rSELF, %ecx
11803 movl %ecx, OUT_ARG0(%esp)
11804 leal OFF_FP_SHADOWFRAME(rFP), %eax
11805 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011806 movl rPC, OUT_ARG2(%esp)
11807 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011808 REFRESH_IBASE
11809 jmp .L_op_nop+(226*128)
11810
11811/* ------------------------------ */
11812 .balign 128
11813.L_ALT_op_iget_quick: /* 0xe3 */
11814/* File: x86/alt_stub.S */
11815/*
11816 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11817 * any interesting requests and then jump to the real instruction
11818 * handler. Unlike the Arm handler, we can't do this as a tail call
11819 * because rIBASE is caller save and we need to reload it.
11820 *
11821 * Note that unlike in the Arm implementation, we should never arrive
11822 * here with a zero breakFlag because we always refresh rIBASE on
11823 * return.
11824 */
11825 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011826 movl rSELF, %ecx
11827 movl %ecx, OUT_ARG0(%esp)
11828 leal OFF_FP_SHADOWFRAME(rFP), %eax
11829 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011830 movl rPC, OUT_ARG2(%esp)
11831 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011832 REFRESH_IBASE
11833 jmp .L_op_nop+(227*128)
11834
11835/* ------------------------------ */
11836 .balign 128
11837.L_ALT_op_iget_wide_quick: /* 0xe4 */
11838/* File: x86/alt_stub.S */
11839/*
11840 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11841 * any interesting requests and then jump to the real instruction
11842 * handler. Unlike the Arm handler, we can't do this as a tail call
11843 * because rIBASE is caller save and we need to reload it.
11844 *
11845 * Note that unlike in the Arm implementation, we should never arrive
11846 * here with a zero breakFlag because we always refresh rIBASE on
11847 * return.
11848 */
11849 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011850 movl rSELF, %ecx
11851 movl %ecx, OUT_ARG0(%esp)
11852 leal OFF_FP_SHADOWFRAME(rFP), %eax
11853 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011854 movl rPC, OUT_ARG2(%esp)
11855 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011856 REFRESH_IBASE
11857 jmp .L_op_nop+(228*128)
11858
11859/* ------------------------------ */
11860 .balign 128
11861.L_ALT_op_iget_object_quick: /* 0xe5 */
11862/* File: x86/alt_stub.S */
11863/*
11864 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11865 * any interesting requests and then jump to the real instruction
11866 * handler. Unlike the Arm handler, we can't do this as a tail call
11867 * because rIBASE is caller save and we need to reload it.
11868 *
11869 * Note that unlike in the Arm implementation, we should never arrive
11870 * here with a zero breakFlag because we always refresh rIBASE on
11871 * return.
11872 */
11873 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011874 movl rSELF, %ecx
11875 movl %ecx, OUT_ARG0(%esp)
11876 leal OFF_FP_SHADOWFRAME(rFP), %eax
11877 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011878 movl rPC, OUT_ARG2(%esp)
11879 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011880 REFRESH_IBASE
11881 jmp .L_op_nop+(229*128)
11882
11883/* ------------------------------ */
11884 .balign 128
11885.L_ALT_op_iput_quick: /* 0xe6 */
11886/* File: x86/alt_stub.S */
11887/*
11888 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11889 * any interesting requests and then jump to the real instruction
11890 * handler. Unlike the Arm handler, we can't do this as a tail call
11891 * because rIBASE is caller save and we need to reload it.
11892 *
11893 * Note that unlike in the Arm implementation, we should never arrive
11894 * here with a zero breakFlag because we always refresh rIBASE on
11895 * return.
11896 */
11897 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011898 movl rSELF, %ecx
11899 movl %ecx, OUT_ARG0(%esp)
11900 leal OFF_FP_SHADOWFRAME(rFP), %eax
11901 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011902 movl rPC, OUT_ARG2(%esp)
11903 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011904 REFRESH_IBASE
11905 jmp .L_op_nop+(230*128)
11906
11907/* ------------------------------ */
11908 .balign 128
11909.L_ALT_op_iput_wide_quick: /* 0xe7 */
11910/* File: x86/alt_stub.S */
11911/*
11912 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11913 * any interesting requests and then jump to the real instruction
11914 * handler. Unlike the Arm handler, we can't do this as a tail call
11915 * because rIBASE is caller save and we need to reload it.
11916 *
11917 * Note that unlike in the Arm implementation, we should never arrive
11918 * here with a zero breakFlag because we always refresh rIBASE on
11919 * return.
11920 */
11921 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011922 movl rSELF, %ecx
11923 movl %ecx, OUT_ARG0(%esp)
11924 leal OFF_FP_SHADOWFRAME(rFP), %eax
11925 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011926 movl rPC, OUT_ARG2(%esp)
11927 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011928 REFRESH_IBASE
11929 jmp .L_op_nop+(231*128)
11930
11931/* ------------------------------ */
11932 .balign 128
11933.L_ALT_op_iput_object_quick: /* 0xe8 */
11934/* File: x86/alt_stub.S */
11935/*
11936 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11937 * any interesting requests and then jump to the real instruction
11938 * handler. Unlike the Arm handler, we can't do this as a tail call
11939 * because rIBASE is caller save and we need to reload it.
11940 *
11941 * Note that unlike in the Arm implementation, we should never arrive
11942 * here with a zero breakFlag because we always refresh rIBASE on
11943 * return.
11944 */
11945 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011946 movl rSELF, %ecx
11947 movl %ecx, OUT_ARG0(%esp)
11948 leal OFF_FP_SHADOWFRAME(rFP), %eax
11949 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011950 movl rPC, OUT_ARG2(%esp)
11951 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011952 REFRESH_IBASE
11953 jmp .L_op_nop+(232*128)
11954
11955/* ------------------------------ */
11956 .balign 128
11957.L_ALT_op_invoke_virtual_quick: /* 0xe9 */
11958/* File: x86/alt_stub.S */
11959/*
11960 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11961 * any interesting requests and then jump to the real instruction
11962 * handler. Unlike the Arm handler, we can't do this as a tail call
11963 * because rIBASE is caller save and we need to reload it.
11964 *
11965 * Note that unlike in the Arm implementation, we should never arrive
11966 * here with a zero breakFlag because we always refresh rIBASE on
11967 * return.
11968 */
11969 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011970 movl rSELF, %ecx
11971 movl %ecx, OUT_ARG0(%esp)
11972 leal OFF_FP_SHADOWFRAME(rFP), %eax
11973 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011974 movl rPC, OUT_ARG2(%esp)
11975 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011976 REFRESH_IBASE
11977 jmp .L_op_nop+(233*128)
11978
11979/* ------------------------------ */
11980 .balign 128
11981.L_ALT_op_invoke_virtual_range_quick: /* 0xea */
11982/* File: x86/alt_stub.S */
11983/*
11984 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
11985 * any interesting requests and then jump to the real instruction
11986 * handler. Unlike the Arm handler, we can't do this as a tail call
11987 * because rIBASE is caller save and we need to reload it.
11988 *
11989 * Note that unlike in the Arm implementation, we should never arrive
11990 * here with a zero breakFlag because we always refresh rIBASE on
11991 * return.
11992 */
11993 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000011994 movl rSELF, %ecx
11995 movl %ecx, OUT_ARG0(%esp)
11996 leal OFF_FP_SHADOWFRAME(rFP), %eax
11997 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000011998 movl rPC, OUT_ARG2(%esp)
11999 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012000 REFRESH_IBASE
12001 jmp .L_op_nop+(234*128)
12002
12003/* ------------------------------ */
12004 .balign 128
12005.L_ALT_op_iput_boolean_quick: /* 0xeb */
12006/* File: x86/alt_stub.S */
12007/*
12008 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12009 * any interesting requests and then jump to the real instruction
12010 * handler. Unlike the Arm handler, we can't do this as a tail call
12011 * because rIBASE is caller save and we need to reload it.
12012 *
12013 * Note that unlike in the Arm implementation, we should never arrive
12014 * here with a zero breakFlag because we always refresh rIBASE on
12015 * return.
12016 */
12017 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012018 movl rSELF, %ecx
12019 movl %ecx, OUT_ARG0(%esp)
12020 leal OFF_FP_SHADOWFRAME(rFP), %eax
12021 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012022 movl rPC, OUT_ARG2(%esp)
12023 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012024 REFRESH_IBASE
12025 jmp .L_op_nop+(235*128)
12026
12027/* ------------------------------ */
12028 .balign 128
12029.L_ALT_op_iput_byte_quick: /* 0xec */
12030/* File: x86/alt_stub.S */
12031/*
12032 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12033 * any interesting requests and then jump to the real instruction
12034 * handler. Unlike the Arm handler, we can't do this as a tail call
12035 * because rIBASE is caller save and we need to reload it.
12036 *
12037 * Note that unlike in the Arm implementation, we should never arrive
12038 * here with a zero breakFlag because we always refresh rIBASE on
12039 * return.
12040 */
12041 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012042 movl rSELF, %ecx
12043 movl %ecx, OUT_ARG0(%esp)
12044 leal OFF_FP_SHADOWFRAME(rFP), %eax
12045 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012046 movl rPC, OUT_ARG2(%esp)
12047 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012048 REFRESH_IBASE
12049 jmp .L_op_nop+(236*128)
12050
12051/* ------------------------------ */
12052 .balign 128
12053.L_ALT_op_iput_char_quick: /* 0xed */
12054/* File: x86/alt_stub.S */
12055/*
12056 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12057 * any interesting requests and then jump to the real instruction
12058 * handler. Unlike the Arm handler, we can't do this as a tail call
12059 * because rIBASE is caller save and we need to reload it.
12060 *
12061 * Note that unlike in the Arm implementation, we should never arrive
12062 * here with a zero breakFlag because we always refresh rIBASE on
12063 * return.
12064 */
12065 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012066 movl rSELF, %ecx
12067 movl %ecx, OUT_ARG0(%esp)
12068 leal OFF_FP_SHADOWFRAME(rFP), %eax
12069 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012070 movl rPC, OUT_ARG2(%esp)
12071 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012072 REFRESH_IBASE
12073 jmp .L_op_nop+(237*128)
12074
12075/* ------------------------------ */
12076 .balign 128
12077.L_ALT_op_iput_short_quick: /* 0xee */
12078/* File: x86/alt_stub.S */
12079/*
12080 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12081 * any interesting requests and then jump to the real instruction
12082 * handler. Unlike the Arm handler, we can't do this as a tail call
12083 * because rIBASE is caller save and we need to reload it.
12084 *
12085 * Note that unlike in the Arm implementation, we should never arrive
12086 * here with a zero breakFlag because we always refresh rIBASE on
12087 * return.
12088 */
12089 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012090 movl rSELF, %ecx
12091 movl %ecx, OUT_ARG0(%esp)
12092 leal OFF_FP_SHADOWFRAME(rFP), %eax
12093 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012094 movl rPC, OUT_ARG2(%esp)
12095 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012096 REFRESH_IBASE
12097 jmp .L_op_nop+(238*128)
12098
12099/* ------------------------------ */
12100 .balign 128
12101.L_ALT_op_iget_boolean_quick: /* 0xef */
12102/* File: x86/alt_stub.S */
12103/*
12104 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12105 * any interesting requests and then jump to the real instruction
12106 * handler. Unlike the Arm handler, we can't do this as a tail call
12107 * because rIBASE is caller save and we need to reload it.
12108 *
12109 * Note that unlike in the Arm implementation, we should never arrive
12110 * here with a zero breakFlag because we always refresh rIBASE on
12111 * return.
12112 */
12113 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012114 movl rSELF, %ecx
12115 movl %ecx, OUT_ARG0(%esp)
12116 leal OFF_FP_SHADOWFRAME(rFP), %eax
12117 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012118 movl rPC, OUT_ARG2(%esp)
12119 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012120 REFRESH_IBASE
12121 jmp .L_op_nop+(239*128)
12122
12123/* ------------------------------ */
12124 .balign 128
12125.L_ALT_op_iget_byte_quick: /* 0xf0 */
12126/* File: x86/alt_stub.S */
12127/*
12128 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12129 * any interesting requests and then jump to the real instruction
12130 * handler. Unlike the Arm handler, we can't do this as a tail call
12131 * because rIBASE is caller save and we need to reload it.
12132 *
12133 * Note that unlike in the Arm implementation, we should never arrive
12134 * here with a zero breakFlag because we always refresh rIBASE on
12135 * return.
12136 */
12137 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012138 movl rSELF, %ecx
12139 movl %ecx, OUT_ARG0(%esp)
12140 leal OFF_FP_SHADOWFRAME(rFP), %eax
12141 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012142 movl rPC, OUT_ARG2(%esp)
12143 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012144 REFRESH_IBASE
12145 jmp .L_op_nop+(240*128)
12146
12147/* ------------------------------ */
12148 .balign 128
12149.L_ALT_op_iget_char_quick: /* 0xf1 */
12150/* File: x86/alt_stub.S */
12151/*
12152 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12153 * any interesting requests and then jump to the real instruction
12154 * handler. Unlike the Arm handler, we can't do this as a tail call
12155 * because rIBASE is caller save and we need to reload it.
12156 *
12157 * Note that unlike in the Arm implementation, we should never arrive
12158 * here with a zero breakFlag because we always refresh rIBASE on
12159 * return.
12160 */
12161 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012162 movl rSELF, %ecx
12163 movl %ecx, OUT_ARG0(%esp)
12164 leal OFF_FP_SHADOWFRAME(rFP), %eax
12165 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012166 movl rPC, OUT_ARG2(%esp)
12167 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012168 REFRESH_IBASE
12169 jmp .L_op_nop+(241*128)
12170
12171/* ------------------------------ */
12172 .balign 128
12173.L_ALT_op_iget_short_quick: /* 0xf2 */
12174/* File: x86/alt_stub.S */
12175/*
12176 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12177 * any interesting requests and then jump to the real instruction
12178 * handler. Unlike the Arm handler, we can't do this as a tail call
12179 * because rIBASE is caller save and we need to reload it.
12180 *
12181 * Note that unlike in the Arm implementation, we should never arrive
12182 * here with a zero breakFlag because we always refresh rIBASE on
12183 * return.
12184 */
12185 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012186 movl rSELF, %ecx
12187 movl %ecx, OUT_ARG0(%esp)
12188 leal OFF_FP_SHADOWFRAME(rFP), %eax
12189 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012190 movl rPC, OUT_ARG2(%esp)
12191 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012192 REFRESH_IBASE
12193 jmp .L_op_nop+(242*128)
12194
12195/* ------------------------------ */
12196 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012197.L_ALT_op_unused_f3: /* 0xf3 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012198/* File: x86/alt_stub.S */
12199/*
12200 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12201 * any interesting requests and then jump to the real instruction
12202 * handler. Unlike the Arm handler, we can't do this as a tail call
12203 * because rIBASE is caller save and we need to reload it.
12204 *
12205 * Note that unlike in the Arm implementation, we should never arrive
12206 * here with a zero breakFlag because we always refresh rIBASE on
12207 * return.
12208 */
12209 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012210 movl rSELF, %ecx
12211 movl %ecx, OUT_ARG0(%esp)
12212 leal OFF_FP_SHADOWFRAME(rFP), %eax
12213 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012214 movl rPC, OUT_ARG2(%esp)
12215 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012216 REFRESH_IBASE
12217 jmp .L_op_nop+(243*128)
12218
12219/* ------------------------------ */
12220 .balign 128
12221.L_ALT_op_unused_f4: /* 0xf4 */
12222/* File: x86/alt_stub.S */
12223/*
12224 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12225 * any interesting requests and then jump to the real instruction
12226 * handler. Unlike the Arm handler, we can't do this as a tail call
12227 * because rIBASE is caller save and we need to reload it.
12228 *
12229 * Note that unlike in the Arm implementation, we should never arrive
12230 * here with a zero breakFlag because we always refresh rIBASE on
12231 * return.
12232 */
12233 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012234 movl rSELF, %ecx
12235 movl %ecx, OUT_ARG0(%esp)
12236 leal OFF_FP_SHADOWFRAME(rFP), %eax
12237 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012238 movl rPC, OUT_ARG2(%esp)
12239 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012240 REFRESH_IBASE
12241 jmp .L_op_nop+(244*128)
12242
12243/* ------------------------------ */
12244 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012245.L_ALT_op_unused_f5: /* 0xf5 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012246/* File: x86/alt_stub.S */
12247/*
12248 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12249 * any interesting requests and then jump to the real instruction
12250 * handler. Unlike the Arm handler, we can't do this as a tail call
12251 * because rIBASE is caller save and we need to reload it.
12252 *
12253 * Note that unlike in the Arm implementation, we should never arrive
12254 * here with a zero breakFlag because we always refresh rIBASE on
12255 * return.
12256 */
12257 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012258 movl rSELF, %ecx
12259 movl %ecx, OUT_ARG0(%esp)
12260 leal OFF_FP_SHADOWFRAME(rFP), %eax
12261 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012262 movl rPC, OUT_ARG2(%esp)
12263 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012264 REFRESH_IBASE
12265 jmp .L_op_nop+(245*128)
12266
12267/* ------------------------------ */
12268 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012269.L_ALT_op_unused_f6: /* 0xf6 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012270/* File: x86/alt_stub.S */
12271/*
12272 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12273 * any interesting requests and then jump to the real instruction
12274 * handler. Unlike the Arm handler, we can't do this as a tail call
12275 * because rIBASE is caller save and we need to reload it.
12276 *
12277 * Note that unlike in the Arm implementation, we should never arrive
12278 * here with a zero breakFlag because we always refresh rIBASE on
12279 * return.
12280 */
12281 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012282 movl rSELF, %ecx
12283 movl %ecx, OUT_ARG0(%esp)
12284 leal OFF_FP_SHADOWFRAME(rFP), %eax
12285 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012286 movl rPC, OUT_ARG2(%esp)
12287 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012288 REFRESH_IBASE
12289 jmp .L_op_nop+(246*128)
12290
12291/* ------------------------------ */
12292 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012293.L_ALT_op_unused_f7: /* 0xf7 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012294/* File: x86/alt_stub.S */
12295/*
12296 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12297 * any interesting requests and then jump to the real instruction
12298 * handler. Unlike the Arm handler, we can't do this as a tail call
12299 * because rIBASE is caller save and we need to reload it.
12300 *
12301 * Note that unlike in the Arm implementation, we should never arrive
12302 * here with a zero breakFlag because we always refresh rIBASE on
12303 * return.
12304 */
12305 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012306 movl rSELF, %ecx
12307 movl %ecx, OUT_ARG0(%esp)
12308 leal OFF_FP_SHADOWFRAME(rFP), %eax
12309 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012310 movl rPC, OUT_ARG2(%esp)
12311 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012312 REFRESH_IBASE
12313 jmp .L_op_nop+(247*128)
12314
12315/* ------------------------------ */
12316 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012317.L_ALT_op_unused_f8: /* 0xf8 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012318/* File: x86/alt_stub.S */
12319/*
12320 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12321 * any interesting requests and then jump to the real instruction
12322 * handler. Unlike the Arm handler, we can't do this as a tail call
12323 * because rIBASE is caller save and we need to reload it.
12324 *
12325 * Note that unlike in the Arm implementation, we should never arrive
12326 * here with a zero breakFlag because we always refresh rIBASE on
12327 * return.
12328 */
12329 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012330 movl rSELF, %ecx
12331 movl %ecx, OUT_ARG0(%esp)
12332 leal OFF_FP_SHADOWFRAME(rFP), %eax
12333 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012334 movl rPC, OUT_ARG2(%esp)
12335 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012336 REFRESH_IBASE
12337 jmp .L_op_nop+(248*128)
12338
12339/* ------------------------------ */
12340 .balign 128
Narayan Kamath14832ef2016-08-05 11:44:32 +010012341.L_ALT_op_unused_f9: /* 0xf9 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012342/* File: x86/alt_stub.S */
12343/*
12344 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12345 * any interesting requests and then jump to the real instruction
12346 * handler. Unlike the Arm handler, we can't do this as a tail call
12347 * because rIBASE is caller save and we need to reload it.
12348 *
12349 * Note that unlike in the Arm implementation, we should never arrive
12350 * here with a zero breakFlag because we always refresh rIBASE on
12351 * return.
12352 */
12353 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012354 movl rSELF, %ecx
12355 movl %ecx, OUT_ARG0(%esp)
12356 leal OFF_FP_SHADOWFRAME(rFP), %eax
12357 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012358 movl rPC, OUT_ARG2(%esp)
12359 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012360 REFRESH_IBASE
12361 jmp .L_op_nop+(249*128)
12362
12363/* ------------------------------ */
12364 .balign 128
buzbee8a287142016-10-07 12:56:32 -070012365.L_ALT_op_invoke_polymorphic: /* 0xfa */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012366/* File: x86/alt_stub.S */
12367/*
12368 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12369 * any interesting requests and then jump to the real instruction
12370 * handler. Unlike the Arm handler, we can't do this as a tail call
12371 * because rIBASE is caller save and we need to reload it.
12372 *
12373 * Note that unlike in the Arm implementation, we should never arrive
12374 * here with a zero breakFlag because we always refresh rIBASE on
12375 * return.
12376 */
12377 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012378 movl rSELF, %ecx
12379 movl %ecx, OUT_ARG0(%esp)
12380 leal OFF_FP_SHADOWFRAME(rFP), %eax
12381 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012382 movl rPC, OUT_ARG2(%esp)
12383 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012384 REFRESH_IBASE
12385 jmp .L_op_nop+(250*128)
12386
12387/* ------------------------------ */
12388 .balign 128
buzbee8a287142016-10-07 12:56:32 -070012389.L_ALT_op_invoke_polymorphic_range: /* 0xfb */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012390/* File: x86/alt_stub.S */
12391/*
12392 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12393 * any interesting requests and then jump to the real instruction
12394 * handler. Unlike the Arm handler, we can't do this as a tail call
12395 * because rIBASE is caller save and we need to reload it.
12396 *
12397 * Note that unlike in the Arm implementation, we should never arrive
12398 * here with a zero breakFlag because we always refresh rIBASE on
12399 * return.
12400 */
12401 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012402 movl rSELF, %ecx
12403 movl %ecx, OUT_ARG0(%esp)
12404 leal OFF_FP_SHADOWFRAME(rFP), %eax
12405 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012406 movl rPC, OUT_ARG2(%esp)
12407 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012408 REFRESH_IBASE
12409 jmp .L_op_nop+(251*128)
12410
12411/* ------------------------------ */
12412 .balign 128
12413.L_ALT_op_unused_fc: /* 0xfc */
12414/* File: x86/alt_stub.S */
12415/*
12416 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12417 * any interesting requests and then jump to the real instruction
12418 * handler. Unlike the Arm handler, we can't do this as a tail call
12419 * because rIBASE is caller save and we need to reload it.
12420 *
12421 * Note that unlike in the Arm implementation, we should never arrive
12422 * here with a zero breakFlag because we always refresh rIBASE on
12423 * return.
12424 */
12425 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012426 movl rSELF, %ecx
12427 movl %ecx, OUT_ARG0(%esp)
12428 leal OFF_FP_SHADOWFRAME(rFP), %eax
12429 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012430 movl rPC, OUT_ARG2(%esp)
12431 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012432 REFRESH_IBASE
12433 jmp .L_op_nop+(252*128)
12434
12435/* ------------------------------ */
12436 .balign 128
12437.L_ALT_op_unused_fd: /* 0xfd */
12438/* File: x86/alt_stub.S */
12439/*
12440 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12441 * any interesting requests and then jump to the real instruction
12442 * handler. Unlike the Arm handler, we can't do this as a tail call
12443 * because rIBASE is caller save and we need to reload it.
12444 *
12445 * Note that unlike in the Arm implementation, we should never arrive
12446 * here with a zero breakFlag because we always refresh rIBASE on
12447 * return.
12448 */
12449 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012450 movl rSELF, %ecx
12451 movl %ecx, OUT_ARG0(%esp)
12452 leal OFF_FP_SHADOWFRAME(rFP), %eax
12453 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012454 movl rPC, OUT_ARG2(%esp)
12455 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012456 REFRESH_IBASE
12457 jmp .L_op_nop+(253*128)
12458
12459/* ------------------------------ */
12460 .balign 128
12461.L_ALT_op_unused_fe: /* 0xfe */
12462/* File: x86/alt_stub.S */
12463/*
12464 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12465 * any interesting requests and then jump to the real instruction
12466 * handler. Unlike the Arm handler, we can't do this as a tail call
12467 * because rIBASE is caller save and we need to reload it.
12468 *
12469 * Note that unlike in the Arm implementation, we should never arrive
12470 * here with a zero breakFlag because we always refresh rIBASE on
12471 * return.
12472 */
12473 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012474 movl rSELF, %ecx
12475 movl %ecx, OUT_ARG0(%esp)
12476 leal OFF_FP_SHADOWFRAME(rFP), %eax
12477 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012478 movl rPC, OUT_ARG2(%esp)
12479 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012480 REFRESH_IBASE
12481 jmp .L_op_nop+(254*128)
12482
12483/* ------------------------------ */
12484 .balign 128
12485.L_ALT_op_unused_ff: /* 0xff */
12486/* File: x86/alt_stub.S */
12487/*
12488 * Inter-instruction transfer stub. Call out to MterpCheckBefore to handle
12489 * any interesting requests and then jump to the real instruction
12490 * handler. Unlike the Arm handler, we can't do this as a tail call
12491 * because rIBASE is caller save and we need to reload it.
12492 *
12493 * Note that unlike in the Arm implementation, we should never arrive
12494 * here with a zero breakFlag because we always refresh rIBASE on
12495 * return.
12496 */
12497 .extern MterpCheckBefore
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012498 movl rSELF, %ecx
12499 movl %ecx, OUT_ARG0(%esp)
12500 leal OFF_FP_SHADOWFRAME(rFP), %eax
12501 movl %eax, OUT_ARG1(%esp)
Bill Buzbeed47fd902016-07-07 14:42:43 +000012502 movl rPC, OUT_ARG2(%esp)
12503 call SYMBOL(MterpCheckBefore) # (self, shadow_frame, dex_pc_ptr)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012504 REFRESH_IBASE
12505 jmp .L_op_nop+(255*128)
12506
12507 .balign 128
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012508 SIZE(SYMBOL(artMterpAsmAltInstructionStart),SYMBOL(artMterpAsmAltInstructionStart))
12509 .global SYMBOL(artMterpAsmAltInstructionEnd)
12510SYMBOL(artMterpAsmAltInstructionEnd):
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012511/* File: x86/footer.S */
12512/*
12513 * ===========================================================================
12514 * Common subroutines and data
12515 * ===========================================================================
12516 */
12517
12518 .text
12519 .align 2
12520
12521/*
12522 * We've detected a condition that will result in an exception, but the exception
12523 * has not yet been thrown. Just bail out to the reference interpreter to deal with it.
12524 * TUNING: for consistency, we may want to just go ahead and handle these here.
12525 */
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012526common_errDivideByZero:
12527 EXPORT_PC
12528#if MTERP_LOGGING
12529 movl rSELF, %eax
12530 movl %eax, OUT_ARG0(%esp)
12531 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12532 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012533 call SYMBOL(MterpLogDivideByZeroException)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012534#endif
12535 jmp MterpCommonFallback
12536
12537common_errArrayIndex:
12538 EXPORT_PC
12539#if MTERP_LOGGING
12540 movl rSELF, %eax
12541 movl %eax, OUT_ARG0(%esp)
12542 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12543 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012544 call SYMBOL(MterpLogArrayIndexException)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012545#endif
12546 jmp MterpCommonFallback
12547
12548common_errNegativeArraySize:
12549 EXPORT_PC
12550#if MTERP_LOGGING
12551 movl rSELF, %eax
12552 movl %eax, OUT_ARG0(%esp)
12553 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12554 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012555 call SYMBOL(MterpLogNegativeArraySizeException)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012556#endif
12557 jmp MterpCommonFallback
12558
12559common_errNoSuchMethod:
12560 EXPORT_PC
12561#if MTERP_LOGGING
12562 movl rSELF, %eax
12563 movl %eax, OUT_ARG0(%esp)
12564 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12565 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012566 call SYMBOL(MterpLogNoSuchMethodException)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012567#endif
12568 jmp MterpCommonFallback
12569
12570common_errNullObject:
12571 EXPORT_PC
12572#if MTERP_LOGGING
12573 movl rSELF, %eax
12574 movl %eax, OUT_ARG0(%esp)
12575 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12576 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012577 call SYMBOL(MterpLogNullObjectException)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012578#endif
12579 jmp MterpCommonFallback
12580
12581common_exceptionThrown:
12582 EXPORT_PC
12583#if MTERP_LOGGING
12584 movl rSELF, %eax
12585 movl %eax, OUT_ARG0(%esp)
12586 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12587 movl %ecx, OUT_ARG0(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012588 call SYMBOL(MterpLogExceptionThrownException)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012589#endif
12590 jmp MterpCommonFallback
12591
12592MterpSuspendFallback:
12593 EXPORT_PC
12594#if MTERP_LOGGING
12595 movl rSELF, %eax
12596 movl %eax, OUT_ARG0(%esp)
12597 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12598 movl %ecx, OUT_ARG0(%esp)
12599 movl THREAD_FLAGS_OFFSET(%eax), %eax
12600 movl %eax, OUT_ARG2(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012601 call SYMBOL(MterpLogSuspendFallback)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012602#endif
12603 jmp MterpCommonFallback
12604
12605/*
12606 * If we're here, something is out of the ordinary. If there is a pending
12607 * exception, handle it. Otherwise, roll back and retry with the reference
12608 * interpreter.
12609 */
12610MterpPossibleException:
12611 movl rSELF, %eax
12612 testl $-1, THREAD_EXCEPTION_OFFSET(%eax)
12613 jz MterpFallback
12614 /* intentional fallthrough - handle pending exception. */
12615
12616/*
12617 * On return from a runtime helper routine, we've found a pending exception.
12618 * Can we handle it here - or need to bail out to caller?
12619 *
12620 */
12621MterpException:
12622 movl rSELF, %eax
12623 movl %eax, OUT_ARG0(%esp)
12624 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12625 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012626 call SYMBOL(MterpHandleException)
Serguei Katkovff8579e2016-02-17 11:30:23 +060012627 testb %al, %al
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012628 jz MterpExceptionReturn
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012629 movl OFF_FP_CODE_ITEM(rFP), %eax
12630 movl OFF_FP_DEX_PC(rFP), %ecx
12631 lea CODEITEM_INSNS_OFFSET(%eax), rPC
12632 lea (rPC, %ecx, 2), rPC
12633 movl rPC, OFF_FP_DEX_PC_PTR(rFP)
Bill Buzbee481352d2016-02-25 17:37:46 +000012634 /* Do we need to switch interpreters? */
12635 call SYMBOL(MterpShouldSwitchInterpreters)
12636 testb %al, %al
12637 jnz MterpFallback
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012638 /* resume execution at catch block */
Bill Buzbee481352d2016-02-25 17:37:46 +000012639 REFRESH_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012640 FETCH_INST
12641 GOTO_NEXT
12642 /* NOTE: no fallthrough */
12643
12644/*
Bill Buzbeed6342082016-04-04 16:59:10 +000012645 * Common handling for branches with support for Jit profiling.
12646 * On entry:
12647 * rINST <= signed offset
12648 * condition bits <= set to establish sign of offset (use "NoFlags" entry if not)
12649 *
12650 * We have quite a few different cases for branch profiling, OSR detection and
12651 * suspend check support here.
12652 *
12653 * Taken backward branches:
12654 * If profiling active, do hotness countdown and report if we hit zero.
12655 * If in osr check mode, see if our target is a compiled loop header entry and do OSR if so.
12656 * Is there a pending suspend request? If so, suspend.
12657 *
12658 * Taken forward branches and not-taken backward branches:
12659 * If in osr check mode, see if our target is a compiled loop header entry and do OSR if so.
12660 *
12661 * Our most common case is expected to be a taken backward branch with active jit profiling,
12662 * but no full OSR check and no pending suspend request.
12663 * Next most common case is not-taken branch with no full OSR check.
12664 *
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012665 */
Bill Buzbeed6342082016-04-04 16:59:10 +000012666MterpCommonTakenBranch:
12667 jg .L_forward_branch # don't add forward branches to hotness
12668/*
12669 * We need to subtract 1 from positive values and we should not see 0 here,
12670 * so we may use the result of the comparison with -1.
12671 */
12672#if JIT_CHECK_OSR != -1
12673# error "JIT_CHECK_OSR must be -1."
12674#endif
12675 cmpw $JIT_CHECK_OSR, rPROFILE
12676 je .L_osr_check
12677 decw rPROFILE
12678 je .L_add_batch # counted down to zero - report
12679.L_resume_backward_branch:
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012680 movl rSELF, %eax
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012681 testl $(THREAD_SUSPEND_REQUEST | THREAD_CHECKPOINT_REQUEST), THREAD_FLAGS_OFFSET(%eax)
Bill Buzbeed6342082016-04-04 16:59:10 +000012682 leal (rPC, rINST, 2), rPC
12683 FETCH_INST
12684 jnz .L_suspend_request_pending
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012685 REFRESH_IBASE
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012686 GOTO_NEXT
12687
Bill Buzbeed6342082016-04-04 16:59:10 +000012688.L_suspend_request_pending:
12689 EXPORT_PC
12690 movl %eax, OUT_ARG0(%esp) # rSELF in eax
12691 call SYMBOL(MterpSuspendCheck) # (self)
12692 testb %al, %al
12693 jnz MterpFallback
12694 REFRESH_IBASE # might have changed during suspend
12695 GOTO_NEXT
12696
12697.L_no_count_backwards:
12698 cmpw $JIT_CHECK_OSR, rPROFILE # possible OSR re-entry?
12699 jne .L_resume_backward_branch
12700.L_osr_check:
12701 EXPORT_PC
12702 movl rSELF, %eax
12703 movl %eax, OUT_ARG0(%esp)
12704 leal OFF_FP_SHADOWFRAME(rFP), %ecx
12705 movl %ecx, OUT_ARG1(%esp)
12706 movl rINST, OUT_ARG2(%esp)
12707 call SYMBOL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12708 testb %al, %al
12709 jz .L_resume_backward_branch
12710 jmp MterpOnStackReplacement
12711
12712.L_forward_branch:
12713 cmpw $JIT_CHECK_OSR, rPROFILE # possible OSR re-entry?
12714 je .L_check_osr_forward
12715.L_resume_forward_branch:
12716 leal (rPC, rINST, 2), rPC
12717 FETCH_INST
12718 GOTO_NEXT
12719
12720.L_check_osr_forward:
12721 EXPORT_PC
12722 movl rSELF, %eax
12723 movl %eax, OUT_ARG0(%esp)
12724 leal OFF_FP_SHADOWFRAME(rFP), %ecx
12725 movl %ecx, OUT_ARG1(%esp)
12726 movl rINST, OUT_ARG2(%esp)
12727 call SYMBOL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12728 testb %al, %al
12729 REFRESH_IBASE
12730 jz .L_resume_forward_branch
12731 jmp MterpOnStackReplacement
12732
12733.L_add_batch:
12734 movl OFF_FP_METHOD(rFP), %eax
12735 movl %eax, OUT_ARG0(%esp)
12736 leal OFF_FP_SHADOWFRAME(rFP), %ecx
12737 movl %ecx, OUT_ARG1(%esp)
12738 movl rSELF, %eax
12739 movl %eax, OUT_ARG2(%esp)
12740 call SYMBOL(MterpAddHotnessBatch) # (method, shadow_frame, self)
12741 jmp .L_no_count_backwards
12742
12743/*
12744 * Entered from the conditional branch handlers when OSR check request active on
12745 * not-taken path. All Dalvik not-taken conditional branch offsets are 2.
12746 */
12747.L_check_not_taken_osr:
buzbee963758d2016-04-28 16:08:44 -070012748 EXPORT_PC
Bill Buzbeed6342082016-04-04 16:59:10 +000012749 movl rSELF, %eax
12750 movl %eax, OUT_ARG0(%esp)
12751 leal OFF_FP_SHADOWFRAME(rFP), %ecx
12752 movl %ecx, OUT_ARG1(%esp)
Bill Buzbee9afaac42016-04-04 16:59:35 +000012753 movl $2, OUT_ARG2(%esp)
Bill Buzbeed6342082016-04-04 16:59:10 +000012754 call SYMBOL(MterpMaybeDoOnStackReplacement) # (self, shadow_frame, offset)
12755 testb %al, %al
12756 REFRESH_IBASE
12757 jnz MterpOnStackReplacement
12758 ADVANCE_PC_FETCH_AND_GOTO_NEXT 2
12759
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012760/*
buzbee2de973d2016-02-23 13:25:00 -080012761 * On-stack replacement has happened, and now we've returned from the compiled method.
12762 */
12763MterpOnStackReplacement:
12764#if MTERP_LOGGING
12765 movl rSELF, %eax
12766 movl %eax, OUT_ARG0(%esp)
12767 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12768 movl %ecx, OUT_ARG1(%esp)
12769 movl rINST, OUT_ARG2(%esp)
12770 call SYMBOL(MterpLogOSR)
12771#endif
12772 movl $1, %eax
12773 jmp MterpDone
12774
12775/*
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012776 * Bail out to reference interpreter.
12777 */
12778MterpFallback:
12779 EXPORT_PC
12780#if MTERP_LOGGING
12781 movl rSELF, %eax
12782 movl %eax, OUT_ARG0(%esp)
12783 lea OFF_FP_SHADOWFRAME(rFP), %ecx
12784 movl %ecx, OUT_ARG1(%esp)
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012785 call SYMBOL(MterpLogFallback)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012786#endif
12787MterpCommonFallback:
12788 xor %eax, %eax
12789 jmp MterpDone
12790
12791/*
12792 * On entry:
12793 * uint32_t* rFP (should still be live, pointer to base of vregs)
12794 */
12795MterpExceptionReturn:
12796 movl $1, %eax
12797 jmp MterpDone
12798MterpReturn:
12799 movl OFF_FP_RESULT_REGISTER(rFP), %edx
12800 movl %eax, (%edx)
12801 movl %ecx, 4(%edx)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012802 mov $1, %eax
12803MterpDone:
Bill Buzbeed6342082016-04-04 16:59:10 +000012804/*
12805 * At this point, we expect rPROFILE to be non-zero. If negative, hotness is disabled or we're
12806 * checking for OSR. If greater than zero, we might have unreported hotness to register
12807 * (the difference between the ending rPROFILE and the cached hotness counter). rPROFILE
12808 * should only reach zero immediately after a hotness decrement, and is then reset to either
12809 * a negative special state or the new non-zero countdown value.
12810 */
12811 cmpw $0, rPROFILE
12812 jle MRestoreFrame # if > 0, we may have some counts to report.
12813
12814 movl %eax, rINST # stash return value
12815 /* Report cached hotness counts */
12816 movl OFF_FP_METHOD(rFP), %eax
12817 movl %eax, OUT_ARG0(%esp)
12818 leal OFF_FP_SHADOWFRAME(rFP), %ecx
12819 movl %ecx, OUT_ARG1(%esp)
12820 movl rSELF, %eax
12821 movl %eax, OUT_ARG2(%esp)
12822 call SYMBOL(MterpAddHotnessBatch) # (method, shadow_frame, self)
12823 movl rINST, %eax # restore return value
12824
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012825 /* pop up frame */
Bill Buzbeed6342082016-04-04 16:59:10 +000012826MRestoreFrame:
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012827 addl $FRAME_SIZE, %esp
12828 .cfi_adjust_cfa_offset -FRAME_SIZE
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012829
Serguei Katkov897338d2016-03-01 15:53:22 +060012830 /* Restore callee save register */
12831 POP %ebx
12832 POP %esi
12833 POP %edi
12834 POP %ebp
12835 ret
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012836 .cfi_endproc
Serguei Katkov05dfaaa2016-01-28 08:21:26 +060012837 SIZE(ExecuteMterpImpl,ExecuteMterpImpl)
Bill Buzbee7c58bd42016-01-20 20:46:01 +000012838