mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
gas/
2005-05-06 Jan Beulich <jbeulich@novell.com> * cond.c (s_ifb): New. * read.c (potable): Add s_ifb as handler for .ifb and .ifnb. * read.h (s_ifb): Prototype. * doc/as.texinfo: Document .ifb and .ifnb. gas/testsuite/ 2005-05-06 Jan Beulich <jbeulich@novell.com> * gas/all/cond.s: Also test .ifb/.ifnb. * gas/all/cond.d: Adjust.
This commit is contained in:
34
gas/cond.c
34
gas/cond.c
@ -181,6 +181,40 @@ s_if (int arg)
|
||||
demand_empty_rest_of_line ();
|
||||
}
|
||||
|
||||
/* Performs the .ifb (test_blank == 1) and
|
||||
the .ifnb (test_blank == 0) pseudo op. */
|
||||
|
||||
void
|
||||
s_ifb (int test_blank)
|
||||
{
|
||||
struct conditional_frame cframe;
|
||||
|
||||
initialize_cframe (&cframe);
|
||||
|
||||
if (cframe.dead_tree)
|
||||
cframe.ignoring = 1;
|
||||
else
|
||||
{
|
||||
int is_eol;
|
||||
|
||||
SKIP_WHITESPACE ();
|
||||
is_eol = is_end_of_line[(unsigned char) *input_line_pointer];
|
||||
cframe.ignoring = (test_blank == !is_eol);
|
||||
}
|
||||
|
||||
current_cframe = ((struct conditional_frame *)
|
||||
obstack_copy (&cond_obstack, &cframe,
|
||||
sizeof (cframe)));
|
||||
|
||||
if (LISTING_SKIP_COND ()
|
||||
&& cframe.ignoring
|
||||
&& (cframe.previous_cframe == NULL
|
||||
|| ! cframe.previous_cframe->ignoring))
|
||||
listing_list (2);
|
||||
|
||||
ignore_rest_of_line ();
|
||||
}
|
||||
|
||||
/* Get a string for the MRI IFC or IFNC pseudo-ops. */
|
||||
|
||||
static char *
|
||||
|
Reference in New Issue
Block a user