This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] Add DWARF constant for Borland fastcall calling convention


Hello,

I have a patch to add support for Borland's variant of the fastcall calling convention on i386 to gdb when using DWARF. This calling convention is, afaik, not supported by gcc, but gdb uses gcc's gcc/ dwarf2.h file to import all DWARF attribute values. Hence, I'm submitting this patch to gcc.

I have asked on the dwarf-std mailing list, and there is no official nor de facto informal process to reserve such new attribute values. It is completely up to the "vendor(s)" (FSF/GNU in this case) to define and use them.

The following patch is against svn HEAD. I have no copyright assignment in place (and I only asked for gdb and binutils contracts, forgot about gcc...), but I assume that this patch is trivial enough.

Here's some more background about my gdb patch: http://sourceware.org/ml/gdb-patches/2009-04/msg00057.html

Thanks,


Jonas


PS: Borland's fastcall calling convention is different from both gcc's fastcall and regparm(x) calling conventions (uses three registers, and pushes stack parameters from right to left instead of from left to right).

2009-04-04 Jonas Maebe <jonas.maebe@elis.ugent.be>

Add DWARF attribute value for the "Borland fastcall" calling convention.

* elf/dwarf2.h: Add DW_CC_GNU_borland_fastcall_i386 constant.

--- gcc.org/dwarf2.h	2009-04-04 12:21:55.000000000 +0200
+++ gcc/dwarf2.h	2009-04-04 12:22:36.000000000 +0200
@@ -659,7 +659,8 @@ enum dwarf_calling_convention
     DW_CC_normal = 0x1,
     DW_CC_program = 0x2,
     DW_CC_nocall = 0x3,
-    DW_CC_GNU_renesas_sh = 0x40
+    DW_CC_GNU_renesas_sh = 0x40,
+    DW_CC_GNU_borland_fastcall_i386 = 0x41
   };

#define DW_CC_lo_user 0x40


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