[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/5712] New: gas can't parse ARM .save directives for FPA registe
dimitry at andric dot com
[Bug gas/5712] New: gas can't parse ARM .save directives for FPA registers
1 Feb 2008 23:18:35 -0000
According to the docs here:
you should be able to specify an FPA register in ARM .save directives,
like the following:
sfmfd f4, 1, [sp]!
.save f4, 1
These directives are usually generated by g++. However, if you attempt
to assemble this, using "gas -mfpu=fpa", you'll get:
test.s: Assembler messages:
test.s:2: Error: expected , <constant>
This is because gas apparently doesn't skip the register name when
looking for the following comma.
The function s_arm_unwind_save(), in gas/config/tc-arm.c, peeks ahead
to parse the type of register that follows a .save directive, using
arm_reg_parse_mult(). When it finds a known register, it uses its
type to call the appropriate handler for that type.
Unfortunately, for FPA registers, it calls s_arm_unwind_save_fpa()
*without* advancing the input_line_pointer to just afer the register
name. Since the first thing s_arm_unwind_save_fpa() expects to find
is a comma, it will always fail, with: "expected , <constant>".
Since arm_reg_parse_multi() already advanced the peek pointer to just
after the register name, just setting input_line_pointer to peek is a
nice, one-line fix.
Summary: gas can't parse ARM .save directives for FPA registers
Version: 2.19 (HEAD)
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: dimitry at andric dot com
CC: bug-binutils at gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-omap2-linux-gnueabi
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug gas/5712] New: gas can't parse ARM .save directives for FPA registers,
dimitry at andric dot com <=