mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 04:23:41 +01:00
sh3eb: add suport for the sh3eb softfp platform
This commit is contained in:
parent
89b463b811
commit
44c1cbb8eb
9 changed files with 24 additions and 2 deletions
4
Make.inc
4
Make.inc
|
@ -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
|
||||
|
|
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
1
sh3eb/Make.files
Normal file
1
sh3eb/Make.files
Normal file
|
@ -0,0 +1 @@
|
|||
$(CUR_SRCS) = fenv.c
|
2
sh3eb/assert.h
Normal file
2
sh3eb/assert.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
#pragma once
|
||||
#define assert(b)
|
7
sh3eb/ctype.h
Normal file
7
sh3eb/ctype.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
static int isxdigit(int c)
|
||||
{
|
||||
return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') ||
|
||||
(c >= 'a' && c <= 'f');
|
||||
}
|
4
sh3eb/string.h
Normal file
4
sh3eb/string.h
Normal file
|
@ -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…
Reference in a new issue