mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-26 19:44:11 +08:00
Allow .seh_pushframe to take an optional [code] parameter
* config/obj-coff-seh.c (obj_coff_seh_pushframe): Allow an optional "code" argument.
This commit is contained in:
parent
b3ea76397a
commit
d039200a7e
@ -1,3 +1,8 @@
|
||||
2021-04-23 Jérôme Gardou <jerome.gardou@gmail.com>
|
||||
|
||||
* config/obj-coff-seh.c (obj_coff_seh_pushframe): Allow an
|
||||
optional "code" argument.
|
||||
|
||||
2021-04-23 Jan Beulich <jbeulich@suse.com>
|
||||
|
||||
* config/tc-i386.c (want_disp32): New.
|
||||
|
@ -582,12 +582,31 @@ obj_coff_seh_pushreg (int what ATTRIBUTE_UNUSED)
|
||||
static void
|
||||
obj_coff_seh_pushframe (int what ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int code = 0;
|
||||
|
||||
if (!verify_context_and_target (".seh_pushframe", seh_kind_x64)
|
||||
|| !seh_validate_seg (".seh_pushframe"))
|
||||
return;
|
||||
|
||||
SKIP_WHITESPACE();
|
||||
|
||||
if (is_name_beginner (*input_line_pointer))
|
||||
{
|
||||
char* identifier;
|
||||
|
||||
get_symbol_name (&identifier);
|
||||
if (strcmp (identifier, "code") != 0)
|
||||
{
|
||||
as_bad(_("invalid argument \"%s\" for .seh_pushframe. Expected \"code\" or nothing"),
|
||||
identifier);
|
||||
return;
|
||||
}
|
||||
code = 1;
|
||||
}
|
||||
|
||||
demand_empty_rest_of_line ();
|
||||
|
||||
seh_x64_make_prologue_element (UWOP_PUSH_MACHFRAME, 0, 0);
|
||||
seh_x64_make_prologue_element (UWOP_PUSH_MACHFRAME, code, 0);
|
||||
}
|
||||
|
||||
/* Add a register save-unwind token to current context. */
|
||||
|
Loading…
Reference in New Issue
Block a user