public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Do not force the n32.S file to be assembled as MIPS4
@ 2015-08-28 13:01 Andrew Bennett
  0 siblings, 0 replies; only message in thread
From: Andrew Bennett @ 2015-08-28 13:01 UTC (permalink / raw)
  To: libffi-discuss

Hi,

The n32.S file in the MIPS backend currently is forced to be compiled as MIPS4.
This could lead to the wrong instruction encodings being used when assembling
for newer MIPS architectures.  This patch only forces the .set mips4 constraint
if the MIPS architecture provided by the compiler is older than MIPS4.

The patch and ChangeLog are below.

Regards,



Andrew

	* src/mips/n32.S: Only force the file to be assembled as MIPS4 if
	the architecture provided by the compiler is older than MIPS4.


diff --git a/src/mips/n32.S b/src/mips/n32.S
index c6985d3..512063a 100644
--- a/src/mips/n32.S
+++ b/src/mips/n32.S
@@ -43,7 +43,9 @@
 #ifdef __GNUC__
        .abicalls
 #endif
+#if __mips < 4
        .set mips4
+#endif
        .text
        .align  2
        .globl  ffi_call_N32

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-28 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-28 13:01 [PATCH] MIPS: Do not force the n32.S file to be assembled as MIPS4 Andrew Bennett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).