From 84f73d89c43a63f9528fbbe0eb3de65bfa7b185d Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 16 Mar 2000 01:18:13 +0000 Subject: [PATCH] Match r[0..7]_bank operands before normal operands. --- gas/ChangeLog | 5 +++++ gas/config/tc-sh.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 36e055e746d..bc68639459c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2000-03-15 Jonathan Larmour + + * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before + normal operands. + 2000-03-15 Kazu Hirata * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate. diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index 66dbb5b38c3..7d9fb6871c7 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -265,6 +265,13 @@ parse_reg (src, mode, reg) if (src[0] == 'r') { + if (src[1] >= '0' && src[1] <= '7' && strncmp (&src[2], "_bank", 5) == 0 + && ! isalnum ((unsigned char) src[7])) + { + *mode = A_REG_B; + *reg = (src[1] - '0'); + return 7; + } if (src[1] == '1') { if (src[2] >= '0' && src[2] <= '5' @@ -282,13 +289,6 @@ parse_reg (src, mode, reg) *reg = (src[1] - '0'); return 2; } - if (src[1] >= '0' && src[1] <= '7' && strncmp(&src[2], "_bank", 5) == 0 - && ! isalnum ((unsigned char) src[7])) - { - *mode = A_REG_B; - *reg = (src[1] - '0'); - return 7; - } if (src[1] == 'e' && ! isalnum ((unsigned char) src[2])) { -- 2.30.2