1 #include <linux/module.h>
2 #include <linux/types.h>
3 #include <linux/kernel.h>
4 #include <linux/sched.h>
6 #include <asm/uaccess.h>
29 #define FOP_FNC_ADDx 0
30 #define FOP_FNC_CVTQL 0
31 #define FOP_FNC_SUBx 1
32 #define FOP_FNC_MULx 2
33 #define FOP_FNC_DIVx 3
34 #define FOP_FNC_CMPxUN 4
35 #define FOP_FNC_CMPxEQ 5
36 #define FOP_FNC_CMPxLT 6
37 #define FOP_FNC_CMPxLE 7
38 #define FOP_FNC_SQRTx 11
39 #define FOP_FNC_CVTxS 12
40 #define FOP_FNC_CVTxT 14
41 #define FOP_FNC_CVTxQ 15
43 #define MISC_TRAPB 0x0000
44 #define MISC_EXCB 0x0400
60 static long (*save_emul) (
unsigned long pc);
62 long do_alpha_fp_emul_imprecise(
struct pt_regs *,
unsigned long);
63 long do_alpha_fp_emul(
unsigned long);
80 #undef alpha_fp_emul_imprecise
81 #define alpha_fp_emul_imprecise do_alpha_fp_emul_imprecise
83 #define alpha_fp_emul do_alpha_fp_emul
110 fc = (insn >> 0) & 0x1f;
111 fb = (insn >> 16) & 0x1f;
112 fa = (insn >> 21) & 0x1f;
113 func = (insn >> 5) & 0xf;
114 src = (insn >> 9) & 0x3;
115 mode = (insn >> 11) & 0x3;
174 vc = 0x4000000000000000
UL;
228 DR_e = DB_e + (1024 - 128);
229 DR_f = SB_f << (52 - 23);
253 vc = ((vb & 0xc0000000) << 32 |
254 (vb & 0x3fffffff) << 29);
279 if ((_fex & FP_EX_UNDERFLOW) && (swcr & IEEE_MAP_UMZ))
306 fpcr |= ieee_swcr_to_fpcr(swcr);
339 unsigned long trigger_pc = regs->
pc - 4;
365 switch (insn & 0xffff) {
379 write_mask &= ~(1
UL <<
rc);
386 write_mask &= ~(1
UL << (rc + 32));
391 regs->
pc = trigger_pc + 4;