Skip to content

Commit

Permalink
MSL_C OK, add MWCC GC v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 7, 2024
1 parent 7d98e13 commit fcbfe1e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
16 changes: 8 additions & 8 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

# Tool versions
config.binutils_tag = "2.42-1"
config.compilers_tag = "20231018"
config.compilers_tag = "20240706"
config.dtk_tag = "v0.9.2"
config.sjiswrap_tag = "v1.1.1"
config.wibo_tag = "0.6.11"
Expand Down Expand Up @@ -1129,15 +1129,15 @@ def JSystemLib(lib_name, objects):
},
{
"lib": "MSL_C",
"mw_version": "GC/1.3.2",
"mw_version": "GC/1.3",
"cflags": cflags_runtime,
"host": False,
"objects": [
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c", extra_cflags=["-inline noauto"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c", extra_cflags=["-inline noauto"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c", extra_cflags=["-inline noauto"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c", extra_cflags=["-inline noauto", "-char signed"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c"),
Expand All @@ -1146,11 +1146,11 @@ def JSystemLib(lib_name, objects):
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c", extra_cflags=["-inline noauto"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c", extra_cflags=["-char signed"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c", extra_cflags=["-char signed"]),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/uart_console_io.c"),
Expand All @@ -1164,7 +1164,7 @@ def JSystemLib(lib_name, objects):
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c"),
Object(Matching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c"),
Expand Down
18 changes: 1 addition & 17 deletions src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,21 +322,5 @@ static inline void __pool_free(__mem_pool* pool, void* ptr) {
}

void free(void* ptr) {
//__pool_free(get_malloc_pool(), ptr);

__mem_pool_obj* pool_obj;
unsigned long size;

if (ptr == 0) {
return;
}

pool_obj = (__mem_pool_obj*)get_malloc_pool();
size = __msize_inline(ptr);

if (size <= 68) {
deallocate_from_fixed_pools(pool_obj, ptr, size);
} else {
deallocate_from_var_pools(pool_obj, ptr);
}
__pool_free(get_malloc_pool(), ptr);
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ void __timesdec(decimal* result, const decimal* x, const decimal* y) {
accumulator += *jp * *kp;
}

// TODO: It's reusing the result of the modulo for the division, but for a match we need to disable this
// optimization and do the divide separately somehow.
*--ip = (unsigned char)(accumulator % 10);
accumulator /= 10;
}
Expand Down
1 change: 1 addition & 0 deletions tools/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ def generate_objdiff_config(
"GC/1.2.5": "mwcc_233_163",
"GC/1.2.5e": "mwcc_233_163e",
"GC/1.2.5n": "mwcc_233_163n",
"GC/1.3": "mwcc_242_53",
"GC/1.3.2": "mwcc_242_81",
"GC/1.3.2r": "mwcc_242_81r",
"GC/2.0": "mwcc_247_92",
Expand Down

0 comments on commit fcbfe1e

Please sign in to comment.