diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-05-06 06:38:11 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-05-06 06:38:11 +0000 |
commit | 26aca5f60e2dde898fb5e6d71859778f0b786f09 (patch) | |
tree | e1c41eac4e28939c0e5bea623b454151f3cf0809 /gas/cond.c | |
parent | a580b8e05174aa8dd67b0bae41037182aba6b418 (diff) | |
download | gdb-26aca5f60e2dde898fb5e6d71859778f0b786f09.zip gdb-26aca5f60e2dde898fb5e6d71859778f0b786f09.tar.gz gdb-26aca5f60e2dde898fb5e6d71859778f0b786f09.tar.bz2 |
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.
Diffstat (limited to 'gas/cond.c')
-rw-r--r-- | gas/cond.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -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 * |