Merge pull request #737 from nakst/master

update essence platform
This commit is contained in:
gingerBill
2020-09-15 22:28:15 +01:00
committed by GitHub
5 changed files with 2830 additions and 2426 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
package runtime
import "core:sys/es"
@(link_name="memset")
memset :: proc "c" (ptr: rawptr, val: i32, len: int) -> rawptr {
return es.CRTmemset(ptr, val, len);
}
@(link_name="memmove")
memmove :: proc "c" (dst, src: rawptr, len: int) -> rawptr {
return es.CRTmemmove(dst, src, len);
}
@(link_name="memcpy")
memcpy :: proc "c" (dst, src: rawptr, len: int) -> rawptr {
return es.CRTmemcpy(dst, src, len);
}

2772
core/sys/es/api.odin Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -712,8 +712,8 @@ union_type :: proc() {
using_statement :: proc() {
fmt.println("\n# using statement");
// using can used to bring entities declared in a scope/namespace
// into the current scope. This can be applied to import declarations,
// import names, struct fields, procedure fields, and struct values.
// into the current scope. This can be applied to import names, struct
// fields, procedure fields, and struct values.
Vector3 :: struct{x, y, z: f32};
{

View File

@@ -1917,7 +1917,7 @@ int main(int arg_count, char const **arg_ptr) {
if (build_context.cross_compiling && selected_target_metrics->metrics == &target_essence_amd64) {
#ifdef GB_SYSTEM_UNIX
system_exec_command_line_app("linker", "x86_64-essence-gcc \"%.*s.o\" -o \"%.*s\" %.*s %.*s",
system_exec_command_line_app("linker", "x86_64-essence-gcc \"%.*s.o\" -o \"%.*s\" %.*s %.*s", // -ffreestanding -nostdlib
LIT(output_base), LIT(output_base), LIT(build_context.link_flags), LIT(build_context.extra_linker_flags));
#else
gb_printf_err("Linking for cross compilation for this platform is not yet supported (%.*s %.*s)\n",