mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 22:45:39 -04:00
0abcd250ab
- p16_permute.hide_asm: b64literal-pragma carrier for register pins + GTE __asm__ blocks. pycparser parses the pragma; decomp-permuter's process_pragmas decodes it back so cc1 sees the real pins/asm (regalloc steered, mvmva compiles). No submodule edit (reuses its own carrier). - drop_preproc_and_scalar_typedefs: keep #define + custom struct/typedefs, drop only #include (fixes func_801412A8 'OTLINK undeclared'); +f32 typedef gap; make_base_c hides asm. - compile.sh/compile_o0.sh: prepend .include "macro.inc" so GTE mvmva assembles (the real build gets it via include_asm.h, which base.c omits + -DPERMUTER disables). Byte-neutral for non-GTE. compile_o0.sh (-O0) auto-selected for _o0 targets. - run_masked.py: expr_type->int fallback for hidden-pin vars -> 0 internal-permuter-failures (perm_split_assignment/perm_temp_for_expr no longer KeyError on pinned drafts). - ALL 5 seeds parse+compile (base 4/110/36/52/77). FLAGSHIP func_80132784 (4/400) CLOSED to a masked-0 that match_one confirms MATCH (400 ins) -> .run/wave/func_80132784.win.c for T4 gate. - no build-input changed (136/136 untouched)
17 lines
1.1 KiB
Bash
17 lines
1.1 KiB
Bash
#!/bin/bash
|
|
# -O0 variant of compile.sh for the ov_SC01_077 _o0 subsegment (Phase 24 T3). The _o0 cluster is
|
|
# built -O0 (Makefile: build/src/ov_SC01_077/ov_SC01_077_o0.o CC1FLAGS := -quiet -O0 ...), so an -O2
|
|
# permuter/match_one compile can never match its target bytes. ONLY the cc1 opt level differs from
|
|
# compile.sh (-O2 -> -O0); cpp (incl. -D__OPTIMIZE__, shared by the Makefile) / maspsx / as are identical.
|
|
set -e -o pipefail
|
|
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
IN="$1"; OUT="${3:-out.o}" # args as passed by permuter: input.c -o output.o
|
|
|
|
mipsel-linux-gnu-cpp -lang-c -I"$REPO/include" -undef -Wall -fno-builtin \
|
|
-Dmips -D__GNUC__=2 -D__OPTIMIZE__ -Dpsx -D_PSYQ -D_MIPSEL -D_LANGUAGE_C "$IN" \
|
|
| "$REPO/tools/bin/gcc-2.7.2-psx/cc1" -quiet -O0 -G0 -mips1 -mcpu=3000 -mgas \
|
|
-msoft-float -fgnu-linker \
|
|
| "$REPO/.venv/bin/python" "$REPO/tools/maspsx/maspsx.py" --aspsx-version=2.56 --expand-div \
|
|
| { printf '.include "macro.inc"\n'; cat; } \
|
|
| mipsel-linux-gnu-as -I"$REPO/include" -march=r3000 -mtune=r3000 -no-pad-sections -O1 -G0 -o "$OUT"
|