Revision 57fa1fb3 target-mips/op.c

b/target-mips/op.c
1609 1609
    RETURN();
1610 1610
}
1611 1611

  
1612
void op_cp1_64bitmode(void)
1613
{
1614
    if (!(env->CP0_Status & (1 << CP0St_FR))) {
1615
        CALL_FROM_TB1(do_raise_exception, EXCP_RI);
1616
    }
1617
    RETURN();
1618
}
1619

  
1612 1620
/*
1613 1621
 * Verify if floating point register is valid; an operation is not defined
1614 1622
 * if bit 0 of any register specification is set and the FR bit in the
......
1946 1954
    RETURN();
1947 1955
}
1948 1956

  
1949
/* binary operations */
1950
#define FLOAT_BINOP(name) \
1957
/* operations calling helpers, for s, d and ps */
1958
#define FLOAT_HOP(name) \
1951 1959
FLOAT_OP(name, d)         \
1952 1960
{                         \
1953 1961
    CALL_FROM_TB0(do_float_ ## name ## _d);  \
......
1966 1974
    DEBUG_FPU_STATE();    \
1967 1975
    RETURN();             \
1968 1976
}
1969
FLOAT_BINOP(add)
1970
FLOAT_BINOP(sub)
1971
FLOAT_BINOP(mul)
1972
FLOAT_BINOP(div)
1973
#undef FLOAT_BINOP
1977
FLOAT_HOP(add)
1978
FLOAT_HOP(sub)
1979
FLOAT_HOP(mul)
1980
FLOAT_HOP(div)
1981
FLOAT_HOP(recip2)
1982
FLOAT_HOP(rsqrt2)
1983
FLOAT_HOP(rsqrt1)
1984
FLOAT_HOP(recip1)
1985
#undef FLOAT_HOP
1986

  
1987
/* operations calling helpers, for s and d */
1988
#define FLOAT_HOP(name)   \
1989
FLOAT_OP(name, d)         \
1990
{                         \
1991
    CALL_FROM_TB0(do_float_ ## name ## _d);  \
1992
    DEBUG_FPU_STATE();    \
1993
    RETURN();             \
1994
}                         \
1995
FLOAT_OP(name, s)         \
1996
{                         \
1997
    CALL_FROM_TB0(do_float_ ## name ## _s);  \
1998
    DEBUG_FPU_STATE();    \
1999
    RETURN();             \
2000
}
2001
FLOAT_HOP(rsqrt)
2002
FLOAT_HOP(recip)
2003
#undef FLOAT_HOP
1974 2004

  
1975
FLOAT_OP(addr, ps)
1976
{
1977
    CALL_FROM_TB0(do_float_addr_ps);
1978
    DEBUG_FPU_STATE();
1979
    RETURN();
2005
/* operations calling helpers, for ps */
2006
#define FLOAT_HOP(name)   \
2007
FLOAT_OP(name, ps)        \
2008
{                         \
2009
    CALL_FROM_TB0(do_float_ ## name ## _ps); \
2010
    DEBUG_FPU_STATE();    \
2011
    RETURN();             \
1980 2012
}
2013
FLOAT_HOP(addr)
2014
FLOAT_HOP(mulr)
2015
#undef FLOAT_HOP
1981 2016

  
1982 2017
/* ternary operations */
1983 2018
#define FLOAT_TERNOP(name1, name2) \
......
2053 2088
{                         \
2054 2089
    FST2 = float32_ ## name(FST0, &env->fp_status);   \
2055 2090
    DEBUG_FPU_STATE();    \
2056
    RETURN();                      \
2057
}                         \
2058
FLOAT_OP(name, ps)        \
2059
{                         \
2060
    FST2 = float32_ ## name(FST0, &env->fp_status);   \
2061
    FSTH2 = float32_ ## name(FSTH0, &env->fp_status); \
2062
    DEBUG_FPU_STATE();    \
2063
    RETURN();                      \
2091
    RETURN();             \
2064 2092
}
2065 2093
FLOAT_UNOP(sqrt)
2066 2094
#undef FLOAT_UNOP

Also available in: Unified diff