x86: replace Reg8, Reg16, Reg32, and Reg64
[deliverable/binutils-gdb.git] / gas / config / obj-coff-seh.c
index 83e8cb669c8e6415aa6b3ca3bb7dfe70361aa111..88ce0fcea4ec2cf507ce7c05c5ead02a54fefc63 100644 (file)
@@ -1,6 +1,5 @@
 /* seh pdata/xdata coff object file format
-   Copyright 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
    This file is part of GAS.
 
@@ -170,6 +169,13 @@ seh_validate_seg (const char *directive)
   return 0;
 }
 
+/* Switch back to the code section, whatever that may be.  */
+static void
+obj_coff_seh_code (int ignored ATTRIBUTE_UNUSED)
+{
+  subseg_set (seh_ctx_cur->code_seg, 0);
+}
+
 static void
 switch_xdata (int subseg, segT code_seg)
 {
@@ -323,8 +329,7 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED)
 
   if (*input_line_pointer == '@')
     {
-      symbol_name = input_line_pointer;
-      name_end = get_symbol_end ();
+      name_end = get_symbol_name (&symbol_name);
 
       seh_ctx_cur->handler.X_op = O_constant;
       seh_ctx_cur->handler.X_add_number = 0;
@@ -337,7 +342,7 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED)
       else
        as_bad (_("unknown constant value '%s' for handler"), symbol_name);
 
-      *input_line_pointer = name_end;
+      (void) restore_line_pointer (name_end);
     }
   else
     expression (&seh_ctx_cur->handler);
@@ -353,8 +358,7 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED)
     {
       do
        {
-         symbol_name = input_line_pointer;
-         name_end = get_symbol_end ();
+         name_end = get_symbol_name (&symbol_name);
 
          if (strcasecmp (symbol_name, "@unwind") == 0)
            seh_ctx_cur->handler_flags |= UNW_FLAG_UHANDLER;
@@ -363,7 +367,7 @@ obj_coff_seh_handler (int what ATTRIBUTE_UNUSED)
          else
            as_bad (_(".seh_handler constant '%s' unknown"), symbol_name);
 
-         *input_line_pointer = name_end;
+         (void) restore_line_pointer (name_end);
        }
       while (skip_whitespace_and_comma (0));
     }
@@ -448,10 +452,9 @@ obj_coff_seh_proc (int what ATTRIBUTE_UNUSED)
 
   SKIP_WHITESPACE ();
 
-  symbol_name = input_line_pointer;
-  name_end = get_symbol_end ();
+  name_end = get_symbol_name (&symbol_name);
   seh_ctx_cur->func_name = xstrdup (symbol_name);
-  *input_line_pointer = name_end;
+  (void) restore_line_pointer (name_end);
 
   demand_empty_rest_of_line ();
 
@@ -480,10 +483,7 @@ void
 obj_coff_seh_do_final (void)
 {
   if (seh_ctx_cur != NULL)
-    {
-      as_bad (_("open SEH entry at end of file (missing .cfi_endproc)"));
-      do_seh_endproc ();
-    }
+    as_bad (_("open SEH entry at end of file (missing .seh_endproc)"));
 }
 
 /* Enter a prologue element into current context (x64).  */
@@ -543,14 +543,13 @@ seh_x64_read_reg (const char *directive, int kind)
   SKIP_WHITESPACE ();
   if (*input_line_pointer == '%')
     ++input_line_pointer;
-  symbol_name = input_line_pointer;
-  name_end = get_symbol_end ();
+  name_end = get_symbol_name (& symbol_name);
 
   for (i = 0; i < 16; i++)
     if (! strcasecmp (regs[i], symbol_name))
       break;
 
-  *input_line_pointer = name_end;
+  (void) restore_line_pointer (name_end);
 
   /* Error if register not found, or EAX used as a frame pointer.  */
   if (i == 16 || (kind == 0 && i == 0))
This page took 0.025203 seconds and 4 git commands to generate.