From 3ae8dd8d5191ffbedfc70e15e20d8f1c03f6f294 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 10 Dec 2010 14:25:05 +0000 Subject: [PATCH] * config/tc-mips.h (TC_ADDRESS_BYTES): New macro. (mips_address_bytes): New prototype. * config/tc-mips.c (mips_address_bytes): New function. --- gas/ChangeLog | 6 ++++++ gas/config/tc-mips.c | 9 +++++++++ gas/config/tc-mips.h | 3 +++ 3 files changed, 18 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 996c53d8eaa..ae54fcab292 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2010-12-10 Maciej W. Rozycki + + * config/tc-mips.h (TC_ADDRESS_BYTES): New macro. + (mips_address_bytes): New prototype. + * config/tc-mips.c (mips_address_bytes): New function. + 2010-12-09 Maciej W. Rozycki * config/tc-mips.c (mips_ip): Remove dead format specifier code. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index dc610756130..a414c3ac12e 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1234,6 +1234,15 @@ static const pseudo_typeS mips_nonecoff_pseudo_table[] = { NULL, NULL, 0 }, }; +/* Export the ABI address size for use by TC_ADDRESS_BYTES for the + purpose of the `.dc.a' internal pseudo-op. */ + +int +mips_address_bytes (void) +{ + return HAVE_64BIT_ADDRESSES ? 8 : 4; +} + extern void pop_insert (const pseudo_typeS *); void diff --git a/gas/config/tc-mips.h b/gas/config/tc-mips.h index 8b174805d2b..abd8d1e5160 100644 --- a/gas/config/tc-mips.h +++ b/gas/config/tc-mips.h @@ -42,6 +42,9 @@ struct expressionS; #define MAX_RELOC_EXPANSION 3 #define LOCAL_LABELS_FB 1 +#define TC_ADDRESS_BYTES mips_address_bytes +extern int mips_address_bytes (void); + /* Maximum symbol offset that can be encoded in a BFD_RELOC_GPREL16 relocation. */ #define MAX_GPREL_OFFSET (0x7FF0) -- 2.30.2