]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* s390-tdep.c (s390_push_dummy_call): Set addressing mode bit
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 19 Dec 2011 21:44:57 +0000 (21:44 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 19 Dec 2011 21:44:57 +0000 (21:44 +0000)
in return PSWA.

gdb/ChangeLog
gdb/s390-tdep.c

index c433ef1d43e61b2b1ba9a905cdad41bdcc1aebf5..16748d1f9e9d7ca0203da4c8610d6d7af783ed12 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-19  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * s390-tdep.c (s390_push_dummy_call): Set addressing mode bit
+       in return PSWA.
+
 2011-12-19  Tom Tromey  <tromey@redhat.com>
 
        * symtab.h (add_minsym_to_hash_table): Don't declare.
index 1c09739a2388ce063f20c2dde545d1e22bc2ab1a..cd0ef9c7ccc32df5c22d292863f2aede7e9f1bfa 100644 (file)
@@ -2749,9 +2749,15 @@ s390_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
       }
   }
 
-  /* Store return address.  */
+  /* Store return PSWA.  In 31-bit mode, keep addressing mode bit.  */
+  if (word_size == 4)
+    {
+      ULONGEST pswa;
+      regcache_cooked_read_unsigned (regcache, S390_PSWA_REGNUM, &pswa);
+      bp_addr = (bp_addr & 0x7fffffff) | (pswa & 0x80000000);
+    }
   regcache_cooked_write_unsigned (regcache, S390_RETADDR_REGNUM, bp_addr);
-  
+
   /* Store updated stack pointer.  */
   regcache_cooked_write_unsigned (regcache, S390_SP_REGNUM, sp);