Browse Source

mips: add NaN support

Waldemar Brodkorb 7 years ago
parent
commit
939014ddce
3 changed files with 20 additions and 0 deletions
  1. 2 0
      Rules.mak
  2. 15 0
      extra/Configs/Config.mips
  3. 3 0
      ldso/ldso/Makefile.in

+ 2 - 0
Rules.mak

@@ -409,6 +409,8 @@ ifeq ($(TARGET_ARCH),mips)
 	CPU_CFLAGS-$(CONFIG_MIPS_N64_ABI)+=-mabi=64
 	CPU_CFLAGS-$(CONFIG_MIPS_O32_ABI)+=-mabi=32
 	CPU_CFLAGS-$(CONFIG_MIPS_N32_ABI)+=-mabi=n32
+	CPU_CFLAGS-$(CONFIG_MIPS_NAN_LEGACY)+=-mnan=legacy
+	CPU_CFLAGS-$(CONFIG_MIPS_NAN_2008)+=-mnan=2008
 	CPU_LDFLAGS-y += $(CPU_CFLAGS)
 endif
 

+ 15 - 0
extra/Configs/Config.mips

@@ -32,6 +32,21 @@ config CONFIG_MIPS_N64_ABI
 
 endchoice
 
+choice
+	prompt "Target NAN Encoding"
+	default CONFIG_MIPS_NAN_LEGACY
+	help
+	  This is the NAN Encoding you want to use.  Chose either Legacy
+	  or 2008.
+
+config CONFIG_MIPS_NAN_LEGACY
+	bool "LEGACY"
+
+config CONFIG_MIPS_NAN_2008
+	bool "2008"
+
+endchoice
+
 config UCLIBC_USE_MIPS_PREFETCH
 	bool "Use MIPS prefetch optimization for memcpy/memset"
 	default y

+ 3 - 0
ldso/ldso/Makefile.in

@@ -82,6 +82,9 @@ $(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
 	$(call link.so,$(ldso_FULL_NAME),$(ABI_VERSION))
 	# link for backward compatibility
 	(cd $(top_builddir)lib; ln -sf $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) $(UCLIBC_LDSO_NAME).so.0 )
+ifeq ($(CONFIG_MIPS_NAN_2008),y)
+	(cd $(top_builddir)lib; ln -sf $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION) $(UCLIBC_LDSO_NAME)-mipsn8.so.0)
+endif
 
 $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y)
 	$(Q)$(RM) $@