Merge "hw/char/goldfish_tty.c: Sign extend addresses for mips" into studio-master-dev
diff --git a/hw/char/goldfish_tty.c b/hw/char/goldfish_tty.c
index a7aee8c..5525e3f 100644
--- a/hw/char/goldfish_tty.c
+++ b/hw/char/goldfish_tty.c
@@ -172,7 +172,11 @@
             break;
 
         case TTY_DATA_PTR:
+#if defined(TARGET_MIPS64)
+            s->ptr = (int32_t)deposit64(s->ptr, 0, 32, value);
+#else
             s->ptr = deposit64(s->ptr, 0, 32, value);
+#endif
             break;
 
         case TTY_DATA_PTR_HIGH: