Core commit. Compile and run on the OpenPandora
[mupen64plus-pandora.git] / source / mupen64plus-core / src / r4300 / x86 / gcop1_l.c
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  *   Mupen64plus - gcop1_l.c                                               *
3  *   Mupen64Plus homepage: http://code.google.com/p/mupen64plus/           *
4  *   Copyright (C) 2002 Hacktarux                                          *
5  *                                                                         *
6  *   This program is free software; you can redistribute it and/or modify  *
7  *   it under the terms of the GNU General Public License as published by  *
8  *   the Free Software Foundation; either version 2 of the License, or     *
9  *   (at your option) any later version.                                   *
10  *                                                                         *
11  *   This program is distributed in the hope that it will be useful,       *
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14  *   GNU General Public License for more details.                          *
15  *                                                                         *
16  *   You should have received a copy of the GNU General Public License     *
17  *   along with this program; if not, write to the                         *
18  *   Free Software Foundation, Inc.,                                       *
19  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
20  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
21
22 #include "assemble.h"
23 #include "interpret.h"
24
25 #include "r4300/recomph.h"
26 #include "r4300/r4300.h"
27 #include "r4300/ops.h"
28
29 void gencvt_s_l(void)
30 {
31 #ifdef INTERPRET_CVT_S_L
32    gencallinterp((unsigned int)cached_interpreter_table.CVT_S_L, 0);
33 #else
34    gencheck_cop1_unusable();
35    mov_eax_memoffs32((unsigned int*)(&reg_cop1_double[dst->f.cf.fs]));
36    fild_preg32_qword(EAX);
37    mov_eax_memoffs32((unsigned int*)(&reg_cop1_simple[dst->f.cf.fd]));
38    fstp_preg32_dword(EAX);
39 #endif
40 }
41
42 void gencvt_d_l(void)
43 {
44 #ifdef INTERPRET_CVT_D_L
45    gencallinterp((unsigned int)cached_interpreter_table.CVT_D_L, 0);
46 #else
47    gencheck_cop1_unusable();
48    mov_eax_memoffs32((unsigned int*)(&reg_cop1_double[dst->f.cf.fs]));
49    fild_preg32_qword(EAX);
50    mov_eax_memoffs32((unsigned int*)(&reg_cop1_double[dst->f.cf.fd]));
51    fstp_preg32_qword(EAX);
52 #endif
53 }
54