summaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-03-23 18:15:49 +0000
committerNick Clifton <nickc@redhat.com>2001-03-23 18:15:49 +0000
commit2479d3d6b7226a46ed262020c86ca3bcd10a681a (patch)
treed26a53cce908d36f0ceb62dc0d4f6b87caf1012e /gas
parentf246bb0a0dc9b0dff588dc8b26b4d5906c58e514 (diff)
downloadbinutils-redhat-2479d3d6b7226a46ed262020c86ca3bcd10a681a.tar.gz
fix_new_exp: Print an error if passed a register.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/write.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 647b2680c2..5be241d045 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2001-03-23 Richard Sandiford <rsandifo@redhat.com>
+
+ * write.c (fix_new_exp): Print an error if passed a register.
+
2001-03-23 Hans-Peter Nilsson <hp@axis.com>
* config/tc-cris.c: Tweak attribution. Fix typos. PIC support.
diff --git a/gas/write.c b/gas/write.c
index b647a11d90..b94c05eed7 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -283,6 +283,10 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
case O_absent:
break;
+ case O_register:
+ as_bad (_("register value used as expression"));
+ break;
+
case O_add:
/* This comes up when _GLOBAL_OFFSET_TABLE_+(.-L0) is read, if
the difference expression cannot immediately be reduced. */