This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] x86: replace Intel syntax parser


On Thu, Apr 16, 2009 at 1:30 AM, Jan Beulich <jbeulich@novell.com> wrote:
> This patch removes the old, ad-hoc (and slightly incomplete) Intel
> syntax parser that was usable only for instruction operands, and
> replaces it with one hooked up to the normal expression parser, thus
> now usable also in expressions used in directives.
>
> There's one particular aspect where masm would reject a construct gas
> now accepts - this is recorded as two "#XXX?"-commented cases in the
> intelbad.[sl] test: masm apparently treats [] as having a higher
> precedence than the unary offset operator, something not easily doable
> in gas' expression handling, which assumes that all unary operators
> have a higher precedence than all binary operators. This is not viewed
> as a problem, however, as the meaning of these constructs is
> unambiguous and would never occur in ported over sources.
>
> gas/
> 2009-04-16 ?Jan Beulich ?<jbeulich@novell.com>
>
> ? ? ? ?* Makefile.am: Add explicit dependency of tc-i386.o on
> ? ? ? ?tc-i386-intel.c.
> ? ? ? ?* Makefile.in: Likewise.
> ? ? ? ?* config/tc-i386.c (i386_finalize_immediate): Declare, broken
> ? ? ? ?out from i386_immediate.
> ? ? ? ?(i386_immediate): Slightly re-arrange, call
> ? ? ? ?i386_finalize_immediate.
> ? ? ? ?(i386_finalize_displacement): Declare, broken out from
> ? ? ? ?i386_displacement.
> ? ? ? ?(i386_displacement): Slightly re-arrange, call
> ? ? ? ?i386_finalize_displacement.
> ? ? ? ?(i386_intel_simplify, i386_intel_parse_name): Declare.
> ? ? ? ?(this_operand): Initialize to -1.
> ? ? ? ?(set_intel_syntax): Set expression rank for O_full_ptr.
> ? ? ? ?(md_assemble): Set this_operand back to -1 after parsing
> ? ? ? ?operands.
> ? ? ? ?(x86_cons): Negate intel_syntax to indicate state. Call
> ? ? ? ?i386_intel_simplify.
> ? ? ? ?(md_operand): Convert if to switch. Handle '[' for Intel
> ? ? ? ?syntax.
> ? ? ? ?(i386_intel_operand): Delete, including all helper functions
> ? ? ? ?and data.
> ? ? ? ?* config/tc-i386-intel.c: New file, all new code.
> ? ? ? ?* config/tc-i386.h (i386_operator): Declare.
> ? ? ? ?(md_operator): Define to i386_operator.
> ? ? ? ?(i386_need_index_operator): Declare.
> ? ? ? ?(md_need_index_operator): Define to i386_need_index_operator.
> ? ? ? ?(O_full_ptr): Define.
>
> gas/testsuite/
> 2009-04-16 ?Jan Beulich ?<jbeulich@novell.com>
>
> ? ? ? ?* gas/i386/equ.s: Adjust.
> ? ? ? ?* gas/i386/equ.d: Remove reference to equ.e.
> ? ? ? ?* gas/i386/equ.e: Delete.
> ? ? ? ?* gas/i386/intel-expr.s: New.
> ? ? ? ?* gas/i386/intel-expr.d: New.
> ? ? ? ?* gas/i386/i386.exp: Run new test.
> ? ? ? ?* gas/i386/intel.s: Adjust.
> ? ? ? ?* gas/i386/intel.e: Remove no longer valid warning messages.
> ? ? ? ?* gas/i386/intel16.s: Adjust.
> ? ? ? ?* gas/i386/intel16.d: Remove reference to intel16.e.
> ? ? ? ?* gas/i386/intel16.e: Delete.
> ? ? ? ?* gas/i386/intelbad.s: Add more tests.
> ? ? ? ?* gas/i386/intelbad.l: Adjust.
> ? ? ? ?* gas/i386/intelok.s: Remove now unneeded equates. Add more
> ? ? ? ?tests.
> ? ? ? ?* gas/i386/intelok.d: Remove reference to intelok.e. Adjust.
> ? ? ? ?* gas/i386/intelok.e: Delete.
> ? ? ? ?* gas/i386/x86_64.s: Adjust.
> ? ? ? ?* gas/i386/x86_64.d: Remove reference to x86_64.e.
> ? ? ? ?* gas/i386/x86_64.e: Delete.
>

Just for the record. i386 changes are OK.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]