diff --git a/gcc-2.7.2-cdk-macos.sh b/gcc-2.7.2-cdk-macos.sh index 0709a80..91deac1 100755 --- a/gcc-2.7.2-cdk-macos.sh +++ b/gcc-2.7.2-cdk-macos.sh @@ -82,6 +82,8 @@ make cpp cc1 xgcc cc1plus g++ \ ./cc1 -quiet -O2 "$SCRIPT_DIR/tests/little_endian.c" -o little_endian.s grep -E 'lbu\s\$2,0\(\$4\)' little_endian.s ./cc1 -quiet -O2 "$SCRIPT_DIR/tests/section_attribute.c" -o /dev/null +./cc1 -quiet -O2 "$SCRIPT_DIR/tests/host_wide_int.c" -o host_wide_int.s +grep -E '# 0x80000000$' host_wide_int.s mkdir -p "$OUTDIR" cp cpp cc1 xgcc cc1plus g++ "$OUTDIR/" diff --git a/gcc-2.7.2-cdk.Dockerfile b/gcc-2.7.2-cdk.Dockerfile index ef2317e..37ff7a6 100644 --- a/gcc-2.7.2-cdk.Dockerfile +++ b/gcc-2.7.2-cdk.Dockerfile @@ -31,6 +31,7 @@ RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -stati COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s RUN ./cc1 -quiet -O2 /work/tests/section_attribute.c +RUN ./cc1 -quiet -O2 /work/tests/host_wide_int.c && grep -E '# 0x80000000$' /work/tests/host_wide_int.s RUN mv xgcc gcc RUN mkdir /build && cp cpp cc1 gcc cc1plus g++ /build/ diff --git a/gcc-2.7.2-psx-macos.sh b/gcc-2.7.2-psx-macos.sh index 31d20be..888e883 100755 --- a/gcc-2.7.2-psx-macos.sh +++ b/gcc-2.7.2-psx-macos.sh @@ -71,7 +71,9 @@ make --jobs "$(sysctl -n hw.ncpu)" cpp cc1 xgcc cc1plus g++ \ ./cc1 -quiet -O2 "$SCRIPT_DIR/tests/little_endian.c" -o little_endian.s grep -E 'lbu\s\$2,0\(\$4\)' little_endian.s ./cc1 -quiet -O2 "$SCRIPT_DIR/tests/section_attribute.c" -o /dev/null -./cc1 -quiet -help &1 | grep -- -msoft-float +./cc1 -quiet -O2 "$SCRIPT_DIR/tests/host_wide_int.c" -o host_wide_int.s +grep -E '# 0x80000000$' host_wide_int.s +./cc1 -quiet -help&1 | grep -- -msoft-float mkdir -p "$OUTDIR" cp cpp cc1 xgcc cc1plus g++ "$OUTDIR/" diff --git a/gcc-2.7.2-psx.Dockerfile b/gcc-2.7.2-psx.Dockerfile index 0cf30ef..7bc6bc2 100644 --- a/gcc-2.7.2-psx.Dockerfile +++ b/gcc-2.7.2-psx.Dockerfile @@ -37,7 +37,8 @@ RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -stati COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s RUN ./cc1 -quiet -O2 /work/tests/section_attribute.c -RUN ./cc1 -quiet -help &1 | grep -- -msoft-float +RUN ./cc1 -quiet -O2 /work/tests/host_wide_int.c && grep -E '# 0x80000000$' /work/tests/host_wide_int.s +RUN ./cc1 -quiet -help&1 | grep -- -msoft-float RUN mv xgcc gcc RUN mkdir /build && cp cpp cc1 gcc cc1plus g++ /build/ diff --git a/gcc-2.8.1-psx-macos.sh b/gcc-2.8.1-psx-macos.sh index 961eca5..41f8a05 100755 --- a/gcc-2.8.1-psx-macos.sh +++ b/gcc-2.8.1-psx-macos.sh @@ -82,7 +82,9 @@ make --jobs "$(sysctl -n hw.ncpu)" cpp cc1 xgcc cc1plus g++ \ ./cc1 -quiet -O2 "$SCRIPT_DIR/tests/little_endian.c" -o little_endian.s grep -E 'lbu\s\$2,0\(\$4\)' little_endian.s ./cc1 -quiet -O2 "$SCRIPT_DIR/tests/section_attribute.c" -o /dev/null -./cc1 -version &1 | grep -- -msoft-float +./cc1 -quiet -O2 "$SCRIPT_DIR/tests/host_wide_int.c" -o host_wide_int.s +grep -E '# 0x80000000$' host_wide_int.s +./cc1 -version&1 | grep -- -msoft-float ./cc1 -version &1 | grep -- -msplit-addresses ./cc1 -version &1 | grep -- -mgpopt diff --git a/gcc-2.8.1-psx.Dockerfile b/gcc-2.8.1-psx.Dockerfile index 3da13ee..36cd135 100644 --- a/gcc-2.8.1-psx.Dockerfile +++ b/gcc-2.8.1-psx.Dockerfile @@ -37,7 +37,8 @@ RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -stati COPY tests /work/tests RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$2,0\(\$4\)' /work/tests/little_endian.s RUN ./cc1 -quiet -O2 /work/tests/section_attribute.c -RUN ./cc1 -version &1 | grep -- -msoft-float +RUN ./cc1 -quiet -O2 /work/tests/host_wide_int.c && grep -E '# 0x80000000$' /work/tests/host_wide_int.s +RUN ./cc1 -version&1 | grep -- -msoft-float RUN ./cc1 -version &1 | grep -- -msplit-addresses RUN ./cc1 -version &1 | grep -- -mgpopt diff --git a/patches/xm-darwin.h b/patches/xm-darwin.h index 8197624..1df192a 100644 --- a/patches/xm-darwin.h +++ b/patches/xm-darwin.h @@ -22,4 +22,7 @@ /* macOS provides bcopy/bcmp/bzero via . */ #define BSTRING +#define HOST_BITS_PER_WIDE_INT 32 +#define HOST_WIDE_INT int + #include "tm.h" diff --git a/tests/host_wide_int.c b/tests/host_wide_int.c new file mode 100644 index 0000000..6a20b62 --- /dev/null +++ b/tests/host_wide_int.c @@ -0,0 +1,3 @@ +unsigned int signbit_mask(void) { + return 1u << 31; +}