fpu_helper.c (d1e8e8ecc3d2a1a72504912d671f1cbbac1b06e5) fpu_helper.c (21ba856499f9c0ccdc05ed04432df059ae76b337)
1/*
2 * Helpers for floating point instructions.
3 *
4 * Copyright (c) 2007 Jocelyn Mayer
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 77 unchanged lines hidden (view full) ---

86
87/* Raise exceptions for ieee fp insns with software completion. */
88void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t ignore, uint32_t regno)
89{
90 uint32_t exc = env->error_code & ~ignore;
91 if (exc) {
92 env->fpcr |= exc;
93 exc &= ~ignore;
1/*
2 * Helpers for floating point instructions.
3 *
4 * Copyright (c) 2007 Jocelyn Mayer
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 77 unchanged lines hidden (view full) ---

86
87/* Raise exceptions for ieee fp insns with software completion. */
88void helper_fp_exc_raise_s(CPUAlphaState *env, uint32_t ignore, uint32_t regno)
89{
90 uint32_t exc = env->error_code & ~ignore;
91 if (exc) {
92 env->fpcr |= exc;
93 exc &= ~ignore;
94 if (exc) {
95 exc &= env->fpcr_exc_enable;
96 fp_exc_raise1(env, GETPC(), exc, regno, EXC_M_SWC);
94#ifdef CONFIG_USER_ONLY
95 /*
96 * In user mode, the kernel's software handler only
97 * delivers a signal if the exception is enabled.
98 */
99 if (!(exc & env->fpcr_exc_enable)) {
100 return;
97 }
101 }
102#else
103 /*
104 * In system mode, the software handler gets invoked
105 * for any non-ignored exception.
106 */
107 if (!exc) {
108 return;
109 }
110#endif
111 exc &= env->fpcr_exc_enable;
112 fp_exc_raise1(env, GETPC(), exc, regno, EXC_M_SWC);
98 }
99}
100
101/* Input handing without software completion. Trap for all
102 non-finite numbers. */
103void helper_ieee_input(CPUAlphaState *env, uint64_t val)
104{
105 uint32_t exp = (uint32_t)(val >> 52) & 0x7ff;

--- 448 unchanged lines hidden ---
113 }
114}
115
116/* Input handing without software completion. Trap for all
117 non-finite numbers. */
118void helper_ieee_input(CPUAlphaState *env, uint64_t val)
119{
120 uint32_t exp = (uint32_t)(val >> 52) & 0x7ff;

--- 448 unchanged lines hidden ---