You should have received a copy of the GNU General Public License
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. */
/*
/* or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP";
-
-const relax_typeS md_relax_table[1];
-
-
static struct hash_control *opcode_hash_control; /* Opcode mnemonics */
/*
md_begin ()
{
struct h8_opcode *opcode;
- const struct reg_entry *reg;
char prev_buffer[100];
int idx = 0;
opcode->length++;
}
+ linkrelax = 1;
}
if (*ptr == ':')
{
ptr++;
+ *mode &= ~SIZE;
if (*ptr == '8')
{
ptr++;
/* ff fill any 8 bit quantity */
/* exp->X_add_number -= 0x100;*/
+ *mode |= L_8;
}
else
{
- *mode &= ~SIZE;
if (*ptr == '2')
{
*mode |= L_24;
char **ptr;
struct h8_op *op;
unsigned int dst;
-
+ int direction;
{
char *src = *ptr;
op_type mode;
unsigned int num;
unsigned int len;
- unsigned int size;
op->mode = E;
int x = operands[i].mode;
if ((op & (DISP | REG)) == (DISP | REG)
- && ((x & DISP | REG) == (DISP | REG)))
+ && ((x & (DISP | REG)) == (DISP | REG)))
{
dispreg = operands[i].reg;
}
&& ((op & SIZE) != (x & SIZE)))
found = 0;
}
-#if 0
- else if ((op & ABSMOV) && (x & ABS))
- {
- /* An absmov is only
- /* Ok */
- }
-#endif
else if ((op & MODE) != (x & MODE))
{
found = 0;
if (width == 255
&& (operand->exp.X_add_number & 0xff00) == 0xff00)
{
- /* Just ignore this one - which happens when trying to
- fit a 16 bit address truncated into an 8 bit address of something like bset */
+ /* Just ignore this one - which happens when trying to
+ fit a 16 bit address truncated into an 8 bit address
+ of something like bset. */
}
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);
+ }
}
}
unsigned int i;
char *output = frag_more (this_try->length);
- char *output_ptr = output;
op_type *nibble_ptr = this_try->data.nib;
- char part;
op_type c;
- char high;
unsigned int nibble_count = 0;
int absat;
int immat;
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)
{
nib = dispreg;
}
-
- else if (c & ABSMOV)
- {
- operand[d].mode &= ~ABS;
- operand[d].mode |= ABSMOV;
- immat = nibble_count / 2;
- nib = 0;
- }
else if (c & ABS )
{
operand[d].mode = c;
if (operand[i].exp.X_add_number & 1)
{
- as_warn ("branch operand has odd offset (%x)\n",
- operand->exp.X_add_number);
+ as_warn ("branch operand has odd offset (%lx)\n",
+ (unsigned long) operand->exp.X_add_number);
}
operand[i].exp.X_add_number =
1,
&operand[i].exp,
0,
- R_RELBYTE);
- }
-
- 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);
+ R_MEM_INDIRECT);
}
-
else if (x & ABSJMP)
{
/* This jmp may be a jump or a branch */
check_operand (operand + i, Hmode ? 0xffffff : 0xffff, "@");
if (operand[i].exp.X_add_number & 1)
{
- as_warn ("branch operand has odd offset (%x)\n",
- operand->exp.X_add_number);
+ as_warn ("branch operand has odd offset (%lx)\n",
+ (unsigned long) operand->exp.X_add_number);
}
if (!Hmode)
operand[i].exp.X_add_number = (short) operand[i].exp.X_add_number;
struct h8_opcode *opcode;
struct h8_op *operand;
{
- struct h8_opcode *scan = opcode;
-
/* Find out if there was more than one possible opccode */
if ((opcode + 1)->idx != opcode->idx)
{
char *op_start;
char *op_end;
- unsigned int i;
struct h8_op operand[2];
struct h8_opcode *opcode;
struct h8_opcode *prev_opcode;
}
void
-md_convert_frag (headers, fragP)
+md_convert_frag (headers, seg, fragP)
object_headers *headers;
+ segT seg;
fragS *fragP;
-
{
printf ("call to md_convert_frag \n");
abort ();
break;
default:
abort ();
-
}
}
-void
-md_operand (expressionP)
- expressionS * expressionP;
-{
-}
-
int md_long_jump_size;
int
valueT use;
int nbytes;
{
- switch (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 ();
- }
+ number_to_chars_bigendian (ptr, use, nbytes);
}
long
md_pcrel_from (fixP)
/* If this relocation is attached to a symbol then it's ok
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..
*/
switch (fix_ptr->fx_size)
{
-
+ case 4:
+ intr->r_type = R_RELLONG;
+ break;
case 2:
intr->r_type = R_RELWORD;
break;
}
-tc_coff_sizemachdep ()
-{
- abort ();
-}
-
/* end of tc-h8300.c */