OSDN Git Service

* function.c (purge_addressof_1): Do not perform endianness
authordavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Oct 1998 20:17:50 +0000 (20:17 +0000)
committerdavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Oct 1998 20:17:50 +0000 (20:17 +0000)
corrections on bitpos, who we call will do it for us.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22766 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c

index fcb480e..efcfefa 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct  2 19:14:20 1998  David S. Miller  <davem@pierdol.cobaltmicro.com>
+
+       * function.c (purge_addressof_1): Do not perform endianness
+       corrections on bitpos, who we call will do it for us.
+
 Fri Oct  2 11:52:35 1998  Jeffrey A Law  (law@cygnus.com)
 
        * h8300.c (WORD_REG_USED): Fix typo.
index d4f29db..41f400e 100644 (file)
@@ -2879,21 +2879,8 @@ purge_addressof_1 (loc, insn, force, store)
              /* Do a bitfield insertion to mirror what would happen
                 in memory.  */
 
-             int bitpos;
              rtx val, seq;
 
-             bitpos = 0;
-             if (WORDS_BIG_ENDIAN)
-               {
-                 bitpos += (size_sub / BITS_PER_WORD) * BITS_PER_WORD;
-                 bitpos -= (size_x / BITS_PER_WORD) * BITS_PER_WORD;
-               }
-             if (BYTES_BIG_ENDIAN)
-               {
-                 bitpos += size_sub % BITS_PER_WORD;
-                 bitpos -= size_x % BITS_PER_WORD;
-               }
-
              if (store)
                {
                  /* If we can't replace with a register, be afraid.  */
@@ -2907,7 +2894,7 @@ purge_addressof_1 (loc, insn, force, store)
                  emit_insn_before (seq, insn);
              
                  start_sequence ();
-                 store_bit_field (sub, size_x, bitpos, GET_MODE (x),
+                 store_bit_field (sub, size_x, 0, GET_MODE (x),
                                   val, GET_MODE_SIZE (GET_MODE (sub)),
                                   GET_MODE_SIZE (GET_MODE (sub)));
 
@@ -2918,7 +2905,7 @@ purge_addressof_1 (loc, insn, force, store)
              else
                {
                  start_sequence ();
-                 val = extract_bit_field (sub, size_x, bitpos, 1, NULL_RTX,
+                 val = extract_bit_field (sub, size_x, 0, 1, NULL_RTX,
                                           GET_MODE (x), GET_MODE (x),
                                           GET_MODE_SIZE (GET_MODE (sub)),
                                           GET_MODE_SIZE (GET_MODE (sub)));