aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/cp1.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-2/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+2
2010-01-01Update copyright notices to add year 2010.Joel Brobecker1-1/+1
2009-01-14 Update the copyright notice of some of the files I missedJoel Brobecker1-1/+1
in the previous copyright update.
2008-01-01 Updated copyright notices for most files.Daniel Jacobowitz1-1/+1
2007-08-24 Switch the license of all files explicitly copyright the FSFJoel Brobecker1-5/+4
to GPLv3.
2007-02-19 * cp1.c (value_fpr): Don't inherit existing FPR_STATE forThiemo Seufer1-14/+21
uninterpreted formats. If fmt is one of the uninterpreted types don't update the FPR_STATE. Handle fmt_uninterpreted_32 like fmt_word, and fmt_uninterpreted_64 like fmt_long. (store_fpr): When writing an invalid odd register, set the matching even register to fmt_unknown, not the following register. * interp.c (sim_open): If STATE_MEM_SIZE isn't set then set it to the the memory window at offset 0 set by --memory-size command line option. (sim_store_register): Handle storing 4 bytes to an 8 byte floating point register. (sim_fetch_register): Likewise for reading 4 bytes from an 8 byte register. (sim_monitor): When returning the memory size to the MIPS application, use the value in STATE_MEM_SIZE, not an arbitrary hardcoded value. (cop_lw): Don' mess around with FPR_STATE, just pass fmt_uninterpreted_32 to StoreFPR. (cop_sw): Similarly. (cop_ld): Pass fmt_uninterpreted_64 not fmt_uninterpreted. (cop_sd): Similarly. * mips.igen (not_word_value): Single version for mips32, mips64 and mips16.
2007-01-09Copyright updates for 2007.Daniel Jacobowitz1-1/+1
2003-05-02[igen/ChangeLog]Chris Demetriou1-3/+4
2003-05-03 Chris Demetriou <cgd@broadcom.com> * compare_igen_models: Tweak attribution slightly. [mips/ChangeLog] 2003-05-03 Chris Demetriou <cgd@broadcom.com> * cp1.c: Tweak attribution slightly. * cp1.h: Likewise. * mdmx.c: Likewise. * mdmx.igen: Likewise. * mips3d.igen: Likewise. * sb1.igen: Likewise.
2002-07-292002-07-29 Michael Snyder <msnyder@redhat.com>Michael Snyder1-2/+2
* cp1.c (fp_recip2): Modify initialization expression so that GCC will recognize it as constant.
2002-06-142002-06-14 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-1/+252
Ed Satterthwaite <ehs@broadcom.com> * mips3d.igen: New file which contains MIPS-3D ASE instructions. * Makefile.in (IGEN_INCLUDE): Add mips3d.igen. * mips.igen: Include mips3d.igen. (mips3d): New model name for MIPS-3D ASE instructions. (CVT.W.fmt): Don't use this instruction for word (source) format instructions. * cp1.c (fp_binary_r, fp_add_r, fp_mul_r, fpu_inv1, fpu_inv1_32) (fpu_inv1_64, fp_recip1, fp_recip2, fpu_inv_sqrt1, fpu_inv_sqrt1_32) (fpu_inv_sqrt1_64, fp_rsqrt1, fp_rsqrt2): New functions. (NR_FRAC_GUARD, IMPLICIT_1): New macros. * sim-main.h (fmt_pw, CompareAbs, AddR, MultiplyR, Recip1, Recip2) (RSquareRoot1, RSquareRoot2): New macros. (fp_add_r, fp_mul_r, fp_recip1, fp_recip2, fp_rsqrt1) (fp_rsqrt2): New functions. * configure.in: Add MIPS-3D support to mipsisa64 simulator. * configure: Regenerate.
2002-06-142002-06-13 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-2/+207
* cp1.c (FP_PS_upper, FP_PS_lower, FP_PS_cat, FPQNaN_PS): New macros. (value_fpr, store_fpr, fp_cmp, fp_unary, fp_binary, fp_mac) (fp_inv_sqrt, fpu_format_name): Add paired-single support. (convert): Note that this function is not used for paired-single format conversions. (ps_lower, ps_upper, pack_ps, convert_ps): New functions. * mips.igen (FMT, MOVtf.fmt): Add paired-single support. (check_fmt_p): Enable paired-single support. (ALNV.PS, CVT.PS.S, CVT.S.PL, CVT.S.PU, PLL.PS, PLU.PS, PUL.PS) (PUU.PS): New instructions. (CVT.S.fmt): Don't use this instruction for paired-single format destinations. * sim-main.h (FP_formats): New value 'fmt_ps.' (ps_lower, ps_upper, pack_ps, convert_ps): New prototypes. (PSLower, PSUpper, PackPS, ConvertPS): New macros.
2002-06-082002-06-07 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-0/+253
Ed Satterthwaite <ehs@broadcom.com> * cp1.c (inner_mac, fp_mac, inner_rsqrt, fp_inv_sqrt) (fp_rsqrt, fp_madd, fp_msub, fp_nmadd, fp_nmsub): New functions. * sim-main.h (fp_rsqrt, fp_madd, fp_msub, fp_nmadd) (fp_nmsub): New prototypes. (RSquareRoot, MultiplyAdd, MultiplySub, NegMultiplyAdd) (NegMultiplySub): New defines. * mips.igen (RSQRT.fmt): Use RSquareRoot(). (MADD.D, MADD.S): Replace with... (MADD.fmt): New instruction. (MSUB.D, MSUB.S): Replace with... (MSUB.fmt): New instruction. (NMADD.D, NMADD.S): Replace with... (NMADD.fmt): New instruction. (NMSUB.D, MSUB.S): Replace with... (NMSUB.fmt): New instruction.
2002-06-072002-06-07 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-43/+78
Ed Satterthwaite <ehs@broadcom.com> * cp1.c: Fix more comment spelling and formatting. (value_fcr, store_fcr): Use fenr_FS rather than hard-coding value. (denorm_mode): New function. (fpu_unary, fpu_binary): Round results after operation, collect status from rounding operations, and update the FCSR. (convert): Collect status from integer conversions and rounding operations, and update the FCSR. Adjust NaN values that result from conversions. Convert to use sim_io_eprintf rather than fprintf, and remove some debugging code. * cp1.h (fenr_FS): New define.
2002-06-072002-06-07 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-39/+37
* cp1.c (convert): Remove unusable debugging code, and move MIPS rounding mode to sim FP rounding mode flag conversion code into... (rounding_mode): New function.
2002-06-072002-06-07 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-21/+7
* cp1.c: Clean up formatting of a few comments. (value_fpr): Reformat switch statement.
2002-06-072002-06-06 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-90/+176
Ed Satterthwaite <ehs@broadcom.com> * cp1.h: New file. * sim-main.h: Include cp1.h. (SETFCC, GETFCC, IR, UF, OF, DX, IO, UO, FP_FLAGS, FP_ENABLE) (FP_CAUSE, GETFS, FP_RM_NEAREST, FP_RM_TOZERO, FP_RM_TOPINF) (FP_RM_TOMINF, GETRM): Remove. Moved to cp1.h. (FP_FS, FP_MASK_RM, FP_SH_RM, Nan, Less, Equal): Remove. (value_fcr, store_fcr, test_fcsr, fp_cmp): New prototypes. (ValueFCR, StoreFCR, TestFCSR, Compare): New macros. * cp1.c: Don't include sim-fpu.h; already included by sim-main.h. Clean up formatting of some comments. (NaN, Equal, Less): Remove. (test_fcsr, value_fcr, store_fcr, update_fcsr, fp_test) (fp_cmp): New functions. * mips.igen (do_c_cond_fmt): Remove. (C.cond.fmta, C.cond.fmtb): Replace uses of do_c_cond_fmt_a with Compare. Add result tracing. (CxC1): Remove, replace with... (CFC1a, CFC1b, CFC1c, CTC1a, CTC1b, CTC1c): New instructions. (DMxC1): Remove, replace with... (DMFC1a, DMFC1b, DMTC1a, DMTC1b): New instructions. (MxC1): Remove, replace with... (MFC1a, MFC1b, MTC1a, MTC1b): New instructions.
2002-06-042002-06-04 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-0/+23
* cp1.c: Add an FSF Copyright notice to this file.
2002-06-042002-06-04 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-398/+97
Ed Satterthwaite <ehs@broadcom.com> * cp1.c (Infinity): Remove. * sim-main.h (Infinity): Likewise. * cp1.c (fp_unary, fp_binary): New functions. (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div, fp_recip) (fp_sqrt): New functions, implemented in terms of the above. (AbsoluteValue, Negate, Add, Sub, Multiply, Divide) (Recip, SquareRoot): Remove (replaced by functions above). * sim-main.h (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div) (fp_recip, fp_sqrt): New prototypes. (AbsoluteValue, Negate, Add, Sub, Multiply, Divide) (Recip, SquareRoot): Replace prototypes with #defines which invoke the functions above.
2002-06-042002-06-03 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-8/+5
* sim-main.h (Nan, Infinity, Less, Equal, AbsoluteValue, Negate) (Add, Sub, Multiply, Divide, Recip, SquareRoot): Move lower in file, remove PARAMS from prototypes. (value_fpr, store_fpr, convert): Likewise. Use SIM_STATE to provide simulator state arguments. (ValueFPR, StoreFPR, Convert): Move lower in file. Use SIM_ARGS to pass simulator state arguments. * cp1.c (SD): Redefine as CPU_STATE(cpu). (store_fpr, convert): Remove 'sd' argument. (value_fpr): Likewise. Convert to use 'SD' instead.
2002-06-042002-06-03 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-144/+0
* cp1.c (Min, Max): Remove #if 0'd functions. * sim-main.h (Min, Max): Remove.
2002-06-032002-06-03 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-11/+11
* cp1.c: fix formatting of switch case and default labels. * interp.c: Likewise. * sim-main.c: Likewise.
2002-06-032002-06-03 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-24/+25
* cp1.c: Clean up comments which describe FP formats. (FPQNaN_DOUBLE, FPQNaN_LONG): Generate using UNSIGNED64.
2002-05-012002-05-01 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-4/+0
* cp1.c (store_fpr): Remove #ifdef'd out call to UndefinedResult which wouldn't compile anyway. * sim-main.h (unpredictable_action): New function prototype. (Unpredictable): Define to call igen function unpredictable(). (NotWordValue): New macro to call igen function not_word_value(). (UndefinedResult): Remove. * interp.c (undefined_result): Remove. (unpredictable_action): New function. * mips.igen (not_word_value, unpredictable): New functions. (ADD, ADDI, do_addiu, do_addu, BGEZAL, BGEZALL, BLTZAL, BLTZALL) (CLO, CLZ, MADD, MADDU, MSUB, MSUBU, MUL, do_mult, do_multu) (do_sra, do_srav, do_srl, do_srlv, SUB, do_subu): Invoke NotWordValue() to check for unpredictable inputs, then Unpredictable() to handle them.
2002-03-202002-03-19 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-20/+0
* cp1.c (FP_S_s, FP_D_s, FP_S_be, FP_D_be, FP_S_e, FP_D_e, FP_S_f) (FP_D_f, FP_S_fb, FP_D_fb, FPINF_SINGLE, FPINF_DOUBLE): Remove unused definitions.
2002-03-202002-03-19 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-547/+623
* cp1.c: Fix many formatting issues.
2002-03-202002-03-19 Chris G. Demetriou <cgd@broadcom.com>Chris Demetriou1-35/+81
* cp1.c (fpu_format_name): New function to replace... (DOFMT): This. Delete, and update all callers. (fpu_rounding_mode_name): New function to replace... (RMMODE): This. Delete, and update all callers.
2002-03-202002-03-19 Chris G. Demetriou <cgd@broadcom.com>Chris Demetriou1-0/+1095
* interp.c: Move FPU support routines from here to... * cp1.c: Here. New file. * Makefile.in (SIM_OBJS): Add cp1.o to object list. (cp1.o): New target.