This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Moxie patch 2 of 4: define new encodings for PC-relative branch instructions
- From: Anthony Green <green at moxielogic dot com>
- To: binutils at sourceware dot org
- Date: Wed, 10 Jun 2009 23:55:23 -0400
- Subject: Moxie patch 2 of 4: define new encodings for PC-relative branch instructions
This patch introduces a new instruction encoding (MOXIE_F3_PCREL) for
our new PC-relative branch instructions. I'll commit it once
patch 1 is approved.
include/elf/ChangeLog
2009-06-10 Anthony Green <green@moxielogic.org>
* moxie.h (R_MOXIE_PCREL10): New.
include/opcode/ChangeLog
2009-06-10 Anthony Green <green@moxielogic.com>
* moxie.h (MOXIE_F3_PCREL): Define.
(moxie_form3_opc_info): Grow.
Index: include/elf/moxie.h
===================================================================
RCS file: /cvs/src/src/include/elf/moxie.h,v
retrieving revision 1.1
diff -u -r1.1 moxie.h
--- include/elf/moxie.h 16 Apr 2009 15:39:45 -0000 1.1
+++ include/elf/moxie.h 10 Jun 2009 15:34:42 -0000
@@ -26,6 +26,7 @@
START_RELOC_NUMBERS (elf_moxie_reloc_type)
RELOC_NUMBER (R_MOXIE_NONE, 0)
RELOC_NUMBER (R_MOXIE_32, 1)
+ RELOC_NUMBER (R_MOXIE_PCREL10, 2)
END_RELOC_NUMBERS (R_MOXIE_max)
#endif /* _ELF_MOXIE_H */
Index: include/opcode/moxie.h
===================================================================
RCS file: /cvs/src/src/include/opcode/moxie.h,v
retrieving revision 1.2
diff -u -r1.2 moxie.h
--- include/opcode/moxie.h 6 Jun 2009 13:02:21 -0000 1.2
+++ include/opcode/moxie.h 10 Jun 2009 15:34:43 -0000
@@ -38,7 +38,8 @@
Form 3 instructions also come in different flavors:
- Some have no arguments (MOXIE_F3_NARG).
*/
+ Some have no arguments (MOXIE_F3_NARG)
+ Some have a 10-bit PC relative operand (MOXIE_F3_PCREL).
*/
#define MOXIE_F1_NARG 0x100
#define MOXIE_F1_A 0x101
@@ -56,7 +57,8 @@
#define MOXIE_F2_NARG 0x200
#define MOXIE_F2_A8V 0x201
-#define MOXIE_F3_NARG 0x300
+#define MOXIE_F3_NARG 0x300
+#define MOXIE_F3_PCREL 0x301
typedef struct moxie_opc_info_t
{
@@ -67,4 +69,4 @@
extern const moxie_opc_info_t moxie_form1_opc_info[64];
extern const moxie_opc_info_t moxie_form2_opc_info[4];
-extern const moxie_opc_info_t moxie_form3_opc_info[4];
+extern const moxie_opc_info_t moxie_form3_opc_info[16];