sh3eb: add suport for the sh3eb softfp platform

dev
Lephenixnoir 2 years ago
parent 89b463b811
commit 44c1cbb8eb
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
  1. 4
      Make.inc
  2. 2
      Makefile
  3. 2
      include/openlibm_fenv.h
  4. 1
      sh3eb/Make.files
  5. 2
      sh3eb/assert.h
  6. 7
      sh3eb/ctype.h
  7. 4
      sh3eb/string.h
  8. 2
      src/fpmath.h
  9. 2
      src/sh3eb_fpmath.h

@ -131,6 +131,10 @@ ifeq ($(ARCH),wasm32)
CFLAGS_arch += -ffreestanding -nostdlib -nostdinc --target=wasm32-unknown-unknown
endif
ifeq ($(ARCH),sh3eb)
CFLAGS_arch += -ffreestanding -nostdlib -m3 -mb
endif
# Add our "arch"-related FLAGS in. We separate arch-related flags out so that
# we can conveniently get at them for targets that don't want the rest of
# *FLAGS_add, such as the testing Makefile targets

@ -53,7 +53,7 @@ endif
OLM_LIBS := libopenlibm.a
ifneq ($(ARCH), wasm32)
ifeq ($(filter wasm32 sh3eb,$(ARCH)),)
OLM_LIBS += libopenlibm.$(OLM_MAJOR_MINOR_SHLIB_EXT)
endif

@ -14,6 +14,8 @@
#include <openlibm_fenv_mips.h>
#elif defined(__s390__)
#include <openlibm_fenv_s390.h>
#elif defined(__sh3__)
#include <openlibm_fenv_sh3eb.h>
#else
#error "Unsupported platform"
#endif

@ -0,0 +1 @@
$(CUR_SRCS) = fenv.c

@ -0,0 +1,2 @@
#pragma once
#define assert(b)

@ -0,0 +1,7 @@
#pragma once
static int isxdigit(int c)
{
return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') ||
(c >= 'a' && c <= 'f');
}

@ -0,0 +1,4 @@
#pragma once
#include <stddef.h>
void *memset(void *mem, int fill, size_t size);

@ -43,6 +43,8 @@
#include "mips_fpmath.h"
#elif defined(__s390__)
#include "s390_fpmath.h"
#elif defined(__sh3__)
#include "sh3eb_fpmath.h"
#endif
/* Definitions provided directly by GCC and Clang. */

@ -29,7 +29,7 @@
union IEEEl2bits {
long double e;
struct {
#ifndef __MIPSEB__
#ifndef __BIG_ENDIAN__
unsigned int manl :32;
unsigned int manh :20;
unsigned int exp :11;

Loading…
Cancel
Save