Patch to enable mftb instructions

Fixes #1
This commit is contained in:
Luke Street
2024-02-20 18:34:49 -07:00
parent ef5576d83e
commit bef68c0844
6 changed files with 24 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
*.patch text eol=lf
+1 -1
View File
@@ -72,7 +72,7 @@ jobs:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
install: make texinfo
install: make texinfo patch
pacboy: clang:p
- name: Build
shell: msys2 {0}
+13
View File
@@ -0,0 +1,13 @@
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index e55bfe846cd..f160e290bce 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -4988,7 +4988,7 @@ const unsigned int num_powerpc_operands = ARRAY_SIZE (powerpc_operands);
#define MFDEC2 (PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_BOOKE \
| PPC_OPCODE_TITAN)
#define BOOKE PPC_OPCODE_BOOKE
-#define NO371 PPC_OPCODE_BOOKE | PPC_OPCODE_PPCPS | PPC_OPCODE_EFS
+#define NO371 PPC_OPCODE_BOOKE | PPC_OPCODE_EFS
#define PPCE300 PPC_OPCODE_E300
#define PPCSPE PPC_OPCODE_SPE
#define PPCSPE2 PPC_OPCODE_SPE2
+3 -2
View File
@@ -3,7 +3,7 @@ ARG ALPINE_VERSION=3.19.1
FROM alpine:${ALPINE_VERSION} AS build
# Install dependencies
RUN apk add --no-cache binutils file gcc make musl-dev
RUN apk add --no-cache binutils file gcc make musl-dev patch
# Install zig
ARG ZIG_VERSION=0.11.0
@@ -28,9 +28,10 @@ RUN mkdir /binutils-host && \
# Build target binutils
ARG ZIG_TRIPLE
COPY *.patch /
RUN mkdir /binutils && \
tar -xf /binutils-${BINUTILS_VERSION}.tar.xz -C /binutils --strip-components=1 && \
cd /binutils && \
cd /binutils && for patch in ../*.patch; do patch -N -p1 -i $patch; done && \
CC="zig cc -target ${ZIG_TRIPLE}" \
./configure --host=${GNU_TRIPLE} --target=powerpc-eabi --prefix=/target \
--disable-nls --disable-shared --disable-gprof --without-zstd && \
+3
View File
@@ -3,6 +3,9 @@ PREFIX="$(pwd)/build"
mkdir source
wget -qO- https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJ -C source --strip-components=1
cd source
for patch in ../*.patch; do
patch -N -p1 -i "$patch"
done
export CFLAGS="-arch arm64 -arch x86_64 -mmacosx-version-min=10.11"
./configure --target=powerpc-eabi --prefix="$PREFIX" --disable-nls --disable-shared --disable-gprof --without-zstd
make -j$(nproc) configure-host
+3
View File
@@ -3,6 +3,9 @@ PREFIX="$(pwd)/build"
mkdir source
wget -qO- https://ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz | tar -xJ -C source --strip-components=1
cd source
for patch in ../*.patch; do
patch -N -p1 -i "$patch"
done
./configure --target=powerpc-eabi --prefix="$PREFIX" --disable-nls --disable-shared --disable-gprof --without-zstd
make -j$(nproc) configure-host
make -j$(nproc)