aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-12-03 10:48:16 +0100
committerJan Beulich <jbeulich@suse.com>2024-12-03 10:48:16 +0100
commita3a47415b74d651dba205037cfc0fb600578c255 (patch)
treef854d7061cf2ce771db2c3ed066371bd5eb84bc5 /gas/config
parent5ea62b98d952c28a988b51fbfabbd6d3a11e1694 (diff)
downloadgdb-a3a47415b74d651dba205037cfc0fb600578c255.zip
gdb-a3a47415b74d651dba205037cfc0fb600578c255.tar.gz
gdb-a3a47415b74d651dba205037cfc0fb600578c255.tar.bz2
gas: partly restore how current_location() had worked
Commit 4a826962e760 changed its behavior without saying why, and without putting in place any testcase demonstrating the required behavior. Firmly latch the current position unless deferred-evaluation mode is in effect.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386-intel.c6
-rw-r--r--gas/config/tc-i386.c9
-rw-r--r--gas/config/tc-i386.h4
-rw-r--r--gas/config/tc-mmix.h2
4 files changed, 13 insertions, 8 deletions
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index d6c8eaa..94e3aaf 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -236,13 +236,15 @@ operatorT i386_operator (const char *name, unsigned int operands, char *pc)
return O_absent;
}
-static int i386_intel_parse_name (const char *name, expressionS *e)
+static int i386_intel_parse_name (const char *name,
+ expressionS *e,
+ enum expr_mode mode)
{
unsigned int j;
if (! strcmp (name, "$"))
{
- current_location (e);
+ current_location (e, mode);
return 1;
}
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 922c958..aeb9b97 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -168,7 +168,7 @@ static int i386_finalize_displacement (segT, expressionS *, i386_operand_type,
static int i386_att_operand (char *);
static int i386_intel_operand (char *, int);
static int i386_intel_simplify (expressionS *);
-static int i386_intel_parse_name (const char *, expressionS *);
+static int i386_intel_parse_name (const char *, expressionS *, enum expr_mode);
static const reg_entry *parse_register (const char *, char **);
static const char *parse_insn (const char *, char *, enum parse_mode);
static char *parse_operands (char *, const char *);
@@ -16649,7 +16649,10 @@ parse_register (const char *reg_string, char **end_op)
}
int
-i386_parse_name (char *name, expressionS *e, char *nextcharP)
+i386_parse_name (char *name,
+ expressionS *e,
+ enum expr_mode mode,
+ char *nextcharP)
{
const reg_entry *r = NULL;
char *end = input_line_pointer;
@@ -16674,7 +16677,7 @@ i386_parse_name (char *name, expressionS *e, char *nextcharP)
}
input_line_pointer = end;
*end = 0;
- return intel_syntax ? i386_intel_parse_name (name, e) : 0;
+ return intel_syntax ? i386_intel_parse_name (name, e, mode) : 0;
}
void
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 5ee6694..b2dd8b9 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -191,8 +191,8 @@ extern bool i386_check_label (void);
extern int i386_unrecognized_line (int);
#define tc_unrecognized_line i386_unrecognized_line
-extern int i386_parse_name (char *, expressionS *, char *);
-#define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)
+extern int i386_parse_name (char *, expressionS *, enum expr_mode, char *);
+#define md_parse_name(s, e, m, c) i386_parse_name (s, e, m, c)
extern operatorT i386_operator (const char *name, unsigned int operands, char *);
#define md_operator i386_operator
diff --git a/gas/config/tc-mmix.h b/gas/config/tc-mmix.h
index 5e70617..970c9ef 100644
--- a/gas/config/tc-mmix.h
+++ b/gas/config/tc-mmix.h
@@ -62,7 +62,7 @@ extern int mmix_gnu_syntax;
(! mmix_gnu_syntax \
&& (name[0] == '@' \
? (! is_part_of_name (name[1]) \
- && (current_location (exp), 1)) \
+ && (current_location (exp, mode), 1)) \
: ((name[0] == ':' || ISUPPER (name[0])) \
&& mmix_parse_predefined_name (name, exp))))