This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Committed: CRIS port: change 32-bit-branch expansion for PIC.


> Date: Wed, 7 Dec 2005 07:49:16 +0100
> From: Hans-Peter Nilsson <hp@axis.com>

> Finally, switching over to the new and improved 32-bit-pic-branch-expansion

Oops, forgot to commit these, breaking the tree:

include/opcode/:

	* cris.h (MOVE_M_TO_PREG_OPCODE, MOVE_M_TO_PREG_ZBITS)
	(MOVE_PC_INCR_OPCODE_PREFIX, MOVE_PC_INCR_OPCODE_SUFFIX): New macros.
	(ADD_PC_INCR_OPCODE): Don't define.

opcodes/:
	* cris-opc.c (cris_opcodes) <"move" "s,P">: Define using
	MOVE_M_TO_PREG_OPCODE and MOVE_M_TO_PREG_ZBITS instead of constants.

Index: include/opcode/cris.h
===================================================================
RCS file: /cvs/src/src/include/opcode/cris.h,v
retrieving revision 1.6
diff -p -u -r1.6 cris.h
--- include/opcode/cris.h	10 May 2005 10:21:12 -0000	1.6
+++ include/opcode/cris.h	7 Dec 2005 12:48:28 -0000
@@ -194,8 +194,15 @@ extern const char *const cris_cc_strings
 #define JUMP_INDIR_Z_BITS (0xf2c0)
 #define JUMP_PC_INCR_OPCODE \
  (JUMP_INDIR_OPCODE + AUTOINCR_BIT * 0x0100 + REG_PC)
-#define ADD_PC_INCR_OPCODE \
- (0xfa00 + (2 << 4) + AUTOINCR_BIT * 0x0100 + REG_PC)
+
+#define MOVE_M_TO_PREG_OPCODE 0x0a30
+#define MOVE_M_TO_PREG_ZBITS 0x01c0
+
+/* BDAP.D N,PC.  */
+#define MOVE_PC_INCR_OPCODE_PREFIX \
+ (((BDAP_INCR_HIGH | (REG_PC << 4)) << 8) | BDAP_PC_LOW | (2 << 4))
+#define MOVE_PC_INCR_OPCODE_SUFFIX \
+ (MOVE_M_TO_PREG_OPCODE | REG_PC | (AUTOINCR_BIT << 8))
 
 #define JUMP_PC_INCR_OPCODE_V32 (0x0DBF)
 
Index: opcodes/cris-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/cris-opc.c,v
retrieving revision 1.6
diff -p -u -r1.6 cris-opc.c
--- opcodes/cris-opc.c	7 May 2005 07:34:27 -0000	1.6
+++ opcodes/cris-opc.c	7 Dec 2005 12:48:29 -0000
@@ -752,7 +752,9 @@ cris_opcodes[] =
    cris_ver_v0_10,
    cris_none_reg_mode_add_sub_cmp_and_or_move_op},
 
-  {"move",    0x0A30, 0x01c0,		  "s,P",     0, SIZE_SPEC_REG, 0,
+  {"move",
+   MOVE_M_TO_PREG_OPCODE, MOVE_M_TO_PREG_ZBITS,
+   "s,P",   0, SIZE_SPEC_REG, 0,
    cris_move_to_preg_op},
 
   {"move",    0x0A30, 0x01c0,		  "S,P",     0, SIZE_NONE,

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]