From eebdca26684b03cc6ad7f51c51ba0e780eaba723 Mon Sep 17 00:00:00 2001 From: William Tan <1284324+Ninja3047@users.noreply.github.com> Date: Wed, 11 Jan 2023 14:25:45 -0500 Subject: [PATCH] move mbar from a2 to ppc_embedded, remove duplicate eieio --- .../Processors/PowerPC/data/languages/ppc_a2.sinc | 8 -------- .../PowerPC/data/languages/ppc_embedded.sinc | 13 ++++++------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Ghidra/Processors/PowerPC/data/languages/ppc_a2.sinc b/Ghidra/Processors/PowerPC/data/languages/ppc_a2.sinc index 4de9773933..28296d72d2 100644 --- a/Ghidra/Processors/PowerPC/data/languages/ppc_a2.sinc +++ b/Ghidra/Processors/PowerPC/data/languages/ppc_a2.sinc @@ -85,14 +85,6 @@ define pcodeop wclrallOp; define pcodeop wclrOp; # :wclr L,A,B is $(NOTVLE) & OP=31 & XOP_1_10=934 & L & A & B { wclrOp(); } -@ifdef IS_ISA -# binutils: 476.d 474: 7c 00 06 ac mbar -# binutils: 476.d 47c: 7c 20 06 ac mbar 1 -# "mbar", X(31,854), X_MASK, BOOKE|PPCA2|PPC476, PPCNONE, {MO} -define pcodeop mbarOp; -:mbar MO is OP=31 & XOP_1_10=854 & MO { mbarOp(); } -@endif - # binutils: a2.d: 514: 7d 4a 3a 87 mfdcr\. r10,234 :mfdcr. D, DCRN is $(NOTVLE) & OP=31 & D & DCRN & XOP_1_10=323 & BIT_0=1 { diff --git a/Ghidra/Processors/PowerPC/data/languages/ppc_embedded.sinc b/Ghidra/Processors/PowerPC/data/languages/ppc_embedded.sinc index 4a07bc7632..a7ea6f3cda 100644 --- a/Ghidra/Processors/PowerPC/data/languages/ppc_embedded.sinc +++ b/Ghidra/Processors/PowerPC/data/languages/ppc_embedded.sinc @@ -49,13 +49,12 @@ dataCacheBlockClearToZero(ea); } -@ifndef IS_ISA -# this is equilent to "mbar 0" -#eieio 0x7c 00 06 ac -:eieio is OP=31 & BITS_21_25=0 & BITS_16_20=0 & BITS_11_15=0 & XOP_1_10=854 & BIT_0=0 -{ - enforceInOrderExecutionIO(); -} +@ifdef IS_ISA +# binutils: 476.d 474: 7c 00 06 ac mbar +# binutils: 476.d 47c: 7c 20 06 ac mbar 1 +# "mbar", X(31,854), X_MASK, BOOKE|PPCA2|PPC476, PPCNONE, {MO} +define pcodeop mbarOp; +:mbar MO is OP=31 & XOP_1_10=854 & MO { mbarOp(); } @endif #icbi r0,r0 0x7c 00 07 ac