Skip to content

Commit

Permalink
[mono] Cleanup unused code and remove sparc and mips architectures (#…
Browse files Browse the repository at this point in the history
…67503)

* Remove linux_magic.h

* Remove dead files

* Remove remap_keys() in assembly.c

It is no longer needed.

* Remove mono_dump_jit_offsets/mono_dump_metadata_offsets

It was actually producing incorrect code, see mono/mono#13689
This wasn't noticed because we're generating the offsets file via offsets-tool.py and that uses the correct target.platform_define which is passed to the script.

The code in metadata-cross-helpers.c was only used as a verification helper but I don't think it has enough value to keep.

* Remove leftover code from Mono.Simd

* Remove leftover code from Mono.Tasklets

* Remove unused functions in mono-proclib.c

* Remove sparc and mips architecture

* Disable the Vector4 SIMD fix, it causes an issue

See #67762
  • Loading branch information
akoeplinger committed Apr 9, 2022
1 parent c1f6785 commit 1276f01
Show file tree
Hide file tree
Showing 63 changed files with 54 additions and 20,728 deletions.
4 changes: 0 additions & 4 deletions src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -857,10 +857,6 @@ if(HOST_IOS OR HOST_ANDROID OR HOST_MACCAT)
else()
set(DISABLE_DLLMAP 1)
endif()
if (TARGET_BROWSER)
# sys/errno.h exists, but just emits a warning and includes errno.h
unset(HAVE_SYS_ERRNO_H)
endif()
### End of OS specific checks

include_directories("${CLR_SRC_NATIVE_DIR}")
Expand Down
24 changes: 0 additions & 24 deletions src/mono/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,6 @@
/* Have mktemp */
#cmakedefine HAVE_MKTEMP 1

/* Define to 1 if you have the <sys/errno.h> header file. */
#cmakedefine HAVE_SYS_ERRNO_H 1

/* Define to 1 if you have the <sys/sendfile.h> header file. */
#cmakedefine HAVE_SYS_SENDFILE_H 1

Expand Down Expand Up @@ -631,9 +628,6 @@
/* Define to 1 if `st_atimespec' is a member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC 1

/* Define to 1 if `kp_proc' is a member of `struct kinfo_proc'. */
#cmakedefine HAVE_STRUCT_KINFO_PROC_KP_PROC 1

/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1

Expand Down Expand Up @@ -733,15 +727,6 @@
/* ... */
#cmakedefine TARGET_S390X 1

/* ... */
#cmakedefine TARGET_MIPS 1

/* ... */
#cmakedefine TARGET_SPARC 1

/* ... */
#cmakedefine TARGET_SPARC64 1

/* ... */
#cmakedefine HOST_WASM 1

Expand Down Expand Up @@ -772,15 +757,6 @@
/* ... */
#cmakedefine HOST_S390X 1

/* ... */
#cmakedefine HOST_MIPS 1

/* ... */
#cmakedefine HOST_SPARC 1

/* ... */
#cmakedefine HOST_SPARC64 1

/* Host is RISC-V */
#cmakedefine HOST_RISCV 1

Expand Down
8 changes: 4 additions & 4 deletions src/mono/cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ac_check_headers (
sys/prctl.h sys/socket.h sys/utsname.h sys/select.h sys/poll.h sys/wait.h sys/resource.h
sys/ioctl.h sys/errno.h sys/sendfile.h sys/statvfs.h sys/statfs.h sys/mman.h sys/mount.h sys/time.h sys/random.h
strings.h stdint.h unistd.h signal.h setjmp.h syslog.h netdb.h utime.h semaphore.h alloca.h ucontext.h pwd.h elf.h
gnu/lib-names.h netinet/tcp.h netinet/in.h link.h arpa/inet.h unwind.h poll.h wchar.h linux/magic.h
gnu/lib-names.h netinet/tcp.h netinet/in.h link.h arpa/inet.h unwind.h poll.h wchar.h
android/legacy_signal_inlines.h execinfo.h pthread.h pthread_np.h net/if.h dirent.h
CommonCrypto/CommonDigest.h dlfcn.h getopt.h pwd.h alloca.h
/usr/include/malloc.h)
Expand All @@ -85,8 +85,8 @@ ac_check_funcs (
gethrtime read_real_time gethostbyname gethostbyname2 getnameinfo getifaddrs
access inet_ntop Qp2getifaddrs getpid mktemp)

if (HOST_LINUX)
# sysctl is deprecated on Linux
if (HOST_LINUX OR HOST_BROWSER)
# sysctl is deprecated on Linux and doesn't work on Browser
set(HAVE_SYS_SYSCTL_H 0)
else ()
check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYS_SYSCTL_H)
Expand All @@ -112,6 +112,7 @@ check_symbol_exists(madvise "sys/mman.h" HAVE_MADVISE)
check_symbol_exists(pthread_mutexattr_setprotocol "pthread.h" HAVE_DECL_PTHREAD_MUTEXATTR_SETPROTOCOL)
check_symbol_exists(CLOCK_MONOTONIC "time.h" HAVE_CLOCK_MONOTONIC)
check_symbol_exists(CLOCK_MONOTONIC_COARSE "time.h" HAVE_CLOCK_MONOTONIC_COARSE)

check_symbol_exists(sys_signame "signal.h" HAVE_SYSSIGNAME)
check_symbol_exists(pthread_jit_write_protect_np "pthread.h" HAVE_PTHREAD_JIT_WRITE_PROTECT_NP)
check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL)
Expand All @@ -123,7 +124,6 @@ ac_check_type("struct ip_mreqn" ip_mreqn "netinet/in.h")
ac_check_type("struct ip_mreq" ip_mreq "netinet/in.h")
ac_check_type("clockid_t" clockid_t "sys/types.h")

check_struct_has_member("struct kinfo_proc" kp_proc "sys/types.h;sys/param.h;sys/sysctl.h;sys/proc.h" HAVE_STRUCT_KINFO_PROC_KP_PROC)
check_struct_has_member("struct sockaddr_in" sin_len "netinet/in.h" HAVE_SOCKADDR_IN_SIN_LEN)
check_struct_has_member("struct sockaddr_in6" sin6_len "netinet/in.h" HAVE_SOCKADDR_IN6_SIN_LEN)
check_struct_has_member("struct stat" st_atim "sys/types.h;sys/stat.h;unistd.h" HAVE_STRUCT_STAT_ST_ATIM)
Expand Down
4 changes: 0 additions & 4 deletions src/mono/mono/arch/mips/.gitignore

This file was deleted.

Loading

0 comments on commit 1276f01

Please sign in to comment.