mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
* config/tc-h8300.c (get_specific): Remove some #if 0 code.
(build_bytes): Remove all ABSMOV related code; it's unnecessary. ABSMOV is gone... Cleaning up. hmse.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Fri Apr 5 17:01:35 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* config/tc-h8300.c (get_specific): Remove some #if 0 code.
|
||||||
|
(build_bytes): Remove all ABSMOV related code; it's unnecessary.
|
||||||
|
|
||||||
Fri Apr 5 15:13:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
Fri Apr 5 15:13:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
* config/atof-ieee.c: Fix handling of denormalized extended
|
* config/atof-ieee.c: Fix handling of denormalized extended
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with GAS; see the file COPYING. If not, write to
|
along with GAS; see the file COPYING. If not, write to
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -100,10 +100,6 @@ const char EXP_CHARS[] = "eE";
|
|||||||
/* or 0d1.2345e12 */
|
/* or 0d1.2345e12 */
|
||||||
const char FLT_CHARS[] = "rRsSfFdDxXpP";
|
const char FLT_CHARS[] = "rRsSfFdDxXpP";
|
||||||
|
|
||||||
|
|
||||||
const relax_typeS md_relax_table[1];
|
|
||||||
|
|
||||||
|
|
||||||
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
|
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -116,7 +112,6 @@ void
|
|||||||
md_begin ()
|
md_begin ()
|
||||||
{
|
{
|
||||||
struct h8_opcode *opcode;
|
struct h8_opcode *opcode;
|
||||||
const struct reg_entry *reg;
|
|
||||||
char prev_buffer[100];
|
char prev_buffer[100];
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
@ -164,6 +159,7 @@ md_begin ()
|
|||||||
opcode->length++;
|
opcode->length++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
linkrelax = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -293,15 +289,16 @@ skip_colonthing (ptr, exp, mode)
|
|||||||
if (*ptr == ':')
|
if (*ptr == ':')
|
||||||
{
|
{
|
||||||
ptr++;
|
ptr++;
|
||||||
|
*mode &= ~SIZE;
|
||||||
if (*ptr == '8')
|
if (*ptr == '8')
|
||||||
{
|
{
|
||||||
ptr++;
|
ptr++;
|
||||||
/* ff fill any 8 bit quantity */
|
/* ff fill any 8 bit quantity */
|
||||||
/* exp->X_add_number -= 0x100;*/
|
/* exp->X_add_number -= 0x100;*/
|
||||||
|
*mode |= L_8;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*mode &= ~SIZE;
|
|
||||||
if (*ptr == '2')
|
if (*ptr == '2')
|
||||||
{
|
{
|
||||||
*mode |= L_24;
|
*mode |= L_24;
|
||||||
@ -371,13 +368,12 @@ get_operand (ptr, op, dst, direction)
|
|||||||
char **ptr;
|
char **ptr;
|
||||||
struct h8_op *op;
|
struct h8_op *op;
|
||||||
unsigned int dst;
|
unsigned int dst;
|
||||||
|
int direction;
|
||||||
{
|
{
|
||||||
char *src = *ptr;
|
char *src = *ptr;
|
||||||
op_type mode;
|
op_type mode;
|
||||||
unsigned int num;
|
unsigned int num;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
unsigned int size;
|
|
||||||
|
|
||||||
op->mode = E;
|
op->mode = E;
|
||||||
|
|
||||||
@ -630,7 +626,7 @@ get_specific (opcode, operands)
|
|||||||
int x = operands[i].mode;
|
int x = operands[i].mode;
|
||||||
|
|
||||||
if ((op & (DISP | REG)) == (DISP | REG)
|
if ((op & (DISP | REG)) == (DISP | REG)
|
||||||
&& ((x & DISP | REG) == (DISP | REG)))
|
&& ((x & (DISP | REG)) == (DISP | REG)))
|
||||||
{
|
{
|
||||||
dispreg = operands[i].reg;
|
dispreg = operands[i].reg;
|
||||||
}
|
}
|
||||||
@ -695,13 +691,6 @@ get_specific (opcode, operands)
|
|||||||
&& ((op & SIZE) != (x & SIZE)))
|
&& ((op & SIZE) != (x & SIZE)))
|
||||||
found = 0;
|
found = 0;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else if ((op & ABSMOV) && (x & ABS))
|
|
||||||
{
|
|
||||||
/* An absmov is only
|
|
||||||
/* Ok */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else if ((op & MODE) != (x & MODE))
|
else if ((op & MODE) != (x & MODE))
|
||||||
{
|
{
|
||||||
found = 0;
|
found = 0;
|
||||||
@ -735,13 +724,15 @@ check_operand (operand, width, string)
|
|||||||
if (width == 255
|
if (width == 255
|
||||||
&& (operand->exp.X_add_number & 0xff00) == 0xff00)
|
&& (operand->exp.X_add_number & 0xff00) == 0xff00)
|
||||||
{
|
{
|
||||||
/* Just ignore this one - which happens when trying to
|
/* Just ignore this one - which happens when trying to
|
||||||
fit a 16 bit address truncated into an 8 bit address of something like bset */
|
fit a 16 bit address truncated into an 8 bit address
|
||||||
|
of something like bset. */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
as_warn ("operand %s0x%x out of range.", string, operand->exp.X_add_number);
|
as_warn ("operand %s0x%lx out of range.", string,
|
||||||
}
|
(unsigned long) operand->exp.X_add_number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -849,11 +840,8 @@ build_bytes (this_try, operand)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
char *output = frag_more (this_try->length);
|
char *output = frag_more (this_try->length);
|
||||||
char *output_ptr = output;
|
|
||||||
op_type *nibble_ptr = this_try->data.nib;
|
op_type *nibble_ptr = this_try->data.nib;
|
||||||
char part;
|
|
||||||
op_type c;
|
op_type c;
|
||||||
char high;
|
|
||||||
unsigned int nibble_count = 0;
|
unsigned int nibble_count = 0;
|
||||||
int absat;
|
int absat;
|
||||||
int immat;
|
int immat;
|
||||||
@ -863,7 +851,8 @@ build_bytes (this_try, operand)
|
|||||||
|
|
||||||
if (!(this_try->inbase || Hmode))
|
if (!(this_try->inbase || Hmode))
|
||||||
{
|
{
|
||||||
as_warn ("Opcode `%s' only available on H8/300-H", this_try->name);
|
as_warn ("Opcode `%s' only available in this mode on H8/300-H",
|
||||||
|
this_try->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*nibble_ptr != E)
|
while (*nibble_ptr != E)
|
||||||
@ -888,14 +877,6 @@ build_bytes (this_try, operand)
|
|||||||
{
|
{
|
||||||
nib = dispreg;
|
nib = dispreg;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (c & ABSMOV)
|
|
||||||
{
|
|
||||||
operand[d].mode &= ~ABS;
|
|
||||||
operand[d].mode |= ABSMOV;
|
|
||||||
immat = nibble_count / 2;
|
|
||||||
nib = 0;
|
|
||||||
}
|
|
||||||
else if (c & ABS )
|
else if (c & ABS )
|
||||||
{
|
{
|
||||||
operand[d].mode = c;
|
operand[d].mode = c;
|
||||||
@ -989,8 +970,8 @@ build_bytes (this_try, operand)
|
|||||||
|
|
||||||
if (operand[i].exp.X_add_number & 1)
|
if (operand[i].exp.X_add_number & 1)
|
||||||
{
|
{
|
||||||
as_warn ("branch operand has odd offset (%x)\n",
|
as_warn ("branch operand has odd offset (%lx)\n",
|
||||||
operand->exp.X_add_number);
|
(unsigned long) operand->exp.X_add_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
operand[i].exp.X_add_number =
|
operand[i].exp.X_add_number =
|
||||||
@ -1011,15 +992,8 @@ build_bytes (this_try, operand)
|
|||||||
1,
|
1,
|
||||||
&operand[i].exp,
|
&operand[i].exp,
|
||||||
0,
|
0,
|
||||||
R_RELBYTE);
|
R_MEM_INDIRECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (x & ABSMOV)
|
|
||||||
{
|
|
||||||
/* This mov is either absolute long or thru a memory loc */
|
|
||||||
do_a_fix_imm (output - frag_now->fr_literal + immat, operand + i, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (x & ABSJMP)
|
else if (x & ABSJMP)
|
||||||
{
|
{
|
||||||
/* This jmp may be a jump or a branch */
|
/* This jmp may be a jump or a branch */
|
||||||
@ -1027,8 +1001,8 @@ build_bytes (this_try, operand)
|
|||||||
check_operand (operand + i, Hmode ? 0xffffff : 0xffff, "@");
|
check_operand (operand + i, Hmode ? 0xffffff : 0xffff, "@");
|
||||||
if (operand[i].exp.X_add_number & 1)
|
if (operand[i].exp.X_add_number & 1)
|
||||||
{
|
{
|
||||||
as_warn ("branch operand has odd offset (%x)\n",
|
as_warn ("branch operand has odd offset (%lx)\n",
|
||||||
operand->exp.X_add_number);
|
(unsigned long) operand->exp.X_add_number);
|
||||||
}
|
}
|
||||||
if (!Hmode)
|
if (!Hmode)
|
||||||
operand[i].exp.X_add_number = (short) operand[i].exp.X_add_number;
|
operand[i].exp.X_add_number = (short) operand[i].exp.X_add_number;
|
||||||
@ -1053,8 +1027,6 @@ clever_message (opcode, operand)
|
|||||||
struct h8_opcode *opcode;
|
struct h8_opcode *opcode;
|
||||||
struct h8_op *operand;
|
struct h8_op *operand;
|
||||||
{
|
{
|
||||||
struct h8_opcode *scan = opcode;
|
|
||||||
|
|
||||||
/* Find out if there was more than one possible opccode */
|
/* Find out if there was more than one possible opccode */
|
||||||
|
|
||||||
if ((opcode + 1)->idx != opcode->idx)
|
if ((opcode + 1)->idx != opcode->idx)
|
||||||
@ -1128,7 +1100,6 @@ md_assemble (str)
|
|||||||
{
|
{
|
||||||
char *op_start;
|
char *op_start;
|
||||||
char *op_end;
|
char *op_end;
|
||||||
unsigned int i;
|
|
||||||
struct h8_op operand[2];
|
struct h8_op operand[2];
|
||||||
struct h8_opcode *opcode;
|
struct h8_opcode *opcode;
|
||||||
struct h8_opcode *prev_opcode;
|
struct h8_opcode *prev_opcode;
|
||||||
@ -1340,10 +1311,10 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
md_convert_frag (headers, fragP)
|
md_convert_frag (headers, seg, fragP)
|
||||||
object_headers *headers;
|
object_headers *headers;
|
||||||
|
segT seg;
|
||||||
fragS *fragP;
|
fragS *fragP;
|
||||||
|
|
||||||
{
|
{
|
||||||
printf ("call to md_convert_frag \n");
|
printf ("call to md_convert_frag \n");
|
||||||
abort ();
|
abort ();
|
||||||
@ -1382,16 +1353,9 @@ md_apply_fix (fixP, val)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
md_operand (expressionP)
|
|
||||||
expressionS * expressionP;
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int md_long_jump_size;
|
int md_long_jump_size;
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1411,20 +1375,7 @@ md_number_to_chars (ptr, use, nbytes)
|
|||||||
valueT use;
|
valueT use;
|
||||||
int nbytes;
|
int nbytes;
|
||||||
{
|
{
|
||||||
switch (nbytes)
|
number_to_chars_bigendian (ptr, use, nbytes);
|
||||||
{
|
|
||||||
case 4:
|
|
||||||
*ptr++ = (use >> 24) & 0xff;
|
|
||||||
case 3:
|
|
||||||
*ptr++ = (use >> 16) & 0xff;
|
|
||||||
case 2:
|
|
||||||
*ptr++ = (use >> 8) & 0xff;
|
|
||||||
case 1:
|
|
||||||
*ptr++ = (use >> 0) & 0xff;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
long
|
long
|
||||||
md_pcrel_from (fixP)
|
md_pcrel_from (fixP)
|
||||||
@ -1447,13 +1398,15 @@ tc_reloc_mangle (fix_ptr, intr, base)
|
|||||||
|
|
||||||
/* If this relocation is attached to a symbol then it's ok
|
/* If this relocation is attached to a symbol then it's ok
|
||||||
to output it */
|
to output it */
|
||||||
if (fix_ptr->fx_r_type == RELOC_32)
|
if (fix_ptr->fx_r_type == TC_CONS_RELOC)
|
||||||
{
|
{
|
||||||
/* cons likes to create reloc32's whatever the size of the reloc..
|
/* cons likes to create reloc32's whatever the size of the reloc..
|
||||||
*/
|
*/
|
||||||
switch (fix_ptr->fx_size)
|
switch (fix_ptr->fx_size)
|
||||||
{
|
{
|
||||||
|
case 4:
|
||||||
|
intr->r_type = R_RELLONG;
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
intr->r_type = R_RELWORD;
|
intr->r_type = R_RELWORD;
|
||||||
break;
|
break;
|
||||||
@ -1482,9 +1435,4 @@ tc_reloc_mangle (fix_ptr, intr, base)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tc_coff_sizemachdep ()
|
|
||||||
{
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* end of tc-h8300.c */
|
/* end of tc-h8300.c */
|
||||||
|
Reference in New Issue
Block a user