summaryrefslogtreecommitdiffhomepage
path: root/src/internal/nolibc
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-20 20:53:41 +0000
committermidipix <writeonce@midipix.org>2016-12-27 04:40:56 -0500
commit26e14f4143ec690a120e197a3adf547145e4ce59 (patch)
treee9e8b522de5abb14230c5f8e0825452f0c7ccb4b /src/internal/nolibc
parent70c49fc4ed3b2c3db68537f828c286241eeeee98 (diff)
downloadntux-26e14f4143ec690a120e197a3adf547145e4ce59.tar.bz2
ntux-26e14f4143ec690a120e197a3adf547145e4ce59.tar.xz
create free-standing, libpsxscl-based project skeleton.
Diffstat (limited to 'src/internal/nolibc')
-rw-r--r--src/internal/nolibc/nt32/ntux_compiler.asm20
-rw-r--r--src/internal/nolibc/nt32/ntux_compiler.s20
-rw-r--r--src/internal/nolibc/nt64/ntux_compiler.asm19
-rw-r--r--src/internal/nolibc/nt64/ntux_compiler.s20
-rw-r--r--src/internal/nolibc/stdbool.h11
-rw-r--r--src/internal/nolibc/stddef.h6
-rw-r--r--src/internal/nolibc/stdint.h6
-rw-r--r--src/internal/nolibc/stdio.h8
-rw-r--r--src/internal/nolibc/stdlib.h4
-rw-r--r--src/internal/nolibc/string.h4
-rw-r--r--src/internal/nolibc/unistd.h4
11 files changed, 122 insertions, 0 deletions
diff --git a/src/internal/nolibc/nt32/ntux_compiler.asm b/src/internal/nolibc/nt32/ntux_compiler.asm
new file mode 100644
index 0000000..fa1e9da
--- /dev/null
+++ b/src/internal/nolibc/nt32/ntux_compiler.asm
@@ -0,0 +1,20 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ntux: native translation und extension ;;
+;; Copyright (C) 2016 Z. Gilboa ;;
+;; Released under GPLv2 and GPLv3; see COPYING.NTUX. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; ___chkstk_ms and _pei386_runtime_relocator are not needed by the framework
+; and are provided here in the form of no-op functions in order to satisfy
+; compiler-generated dependencies.
+
+TITLE __psx_compiler
+
+.model flat
+.code
+
+___chkstk PROC EXPORT
+ ret
+___chkstk ENDP
+
+END
diff --git a/src/internal/nolibc/nt32/ntux_compiler.s b/src/internal/nolibc/nt32/ntux_compiler.s
new file mode 100644
index 0000000..89e2840
--- /dev/null
+++ b/src/internal/nolibc/nt32/ntux_compiler.s
@@ -0,0 +1,20 @@
+############################################################
+## ntux: native translation und extension ##
+## Copyright (C) 2016 Z. Gilboa ##
+## Released under GPLv2 and GPLv3; see COPYING.NTUX. ##
+############################################################
+
+# ___chkstk_ms and _pei386_runtime_relocator are not needed by the framework
+# and are provided here in the form of no-op functions in order to satisfy
+# compiler-generated dependencies.
+
+.section .text
+
+.global _pei386_runtime_relocator
+.global ___chkstk_ms
+
+_pei386_runtime_relocatorr:
+ ret
+
+___chkstk_ms:
+ ret
diff --git a/src/internal/nolibc/nt64/ntux_compiler.asm b/src/internal/nolibc/nt64/ntux_compiler.asm
new file mode 100644
index 0000000..d6011bd
--- /dev/null
+++ b/src/internal/nolibc/nt64/ntux_compiler.asm
@@ -0,0 +1,19 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; ntux: native translation und extension ;;
+;; Copyright (C) 2016 Z. Gilboa ;;
+;; Released under GPLv2 and GPLv3; see COPYING.NTUX. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; ___chkstk_ms and _pei386_runtime_relocator are not needed by the framework
+; and are provided here in the form of no-op functions in order to satisfy
+; compiler-generated dependencies.
+
+TITLE __psx_compiler
+
+.code
+
+__chkstk PROC EXPORT
+ ret
+__chkstk ENDP
+
+END
diff --git a/src/internal/nolibc/nt64/ntux_compiler.s b/src/internal/nolibc/nt64/ntux_compiler.s
new file mode 100644
index 0000000..89e2840
--- /dev/null
+++ b/src/internal/nolibc/nt64/ntux_compiler.s
@@ -0,0 +1,20 @@
+############################################################
+## ntux: native translation und extension ##
+## Copyright (C) 2016 Z. Gilboa ##
+## Released under GPLv2 and GPLv3; see COPYING.NTUX. ##
+############################################################
+
+# ___chkstk_ms and _pei386_runtime_relocator are not needed by the framework
+# and are provided here in the form of no-op functions in order to satisfy
+# compiler-generated dependencies.
+
+.section .text
+
+.global _pei386_runtime_relocator
+.global ___chkstk_ms
+
+_pei386_runtime_relocatorr:
+ ret
+
+___chkstk_ms:
+ ret
diff --git a/src/internal/nolibc/stdbool.h b/src/internal/nolibc/stdbool.h
new file mode 100644
index 0000000..45fc6f9
--- /dev/null
+++ b/src/internal/nolibc/stdbool.h
@@ -0,0 +1,11 @@
+#ifndef _STDBOOL_H
+#define _STDBOOL_H
+
+#ifndef __cplusplus
+
+#define true 1
+#define false 0
+#define bool _Bool
+
+#endif
+#endif
diff --git a/src/internal/nolibc/stddef.h b/src/internal/nolibc/stddef.h
new file mode 100644
index 0000000..8288bae
--- /dev/null
+++ b/src/internal/nolibc/stddef.h
@@ -0,0 +1,6 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+#define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 ))
+
+#endif
diff --git a/src/internal/nolibc/stdint.h b/src/internal/nolibc/stdint.h
new file mode 100644
index 0000000..831d865
--- /dev/null
+++ b/src/internal/nolibc/stdint.h
@@ -0,0 +1,6 @@
+#ifndef _STDINT_H
+#define _STDINT_H
+
+#include <psxtypes/psxtypes.h>
+
+#endif
diff --git a/src/internal/nolibc/stdio.h b/src/internal/nolibc/stdio.h
new file mode 100644
index 0000000..610533e
--- /dev/null
+++ b/src/internal/nolibc/stdio.h
@@ -0,0 +1,8 @@
+#ifndef _STDIO_H
+#define _STDIO_H
+
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+#endif
diff --git a/src/internal/nolibc/stdlib.h b/src/internal/nolibc/stdlib.h
new file mode 100644
index 0000000..8a24bec
--- /dev/null
+++ b/src/internal/nolibc/stdlib.h
@@ -0,0 +1,4 @@
+#ifndef _STDLIB_H
+#define _STDLIB_H
+
+#endif
diff --git a/src/internal/nolibc/string.h b/src/internal/nolibc/string.h
new file mode 100644
index 0000000..f8e3b8e
--- /dev/null
+++ b/src/internal/nolibc/string.h
@@ -0,0 +1,4 @@
+#ifndef _STRING_H
+#define _STRING_H
+
+#endif
diff --git a/src/internal/nolibc/unistd.h b/src/internal/nolibc/unistd.h
new file mode 100644
index 0000000..2e39dc8
--- /dev/null
+++ b/src/internal/nolibc/unistd.h
@@ -0,0 +1,4 @@
+#ifndef _UNISTD_H
+#define _UNISTD_H
+
+#endif