This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Inability to use divide symbol in gas
- From: "Hamilton, Ian" <Ian dot Hamilton at gbr dot xerox dot com>
- To: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: Fri, 5 Dec 2003 11:25:24 -0000
- Subject: Inability to use divide symbol in gas
I've run into a problem trying to use the division symbol (/) in expressions
in my assembler files.
Looking back through the mail archive it seems to be a long-standing, known
problem with the i386 version of the assembler. Apparently, the / symbol is
defined as a comment character, which makes it impossible to use it for
division.
Are there any plans to fix this problem, or do we have to live with it?
Is there a commonly accepted work-around? For example, can the preprocessor
be
turned off around that section of source, or is there a configure option
which
allows a version of gas to be built that does not use / for comments?
Cheers,
Ian.
For those that are interested, here's a short source file which demonstrates
the problem. It fails on the assignment to symbol4, complaining that there
is a missing ')'
symbol1 = 20
symbol2 = 10
symbol3 = (symbol1 * symbol2)
symbol4 = (symbol1 / symbol2)
leviathan{ihamilto}~/development/runtime/pre.40.1/Target/TitanCode/Utils>/ho
me/tools/gnu/i386-elf/bin/i386-elf-as -o test.o test.s
test.s: Assembler messages:
test.s:5: Error: missing ')'