x86: introduce a state stack for .arch
authorJan Beulich <jbeulich@suse.com>
Wed, 6 Jul 2022 07:22:47 +0000 (09:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 6 Jul 2022 07:22:47 +0000 (09:22 +0200)
commitf68697e82319687871943f949078ed334f188211
tree41da297c91ac333d50f9d2d75a8e61186fea279d
parentae89daecb1326742448fc359ddd64d127477cbc2
x86: introduce a state stack for .arch

When using just slightly non-trivial combinations of .arch, it can be
quite useful to be able to go back to prior state without needing to
re-invoke perhaps many earlier directives and without needing to invoke
perhaps many "negative" ones. Like some other architectures allow
saving (pushing) and restoring (popping) present/prior state.

For now require the same .code<N> to be in effect for ".arch pop" that
was in effect for the corresponding ".arch push".

Also change the global "no_cond_jump_promotion" to be bool, to match the
new struct field.
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/arch-stk.l [new file with mode: 0644]
gas/testsuite/gas/i386/arch-stk.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp