[PATCH]: aarch64: Refactor representation of system registers
[deliverable/binutils-gdb.git] / include / opcode / arc-func.h
index 96ffcffe8a297998858633457446d960a3242ff5..d0e84d8251f5e7f891157ebb7e6b071ba99a6f70 100644 (file)
@@ -1,5 +1,5 @@
 /* Replace functions for the ARC relocs.
-   Copyright (C) 2015-2016 Free Software Foundation, Inc.
+   Copyright (C) 2015-2020 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
    the GNU Binutils.
@@ -74,6 +74,21 @@ replace_bits24 (unsigned insn, int value ATTRIBUTE_UNUSED)
 
 #endif /* REPLACE_bits24 */
 
+/* Special 24 bit replace for big endian.  */
+/* mask  = 111111111111111111111111.  */
+#ifndef REPLACE_bits24_be
+#define REPLACE_bits24_be
+ATTRIBUTE_UNUSED static unsigned
+replace_bits24_be (unsigned insn, int value ATTRIBUTE_UNUSED)
+{
+  insn = insn & ~0xffffff00;
+  insn |= ((value >> 0) & 0xffffff) << 8;
+
+  return insn;
+}
+
+#endif /* REPLACE_bits24_be */
+
 /* mask  = 11111111111111111111111111111111.  */
 #ifndef REPLACE_word32
 #define REPLACE_word32
@@ -249,3 +264,31 @@ replace_disp9s1 (unsigned insn, int value ATTRIBUTE_UNUSED)
 }
 
 #endif /* REPLACE_disp9s1 */
+
+/* mask  = 00000000000000000000111111222222.  */
+#ifndef REPLACE_disp12s
+#define REPLACE_disp12s
+ATTRIBUTE_UNUSED static unsigned
+replace_disp12s (unsigned insn, int value ATTRIBUTE_UNUSED)
+{
+  insn = insn & ~0xfff;
+  insn |= ((value >> 0) & 0x003f) << 6;
+  insn |= ((value >> 6) & 0x003f) << 0;
+  return insn;
+}
+
+#endif /* REPLACE_disp12s */
+
+/* mask  = 0000001111111111.  */
+#ifndef REPLACE_jli
+#define REPLACE_jli
+ATTRIBUTE_UNUSED static unsigned
+replace_jli (unsigned insn, int value)
+{
+  insn = insn & ~0x3ff;
+  insn |= ((value >> 0) & 0x03ff) << 0;
+
+  return insn;
+}
+
+#endif /* REPLACE_jli */
This page took 0.023324 seconds and 4 git commands to generate.