PR22069, Several instances of register accidentally spelled as regsiter
[deliverable/binutils-gdb.git] / sim / ppc / ppc-instructions
index 5f3e13319f63cfb0e2d2a840154d55d34896ff20..9f9773477f772e72577ce3527ee3a6a4c1ee46e1 100644 (file)
@@ -21,7 +21,7 @@
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
-#   the Free Software Foundation; either version 2 of the License, or
+#   the Free Software Foundation; either version 3 of the License, or
 #   (at your option) any later version.
 #
 #   This program is distributed in the hope that it will be useful,
@@ -30,8 +30,7 @@
 #   GNU General Public License for more details.
 #
 #   You should have received a copy of the GNU General Public License
-#   along with this program; if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#   along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 
 :cache::::RA:RA:
@@ -735,7 +734,7 @@ void::model-function::ppc_insn_to_spr:itable_index index, model_data *model_ptr,
        busy_ptr->nr_writebacks = 1;
        TRACE(trace_model,("Making register %s busy.\n", spr_name(nSPR)));
 
-# Schedule a MFCR instruction that moves the CR into an integer regsiter
+# Schedule a MFCR instruction that moves the CR into an integer register
 void::model-function::ppc_insn_mfcr:itable_index index, model_data *model_ptr, unsigned32 int_mask
        const unsigned32 cr_mask = 0xff;
        model_busy *busy_ptr;
@@ -909,7 +908,7 @@ model_print *::model-function::model_mon_info:model_data *model_ptr
          tail->suffix_singular = "";
        }
 
-       for (j = 0; j < (sizeof(ppc_branch_conditional_name) / sizeof(ppc_branch_conditional_name[0])) ; j++) {
+       for (j = 0; j < ARRAY_SIZE (ppc_branch_conditional_name); j++) {
          if (model_ptr->nr_branch_conditional[j]) {
            tail->next = ZALLOC(model_print);
            tail = tail->next;
@@ -2494,7 +2493,7 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
        }
        PPC_INSN_INT(0, (RA_BITMASK & ~1) | RB_BITMASK | RS_BITMASK, 1/*Rc*/);
 
-0.31,6./,11./,16./,21.598,31./:X::sync:Synchronize
+0.31,6./,9.L,11./,16./,21.598,31./:X::sync:Synchronize
 *601: PPC_UNIT_IU,    PPC_UNIT_IU,    1,  1,  0
 *603: PPC_UNIT_SRU,   PPC_UNIT_SRU,   1,  1,  0
 *603e:PPC_UNIT_SRU,   PPC_UNIT_SRU,   1,  1,  0
@@ -3356,7 +3355,7 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
          spreg new_val = (spr_length(n) == 64
                           ? *rS
                           : MASKED(*rS, 32, 63));
-         /* HACK - time base registers need to be updated immediatly */
+         /* HACK - time base registers need to be updated immediately */
          if (WITH_TIME_BASE) {
            switch (n) {
            case spr_tbu:
@@ -3402,6 +3401,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
            case spr_dec:
              *rT = cpu_get_decrementer(processor);
              break;
+               case spr_tbrl:
+                 if (is_64bit_implementation) *rT = TB;
+                 else                         *rT = EXTRACTED64(TB, 32, 63);
+               break;
+               case spr_tbru:
+                 if (is_64bit_implementation) *rT = EXTRACTED64(TB, 0, 31);
+                 else                         *rT = EXTRACTED64(TB, 0, 31);
+               break;
            case spr_tbu:
            case spr_tbl:
              /* NOTE - these SPR's are not readable. Use mftb[ul] */
@@ -3965,12 +3972,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 0, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4010,12 +4019,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 1, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4055,12 +4066,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 0, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4100,12 +4113,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 1, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4145,12 +4160,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 0, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4190,12 +4207,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 1, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4235,12 +4254,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 0, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
@@ -4280,12 +4301,14 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
                                 fpscr_vxsnan | fpscr_vximz,
                                 1, /*single?*/
                                 0) /*negate?*/) {
+         union { double d; unsigned64 u; } tmp;
          invalid_arithemetic_operation(processor, cia,
-                                       (unsigned64*)&product, *frA, 0, *frC,
+                                       &tmp.u, *frA, 0, *frC,
                                        0, /*instruction_is_frsp*/
                                        0, /*instruction_is_convert_to_64bit*/
                                        0, /*instruction_is_convert_to_32bit*/
                                        0); /*single-precision*/
+         product = tmp.d;
        }
        else {
          /*HACK!*/
This page took 0.027525 seconds and 4 git commands to generate.