--- /dev/null
+/* tc-ppc-svp64.c -- Assemble for the PowerPC SVP64 extension.
+ Copyright (C) 2022 Free Software Foundation, Inc.
+ Written by Dmitry Selyutin aka ghostmansd.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+static void
+svp64_assemble (char *str)
+{
+ as_warn (_("opcode ignored"));
+ memcpy (str, "nop", sizeof ("nop"));
+ md_assemble (str);
+}
#include "libxcoff.h"
#endif
+#include "tc-ppc-svp64.c"
+
/* This is the assembler for the PowerPC or POWER (RS/6000) chips. */
/* Tell the main code what the endianness is. */
}
#endif
+static inline bool
+is_svp64_insn (char *str)
+{
+ return (((ppc_cpu & PPC_OPCODE_SVP64) == PPC_OPCODE_SVP64) &&
+ (strncmp (str, "sv.", (sizeof ("sv.") - 1)) == 0));
+}
+
/* This routine is called for each instruction to be assembled. */
void
opcode = (const struct powerpc_opcode *) str_hash_find (ppc_hash, str);
if (opcode == (const struct powerpc_opcode *) NULL)
{
+ if (is_svp64_insn (str))
+ {
+ svp64_assemble (str);
+ return;
+ }
+
as_bad (_("unrecognized opcode: `%s'"), str);
ppc_clear_labels ();
return;
fixP->fx_pcrel_adjust = fixups[i].opindex;
}
}
+
\f
#ifdef OBJ_ELF
/* For ELF, add support for SHT_ORDERED. */