1f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
2f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Copyright (C) 2008 The Android Open Source Project
3f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *
4f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License");
5f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * you may not use this file except in compliance with the License.
6f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * You may obtain a copy of the License at
7f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *
8f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *      http://www.apache.org/licenses/LICENSE-2.0
9f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *
10f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Unless required by applicable law or agreed to in writing, software
11f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS,
12f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * See the License for the specific language governing permissions and
14f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * limitations under the License.
15f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
16f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
17f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * 32-bit x86 definitions and declarations.
18f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
19f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
20f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
21f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project386 ABI general notes:
22f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
23f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectCaller save set:
24f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   eax, edx, ecx, st(0)-st(7)
25f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectCallee save set:
26f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   ebx, esi, edi, ebp
27f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectReturn regs:
28f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   32-bit in eax
29f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   64-bit in edx:eax (low-order 32 in eax)
30f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   fp on top of fp stack st(0)
31f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
32f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectParameters passed on stack, pushed right-to-left.  On entry to target, first
33f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectparm is at 4(%esp).  Traditional entry code is:
34f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
35f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectfunctEntry:
36f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    push    %ebp             # save old frame pointer
37f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    mov     %ebp,%esp        # establish new frame pointer
38f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    sub     FrameSize,%esp   # Allocate storage for spill, locals & outs
39f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
40f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectOnce past the prologue, arguments are referenced at ((argno + 2)*4)(%ebp)
41f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
42f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectAlignment of stack not strictly required, but should be for performance.  We'll
43f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectalign frame sizes to 16-byte multiples.
44f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
45f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectIf we're not doing variable stack allocation (alloca), the frame pointer can be
46f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projecteliminated and all arg references adjusted to be esp relative.
47f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
48f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectMterp notes:
49f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
50f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectSome key interpreter variables will be assigned to registers.  Note that each
51f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectwill also have an associated spill location (mostly used useful for those assigned
52f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectto callee save registers).
53f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
54f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  nick     reg   purpose
55f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  rPC      edx   interpreted program counter, used for fetching instructions
56f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  rFP      esi   interpreted frame pointer, used for accessing locals and args
57f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  rIBASE   edi   Base pointer for instruction dispatch computed goto
58f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  rINST    bx    first 16-bit code of current instruction
59f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  rOPCODE  bl    opcode portion of instruction word
60f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project  rINST_HI bh    high byte of instruction word, usually contains src/tgt reg names
61f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
62f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source ProjectNotes:
63f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   o High order 16 bits of ebx must be zero on entry to handler
64f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   o rPC, rFP, rIBASE, rINST/rOPCODE valid on handler entry and exit
65f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   o eax and ecx are scratch, rINST/ebx sometimes scratch
66f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   o rPC is in the caller save set, and will be killed across external calls. Don't
67f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     forget to SPILL/UNSPILL it around call points
68f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
69f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project*/
70f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
71f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rPC      %edx
72f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rFP      %esi
73f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rIBASE   %edi
74f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rINST_FULL %ebx
75f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rINST    %bx
76f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rINST_HI %bh
77f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rINST_LO %bl
78f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rOPCODE  %bl
79f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
80f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
81f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/* Frame diagram while executing dvmMterpStdRun, high to low addresses */
82f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define IN_ARG0        (  8)
83f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define CALLER_RP      (  4)
84f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define PREV_FP        (  0) /* <- dvmMterpStdRun ebp */
85f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/* Spill offsets relative to %ebp */
86f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define EDI_SPILL      ( -4)
87f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define ESI_SPILL      ( -8)
88f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define EDX_SPILL      (-12) /* <- esp following dmMterpStdRun header */
89f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rPC_SPILL      (-16)
90f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rFP_SPILL      (-20)
91f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rGLUE_SPILL    (-24)
92f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rIBASE_SPILL   (-28)
93f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define rINST_FULL_SPILL    (-32)
94f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define TMP_SPILL      (-36)
95f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define LOCAL0_OFFSET  (-40)
96f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define LOCAL1_OFFSET  (-44)
97f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define LOCAL2_OFFSET  (-48)
98f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define LOCAL3_OFFSET  (-52)
99f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/* Out Arg offsets, relative to %sp */
100f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define OUT_ARG4       ( 16)
101f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define OUT_ARG3       ( 12)
102f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define OUT_ARG2       (  8)
103f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define OUT_ARG1       (  4)
104f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define OUT_ARG0       (  0)  /* <- dvmMterpStdRun esp */
105f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
106f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SPILL(reg) movl reg##,reg##_SPILL(%ebp)
107f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define UNSPILL(reg) movl reg##_SPILL(%ebp),reg
108f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SPILL_TMP(reg) movl reg,TMP_SPILL(%ebp)
109f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define UNSPILL_TMP(reg) movl TMP_SPILL(%ebp),reg
110f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
111f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
112f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/* save/restore the PC and/or FP from the glue struct */
113f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define LOAD_PC_FROM_GLUE(_glu)     movl    offGlue_pc(_glu),rPC
114f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SAVE_PC_TO_GLUE(_glu)       movl    rPC,offGlue_pc(_glu)
115f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define LOAD_FP_FROM_GLUE(_glu)     movl    offGlue_fp(_glu),rFP
116f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SAVE_FP_TO_GLUE(_glu)       movl    rFP,offGlue_fp(_glu)
117f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
118f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define GET_GLUE(_reg)     movl   rGLUE_SPILL(%ebp),_reg
119f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
120f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/* The interpreter assumes a properly aligned stack on entry, and
121f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * will preserve 16-byte alignment.
122f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
123f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
124f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
125f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * "export" the PC to the interpreted stack frame, f/b/o future exception
126f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * objects.  Must * be done *before* something calls dvmThrowException.
127f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *
128f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * In C this is "SAVEAREA_FROM_FP(fp)->xtra.currentPc = pc", i.e.
129f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * fp - sizeof(StackSaveArea) + offsetof(SaveArea, xtra.currentPc)
130f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *
131f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * It's okay to do this more than once.
132f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
133f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define EXPORT_PC() \
134f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    movl     rPC, (-sizeofStackSaveArea + offStackSaveArea_currentPc)(rFP)
135f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
136f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
137f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Given a frame pointer, find the stack save area.
138f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *
139f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * In C this is "((StackSaveArea*)(_fp) -1)".
140f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
141f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SAVEAREA_FROM_FP(_reg, _fpreg) \
142f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    leal    -sizeofStackSaveArea(_fpreg),_reg
143f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
144f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
145f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Fetch the next instruction from rPC into rINST.  Does not advance rPC.
146f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
147f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define FETCH_INST()            movzwl    (rPC),rINST_FULL
148f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
149f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
150f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Fetch the nth instruction word from rPC into rINST.  Does not advance
151f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * rPC, and _count is in words
152f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
153f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define FETCH_INST_WORD(_count)  movzwl  _count*2(rPC),rINST_FULL
154f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
155f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
156f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Fetch instruction word indexed (used for branching).
157f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Index is in instruction word units.
158f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
159f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define FETCH_INST_INDEXED(_reg) movzwl  (rPC,_reg,2),rINST_FULL
160f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
161f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
162f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Extract the opcode of the instruction in rINST
163f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
164f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define EXTRACT_OPCODE(_reg)   movzx rOPCODE,_reg
165f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
166f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
167f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Advance rPC by instruction count
168f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
169f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define ADVANCE_PC(_count)    leal  2*_count(rPC),rPC
170f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
171f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
172f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Advance rPC by branch offset in register
173f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
174f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define ADVANCE_PC_INDEXED(_reg) leal (rPC,_reg,2),rPC
175f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
176f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
177f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Note: assumes opcode previously fetched and in rINST, and
178f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project *       %eax is killable at this point.
179f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
180f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#if 1
181f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project.macro GOTO_NEXT
182f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project    /* For computed next version */
183f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     movzx    rOPCODE,%eax
184f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     sall     $$$handler_size_bits,%eax
185f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     addl     rIBASE,%eax
186f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     jmp      *%eax
187f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project.endm
188f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#else
189f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project   /* For jump table version */
190f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project.macro GOTO_NEXT
191f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     movzx   rOPCODE,%eax
192f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project     jmp     *(rIBASE,%eax,4)
193f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project.endm
194f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#endif
195f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
196f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
197f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * Get/set the 32-bit value from a Dalvik register.
198f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
199f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define GET_VREG(_reg, _vreg)   movl     (rFP,_vreg,4),_reg
200f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SET_VREG(_reg, _vreg)   movl     _reg,(rFP,_vreg,4)
201f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define GET_VREG_WORD(_reg, _vreg, _offset)   movl     4*(_offset)(rFP,_vreg,4),_reg
202f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#define SET_VREG_WORD(_reg, _vreg, _offset)   movl     _reg,4*(_offset)(rFP,_vreg,4)
203f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project
204f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/*
205f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * This is a #include, not a %include, because we want the C pre-processor
206f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * to expand the macros into assembler assignment statements.
207f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */
208f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project#include "../common/asm-constants.h"
209