aboutsummaryrefslogtreecommitdiff
path: root/gas/config/bfin-defs.h
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2009-09-03 17:06:38 +0000
committerJie Zhang <jie.zhang@analog.com>2009-09-03 17:06:38 +0000
commitf31bf2c696b9bd0a0d4aff20f7c0f65d87179212 (patch)
tree8c28e418a1bda5de2e3f375ead6219cd85807840 /gas/config/bfin-defs.h
parent118176876bb5ceef6f8d15413602107c157dd106 (diff)
downloadgdb-f31bf2c696b9bd0a0d4aff20f7c0f65d87179212.zip
gdb-f31bf2c696b9bd0a0d4aff20f7c0f65d87179212.tar.gz
gdb-f31bf2c696b9bd0a0d4aff20f7c0f65d87179212.tar.bz2
* config/bfin-defs.h (F_REG_ALL): Remove macro.
(F_REG_HIGH): Redefine. (F_REG_NONE): New macro. (F_REG_LOW): New macro. (REG_CLASS): Enclose macro argument in parentheses when used. (REG_EVEN): Likewise. (IS_H): Use flags. (IS_HCOMPL): Use flags. * config/bfin-lex.l (SP.L, SP.H, FP.L, FP.H): Set flags. (parse_reg): Set flags. (parse_halfreg): Set flags.
Diffstat (limited to 'gas/config/bfin-defs.h')
-rw-r--r--gas/config/bfin-defs.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/gas/config/bfin-defs.h b/gas/config/bfin-defs.h
index 8846a02..213e8bf 100644
--- a/gas/config/bfin-defs.h
+++ b/gas/config/bfin-defs.h
@@ -82,8 +82,9 @@ typedef enum
#define T_NOGROUP 0xa0
/* Flags. */
-#define F_REG_ALL 0x1000
-#define F_REG_HIGH 0x2000 /* Half register: high half. */
+#define F_REG_NONE 0
+#define F_REG_HIGH 1
+#define F_REG_LOW 2
enum machine_registers
{
@@ -180,12 +181,12 @@ enum reg_class
#define REG_SAME(a, b) ((a).regno == (b).regno)
#define REG_EQUAL(a, b) (((a).regno & CODE_MASK) == ((b).regno & CODE_MASK))
-#define REG_CLASS(a) ((a.regno) & 0xf0)
+#define REG_CLASS(a) ((a).regno & 0xf0)
#define IS_A1(a) ((a).regno == REG_A1)
-#define IS_H(a) ((a).regno & F_REG_HIGH ? 1: 0)
-#define IS_EVEN(r) (r.regno % 2 == 0)
+#define IS_H(a) ((a).flags & F_REG_HIGH ? 1: 0)
+#define IS_EVEN(r) ((r).regno % 2 == 0)
#define IS_HCOMPL(a, b) (REG_EQUAL(a, b) && \
- ((a).regno & F_REG_HIGH) != ((b).regno & F_REG_HIGH))
+ ((a).flags & F_REG_HIGH) != ((b).flags & F_REG_HIGH))
/* register type checking. */
#define _TYPECHECK(r, x) (((r).regno & CLASS_MASK) == T_REG_##x)