-# endif
-#elif defined _MIPS_SIM
-# ifndef __NR_memfd_create
-# warning "__NR_memfd_create not yet defined for MIPS"
-# define __NR_memfd_create 0xffffffff
-# endif
-#else
-# ifndef __NR_memfd_create
+# elif defined _MIPS_SIM
+# if _MIPS_SIM == _MIPS_SIM_ABI32
+# define __NR_memfd_create 4354
+# endif
+# if _MIPS_SIM == _MIPS_SIM_NABI32
+# define __NR_memfd_create 6318
+# endif
+# if _MIPS_SIM == _MIPS_SIM_ABI64
+# define __NR_memfd_create 5314
+# endif
+# else