4 * Copyright Roman Zippel, 1997. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, and the entire permission notice in its entirety,
11 * including the disclaimer of warranties.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote
16 * products derived from this software without specific prior
19 * ALTERNATIVELY, this product may be distributed under the terms of
20 * the GNU General Public License, in which case the provisions of the GPL are
21 * required INSTEAD OF the above restrictions. (This clause is
22 * necessary due to a potential bad interaction between the GPL and
23 * the restrictions contained in a BSD-style copyright.)
25 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
26 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
35 * OF THE POSSIBILITY OF SUCH DAMAGE.
39 #include "fp_decode.h"
43 .globl fp_fmove_fp2mem
46 clr.b (2+FPD_FPSR,FPDATA)
48 move.w %d0,%d1 | store data size twice in %d1
49 swap %d1 | one can be trashed below
54 move.b (%a0,%d1.w),%d0
55 printf PDECODE,"fmove.%c ",1,%d0
57 printf PDECODE,"fp%d,",1,%d0
60 0: .byte 'l','s','x','p','w','d','b','p'
64 | encode addressing mode for dest
68 .long fp_indirect, fp_postinc
69 .long fp_predecr, fp_disp16
70 .long fp_extmode0, fp_extmode1
72 | addressing mode: data register direct
78 lea (FPD_TEMPFP1,FPDATA),%a1
86 jmp ([0f:w,%pc,%d1.w*4])
90 .long fp_data_long, fp_data_single
92 .long fp_data_word, fp_ill
93 .long fp_data_byte, fp_ill
109 jsr fp_conv_ext2short
129 jsr fp_conv_ext2single
135 | addressing mode: address register indirect
137 fp_mode_addr_indirect
140 | addressing mode: address register indirect with postincrement
142 fp_mode_addr_indirect_postinc
145 | addressing mode: address register indirect with predecrement
147 fp_mode_addr_indirect_predec
150 | addressing mode: address register indirect with 16bit displacement
152 fp_mode_addr_indirect_disp16
156 fp_mode_addr_indirect_extmode0
161 jmp ([0f:w,%pc,%d0*4])
165 .long fp_abs_short, fp_abs_long
181 move.l %d1,%d2 | save size
192 jmp ([0f:w,%pc,%d2.w*4])
196 .long fp_format_long, fp_format_single
197 .long fp_format_extended, fp_format_packed
198 .long fp_format_word, fp_format_double
199 .long fp_format_byte, fp_format_packed
203 putuser.l %d0,(%a1),fp_err_ua1,%a1
207 jsr fp_conv_ext2single
208 putuser.l %d0,(%a1),fp_err_ua1,%a1
216 putuser.l %d0,(%a1)+,fp_err_ua1,%a1
218 putuser.l %d0,(%a1)+,fp_err_ua1,%a1
220 putuser.l %d0,(%a1),fp_err_ua1,%a1
224 /* not supported yet */
229 jsr fp_conv_ext2short
230 putuser.w %d0,(%a1),fp_err_ua1,%a1
234 jsr fp_conv_ext2double
239 putuser.b %d0,(%a1),fp_err_ua1,%a1