aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1997-08-18 18:26:42 +0000
committerNick Clifton <nickc@redhat.com>1997-08-18 18:26:42 +0000
commita365cd79ee656018c3702516a6f88faf189ad628 (patch)
treeacd201e7984067e67cf89701623bab1eb90e400a /gas
parentab11a82c2dc79b3572024b78bcef08980ca0c8c5 (diff)
downloadfsf-binutils-gdb-a365cd79ee656018c3702516a6f88faf189ad628.zip
fsf-binutils-gdb-a365cd79ee656018c3702516a6f88faf189ad628.tar.gz
fsf-binutils-gdb-a365cd79ee656018c3702516a6f88faf189ad628.tar.bz2
Add support for v850e and v850eq targets.
Add support for BFD_RELOC_V850_16_PCREL.
Diffstat (limited to 'gas')
-rw-r--r--gas/.Sanitize52
-rw-r--r--gas/ChangeLog27
-rw-r--r--gas/config/tc-v850.c63
3 files changed, 86 insertions, 56 deletions
diff --git a/gas/.Sanitize b/gas/.Sanitize
index 9646785..0070aac 100644
--- a/gas/.Sanitize
+++ b/gas/.Sanitize
@@ -195,6 +195,58 @@ else
fi
done
fi
+if ( echo $* | grep keep\-v850e > /dev/null ) ; then
+ for i in $v850_files ; do
+ if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
+ if [ -n "${verbose}" ] ; then
+ echo Keeping v850e stuff in $i
+ fi
+ fi
+ done
+else
+ for i in $v850_files ; do
+ if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
+ if [ -n "${verbose}" ] ; then
+ echo Removing traces of \"v850e\" from $i...
+ fi
+ cp $i new
+ sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
+ if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+ if [ -n "${verbose}" ] ; then
+ echo Caching $i in .Recover...
+ fi
+ mv $i .Recover
+ fi
+ mv new $i
+ fi
+ done
+fi
+if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
+ for i in $v850_files ; do
+ if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
+ if [ -n "${verbose}" ] ; then
+ echo Keeping v850eq stuff in $i
+ fi
+ fi
+ done
+else
+ for i in $v850_files ; do
+ if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
+ if [ -n "${verbose}" ] ; then
+ echo Removing traces of \"v850eq\" from $i...
+ fi
+ cp $i new
+ sed '/start\-sanitize\-v850eq/,/end-\sanitize\-v850eq/d' < $i > new
+ if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+ if [ -n "${verbose}" ] ; then
+ echo Caching $i in .Recover...
+ fi
+ mv $i .Recover
+ fi
+ mv new $i
+ fi
+ done
+fi
r5900_files="ChangeLog"
if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 26bd7b6..65c16cf 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,30 @@
+Mon Aug 18 11:26:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_apply_fix3): Add support for new 16 bit PC
+ relative reloc.
+
+start-sanitize-v850e
+Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Remove support_v850e flag and command line
+ option.
+
+ * configure.in (emulations): Add support for v850e target
+
+ * configure (emulations): Add support for v850e target
+end-sanitize-v850e
+
+start-sanitize-v850eq
+Mon Aug 18 11:24:21 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Remove support_v850eq flag and command line
+ option.
+
+ * configure.in (emulations): Add support for v850eq target
+
+ * configure (emulations): Add support for v850eq target
+end-sanitize-v850eq
+
Fri Aug 15 14:00:13 1997 Ian Lance Taylor <ian@cygnus.com>
* Makefile.am (check-DEJAGNU): Don't cd into testsuite until after
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index d4dcaa9..944f27b 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -60,12 +60,6 @@ const relax_typeS md_relax_table[] = {
{0x1fffff, -0x200000, 6, 0},
};
-/* start-sanitize-v850e */
-static boolean support_v850e = false;
-/* end-sanitize-v850e */
-/* start-sanitize-v850eq */
-static boolean support_v850eq = false;
-/* end-sanitize-v850eq */
/* local functions */
static unsigned long v850_insert_operand
@@ -450,12 +444,7 @@ md_show_usage (stream)
FILE *stream;
{
fprintf (stream, "V850 options:\n");
-/* start-sanitize-v850e */
- fprintf (stream, " -mcpu=v850e target the V850E processor\n");
-/* end-sanitize-v850e */
-/* start-sanitize-v850eq */
- fprintf (stream, " -mcpu=v850eq target the V850E processor with Quantum's extensions\n");
-/* end-sanitize-v850eq */
+ fprintf (stream, "\tnone at present\n");
}
int
@@ -463,23 +452,6 @@ md_parse_option (c, arg)
int c;
char * arg;
{
-/* start-sanitize-v850e */
- if ((c == 'm') && arg != NULL && (strcmp (arg, "cpu=v850e") == 0))
- {
- support_v850e = true;
- return 1;
- }
-/* end-sanitize-v850e */
-
-/* start-sanitize-v850eq */
- if ((c == 'm') && arg != NULL && (strcmp (arg, "cpu=v850eq") == 0))
- {
- support_v850e = true;
- support_v850eq = true;
- return 1;
- }
-/* end-sanitize-v850eq */
-
return 0;
}
@@ -736,22 +708,6 @@ md_assemble (str)
input_line_pointer = str = start_of_operands;
-/* start-sanitize-v850e */
- if ((opcode->flags & V850E_INSTRUCTION) && ! support_v850e)
- {
- errmsg = "V850E instructions not allowed";
- goto error;
- }
-/* end-sanitize-v850e */
-
-/* start-sanitize-v850eq */
- if ((opcode->flags & V850EQ_INSTRUCTION) && ! support_v850eq)
- {
- errmsg = "V850EQ instructions not allowed";
- goto error;
- }
-/* end-sanitize-v850eq */
-
for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++)
{
const struct v850_operand * operand;
@@ -961,21 +917,21 @@ md_assemble (str)
/* Special case:
If we are assembling a MOV instruction (or a CALLT.... :-)
and the immediate value does not fit into the bits available
- and we are supporting V850e instructions
then create a fake error so that the next MOV instruction
will be selected. This one has a 32 bit immediate field. */
if (((insn & 0x07e0) == 0x0200)
&& ex.X_op == O_constant
- && (ex.X_add_number < (- (1 << (operand->bits - 1))) || ex.X_add_number > ((1 << operand->bits) - 1))
- && support_v850e)
+ && (ex.X_add_number < (- (1 << (operand->bits - 1))) || ex.X_add_number > ((1 << operand->bits) - 1)))
errmsg = "use bigger instruction";
/* end-sanitize-v850e */
}
if (errmsg)
goto error;
-
+
+//fprintf (stderr, "insn: %x, operand %d, op: %d, add_number: %d\n", insn, opindex_ptr - opcode->operands, ex.X_op, ex.X_add_number );
+
switch (ex.X_op)
{
case O_illegal:
@@ -990,13 +946,6 @@ md_assemble (str)
errmsg = "invalid operand";
goto error;
}
-#if 0
- if (ex.X_add_number == 0
- && (operand->shift == 11))
- {
- as_warn ("register 0 being used as destination of instruction" );
- }
-#endif
insn = v850_insert_operand (insn, operand, ex.X_add_number,
(char *) NULL, 0);
break;
@@ -1266,6 +1215,8 @@ md_apply_fix3 (fixp, valuep, seg)
fixp->fx_r_type = BFD_RELOC_V850_22_PCREL;
else if (operand->bits == 9)
fixp->fx_r_type = BFD_RELOC_V850_9_PCREL;
+ else if (operand->bits == 16)
+ fixp->fx_r_type = BFD_RELOC_V850_16_PCREL;
else
{
as_bad_where(fixp->fx_file, fixp->fx_line,