diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-08-14 11:25:34 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2024-08-20 21:23:08 +0200 |
commit | 8e86a6ae413c769d54c5ecaa8686a12ddbc5d1ec (patch) | |
tree | e05fe7622e491ba3f7496000811d3c47e559425c | |
parent | x86: correct .insn with opcode extension and VEX/XOP/EVEX encoding (diff) | |
download | binutils-gdb-8e86a6ae413c769d54c5ecaa8686a12ddbc5d1ec.tar.gz binutils-gdb-8e86a6ae413c769d54c5ecaa8686a12ddbc5d1ec.tar.bz2 binutils-gdb-8e86a6ae413c769d54c5ecaa8686a12ddbc5d1ec.zip |
gas: correct .irpc handling with empty string
Following 69cab370cf66 ("gas: adjust handling of quotes for .irpc") the
closing quote was mistakenly treated as the first quoted character.
(cherry picked from commit cb204acaff5d85f88f1fb006265bc361d566ff2d)
-rw-r--r-- | gas/macro.c | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/macros/irpc-quote.s | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gas/macro.c b/gas/macro.c index a35e1356bbf..d0c90d30e47 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -1389,6 +1389,7 @@ expand_irp (int irpc, size_t idx, sb *in, sb *out, size_t (*get_line) (sb *)) if (idx >= in->len) break; } + continue; } sb_reset (&f.actual); sb_add_char (&f.actual, in->ptr[idx]); diff --git a/gas/testsuite/gas/macros/irpc-quote.s b/gas/testsuite/gas/macros/irpc-quote.s index 0499f6957b4..032619665b9 100644 --- a/gas/testsuite/gas/macros/irpc-quote.s +++ b/gas/testsuite/gas/macros/irpc-quote.s @@ -1,6 +1,6 @@ - .irpc c, " ab" cd " ef" + .irpc c, " ab" cd " ef" "" .print ">\c<" .endr - .irpc c, "12 " 34 "56 " + .irpc c, "" "12 " 34 "56 " .print ">\c<" .endr |