aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-alpha.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-06-07 10:23:47 +0000
committerRichard Henderson <rth@redhat.com>1999-06-07 10:23:47 +0000
commitbf29b231782c4f6533dcf65cec243e0d72ec8e2e (patch)
tree590f22c9ccc928c50b31cefc28098852c90bf37f /gas/config/tc-alpha.c
parent32a5c94a565d71084ec0338e3877c4f93365bdf2 (diff)
downloadgdb-bf29b231782c4f6533dcf65cec243e0d72ec8e2e.zip
gdb-bf29b231782c4f6533dcf65cec243e0d72ec8e2e.tar.gz
gdb-bf29b231782c4f6533dcf65cec243e0d72ec8e2e.tar.bz2
* expr.h (struct expressionS): Revert last change; widen X_op.
* config/tc-alpha.c (md_begin): Check the field is wide enough.
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r--gas/config/tc-alpha.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 791f15d..e55a9bc 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -96,8 +96,9 @@ struct alpha_macro
/* Two extra symbols we want to see in our input. This is a blatent
misuse of the expressionS.X_op field. */
-#define O_pregister (O_max+1) /* O_register, but in parentheses */
-#define O_cpregister (O_pregister+1) /* + a leading comma */
+#define O_pregister ((operatorT) (O_max+1)) /* O_register, in parentheses */
+#define O_cpregister ((operatorT) (O_pregister+1)) /* + a leading comma */
+#define O_alpha_max ((operatorT) (O_cpregister+1))
/* Macros for extracting the type and number of encoded register tokens */
@@ -709,6 +710,13 @@ md_begin ()
{
unsigned int i;
+ /* Verify that X_op field is wide enough. */
+ {
+ expressionS e;
+ e.X_op = O_alpha_max;
+ assert (e.X_op == O_alpha_max);
+ }
+
/* Create the opcode hash table */
alpha_opcode_hash = hash_new ();