[PATCH] msp430 gas: enlarge variable name size.
Dmitry
diwil@mail.ru
Tue Sep 16 10:45:00 GMT 2003
Hi fellows,
Some people were unhappy with minor gas bug for msp430 target:
shift operations can accept only operands of 15 and less chars.
The following patch fixes this problem.
Cheers,
Dmitry.
2003-09-16 Dmitry Diky <diwil@mail.ru>
* config/tc-msp430.c (MAX_OP_LEN): Set size to 256 for a good measure.
(msp430_operands): Remove redudant l2[16] within switch-case, which restricts
operand's name for shift operations to 15 characters.
Index: config/tc-msp430.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-msp430.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 tc-msp430.c
*** config/tc-msp430.c 8 Aug 2003 10:14:51 -0000 1.6
--- config/tc-msp430.c 16 Sep 2003 10:35:51 -0000
*************** static void show_mcu_list
*** 61,67 ****
static void del_spaces
PARAMS ((char *));
! #define MAX_OP_LEN 64
struct mcu_type_s
{
--- 61,67 ----
static void del_spaces
PARAMS ((char *));
! #define MAX_OP_LEN 256
struct mcu_type_s
{
*************** msp430_operands (opcode, line)
*** 560,570 ****
case 2:
{
- char l2[16];
-
/* Shift instruction. */
line = extract_operand (line, l1, sizeof (l1));
! strncpy (l2, l1, 16);
res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op);
res += msp430_dstoperand (&op2, l2, opcode->bin_opcode);
--- 560,569 ----
case 2:
{
/* Shift instruction. */
line = extract_operand (line, l1, sizeof (l1));
! strncpy (l2, l1, sizeof (l2));
! l2[sizeof (l2) - 1] = '\0';
res = msp430_srcoperand (&op1, l1, opcode->bin_opcode, &imm_op);
res += msp430_dstoperand (&op2, l2, opcode->bin_opcode);
More information about the Binutils
mailing list