This is the mail archive of the binutils@sources.redhat.com 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] CFI directives for GAS


Alan Modra told me that:
On Thu, May 15, 2003 at 06:08:45PM +0200, Michal Ludvig wrote:
+/* Codes of CFI instructions taken from Dwarf2 standard. */
+enum cfi_insn { + CFA_nop = 0x0,
+ CFA_set_loc = 0x01,

Use include/elf/dwarf2.h:dwarf_call_frame_info if possible.

The enum cfi_insn has some more items than those defined in dwarf2 standard so I left it in place. I don't initialize it by numbers anymore, but I use DW_CFA_* values from dwarf_call_frame_info.
Is that OK?


+ char *regnames[] = { + "rax", "rbx", "rcx", "rdx",
+ "rdi", "rsi", "rbp", "rsp",
+ "r8", "r9", "r10", "r11",
+ "r12", "r13", "r14", "r15",
+ "rip" };

This is obviously processor dependent. Needs to be split out to an md_* define in tc-i386.h.

Indeed, I forgot it in the common file. It's out now.


+    as_bad ("Can't convert argument to %s.",
+	    resolvereg ? "register number" : "integer");

No internationalization of messages, and better for translation to write: as_bad (resolvereg ? _("can't convert argument to register number") : _("can't convert argument to integer"));

Note also that messages generally don't start with a capital (because
they aren't the start of a sentence), and don't finish with a fullstop.

Done, I wrapped all relevant strings to _("") and removed capitals and full-stops.


Attached is also a documentation (at the end ot the first diff) and a testsuite (separate patch).

Do you like it more now? More comments? Approvals? :-)

Michal Ludvig
--
* SuSE CR, s.r.o     * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz


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