+Wed Feb 25 18:56:22 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips.igen (CxC1): Add tracing.
+
+start-sanitize-r5900
+Wed Feb 25 13:59:03 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * r5900.igen (StoreFP): Delete.
+ (r59fp_store, r59fp_overflow, r59fp_op1, r59fp_op2, r59fp_op3):
+ New functions.
+ (rsqrt.s, sqrt.s): Implement.
+ (r59cond): New function.
+ (C.COND.S): Call r59cond in assembler line.
+ (cvt.w.s, cvt.s.w): Implement.
+
+ * mips.igen (rsqrt.fmt, sqrt.fmt, cvt.*.*): Remove from r5900
+ instruction set.
+
+ * sim-main.h: Define an enum of r5900 FCSR bit fields.
+
+end-sanitize-r5900
start-sanitize-r5900
Tue Feb 24 14:44:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
{
if (X)
{
+ /* control to */
+ TRACE_ALU_INPUT1 (GPR[RT]);
if (FS == 0)
- FCR0 = VL4_8(GPR[RT]);
+ {
+ FCR0 = VL4_8(GPR[RT]);
+ TRACE_ALU_RESULT (FCR0);
+ }
else if (FS == 31)
- FCR31 = VL4_8(GPR[RT]);
+ {
+ FCR31 = VL4_8(GPR[RT]);
+ SETFCC(0,((FCR31 & (1 << 23)) ? 1 : 0));
+ TRACE_ALU_RESULT (FCR31);
+ }
+ else
+ {
+ TRACE_ALU_RESULT0 ();
+ }
/* else NOP */
- SETFCC(0,((FCR31 & (1 << 23)) ? 1 : 0));
}
else
{ /* control from */
if (FS == 0)
- GPR[RT] = SIGNEXTEND (FCR0, 32);
+ {
+ TRACE_ALU_INPUT1 (FCR0);
+ GPR[RT] = SIGNEXTEND (FCR0, 32);
+ }
else if (FS == 31)
- GPR[RT] = SIGNEXTEND (FCR31, 32);
+ {
+ TRACE_ALU_INPUT1 (FCR31);
+ GPR[RT] = SIGNEXTEND (FCR31, 32);
+ }
+ TRACE_ALU_RESULT (GPR[RT]);
/* else NOP */
}
}
// start-sanitize-vr5400
*vr5400:
// end-sanitize-vr5400
-// start-sanitize-r5900
-*r5900:
-// end-sanitize-r5900
*r3900:
// start-sanitize-tx19
*tx19:
// start-sanitize-vr5400
*vr5400:
// end-sanitize-vr5400
-// start-sanitize-r5900
-*r5900:
-// end-sanitize-r5900
*r3900:
// start-sanitize-tx19
*tx19:
// start-sanitize-vr5400
*vr5400:
// end-sanitize-vr5400
-// start-sanitize-r5900
-*r5900:
-// end-sanitize-r5900
*r3900:
// start-sanitize-tx19
*tx19:
// start-sanitize-vr5400
*vr5400:
// end-sanitize-vr5400
-// start-sanitize-r5900
-*r5900:
-// end-sanitize-r5900
*r3900:
// start-sanitize-tx19
*tx19:
// start-sanitize-vr5400
*vr5400:
// end-sanitize-vr5400
-// start-sanitize-r5900
-*r5900:
-// end-sanitize-r5900
*r3900:
// start-sanitize-tx19
*tx19:
/* start-sanitize-r5900 */
+/* Figure 10-5 FPU Control/Status Register.
+ Note: some of these bits are different to what is found in a
+ standard MIPS manual. */
+enum {
+ R5900_FCSR_C = BIT (23), /* OK */
+ R5900_FCSR_I = BIT (17),
+ R5900_FCSR_D = BIT (16),
+ R5900_FCSR_O = BIT (15),
+ R5900_FCSR_U = BIT (14),
+ R5900_FCSR_CAUSE = MASK (16,14),
+ R5900_FCSR_SI = BIT (6),
+ R5900_FCSR_SD = BIT (5),
+ R5900_FCSR_SO = BIT (4),
+ R5900_FCSR_SU = BIT (3),
+};
+
typedef struct _sim_r5900_cpu {
/* The R5900 has 32 x 128bit general purpose registers.